mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix!: refactored nixosModules
This commit is contained in:
parent
3753271d60
commit
18f7c70bc9
17 changed files with 25 additions and 32 deletions
28
nix/nixosModules/extra/i_am_builder/default.nix
Normal file
28
nix/nixosModules/extra/i_am_builder/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
nix.gc = lib.mkOverride 900 {
|
||||
# Garbage-collect often
|
||||
automatic = true;
|
||||
dates = "*:45";
|
||||
|
||||
# Randomize GC to avoid thundering herd effects.
|
||||
randomizedDelaySec = "1800";
|
||||
|
||||
options = "--delete-older-than 8d";
|
||||
};
|
||||
|
||||
users.users.nix-remote-builder = {
|
||||
isNormalUser = true;
|
||||
group = "nogroup";
|
||||
|
||||
# credit:
|
||||
# https://github.com/nix-community/srvos/blob/main/nixos/roles/nix-remote-builder.nix
|
||||
openssh.authorizedKeys.keys = map (key: ''restrict ${key}'') [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKf9AFsIEjkf0c5Hu73Vr4rKkGKzMkgYBJODw1Vvi2DL root@carbon"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEdzs65v65s5sVEv+BClW7qYb0tWuLOZ4e8lIAActeUq root@bismuth"
|
||||
];
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [ "nix-remote-builder" ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue