diff --git a/README.md b/README.md index d51e6c5..4e97c35 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Here are some of the interesting files and dirs: |------|---------| | `/home` | [home-manager][home-manager] configuration. | | `/hosts` | Machine specific NixOS configurations. | -| `/hosts/common.nix` | Configuration that is equal for all hosts. | +| `/hosts/common/default.nix` | Configuration that is equal for all hosts. | | `/lib` | Custom lib functions that has not been upstreamed (or should not be) to nixpkgs. I'm trying to phase these out as much as possible. | | `/modules` | Custom nixos modules that I use in my own configuration. If you see options that does not appear in [NixOS Search][nixos-search], they might be defined here. | | `/package-overrides` | Updated or pinned versions of packages that have not been upstreamed to nixpkgs (yet). | diff --git a/flake.nix b/flake.nix index 90456cf..619b921 100644 --- a/flake.nix +++ b/flake.nix @@ -171,7 +171,7 @@ "${home-manager}/nixos" ./modules/machineVars.nix ./modules/socketActivation.nix - ./hosts/common.nix + ./hosts/common ./hosts/${name}/configuration.nix matrix-synapse-next.nixosModules.default diff --git a/hosts/common.nix b/hosts/common/default.nix similarity index 95% rename from hosts/common.nix rename to hosts/common/default.nix index df1ac57..d911421 100644 --- a/hosts/common.nix +++ b/hosts/common/default.nix @@ -2,19 +2,19 @@ let inherit (config) machineVars; in { - sops.defaultSopsFile = ./.. + "/secrets/${config.networking.hostName}.yaml"; + sops.defaultSopsFile = ./../.. + "/secrets/${config.networking.hostName}.yaml"; sops.secrets = { - "ssh/nix-builders/tsuki/key" = { sopsFile = ./../secrets/common.yaml; }; - "ssh/nix-builders/tsuki/pub" = { sopsFile = ./../secrets/common.yaml; }; - "ssh/nix-builders/isvegg/key" = { sopsFile = ./../secrets/common.yaml; }; - "ssh/nix-builders/bob/key" = { sopsFile = ./../secrets/common.yaml; }; + "ssh/nix-builders/tsuki/key" = { sopsFile = ./../../secrets/common.yaml; }; + "ssh/nix-builders/tsuki/pub" = { sopsFile = ./../../secrets/common.yaml; }; + "ssh/nix-builders/isvegg/key" = { sopsFile = ./../../secrets/common.yaml; }; + "ssh/nix-builders/bob/key" = { sopsFile = ./../../secrets/common.yaml; }; # "ssh/nix-builders/isvegg/pub" = { }; - "nix/access-tokens" = { sopsFile = ./../secrets/common.yaml; }; + "nix/access-tokens" = { sopsFile = ./../../secrets/common.yaml; }; "ssh/secret-config/global" = { - sopsFile = ./../secrets/common.yaml; + sopsFile = ./../../secrets/common.yaml; mode = "0444"; }; }; diff --git a/hosts/eisei/configuration.nix b/hosts/eisei/configuration.nix index 68a2e43..cac8639 100644 --- a/hosts/eisei/configuration.nix +++ b/hosts/eisei/configuration.nix @@ -8,7 +8,7 @@ in { ./hardware-configuration.nix ]; - # TODO: See ../common.nix + # TODO: See ../common/default.nix services.xserver.enable = true; services.xserver.displayManager.lightdm.enable = true;