mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
hp: move persistence
This commit is contained in:
parent
61a3231294
commit
f6be47670d
1 changed files with 14 additions and 7 deletions
|
@ -1,4 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
persist = "/nix/persist";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
sconfig = {
|
sconfig = {
|
||||||
gnome = true;
|
gnome = true;
|
||||||
|
@ -7,18 +10,23 @@
|
||||||
wg-home.enable = true;
|
wg-home.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc.machine-id.source = "/var/lib/nixos/machine-id";
|
environment.etc.machine-id.source = "${persist}/machine-id";
|
||||||
|
|
||||||
environment.etc."NetworkManager/system-connections".source =
|
environment.persistence."${persist}/system".directories = [
|
||||||
"/var/lib/nixos/nm-connections";
|
"/etc/NetworkManager/system-connections"
|
||||||
|
"/var/lib/bluetooth"
|
||||||
|
"/var/lib/nixos"
|
||||||
|
"/var/lib/systemd/coredump"
|
||||||
|
"/var/log/journal"
|
||||||
|
];
|
||||||
|
|
||||||
services.openssh.hostKeys = [
|
services.openssh.hostKeys = [
|
||||||
{ type = "ed25519"; path = "/var/lib/nixos/ssh_host_ed25519_key"; }
|
{ type = "ed25519"; path = "${persist}/ssh_host_ed25519_key"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
users.users.sean.passwordFile = "/var/lib/nixos/shadow_sean";
|
users.users.sean.passwordFile = "${persist}/shadow_sean";
|
||||||
users.users.root.passwordFile = "/var/lib/nixos/shadow_sean";
|
users.users.root.passwordFile = "${persist}/shadow_sean";
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
|
@ -33,7 +41,6 @@
|
||||||
"/boot" = { device = "/dev/disk/by-partlabel/EFI\\x20system\\x20partition"; fsType = "vfat"; };
|
"/boot" = { device = "/dev/disk/by-partlabel/EFI\\x20system\\x20partition"; fsType = "vfat"; };
|
||||||
"/home" = { device = "zroot/locker/home"; fsType = "zfs"; };
|
"/home" = { device = "zroot/locker/home"; fsType = "zfs"; };
|
||||||
"/nix" = { device = "zroot/locker/nix"; fsType = "zfs"; };
|
"/nix" = { device = "zroot/locker/nix"; fsType = "zfs"; };
|
||||||
"/var/lib" = { device = "zroot/locker/lib"; fsType = "zfs"; };
|
|
||||||
"/var/log" = { device = "zroot/locker/log"; fsType = "zfs"; };
|
"/var/log" = { device = "zroot/locker/log"; fsType = "zfs"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue