diff --git a/flake.nix b/flake.nix index b7ae54c..d369795 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,11 @@ extraGitConfigs = [{ path = "${homepath}/.config/mysumo/gitconfig"; }]; }; homeManagerVersion = "24.05"; + localNixCaches = [ + "http://minipc1.lab.internal:5000" + "http://fwlaptop.devices.internal:5000" + ]; + # Libs lib = (import modules/lib.nix { nixpkgs = nixpkgs; home-manager = home-manager; @@ -71,6 +76,7 @@ user = user; systemStateVersion = "23.11"; hostName = "fwbook"; + localNixCaches = localNixCaches; home-manager = { enable = true; version = homeManagerVersion; @@ -112,6 +118,7 @@ darwinConfigurations."asosnovsky-mac" = lib.makeDarwinModule { user = sumoUser; systemStateVersion = 4; + localNixCaches = localNixCaches; system = "x86_64-darwin"; hostName = "asosnovsky-mac"; home-manager = { @@ -128,6 +135,7 @@ nixosConfigurations."hl-bigbox1" = unstableLib.makeNixOsModule { system = "x86_64-linux"; user = user; + localNixCaches = localNixCaches; systemStateVersion = "24.05"; hostName = "hl-bigbox1"; home-manager = { @@ -154,6 +162,7 @@ nixosConfigurations."hl-minipc1" = lib.makeNixOsModule { system = "x86_64-linux"; user = user; + localNixCaches = localNixCaches; systemStateVersion = "23.11"; hostName = "hl-minipc1"; enableNetworkDrives = true; diff --git a/hosts/hl-minipc1.nix b/hosts/hl-minipc1.nix index c38ea30..b673e49 100644 --- a/hosts/hl-minipc1.nix +++ b/hosts/hl-minipc1.nix @@ -12,6 +12,7 @@ fsType = "ext4"; options = [ "nofail" ]; }; + # Services homelab.services.audiobookshelf = { enable = true; host = "0.0.0.0"; @@ -20,4 +21,12 @@ configDir = "/mnt/Data/audiobookshelf/config"; metadtaDir = "/mnt/Data/audiobookshelf/metadata"; }; + services.dockerRegistry = { + enable = true; + storagePath = "/mnt/Data/docker-registry"; + port = 5001; + openFirewall = true; + listenAddress = "0.0.0.0"; + enableDelete = true; + }; } diff --git a/modules/main.nix b/modules/main.nix index bcd3863..4336b26 100644 --- a/modules/main.nix +++ b/modules/main.nix @@ -17,6 +17,7 @@ enable = false; enableDevelopmentKit = false; } +, localNixCaches ? [ ] , ... }: { ... }: { @@ -24,6 +25,7 @@ (import ./nix { user = user; systemStateVersion = systemStateVersion; + localNixCaches = localNixCaches; }) ] ++ (if desktop.enable then [ (import ./desktop ({ user = user; } // desktop)) ] diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 4e65108..6547eba 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -1,4 +1,4 @@ -{ user, systemStateVersion }: +{ user, systemStateVersion, localNixCaches ? [ ] }: { pkgs, ... }: { # Nix core @@ -10,11 +10,11 @@ "https://cache.nixos.org" "https://cache.flox.dev" "https://devenv.cachix.org" - ]; + ] ++ localNixCaches; trusted-substituters = [ "https://cache.flox.dev" "https://devenv.cachix.org" - ]; + ] ++ localNixCaches; trusted-users = [ "root" user.name ]; trusted-public-keys = [ "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="