Add hydra to my pc
This commit is contained in:
parent
7843d6b729
commit
530b903d52
7 changed files with 29 additions and 11 deletions
|
@ -47,9 +47,6 @@
|
|||
Defaults env_keep += "TMUX"
|
||||
'';
|
||||
|
||||
security.tpm2.enable = true;
|
||||
security.tpm2.abrmd.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./systemd-boot.nix
|
||||
./desktop.nix
|
||||
./services/tpm2.nix
|
||||
./services/hydra.nix
|
||||
];
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" "k10temp" ];
|
||||
|
|
19
config/services/hydra.nix
Normal file
19
config/services/hydra.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./postgres.nix
|
||||
];
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
hydraURL = "http://localhost:3000";
|
||||
notificationSender = "hydra@chir.rs";
|
||||
};
|
||||
services.postgresql.ensureDatabases = [ "hydra" ];
|
||||
services.postgresql.ensureUsers = [
|
||||
{
|
||||
name = "hydra";
|
||||
ensurePermissions = {
|
||||
"DATABASE hydra" = "ALL PRIVILEGES";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
4
config/services/tpm2.nix
Normal file
4
config/services/tpm2.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }: {
|
||||
security.tpm2.enable = true;
|
||||
security.tpm2.abrmd.enable = true;
|
||||
}
|
|
@ -6,6 +6,7 @@
|
|||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./systemd-boot.nix
|
||||
./desktop.nix
|
||||
./services/tpm2.nix
|
||||
];
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
|
|
|
@ -332,11 +332,11 @@
|
|||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1645185725,
|
||||
"narHash": "sha256-dI58jOZ2ny+UUrrA7yyIcMa90zY61+1izvbNx7eZJvI=",
|
||||
"lastModified": 1645190567,
|
||||
"narHash": "sha256-TjwpdmAxSCoqhsirBMQzcr75G7ZAe9rmWx1NMM+8/g8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "997d3f8fcc3dcfaa92082e21a064aa596b55ee5c",
|
||||
"rev": "f3f7067be520c161c8d9234aeed953993b8b47f2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -4,12 +4,7 @@ with lib;
|
|||
|
||||
let
|
||||
cfg = config.services.gitea;
|
||||
opt = options.services.gitea;
|
||||
gitea = cfg.package;
|
||||
pg = config.services.postgresql;
|
||||
useMysql = cfg.database.type == "mysql";
|
||||
usePostgresql = cfg.database.type == "postgres";
|
||||
useSqlite = cfg.database.type == "sqlite3";
|
||||
configFile = pkgs.writeText "app.ini" ''
|
||||
APP_NAME = ${cfg.appName}
|
||||
RUN_USER = ${cfg.user}
|
||||
|
|
Loading…
Reference in a new issue