ssh: allow motiejus from localhost/root
This commit is contained in:
parent
2199bae446
commit
1ad5cd63d5
@ -49,10 +49,19 @@ in {
|
|||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel" "dialout" "video"] ++ cfg.user.extraGroups;
|
extraGroups = ["wheel" "dialout" "video"] ++ cfg.user.extraGroups;
|
||||||
uid = myData.uidgid.motiejus;
|
uid = myData.uidgid.motiejus;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = let
|
||||||
myData.people_pubkeys.motiejus
|
fqdn = "${config.networking.hostName}.${config.networking.domain}";
|
||||||
myData.people_pubkeys.motiejus_work
|
in
|
||||||
];
|
lib.mkMerge [
|
||||||
|
[
|
||||||
|
myData.people_pubkeys.motiejus
|
||||||
|
myData.people_pubkeys.motiejus_work
|
||||||
|
]
|
||||||
|
|
||||||
|
(lib.mkIf (builtins.hasAttr fqdn myData.hosts) [
|
||||||
|
("from=\"127.0.0.1,::1\" " + myData.hosts.${fqdn}.publicKey)
|
||||||
|
])
|
||||||
|
];
|
||||||
}
|
}
|
||||||
// lib.filterAttrs (n: v: n != "extraGroups" && v != null) cfg.user or {};
|
// lib.filterAttrs (n: v: n != "extraGroups" && v != null) cfg.user or {};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user