remove impermanence

This commit is contained in:
Sean Buckley 2021-12-03 21:45:41 -05:00
parent ea7e19c21c
commit 4f5ca30b2d
6 changed files with 52 additions and 78 deletions

View file

@ -1,20 +1,5 @@
{
"nodes": {
"impermanence": {
"locked": {
"lastModified": 1637278200,
"narHash": "sha256-nwPBJpjHU8J0hhZ6l4Ytvi3qhcxXJVy4jOWurmzSv3A=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "0616c64b0ebcf08cc74db7820e74b807274246f6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1638161295,
@ -32,7 +17,6 @@
},
"root": {
"inputs": {
"impermanence": "impermanence",
"nixpkgs": "nixpkgs"
}
}

View file

@ -1,8 +1,7 @@
{
inputs.nixpkgs.url = "nixpkgs/nixos-21.11";
inputs.impermanence.url = "github:nix-community/impermanence";
outputs = { self, nixpkgs, impermanence, ... }:
outputs = { self, nixpkgs, ... }:
let
mypkgs = import ./pkgs;
@ -27,10 +26,7 @@
lib = { inherit forAllSystems getHosts morphHosts; };
nixosModules =
{
inherit pins;
inherit (impermanence.nixosModules) impermanence;
} //
{ inherit pins; } //
nixpkgs.lib.mapAttrs'
(name: type: {
name = nixpkgs.lib.removeSuffix ".nix" name;

View file

@ -6,19 +6,14 @@
hardware = "physical";
};
environment.persistence."/persist" = {
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_rsa_key"
];
directories = [
"/home"
"/var/log"
];
};
environment.etc =
builtins.listToAttrs (map
(name: { inherit name; value.source = "/persist/etc/${name}"; })
[
"machine-id"
"ssh/ssh_host_ed25519_key"
"ssh/ssh_host_rsa_key"
]);
environment.systemPackages = with pkgs; [
wine
@ -42,7 +37,10 @@
"/boot" = { device = "/dev/disk/by-partlabel/_esp"; fsType = "vfat"; };
"/nix" = { device = "cube/locker/nix"; fsType = "zfs"; };
"/persist" = { device = "cube/locker/persist"; fsType = "zfs"; neededForBoot = true; };
};
}
// builtins.listToAttrs (map
(name: { inherit name; value = { device = "/persist${name}"; noCheck = true; options = [ "bind" ]; }; })
[ "/home" "/var/log" ]);
system.stateVersion = "21.05";
}

View file

@ -8,19 +8,15 @@
users.users.root.passwordFile = "/nix/persist/shadow_sean";
users.users.sean.passwordFile = "/nix/persist/shadow_sean";
environment.etc."NetworkManager/system-connections".source =
"/nix/persist/etc/NetworkManager/system-connections";
environment.persistence."/nix/persist" = {
directories = [ "/var/log" ];
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_rsa_key"
];
};
environment.etc =
builtins.listToAttrs (map
(name: { inherit name; value.source = "/nix/persist/etc/${name}"; })
[
"machine-id"
"NetworkManager/system-connections"
"ssh/ssh_host_ed25519_key"
"ssh/ssh_host_rsa_key"
]);
sconfig = {
gnome = true;
@ -40,7 +36,10 @@
"/nix" = { device = "zroot/locker/nix"; fsType = "zfs"; };
"/home" = { device = "zroot/locker/home"; fsType = "zfs"; };
"/boot" = { device = "/dev/disk/by-partlabel/EFI\\x20system\\x20partition"; fsType = "vfat"; };
};
}
// builtins.listToAttrs (map
(name: { inherit name; value = { device = "/nix/persist${name}"; noCheck = true; options = [ "bind" ]; }; })
[ "/var/log" ]);
system.stateVersion = "21.05";
}

View file

@ -8,19 +8,15 @@
users.users.root.passwordFile = "/nix/persist/shadow_sean";
users.users.sean.passwordFile = "/nix/persist/shadow_sean";
environment.etc."NetworkManager/system-connections".source =
"/nix/persist/etc/NetworkManager/system-connections";
environment.persistence."/nix/persist" = {
directories = [ "/var/log" ];
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_rsa_key"
];
};
environment.etc =
builtins.listToAttrs (map
(name: { inherit name; value.source = "/nix/persist/etc/${name}"; })
[
"machine-id"
"NetworkManager/system-connections"
"ssh/ssh_host_ed25519_key"
"ssh/ssh_host_rsa_key"
]);
sconfig = {
gnome = true;
@ -40,7 +36,10 @@
"/nix" = { device = "lenny/locker/nix"; fsType = "zfs"; };
"/home" = { device = "lenny/locker/home"; fsType = "zfs"; };
"/boot" = { device = "/dev/disk/by-partlabel/_esp"; fsType = "vfat"; };
};
}
// builtins.listToAttrs (map
(name: { inherit name; value = { device = "/nix/persist${name}"; noCheck = true; options = [ "bind" ]; }; })
[ "/var/log" ]);
system.stateVersion = "21.11";
}

View file

@ -12,19 +12,14 @@
users.users.root.passwordFile = "/nix/persist/shadow_sean";
users.users.sean.passwordFile = "/nix/persist/shadow_sean";
environment.persistence."/nix/persist" = {
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_rsa_key"
];
directories = [
"/home"
"/var/log"
];
};
environment.etc =
builtins.listToAttrs (map
(name: { inherit name; value.source = "/nix/persist/etc/${name}"; })
[
"machine-id"
"ssh/ssh_host_ed25519_key"
"ssh/ssh_host_rsa_key"
]);
boot = {
loader.systemd-boot.enable = true;
@ -36,7 +31,10 @@
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" ]; };
"/boot" = { device = "/dev/disk/by-partlabel/_esp"; fsType = "vfat"; options = [ "discard" "noatime" ]; };
"/nix" = { device = "/dev/disk/by-partlabel/_nix"; fsType = "ext4"; options = [ "discard" "noatime" ]; };
};
}
// builtins.listToAttrs (map
(name: { inherit name; value = { device = "/nix/persist${name}"; noCheck = true; options = [ "bind" ]; }; })
[ "/home" "/var/log" ]);
system.stateVersion = "21.05";
}