diff --git a/README.md b/README.md index 26734c0..759e36e 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,10 @@ If you have a `nixos-rebuild` available on your system it can automatize these t `--target-host` parameters. But there are some pitfalls so look at the `nixos-rebuild` documentation beforehand. ### On the machine +<<<<<<< HEAD + +======= +>>>>>>> d89313e25d9c66bafdaed10bb11716589472bac3 clone this repo to `/etc/nixos/` and `nixos-rebuild boot` or `nixos-rebuild switch` that will select the appropriate machine based on hostname. diff --git a/flake.lock b/flake.lock index 2a7be87..2ad8261 100644 --- a/flake.lock +++ b/flake.lock @@ -33,21 +33,6 @@ "type": "indirect" } }, - "impermanence": { - "locked": { - "lastModified": 1694622745, - "narHash": "sha256-z397+eDhKx9c2qNafL1xv75lC0Q4nOaFlhaU1TINqb8=", - "owner": "nix-community", - "repo": "impermanence", - "rev": "e9643d08d0d193a2e074a19d4d90c67a874d932e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "impermanence", - "type": "github" - } - }, "nixos-mailserver": { "inputs": { "blobs": "blobs", @@ -154,7 +139,6 @@ "root": { "inputs": { "flake-parts": "flake-parts", - "impermanence": "impermanence", "nixos-mailserver": "nixos-mailserver", "nixpkgs": "nixpkgs", "sops-nix": "sops-nix" diff --git a/flake.nix b/flake.nix index 0c61327..727dd91 100644 --- a/flake.nix +++ b/flake.nix @@ -14,9 +14,6 @@ url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - impermanence = { - url = "github:nix-community/impermanence"; - }; }; outputs = inputs@{ flake-parts, ... }: diff --git a/nixos/flake-module.nix b/nixos/flake-module.nix index a995aff..d82fbd4 100644 --- a/nixos/flake-module.nix +++ b/nixos/flake-module.nix @@ -21,7 +21,6 @@ imports = [ (import (./. + "/machines/${name}/configuration.nix") inputs) inputs.sops-nix.nixosModules.sops - inputs.impermanence.nixosModules.impermanence ]; }; in lib.genAttrs machines makeSystem); diff --git a/nixos/modules/impermanence.nix b/nixos/modules/impermanence.nix deleted file mode 100644 index 0f955fd..0000000 --- a/nixos/modules/impermanence.nix +++ /dev/null @@ -1,42 +0,0 @@ -{lib, config, ...} : - -let - inherit (lib) - mkEnableOption - mkIf - mkOption - types - ; - cfg = config.impermanence; -in - -{ -imports = [ ]; - -options.impermanence = { - enable = mkEnableOption "impermanence"; - storagePath = mkOption { - type = types.path; - default = "/persist/persist"; - description = "The path where persistent data is stored"; - }; - name = mkOption { - type = types.str; - default = "persist"; - description = "the name of the persistent data store"; - }; -}; - -config = mkIf cfg.enable { - environment.persistence.${cfg.name} = { - persistentStoragePath = cfg.storagePath; - directories = [ - "/var/log" - "/etc/ssh" - "/var/lib/nixos" - ]; - }; - environment.etc.machine-id.source = "${cfg.storagePath}/machine-id"; -}; - -} diff --git a/nixos/roles/default.nix b/nixos/roles/default.nix index d540660..de4eb17 100644 --- a/nixos/roles/default.nix +++ b/nixos/roles/default.nix @@ -3,7 +3,6 @@ imports = [ ./admins.nix ./nix_keys.nix - ../modules/impermanence.nix ]; nix = { extraOptions = '' @@ -26,8 +25,6 @@ users = { mutableUsers = false; }; -impermanence.enable = true; - sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; environment = {