diff --git a/nix/hosts/chunk/default.nix b/nix/hosts/chunk/default.nix index ac8c9f6..685ad90 100644 --- a/nix/hosts/chunk/default.nix +++ b/nix/hosts/chunk/default.nix @@ -11,6 +11,7 @@ in { [ ./hardware-configuration.nix "${inputs.testpkgs}/nixos/modules/services/web-servers/caddy" + ../common.nix ]; sops.defaultSopsFile = ./secrets.yaml; @@ -181,8 +182,6 @@ in { }; }; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - services.vaultwarden = { enable = true; dbBackend = "postgresql"; @@ -237,12 +236,6 @@ in { programs.fuse.userAllowOther = true; - nix.optimise = { - automatic = true; - dates = [ "03:45" ]; - }; - nix.settings.auto-optimise-store = true; - services.hedgedoc = { enable = true; environmentFile = "/run/secrets/hedgedoc"; diff --git a/nix/hosts/common.nix b/nix/hosts/common.nix new file mode 100644 index 0000000..7ffead1 --- /dev/null +++ b/nix/hosts/common.nix @@ -0,0 +1,21 @@ +{lib,config,pkgs, ...}: { + nix = { + settings = { + experimental-features = "nix-command flakes"; + auto-optimise-store = true; + flake-registry = ""; + }; + channel.enable = false; + optimise = { + automatic = true; + dates = ["03:45"]; + }; + gc = { + automatic = true; + dates = "19:00"; + persistent = true; + options = "--delete-older-than 60d"; + }; + }; + time.timeZone = "America/Toronto"; +} diff --git a/nix/hosts/ytnix/default.nix b/nix/hosts/ytnix/default.nix index 0f5dbe9..240ebdd 100644 --- a/nix/hosts/ytnix/default.nix +++ b/nix/hosts/ytnix/default.nix @@ -8,27 +8,9 @@ }: { imports = [ ./hardware-configuration.nix + ../common.nix ]; - nix = { - settings = { - experimental-features = "nix-command flakes"; - auto-optimise-store = true; - flake-registry = ""; - }; - channel.enable = false; - optimise = { - automatic = true; - dates = ["03:45"]; - }; - gc = { - automatic = true; - dates = "19:00"; - persistent = true; - options = "--delete-older-than 60d"; - }; - }; - sops.defaultSopsFile = ./secrets.yaml; sops.defaultSopsFormat = "yaml"; sops.age.keyFile = "/root/.config/sops/age/keys.txt"; @@ -75,7 +57,6 @@ }; }; programs.nm-applet.enable = true; - time.timeZone = "America/Toronto"; security.rtkit.enable = true; services.pipewire = {