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": { "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1638161295, "lastModified": 1638161295,
@ -32,7 +17,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"impermanence": "impermanence",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View file

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

View file

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

View file

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

View file

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

View file

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