Add declarative ssh known hosts
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -4,14 +4,5 @@
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
environment.persistence."/persist"."${home}/.ssh/known_hosts" = { };
|
||||
|
||||
home-manager.users.${user} = {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
userKnownHostsFile = "${home}/.ssh/known_hosts/default";
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.rules = [ "d ${home}/.ssh/known_hosts 0755 ${user} users" ];
|
||||
};
|
||||
home-manager.users.${user}.programs.ssh.enable = true;
|
||||
}
|
||||
|
@@ -10,6 +10,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
selfLib = inputs.self.lib.${system};
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
@@ -64,7 +65,7 @@ in
|
||||
"spotify/prefs.init" = {
|
||||
source = ./config/prefs;
|
||||
onChange = ''
|
||||
${config.lib.runtime.merge.keyValue} "${home}/.config/spotify/prefs.init" "${home}/.config/spotify/prefs"
|
||||
${selfLib.runtime.merge.keyValue} "${home}/.config/spotify/prefs.init" "${home}/.config/spotify/prefs"
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -72,7 +73,7 @@ in
|
||||
source = ./config/prefs-user;
|
||||
onChange = ''
|
||||
user = $(cat "${hmConfig.sops.secrets."spotify/username".path}")
|
||||
${config.lib.runtime.merge.keyValue} "${home}/.config/spotify/prefs-user.init" "${home}/.config/spotify/Users/''${user}-user/prefs"
|
||||
${selfLib.runtime.merge.keyValue} "${home}/.config/spotify/prefs-user.init" "${home}/.config/spotify/Users/''${user}-user/prefs"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user