Added nix files
This commit is contained in:
35
modules/common.nix
Normal file
35
modules/common.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Bootloader
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/swapfile"; size = 4096; }];
|
||||
|
||||
# Locales and timezone
|
||||
time.timeZone = "Europe/London";
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
# UFW Firewall
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 ]; # Allow SSH
|
||||
};
|
||||
|
||||
# Enable SSH
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "no";
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
}
|
25
modules/hyprland.nix
Normal file
25
modules/hyprland.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
services.displayManager = {
|
||||
enable = true;
|
||||
defaultSession = "hyprland";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
alacritty # Terminal
|
||||
brave # Browser
|
||||
helix # Text editor
|
||||
rustc cargo # Rust
|
||||
go # Go
|
||||
nodejs # Node.js
|
||||
discord
|
||||
spotify
|
||||
bitwarden
|
||||
];
|
||||
}
|
15
modules/networking.nix
Normal file
15
modules/networking.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
wireless = {
|
||||
enable = true;
|
||||
networks = {
|
||||
"your-SSID" = {
|
||||
psk = "your-wifi-password";
|
||||
};
|
||||
};
|
||||
};
|
||||
dhcp = true;
|
||||
};
|
||||
}
|
15
modules/user.nix
Normal file
15
modules/user.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users."luke-else" = {
|
||||
isNormalUser = true;
|
||||
home = "/home/luke-else";
|
||||
shell = pkgs.bash;
|
||||
extraGroups = [ "wheel" "networkmanager" "docker" ];
|
||||
};
|
||||
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
wheelNeedsPassword = true;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user