Enable preservation for SIIT-DC
This commit is contained in:
parent
1e91ba677d
commit
44af0493db
3 changed files with 33 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
networking.hostId = "f1636fe0";
|
||||
preservation.enable = true;
|
||||
swapDevices = lib.mkForce [ ];
|
||||
imports = [
|
||||
../../shared/base.nix
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, modulesPath, ... }:
|
||||
{
|
||||
networking.hostId = "f1636fe0";
|
||||
networking.networkmanager.enable = lib.mkForce false;
|
||||
networking.useDHCP = false;
|
||||
systemd.network.enable = true;
|
||||
|
|
|
@ -34,6 +34,35 @@
|
|||
ssss
|
||||
];
|
||||
|
||||
######################################## Preservation ###########################################
|
||||
preservation = {
|
||||
enable = lib.mkDefault false;
|
||||
preserveAt."/persist" = {
|
||||
files = [
|
||||
{
|
||||
file = "/etc/machine-id";
|
||||
inInitrd = true;
|
||||
}
|
||||
{
|
||||
file = "/etc/ssh/ssh_host_rsa_key";
|
||||
how = "symlink";
|
||||
inInitrd = true; # sops-nix
|
||||
}
|
||||
{
|
||||
file = "/etc/ssh/ssh_host_ed25519_key";
|
||||
how = "symlink";
|
||||
inInitrd = true; # sops-nix
|
||||
}
|
||||
];
|
||||
directories = [
|
||||
"/var/lib/systemd/timers"
|
||||
"/var/lib/nixos"
|
||||
"/var/log"
|
||||
];
|
||||
};
|
||||
};
|
||||
systemd.suppressedSystemUnits = [ "systemd-machine-id-commit.service" ];
|
||||
|
||||
######################################## ZSH configuration ######################################
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue