Add ci deploy ssh key to all hosts
This commit is contained in:
parent
975cd43de1
commit
b5d6894321
2 changed files with 22 additions and 12 deletions
|
@ -4,6 +4,14 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
concatLists
|
||||||
|
elem
|
||||||
|
mapAttrsToList
|
||||||
|
mkForce
|
||||||
|
;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./applications.nix
|
./applications.nix
|
||||||
|
@ -35,20 +43,26 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
root.openssh.authorizedKeys.keys =
|
root.openssh.authorizedKeys.keys =
|
||||||
with lib;
|
let
|
||||||
concatLists (
|
wheelUserKeys = concatLists (
|
||||||
mapAttrsToList (
|
mapAttrsToList (
|
||||||
name: user:
|
name: user:
|
||||||
if elem "wheel" user.extraGroups && name != "root" then user.openssh.authorizedKeys.keys else [ ]
|
if elem "wheel" user.extraGroups && name != "root" then user.openssh.authorizedKeys.keys else [ ]
|
||||||
) config.users.users
|
) config.users.users
|
||||||
);
|
);
|
||||||
|
in
|
||||||
|
wheelUserKeys
|
||||||
|
++ [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBS65v7n5ozOUjYGuO/dgLC9C5MUGL5kTnQnvWAYP5B3 ci@git.qo.is"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Disable dependency on xorg
|
# Disable dependency on xorg
|
||||||
# TODO: Set environment.noXlibs on hosts that don't need any x libraries.
|
# TODO: Set environment.noXlibs on hosts that don't need any x libraries.
|
||||||
security.pam.services.su.forwardXAuth = lib.mkForce false;
|
security.pam.services.su.forwardXAuth = mkForce false;
|
||||||
|
|
||||||
# Package management
|
# Package management
|
||||||
nix = {
|
nix = {
|
||||||
|
|
|
@ -13,10 +13,6 @@ with lib;
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBS65v7n5ozOUjYGuO/dgLC9C5MUGL5kTnQnvWAYP5B3 ci@git.qo.is"
|
|
||||||
]; # TODO: Move this key to allow CI deployment for all machines.
|
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
|
|
||||||
system.autoUpgrade.allowReboot = true;
|
system.autoUpgrade.allowReboot = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue