diff --git a/deploy/colmena.nix b/deploy/colmena.nix index 5af9332..981a85a 100644 --- a/deploy/colmena.nix +++ b/deploy/colmena.nix @@ -17,7 +17,7 @@ in inputs.colmena.lib.makeHive { meta = { nixpkgs = import inputs.nixpkgs { - system = "x86_64-linux"; + localSystem = "x86_64-linux"; }; nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations; diff --git a/flake.nix b/flake.nix index ef27a78..4e70e56 100644 --- a/flake.nix +++ b/flake.nix @@ -77,8 +77,10 @@ (lib.genAttrs hostDirNames ( host: nixpkgs.lib.nixosSystem { - system = import ./hosts/${host}/system.nix; - modules = [ ./hosts/${host} ]; + modules = [ + ./hosts/${host} + { nixpkgs.hostPlatform = import ./hosts/${host}/system.nix; } + ]; specialArgs = { inherit inputs outputs dotsPath; }; @@ -86,14 +88,12 @@ )) // { sd-image-orange-pi-aarch64 = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; modules = [ "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" ./images/sd-image-orange-pi-aarch64.nix { - nixpkgs.crossSystem = { - system = "aarch64-linux"; - }; + nixpkgs.buildPlatform = "x86_64-linux"; + nixpkgs.hostPlatform = "aarch64-linux"; } ]; specialArgs = { @@ -101,14 +101,12 @@ }; }; sd-image-raspberry-pi-aarch64 = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; modules = [ "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" ./images/sd-image-raspberry-pi-aarch64.nix { - nixpkgs.crossSystem = { - system = "aarch64-linux"; - }; + nixpkgs.buildPlatform = "x86_64-linux"; + nixpkgs.hostPlatform = "aarch64-linux"; } ]; specialArgs = { @@ -130,8 +128,10 @@ }; }; - apps.${system}.colmena = inputs.colmena.apps.${system}.default; - colmenaHive = import ./deploy/colmena.nix { + apps.${system}.colmena = inputs.colmena.apps.${system}.default // { + meta.description = "Colmena deployment tool"; + }; + colmena = import ./deploy/colmena.nix { inherit self inputs @@ -142,9 +142,11 @@ formatter.${system} = gitHooks.formatter; devShells.${system} = gitHooks.devShells; - images.sd-image-orange-pi-aarch64 = - self.nixosConfigurations.sd-image-orange-pi-aarch64.config.system.build.sdImage; - images.sd-image-raspberry-pi-aarch64 = - self.nixosConfigurations.sd-image-raspberry-pi-aarch64.config.system.build.sdImage; + legacyPackages.${system} = { + sd-image-orange-pi-aarch64 = + self.nixosConfigurations.sd-image-orange-pi-aarch64.config.system.build.sdImage; + sd-image-raspberry-pi-aarch64 = + self.nixosConfigurations.sd-image-raspberry-pi-aarch64.config.system.build.sdImage; + }; }; } diff --git a/git-hooks.nix b/git-hooks.nix index 9c41948..c18dae7 100644 --- a/git-hooks.nix +++ b/git-hooks.nix @@ -10,7 +10,10 @@ let pre-commit-check = git-hooks.lib.${system}.run { inherit src; hooks = { - nixfmt.enable = true; + nixfmt = { + enable = true; + package = pkgs.nixfmt; + }; statix.enable = true; deadnix.enable = true; }; diff --git a/home/hosts/packages.nix b/home/hosts/packages.nix index ee19410..d8b557a 100644 --- a/home/hosts/packages.nix +++ b/home/hosts/packages.nix @@ -8,7 +8,6 @@ with pkgs; fzf htop jq - nixfmt-rfc-style nmap nodejs_24 nvimpager diff --git a/home/modules/browser/firefox-base.nix b/home/modules/browser/firefox-base.nix index 27ad587..c22f6c3 100644 --- a/home/modules/browser/firefox-base.nix +++ b/home/modules/browser/firefox-base.nix @@ -26,7 +26,7 @@ in }; extensions = { force = true; - packages = with inputs.firefox-addons.packages.${pkgs.system}; [ + packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ duckduckgo-privacy-essentials firefox-color istilldontcareaboutcookies diff --git a/home/modules/nvim.nix b/home/modules/nvim.nix index 032c9aa..f42b151 100644 --- a/home/modules/nvim.nix +++ b/home/modules/nvim.nix @@ -3,7 +3,7 @@ { config = { home.packages = [ - inputs.nvim.packages.${pkgs.system}.nvim + inputs.nvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim ]; }; } diff --git a/hosts/andromache/default.nix b/hosts/andromache/default.nix index 5d0f5ba..7f116b9 100644 --- a/hosts/andromache/default.nix +++ b/hosts/andromache/default.nix @@ -86,7 +86,7 @@ in boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; environment.systemPackages = [ - inputs.colmena.packages.${pkgs.system}.colmena + inputs.colmena.packages.${pkgs.stdenv.hostPlatform.system}.colmena ]; services = { diff --git a/hosts/astyanax/default.nix b/hosts/astyanax/default.nix index 086a29f..a1e0ec6 100644 --- a/hosts/astyanax/default.nix +++ b/hosts/astyanax/default.nix @@ -80,7 +80,7 @@ in }; environment.systemPackages = [ - inputs.colmena.packages.${pkgs.system}.colmena + inputs.colmena.packages.${pkgs.stdenv.hostPlatform.system}.colmena (pkgs.writeShellApplication { name = "wol-andromache"; runtimeInputs = [ pkgs.wakeonlan ]; diff --git a/images/sd-image-raspberry-pi-aarch64.nix b/images/sd-image-raspberry-pi-aarch64.nix index dff2475..5165c01 100644 --- a/images/sd-image-raspberry-pi-aarch64.nix +++ b/images/sd-image-raspberry-pi-aarch64.nix @@ -31,7 +31,7 @@ in hardware.enableRedistributableFirmware = true; - hardware.pulseaudio.enable = true; + services.pulseaudio.enable = true; networking.wireless.enable = true;