diff --git a/hosts/common/default.nix b/hosts/common/default.nix new file mode 100644 index 0000000..b53c63e --- /dev/null +++ b/hosts/common/default.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + + imports = [ + ./nix.nix + ]; + +} diff --git a/hosts/common/nix.nix b/hosts/common/nix.nix new file mode 100644 index 0000000..ac50a2b --- /dev/null +++ b/hosts/common/nix.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: +{ + + nix = { + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + settings = { + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + trusted-users = [ "jhemono" ]; + }; + channel.enable = false; + }; + +} diff --git a/hosts/gwiad/configuration.nix b/hosts/gwiad/configuration.nix index 8a02f1a..dbc22a8 100644 --- a/hosts/gwiad/configuration.nix +++ b/hosts/gwiad/configuration.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ../common ./home.nix # Services ./btrbk.nix @@ -87,21 +88,6 @@ environment.variables.EDITOR = "vim"; - # Nix configuration - nix = { - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - settings = { - experimental-features = [ "nix-command" "flakes" ]; - auto-optimise-store = true; - trusted-users = [ "jhemono" ]; - }; - channel.enable = false; - }; - # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/hosts/sesame/configuration.nix b/hosts/sesame/configuration.nix index 057ac65..28a5a97 100644 --- a/hosts/sesame/configuration.nix +++ b/hosts/sesame/configuration.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ../common # Supporting ./buckets.nix ./nginx.nix @@ -69,15 +70,6 @@ environment.variables.EDITOR = "vim"; - # Nix configuration - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - nix.settings.auto-optimise-store = true; - # OpenSSH services.openssh = { enable = true;