diff --git a/flake.nix b/flake.nix index cc358a8..8d80ef3 100644 --- a/flake.nix +++ b/flake.nix @@ -10,10 +10,23 @@ outputs = { nixpkgs, home-manager, ... }: { - nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { + nixosConfigurations.selune = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./nixos/configuration.nix + ./hosts/selune/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.hms = ./home/home.nix; + home-manager.backupFileExtension = "bak"; + } + ]; + }; + nixosConfigurations.shar = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/shar/configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/nixos/configuration.nix b/hosts/selune/configuration.nix similarity index 88% rename from nixos/configuration.nix rename to hosts/selune/configuration.nix index 7380dfc..4954b53 100644 --- a/nixos/configuration.nix +++ b/hosts/selune/configuration.nix @@ -5,6 +5,16 @@ # Use flakes. nix.settings.experimental-features = "nix-command flakes"; + # Automatic updating. + system.autoUpgrade.enable = true; + system.autoUpgrade.dates = "weekly"; + + # Automatic cleanup. + nix.gc.automatic = true; + nix.gc.dates = "daily"; + nix.gc.options = "--delete-older-than 10d"; + nix.settings.auto-optimise-store = true; + # Bootloader. boot.loader = { systemd-boot.enable = true; diff --git a/nixos/hardware-configuration.nix b/hosts/selune/hardware-configuration.nix similarity index 100% rename from nixos/hardware-configuration.nix rename to hosts/selune/hardware-configuration.nix