feat(hydra): add hydra

This commit is contained in:
zack 2024-10-18 23:59:23 -04:00
parent 3aa8d39a3f
commit 169932121f
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
6 changed files with 88 additions and 22 deletions

View file

@ -149,5 +149,12 @@
agenix.nixosModules.default agenix.nixosModules.default
solaar.nixosModules.default solaar.nixosModules.default
]; ];
# Add this new section
outputs-builder = channels: {
hydraJobs = {
x86_64-linux.earth = self.nixosConfigurations.x86_64-linux.earth.config.system.build.toplevel;
};
};
}; };
} }

View file

@ -105,6 +105,9 @@
pkgs.nix-output-monitor pkgs.nix-output-monitor
pkgs.fastfetch pkgs.fastfetch
pkgs.libreoffice-qt6-fresh
pkgs.signal-desktop
pkgs.nh pkgs.nh
pkgs.dwl pkgs.dwl

View file

@ -29,6 +29,12 @@ return {
}, },
}, },
{ "hrsh7th/nvim-cmp", enabled = false }, { "hrsh7th/nvim-cmp", enabled = false },
{
"jake-stewart/force-cul.nvim",
config = function()
require("force-cul").setup()
end,
},
{ {
"saghen/blink.cmp", "saghen/blink.cmp",
lazy = false, -- lazy loading handled internally lazy = false, -- lazy loading handled internally

View file

@ -9,40 +9,39 @@ with lib.custom; let
cfg = config.services.pm-bridge; cfg = config.services.pm-bridge;
in { in {
options.services.pm-bridge = with types; { options.services.pm-bridge = with types; {
enable = mkBoolOpt false "Enable Protonmail Bridge"; enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the Bridge.";
};
package = lib.mkPackageOption pkgs "protonmail-bridge" {}; nonInteractive = mkOption {
type = types.bool;
default = false;
description = "Start Bridge entirely noninteractively";
};
logLevel = lib.mkOption { logLevel = mkOption {
type = lib.types.nullOr ( type = types.enum ["panic" "fatal" "error" "warn" "info" "debug" "debug-client" "debug-server"];
lib.types.enum [ default = "info";
"panic" description = "The log level";
"fatal"
"error"
"warn"
"info"
"debug"
]
);
default = null;
description = "Log level of the Proton Mail Bridge service. If set to null then the service uses it's default log level.";
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.user.services.protonmail-bridge = { systemd.user.services.protonmail-bridge = {
Unit = { Unit = {
Description = "A Bridge to view Protonmail Messages in your local email client"; Description = "Protonmail Bridge";
After = ["network.target"];
}; };
Service = let
logLevel = lib.optionalString (cfg.logLevel != null) "--log-level ${cfg.logLevel}"; Service = {
in {
Type = "simple";
ExecStart = "${lib.getExe cfg.package} --noninteractive ${logLevel}";
Restart = "always"; Restart = "always";
ExecStart = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --no-window --log-level ${cfg.logLevel}" + optionalString (cfg.nonInteractive) " --noninteractive";
}; };
Install = { Install = {
WantedBy = ["graphical-session.target"]; WantedBy = ["default.target"];
}; };
}; };
}; };

View file

@ -0,0 +1,49 @@
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.sites.hydra;
in {
options.sites.hydra = with types; {
enable = mkBoolOpt false "Enable Hydra";
};
config = mkIf cfg.enable {
services.hydra = {
enable = true;
hydraURL = "https://hydra.zoeys.computer";
useSubstitutes = true;
notificationSender = "hydra@localhost"; # e-mail of hydra service
};
services.nginx.virtualHosts."hydra.zoeys.computer" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:3000";
};
};
nix.settings.allowed-uris = [
"github:"
"git+https://github.com/"
"git+ssh://github.com/"
"git+https://git.zoeys.computer/"
"git+ssh://git.zoeys.computer/"
];
nix.buildMachines = [
{
hostName = "localhost";
protocol = null;
system = "x86_64-linux";
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
maxJobs = 8;
}
];
};
}

View file

@ -37,6 +37,7 @@
services.web.nginx.enable = true; services.web.nginx.enable = true;
services.gh.enable = true; services.gh.enable = true;
services.fail2ban.enable = true; services.fail2ban.enable = true;
sites = { sites = {
cv.enable = true; cv.enable = true;
gitlab.enable = true; gitlab.enable = true;
@ -45,6 +46,7 @@
pterodactyl.enable = true; pterodactyl.enable = true;
search.enable = true; search.enable = true;
map.enable = true; map.enable = true;
hydra.enable = true;
}; };
zmio.blog.enable = true; zmio.blog.enable = true;