diff --git a/hosts/hermes/configuration.nix b/hosts/hermes/configuration.nix index 0988d39..b0870f1 100644 --- a/hosts/hermes/configuration.nix +++ b/hosts/hermes/configuration.nix @@ -9,24 +9,8 @@ nix.settings.experimental-features = ["nix-command" "flakes"]; nixpkgs.config.allowUnfree = true; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - boot.kernelPackages = pkgs.linuxPackages_latest; - - networking.hostName = "Hermes"; - - networking.networkmanager.enable = true; - networking.nameservers = ["1.1.1.1" "1.0.0.1"]; - time.timeZone = "Europe/Berlin"; - users.users.nick = { - isNormalUser = true; - shell = pkgs.zsh; - extraGroups = ["wheel"]; - }; - programs = { zsh = { enable = true; @@ -36,27 +20,6 @@ }; }; - environment.systemPackages = with pkgs; [ - inputs.agenix.packages."${stdenv.hostPlatform.system}".default - neovim - wget - curl - git - fastfetch - rsync - starship - eza - net-tools - alejandra - nixd - yazi - dysk - tmux - btop - ]; - - networking.firewall.enable = true; - age.identityPaths = [ "/etc/ssh/id_ed25519" ]; diff --git a/hosts/hermes/hardware-configuration.nix b/hosts/hermes/hardware-configuration.nix index f764d1b..994dbc4 100644 --- a/hosts/hermes/hardware-configuration.nix +++ b/hosts/hermes/hardware-configuration.nix @@ -1,7 +1,6 @@ { config, lib, - pkgs, modulesPath, ... }: { diff --git a/modules/system/boot.nix b/modules/system/boot.nix new file mode 100644 index 0000000..b7012fc --- /dev/null +++ b/modules/system/boot.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.kernelPackages = pkgs.linuxPackages_latest; +} diff --git a/modules/system/default.nix b/modules/system/default.nix index f18f367..8a5607e 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -1,7 +1,12 @@ -{ pkgs, lib, config, ... }: { - imports = [ - ./garbage-collection.nix + ... +}: { + imports = [ + ./garbage-collection.nix + ./networking.nix + ./packages.nix ./backups.nix - ]; + ./users.nix + ./boot.nix + ]; } diff --git a/modules/system/networking.nix b/modules/system/networking.nix new file mode 100644 index 0000000..fd77188 --- /dev/null +++ b/modules/system/networking.nix @@ -0,0 +1,15 @@ +{...}: { + networking = { + hostName = "Hermes"; + nameservers = ["1.1.1.1" "1.0.0.1"]; + firewall = { + enable = true; + }; + nftables = { + enable = true; + }; + networkmanager = { + enable = true; + }; + }; +} diff --git a/modules/system/packages.nix b/modules/system/packages.nix new file mode 100644 index 0000000..9d2d918 --- /dev/null +++ b/modules/system/packages.nix @@ -0,0 +1,20 @@ +{pkgs, inputs, ...}: { + environment.systemPackages = with pkgs; [ + inputs.agenix.packages."${stdenv.hostPlatform.system}".default + neovim + wget + curl + git + fastfetch + rsync + starship + eza + net-tools + alejandra + nixd + yazi + dysk + tmux + btop + ]; +} diff --git a/modules/system/users.nix b/modules/system/users.nix new file mode 100644 index 0000000..cf77612 --- /dev/null +++ b/modules/system/users.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: { + users.users.nick = { + isNormalUser = true; + shell = pkgs.zsh; + extraGroups = ["wheel"]; + }; +}