From 505f960a53f8fe91c9cdc8adc060272fb6db7143 Mon Sep 17 00:00:00 2001 From: osbm Date: Fri, 7 Nov 2025 09:06:37 +0300 Subject: [PATCH] inherit hell yeah --- modules/home-manager/programs/ssh.nix | 4 ++-- modules/nixos/hardware/disko.nix | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/home-manager/programs/ssh.nix b/modules/home-manager/programs/ssh.nix index f24ad16..fcfeaa1 100644 --- a/modules/home-manager/programs/ssh.nix +++ b/modules/home-manager/programs/ssh.nix @@ -1,7 +1,7 @@ let # define a block that just takes a hostname and returns attrset to not repeat the same fields sshBlock = hostname: { - hostname = hostname; + inherit hostname; user = "osbm"; identityFile = "~/.ssh/id_ed25519"; extraOptions = { @@ -14,7 +14,7 @@ let }; # sshBlockAtreus is the same as sshBlock but with 8090 as the port sshBlockAtreus = hostname: { - hostname = hostname; + inherit hostname; user = "osbm"; identityFile = "~/.ssh/id_ed25519"; port = 8022; diff --git a/modules/nixos/hardware/disko.nix b/modules/nixos/hardware/disko.nix index cba32d1..13aaf3a 100644 --- a/modules/nixos/hardware/disko.nix +++ b/modules/nixos/hardware/disko.nix @@ -35,7 +35,7 @@ in enable = true; port = 2222; # different port to avoid conflicts shell = "/bin/cryptsetup-askpass"; - authorizedKeys = authorizedKeys; + inherit authorizedKeys; hostKeys = [ "/etc/ssh/initrd" ]; }; boot.initrd.secrets = { @@ -208,7 +208,7 @@ in options = { canmount = "off"; mountpoint = "none"; - reservation = cfg.zfs.root.reservation; + inherit (cfg.zfs.root) reservation; }; }; @@ -288,7 +288,7 @@ in options = { canmount = "off"; mountpoint = "none"; - reservation = cfg.zfs.storage.reservation; + inherit (cfg.zfs.storage) reservation; }; };