Added nix files

This commit is contained in:
2025-03-20 15:26:29 +00:00
parent bf0779ae97
commit 5965d43eff
9 changed files with 234 additions and 0 deletions

35
modules/common.nix Normal file
View 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
View 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
View 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
View 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;
};
}