Add auto updates to merlin, mount btcnode disk and minor refactor
This commit is contained in:
parent
6b44db92ca
commit
bc033a9e57
|
@ -3,20 +3,14 @@
|
|||
configVars,
|
||||
lib,
|
||||
config,
|
||||
outputs,
|
||||
...
|
||||
}: let
|
||||
# Disko setup
|
||||
fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence
|
||||
dev = "/dev/disk/by-id/wwn-0x5001b448b5f7cc7f";
|
||||
encrypted = false; # currrently only applies to btrfs
|
||||
btrfsMountDevice =
|
||||
if encrypted
|
||||
then "/dev/mapper/crypted"
|
||||
else "/dev/root_vg/root";
|
||||
|
||||
btrfsMountDevice = "/dev/root_vg/root";
|
||||
impermanence = true;
|
||||
|
||||
pubKeys = lib.filesystem.listFilesRecursive ../common/users/keys;
|
||||
piholeIp = configVars.networking.addresses.pihole.ip;
|
||||
gatewayIp = configVars.networking.addresses.gateway.ip;
|
||||
merlinIp = configVars.networking.addresses.merlin.ip;
|
||||
|
@ -47,6 +41,8 @@ in {
|
|||
|
||||
# Import optional options
|
||||
../common/optional/openssh.nix
|
||||
|
||||
outputs.nixosModules.nixosAutoUpgrade
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
@ -57,12 +53,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
users.users = {
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = lib.lists.forEach pubKeys (key: builtins.readFile key);
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "merlin";
|
||||
nameservers = ["${piholeIp}" "${gatewayIp}" "8.8.8.8"];
|
||||
|
@ -111,21 +101,25 @@ in {
|
|||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# system.services.nixosAutoUpgrade = {
|
||||
# enable = true;
|
||||
# persistent = true;
|
||||
# reboot = false;
|
||||
# pushUpdates = false;
|
||||
# configDir = "/etc/nixos";
|
||||
# onCalendar = "*-*-* 07:00:00";
|
||||
# user = "media";
|
||||
# };
|
||||
#
|
||||
system.services.nixosAutoUpgrade = {
|
||||
enable = true;
|
||||
persistent = false;
|
||||
reboot = true;
|
||||
pushUpdates = false;
|
||||
configDir = "/etc/nixos";
|
||||
onCalendar = "*-*-* 07:00:00";
|
||||
user = "admin";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/btcnode" = {
|
||||
device = "/dev/disk/by-uuid/1dc56ec7-322f-44be-b6ad-79360fdfef93";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
boot.supportedFilesystems = ["zfs"];
|
||||
boot.zfs.forceImportRoot = false;
|
||||
networking.hostId = "18aec5d7";
|
||||
boot.zfs.extraPools = ["deepzfs"];
|
||||
boot.zfs.extraPools = ["deepzfs" "nvme-zpool"];
|
||||
|
||||
services.libinput.enable = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue