fixup! fix(openssh): Actually set pub keys from github
This commit is contained in:
parent
ffcbac2a73
commit
65a30b5283
1 changed files with 14 additions and 7 deletions
|
@ -1,6 +1,18 @@
|
||||||
{ stylix }: { config, pkgs, lib, ... }:
|
{ stylix }: { config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.jconfig;
|
cfg = config.jconfig;
|
||||||
|
keysFromGithub = lib.attrsets.mapAttrs'
|
||||||
|
(username: sha256: {
|
||||||
|
name = "pubkeys/${username}";
|
||||||
|
value = {
|
||||||
|
mode = "0755";
|
||||||
|
source = builtins.fetchurl {
|
||||||
|
inherit sha256;
|
||||||
|
url = "https://github.com/${username}.keys";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
cfg.importSSHKeysFromGithub;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -49,13 +61,8 @@ in
|
||||||
sudo.disabled = false;
|
sudo.disabled = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh.authorizedKeysFiles =
|
environment.etc = keysFromGithub;
|
||||||
lib.mapAttrsToList
|
services.openssh.authorizedKeysFiles = builtins.map (path: "/etc/${path}") (builtins.attrNames keysFromGithub);
|
||||||
(username: sha256: builtins.fetchurl {
|
|
||||||
inherit sha256;
|
|
||||||
url = "https://github.com/${username}.keys";
|
|
||||||
})
|
|
||||||
cfg.importSSHKeysFromGithub;
|
|
||||||
|
|
||||||
# Default shell
|
# Default shell
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue