alyssum/samba: use proper credentials
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run

This commit is contained in:
Cilly Leang 2026-06-17 18:16:21 +10:00
parent d1a8e7222f
commit 4f8249b780
Signed by: cilly
GPG key ID: 6500251E087653C9
4 changed files with 21 additions and 2 deletions

View file

@ -1,6 +1,9 @@
{ config, ... }: {
networking.firewall.allowPing = true;
age.secrets.passwd_smbcilly.file = ../../secrets/passwd_smbcilly.age;
age.secrets.passwd_smbkujira.file = ../../secrets/passwd_smbkujira.age;
users.users.cilly = {
hashedPasswordFile = config.age.secrets.passwd.path;
isNormalUser = true;
@ -11,9 +14,9 @@
};
system.activationScripts = {
init_smbpasswd.text = ''
/run/current-system/sw/bin/printf "$(/run/current-system/sw/bin/cat ${config.age.secrets.passwd.path})\n$(/run/current-system/sw/bin/cat ${config.age.secrets.passwd.path})\n" | /run/current-system/sw/bin/smbpasswd -sa cilly
/run/current-system/sw/bin/printf "$(/run/current-system/sw/bin/cat ${config.age.secrets.passwd_smbcilly.path})\n$(/run/current-system/sw/bin/cat ${config.age.secrets.passwd_smbcilly.path})\n" | /run/current-system/sw/bin/smbpasswd -sa cilly
/run/current-system/sw/bin/printf "$(/run/current-system/sw/bin/cat ${config.age.secrets.passwd_kujira.path})\n$(/run/current-system/sw/bin/cat ${config.age.secrets.passwd_kujira.path})\n" | /run/current-system/sw/bin/smbpasswd -sa kujira
/run/current-system/sw/bin/printf "$(/run/current-system/sw/bin/cat ${config.age.secrets.passwd_smbkujira.path})\n$(/run/current-system/sw/bin/cat ${config.age.secrets.passwd_smbkujira.path})\n" | /run/current-system/sw/bin/smbpasswd -sa kujira
'';
};