diff --git a/flake.nix b/flake.nix index a3baf12..cc8188b 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,6 @@ { - description = "My nix setup"; inputs = { + description = "My nix setup"; + inputs = { nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; }; @@ -63,7 +64,7 @@ }; outputs = - { self + { self , nixpkgs , home-manager , nix-index-database @@ -77,6 +78,7 @@ , ... }@attrs: { packages.x86_64-linux.default = self.nixosConfigurations.iso.config.system.build.isoImage; + hydraJobs.x86_64-linux.default = self.packages.x86_64-linux.default; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; nixosConfigurations = { thinkpad = nixpkgs.lib.nixosSystem { diff --git a/hosts/nuc/default.nix b/hosts/nuc/default.nix index 232b3a9..5aea7c9 100644 --- a/hosts/nuc/default.nix +++ b/hosts/nuc/default.nix @@ -8,6 +8,7 @@ ./modules/adguard ./modules/networks ./modules/backup + ./modules/hydra ./modules/nextcloud ./modules/vaultwarden ./modules/nginx @@ -21,6 +22,10 @@ tmp.useTmpfs = true; }; services.btrfs.autoScrub.enable = true; + nix.settings = { + cores = 3; + auto-optimise-store = true; + }; time.timeZone = "Europe/Berlin"; diff --git a/hosts/nuc/modules/hydra/default.nix b/hosts/nuc/modules/hydra/default.nix new file mode 100644 index 0000000..6d19b06 --- /dev/null +++ b/hosts/nuc/modules/hydra/default.nix @@ -0,0 +1,19 @@ +{ config, ... }: +let + domain = "hydra.rfive.de"; +in +{ + services.hydra = { + enable = true; + port = 4000; + hydraURL = domain; + notificationSender = "hydra@localhost"; + }; + services.nginx.virtualHosts."${domain}" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.services.hydra.port}"; + }; + }; +} diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix index cc0feed..94bf6ef 100755 --- a/hosts/thinkpad/default.nix +++ b/hosts/thinkpad/default.nix @@ -20,7 +20,6 @@ }; nix.settings = { - # cores = 6; # don't clutter the whole system when compiling stuff auto-optimise-store = true; };