From 24d2c6bf88e4d8fb8b36b69dd5e8965b139c8a33 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Fri, 31 Mar 2023 17:38:15 -0700 Subject: [PATCH] Updated server configuration --- flake.nix | 23 +++++++++++++++++++ .../{nixsserver => Alaska}/configuration.nix | 7 +----- hosts/Alaska/containers/default.nix | 0 hosts/{nixsserver => Alaska}/default.nix | 2 ++ hosts/nixsserver/containers/default.nix | 5 ---- 5 files changed, 26 insertions(+), 11 deletions(-) rename hosts/{nixsserver => Alaska}/configuration.nix (84%) create mode 100644 hosts/Alaska/containers/default.nix rename hosts/{nixsserver => Alaska}/default.nix (99%) delete mode 100644 hosts/nixsserver/containers/default.nix diff --git a/flake.nix b/flake.nix index 3ecbe09..3f66feb 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,29 @@ inherit (nixpkgs) lib; inherit inputs nixpkgs home-manager user kmonad ; + # Home server + Alaska = lib.nixossystem { + inherit system; + specialArgs = { inherit user; }; + + modules = [ + { + networking.hostName = "Alaska"; + } + ./hosts/Alaska + ./hosts/Alaska/configuration.nix + home-manager.nixosModules.home-manager { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = { inherit user; }; + users.${user} = import ./users/${user}.nix; + }; + } + ]; + }; + + NicksNixLaptop = lib.nixosSystem { inherit system; specialArgs = { inherit user; }; diff --git a/hosts/nixsserver/configuration.nix b/hosts/Alaska/configuration.nix similarity index 84% rename from hosts/nixsserver/configuration.nix rename to hosts/Alaska/configuration.nix index 69d85ad..6919b2f 100644 --- a/hosts/nixsserver/configuration.nix +++ b/hosts/Alaska/configuration.nix @@ -1,7 +1,3 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - { config, lib, pkgs, user, inputs, ... }: { @@ -12,10 +8,9 @@ nix.settings.auto-optimise-store = true; nixpkgs.config.allowUnfree = true; - system.autoUpgrade.enable = true; nix.gc = { automatic = true; - options = "--delete-generations 8d"; + options = "--delete-generations 20d"; }; programs.zsh.enable = true; diff --git a/hosts/Alaska/containers/default.nix b/hosts/Alaska/containers/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/hosts/nixsserver/default.nix b/hosts/Alaska/default.nix similarity index 99% rename from hosts/nixsserver/default.nix rename to hosts/Alaska/default.nix index b8d7f9d..dcb59ec 100644 --- a/hosts/nixsserver/default.nix +++ b/hosts/Alaska/default.nix @@ -1,5 +1,7 @@ + { config, lib, pkgs, ... }: + { imports = [ (import ./hardware-configuration.nix) ]; diff --git a/hosts/nixsserver/containers/default.nix b/hosts/nixsserver/containers/default.nix deleted file mode 100644 index 865d469..0000000 --- a/hosts/nixsserver/containers/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - -}