treewide: persist rework

This commit is contained in:
LavaDesu 2022-08-09 15:17:30 +07:00
parent 2c733de3b3
commit 4b1483327b
Signed by: cilly
GPG key ID: 6500251E087653C9
6 changed files with 12 additions and 11 deletions

View file

@ -43,7 +43,6 @@ in {
neededForBoot = true; neededForBoot = true;
}; };
"/var/persist" = bind "/persist";
"/var/lib/acme" = bind "/persist/acme"; "/var/lib/acme" = bind "/persist/acme";
"/var/log/journal" = bind "/persist/journal"; "/var/log/journal" = bind "/persist/journal";
"/boot" = (bind "/mnt/image/boot") // { depends = [ "/mnt/image" ]; }; "/boot" = (bind "/mnt/image/boot") // { depends = [ "/mnt/image" ]; };

View file

@ -22,7 +22,7 @@ in {
neededForBoot = true; neededForBoot = true;
}; };
"/var/persist" = bind "/nix/persist"; "/persist" = bind "/nix/persist";
"/var/log/journal" = bind "/nix/persist/journal"; "/var/log/journal" = bind "/nix/persist/journal";
"/boot" = bind "/nix/persist/boot"; "/boot" = bind "/nix/persist/boot";
}; };

View file

@ -1,10 +1,10 @@
{ config, enableGUI, inputs, modules, overlays, ... }: { { config, enableGUI, inputs, modules, overlays, ... }: {
environment.etc = { environment.etc = {
"machine-id".source = "/var/persist/machine-id"; "machine-id".source = "/persist/machine-id";
"ssh/ssh_host_rsa_key".source = "/var/persist/ssh_host_rsa_key"; "ssh/ssh_host_rsa_key".source = "/persist/ssh_host_rsa_key";
"ssh/ssh_host_rsa_key.pub".source = "/var/persist/ssh_host_rsa_key.pub"; "ssh/ssh_host_rsa_key.pub".source = "/persist/ssh_host_rsa_key.pub";
"ssh/ssh_host_ed25519_key".source = "/var/persist/ssh_host_ed25519_key"; "ssh/ssh_host_ed25519_key".source = "/persist/ssh_host_ed25519_key";
"ssh/ssh_host_ed25519_key.pub".source = "/var/persist/ssh_host_ed25519_key.pub"; "ssh/ssh_host_ed25519_key.pub".source = "/persist/ssh_host_ed25519_key.pub";
}; };
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];

View file

@ -15,12 +15,12 @@
hostKeys = [ hostKeys = [
{ {
bits = 4096; bits = 4096;
path = "/var/persist/ssh_host_rsa_key"; path = "/persist/ssh_host_rsa_key";
rounds = 100; rounds = 100;
type = "rsa"; type = "rsa";
} }
{ {
path = "/var/persist/ssh_host_ed25519_key"; path = "/persist/ssh_host_ed25519_key";
rounds = 100; rounds = 100;
type = "ed25519"; type = "ed25519";
} }

2
res/authorized_keys Normal file
View file

@ -0,0 +1,2 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPru5eTBvHJ4ZmrrzPRHCGM09wQP/ZHSaKYalDuBVO15 rin@blossom
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ5l9t8dc6mPsKKYqZlPKvhOdyqz+DS5UOcvHuh3uVGt @strawberry

View file

@ -24,8 +24,8 @@
]; ];
programs.git.signing.signByDefault = lib.mkForce false; programs.git.signing.signByDefault = lib.mkForce false;
programs.zsh.history.path = lib.mkForce "/nix/persist/hana/zsh_history"; programs.zsh.history.path = lib.mkForce "/persist/hana/zsh_history";
home.file.".ssh/authorized_keys".source = config.lib.file.mkOutOfStoreSymlink "/nix/persist/hana/authorized_keys"; home.file.".ssh/authorized_keys".source = ../../res/authorized_keys;
}; };
} }