2025-04-01 14:46:19 +00:00
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page, on
|
|
|
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
|
|
|
|
|
|
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
|
|
|
|
# https://github.com/nix-community/NixOS-WSL
|
|
|
|
|
2025-04-24 15:23:51 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2025-04-01 14:46:19 +00:00
|
|
|
let
|
2025-04-24 15:23:51 +00:00
|
|
|
cfg = config.services.forgejo;
|
|
|
|
srv = cfg.settings.server;
|
2025-04-01 14:46:19 +00:00
|
|
|
in
|
|
|
|
{
|
2025-04-24 15:23:51 +00:00
|
|
|
imports = [
|
|
|
|
./shared/system.nix
|
|
|
|
./shared/dev_user.nix
|
|
|
|
./shared/docker.nix
|
|
|
|
./shared/ssh.nix
|
2025-04-24 15:59:48 +00:00
|
|
|
|
|
|
|
./dummy-hardware.nix
|
2025-04-24 15:23:51 +00:00
|
|
|
];
|
2025-04-03 09:48:30 +00:00
|
|
|
|
2025-05-05 16:04:08 +00:00
|
|
|
sops = {
|
|
|
|
defaultSopsFile = "./secrets/example.yaml";
|
|
|
|
age = {
|
|
|
|
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25510_key" ];
|
|
|
|
keyFile = "/root/.config/sops/age/keys.txt";
|
|
|
|
generateKey = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2025-04-24 15:23:51 +00:00
|
|
|
users.users = {
|
|
|
|
# connection only via ssh key
|
|
|
|
pipeline = {
|
|
|
|
isNormalUser = true;
|
|
|
|
home = "/home/pipeline";
|
|
|
|
description = "User used by forgejo runners to connect to this system";
|
|
|
|
extraGroups = [ "docker" ];
|
2025-05-05 16:04:08 +00:00
|
|
|
openssh.authorizedKeys.keyFiles = [ config.sops.secrets."foo".path ];
|
2025-04-01 14:46:19 +00:00
|
|
|
};
|
2025-04-24 15:23:51 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|