Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions nixosConfigurations/asphodel/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
};
};

postDeviceCommands = lib.mkAfter ''
cryptsetup close cryptkey
'';

# Support remote unlock. Run `cryptsetup-askpass` to unlock
network = {
enable = true;
Expand Down
4 changes: 0 additions & 4 deletions nixosConfigurations/elysium/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
};
};

postDeviceCommands = lib.mkAfter ''
cryptsetup close cryptkey
'';

# Support remote unlock. Run `cryptsetup-askpass` to unlock
network = {
enable = true;
Expand Down
5 changes: 0 additions & 5 deletions nixosConfigurations/erebus/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
config,
lib,
pkgs,
modulesPath,
...
Expand Down Expand Up @@ -50,10 +49,6 @@
};
};

postDeviceCommands = lib.mkAfter ''
cryptsetup close cryptkey
'';

# Support remote unlock. Run `cryptsetup-askpass` to unlock
network = {
enable = true;
Expand Down
5 changes: 0 additions & 5 deletions nixosConfigurations/tartarus/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
lib,
pkgs,
modulesPath,
...
Expand Down Expand Up @@ -50,10 +49,6 @@
};
};

boot.initrd.postDeviceCommands = lib.mkAfter ''
cryptsetup close cryptkey
'';

fileSystems = {
"/" = {
device = "styx/local/root";
Expand Down
1 change: 1 addition & 0 deletions nixosModules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
imports = [
./_1password.nix
./knownHosts.nix
./luks.nix
./nixConfig.nix
./pihole.nix
./tailscale.nix
Expand Down
14 changes: 14 additions & 0 deletions nixosModules/luks.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ ... }:

{
boot.initrd.systemd.services = {
cryptkey-close = {
script = ''
set -x
systemd-cryptsetup detach cryptkey || echo cannot detach cryptkey
'';
serviceConfig.Type = "oneshot";
wantedBy = [ "initrd-switch-root.target" ];
};
};
}
7 changes: 7 additions & 0 deletions nixosModules/tailscale.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@ in
trustedInterfaces = [ cfg.interfaceName ];
checkReversePath = "loose";
};

# For some reason tailscale started failing at startup and this wires things up to force the tun
# module to be enabled
systemd.services.tailscaled = {
after = [ "modprobe@tun.service" ];
wants = [ "modprobe@tun.service" ];
};
};
}
Loading