diff --git a/default.nix b/default.nix index 2a8d007..f01ab85 100644 --- a/default.nix +++ b/default.nix @@ -4,14 +4,14 @@ let # https://github.com/andir/npins?tab=readme-ov-file#using-the-nixpkgs-fetchers src = import ./npins; pkgs = import src.nixpkgs { }; - sources = mapAttrs (k: v: v { inherit pkgs; }) src; + sources = mapAttrs (_: v: v { inherit pkgs; }) src; inherit (pkgs) lib; inherit (lib.filesystem) listFilesRecursive; inherit (lib.strings) hasSuffix; mkSystem = - system: hostname: + hostname: import (src.nixpkgs + "/nixos/lib/eval-config.nix") { specialArgs = { inherit sources; @@ -28,7 +28,7 @@ let }; in { - temperance = mkSystem "x86_64-linux" "temperance"; - hermit = mkSystem "x86_64-linux" "hermit"; - tower = mkSystem "aarch64-linux" "tower"; + temperance = mkSystem "temperance"; + hermit = mkSystem "hermit"; + tower = mkSystem "tower"; } diff --git a/modules/home/hjem.mod.nix b/modules/home/hjem.mod.nix index a6c5e04..43838e6 100644 --- a/modules/home/hjem.mod.nix +++ b/modules/home/hjem.mod.nix @@ -27,7 +27,7 @@ in directory = config.users.users.${username}.home; clobberFiles = mkForce true; }; - extraModules = ((listFilesRecursive ./.) |> filter (hasSuffix ".hjem.nix")); + extraModules = (listFilesRecursive ./.) |> filter (hasSuffix ".hjem.nix"); specialArgs = { inherit sources; }; diff --git a/modules/programs/other/nix-index.mod.nix b/modules/programs/other/nix-index.mod.nix index febcd44..86c94b1 100644 --- a/modules/programs/other/nix-index.mod.nix +++ b/modules/programs/other/nix-index.mod.nix @@ -1,4 +1,3 @@ -{ pkgs, ... }: { programs = { # We have to disable this and use nix-index instead. (Rust >>> Pearl) diff --git a/modules/system/nix/nixpkgs.mod.nix b/modules/system/nix/nixpkgs.mod.nix index 8092b9d..2955c48 100644 --- a/modules/system/nix/nixpkgs.mod.nix +++ b/modules/system/nix/nixpkgs.mod.nix @@ -20,43 +20,41 @@ in readOnly = true; }; - config.nixpkgs.pkgs = ( - import sources.nixpkgs { - hostPlatform = pkgs.stdenv.hostPlatform; - overlays = [ ]; - config = { - # Configuration reference: - # - # Disallow broken packages to be built. - allowBroken = false; + config.nixpkgs.pkgs = import sources.nixpkgs { + inherit (pkgs.stdenv) hostPlatform; + overlays = [ ]; + config = { + # Configuration reference: + # + # Disallow broken packages to be built. + allowBroken = false; - allowUnsupportedSystem = true; + allowUnsupportedSystem = true; - # Warn when config contains an unrecognized attribute. - # This might be useful for getting a better configuration. - warnUndeclaredOptions = true; + # Warn when config contains an unrecognized attribute. + # This might be useful for getting a better configuration. + warnUndeclaredOptions = true; - # Allow unfree packages - allowUnfree = true; + # Allow unfree packages + allowUnfree = true; - # Permitted insecure packages in a system. - # Default to none, add more as necessary. - # Matrix also likes using deprecated libraries, which tend to go into this list. - # permittedInsecurePackages = []; + # Permitted insecure packages in a system. + # Default to none, add more as necessary. + # Matrix also likes using deprecated libraries, which tend to go into this list. + # permittedInsecurePackages = []; - # Whether to set enableParallelBuilding to true by default while - # building nixpkgs packages. Changing the default causes a mass rebuild. - enableParallelBuildingByDefault = false; + # Whether to set enableParallelBuilding to true by default while + # building nixpkgs packages. Changing the default causes a mass rebuild. + enableParallelBuildingByDefault = false; - # Whether to expose old attribute names for compatibility. - # This improves backwards compatibility, - # which I could not care less about in my configuration. - allowAliases = false; + # Whether to expose old attribute names for compatibility. + # This improves backwards compatibility, + # which I could not care less about in my configuration. + allowAliases = false; - # List of derivation warnings to display while rebuilding. - # See: - showDerivationWarnings = [ ]; - }; - } - ); + # List of derivation warnings to display while rebuilding. + # See: + showDerivationWarnings = [ ]; + }; + }; } diff --git a/templates/rust/flake.nix b/templates/rust/flake.nix index c535237..2bc9461 100644 --- a/templates/rust/flake.nix +++ b/templates/rust/flake.nix @@ -20,7 +20,7 @@ ralc = pkgsFor.${system}.callPackage ./nix/package.nix { }; }); - devShells = mapAttrs (system: pkgs: { + devShells = mapAttrs (_: pkgs: { default = pkgs.mkShell { packages = with pkgs; [ cargo