mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 18:41:34 +01:00
Simplify template
This commit is contained in:
parent
dce29185ba
commit
11977d1b5d
1 changed files with 7 additions and 5 deletions
|
|
@ -16,14 +16,14 @@
|
||||||
|
|
||||||
templates =
|
templates =
|
||||||
let
|
let
|
||||||
mkPskFile = key: ''
|
makePskFile = name: ''
|
||||||
[Security]
|
[Security]
|
||||||
Passphrase=${key}
|
Passphrase=${config.sops.placeholder."wlan/${name}/key"}
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"iwd/WLAN-233151.psk".content = mkPskFile "${config.sops.placeholder."wlan/WLAN-233151/key"}";
|
"iwd/WLAN-233151.psk".content = makePskFile "WLAN-233151";
|
||||||
"iwd/Fairphone4.psk".content = mkPskFile "${config.sops.placeholder."wlan/Fairphone4/key"}";
|
"iwd/Fairphone4.psk".content = makePskFile "Fairphone4";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -38,7 +38,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"C /var/lib/iwd/WLAN-233151.psk 0600 root root - ${config.sops.templates."iwd/WLAN-233151.psk".path}"
|
"C /var/lib/iwd/WLAN-233151.psk 0600 root root - ${
|
||||||
|
config.sops.templates."iwd/WLAN-233151.psk".path
|
||||||
|
}"
|
||||||
"C /var/lib/iwd/Fairphone4.psk 0600 root root - ${config.sops.templates."iwd/Fairphone4.psk".path}"
|
"C /var/lib/iwd/Fairphone4.psk 0600 root root - ${config.sops.templates."iwd/Fairphone4.psk".path}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue