forked from Bos55/nix-config
feat(ci): implement automated deployment pipeline with deploy-rs
This commit is contained in:
parent
de1ee54b8b
commit
33fcc55bf5
17 changed files with 274 additions and 76 deletions
|
|
@ -3,7 +3,19 @@
|
|||
let
|
||||
cfg = config.homelab.users.deploy;
|
||||
in {
|
||||
options.homelab.users.deploy.enable = lib.mkEnableOption "user Deploy";
|
||||
options.homelab.users.deploy = {
|
||||
enable = lib.mkEnableOption "user Deploy";
|
||||
|
||||
authorizedKeys = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
description = ''
|
||||
Additional SSH public keys authorized for the deploy user.
|
||||
The CI runner key should be provided as a base key; personal
|
||||
workstation keys can be appended here per host or globally.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users = {
|
||||
|
|
@ -21,6 +33,9 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
# Allow the deploy user to push closures to the nix store
|
||||
nix.settings.trusted-users = [ "deploy" ];
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
groups = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue