From 55e04ea09e04808ca227f09e29fb904ab3dbfd47 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Wed, 21 May 2025 14:35:59 +0200 Subject: [PATCH 1/6] flake: add aarch64-linux to systems --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index b5af16a..affc70b 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ nixpkgs, ... } @ inputs: let - forAllSystems = nixpkgs.lib.genAttrs ["x86_64-linux"]; + forAllSystems = nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"]; pkgsForEach = nixpkgs.legacyPackages; in { packages = forAllSystems (system: { From 7b375439bb04b67ceb2cbaa3983eb01ce746f444 Mon Sep 17 00:00:00 2001 From: Jacob Birkett Date: Sat, 31 May 2025 12:19:50 -0700 Subject: [PATCH 2/6] flake: formatter: set to alejandra --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index affc70b..ab6d122 100644 --- a/flake.nix +++ b/flake.nix @@ -22,5 +22,7 @@ superfreq = import ./nix/module.nix inputs; default = self.nixosModules.superfreq; }; + + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); }; } From 6b1af5cbabef28541748bfc88c8ff1e7b9751d65 Mon Sep 17 00:00:00 2001 From: Jacob Birkett Date: Sat, 31 May 2025 12:25:28 -0700 Subject: [PATCH 3/6] flake: pkgsForEach: replace legacyPackages with manual import --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index affc70b..135a05a 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,10 @@ ... } @ inputs: let forAllSystems = nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"]; - pkgsForEach = nixpkgs.legacyPackages; + pkgsForEach = forAllSystems (system: + import nixpkgs { + localSystem.system = system; + }); in { packages = forAllSystems (system: { superfreq = pkgsForEach.${system}.callPackage ./nix/package.nix {}; From 08c51b6296d868c77724b4ccec091e75f42a999a Mon Sep 17 00:00:00 2001 From: Jacob Birkett Date: Sat, 31 May 2025 12:27:32 -0700 Subject: [PATCH 4/6] flake: overlays: add superfreq and default --- flake.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flake.nix b/flake.nix index 135a05a..8318810 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,13 @@ localSystem.system = system; }); in { + overlays = { + superfreq = final: _: { + superfreq = final.callPackage ./nix/package.nix {}; + }; + default = self.overlays.superfreq; + }; + packages = forAllSystems (system: { superfreq = pkgsForEach.${system}.callPackage ./nix/package.nix {}; default = self.packages.${system}.superfreq; From 3caaa22f3efeba6e3cf3a2a204aa015fb4264394 Mon Sep 17 00:00:00 2001 From: Jacob Birkett Date: Sat, 31 May 2025 12:43:55 -0700 Subject: [PATCH 5/6] flake: packages: inherit from default overlay --- flake.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 8318810..4c012bb 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ pkgsForEach = forAllSystems (system: import nixpkgs { localSystem.system = system; + overlays = [self.overlays.default]; }); in { overlays = { @@ -19,10 +20,12 @@ default = self.overlays.superfreq; }; - packages = forAllSystems (system: { - superfreq = pkgsForEach.${system}.callPackage ./nix/package.nix {}; - default = self.packages.${system}.superfreq; - }); + packages = + nixpkgs.lib.mapAttrs (system: pkgs: { + inherit (pkgs) superfreq; + default = self.packages.${system}.superfreq; + }) + pkgsForEach; devShells = forAllSystems (system: { default = pkgsForEach.${system}.callPackage ./nix/shell.nix {}; From 0f3d5d81dd96a25642ca7239a17843d5e9639217 Mon Sep 17 00:00:00 2001 From: Jacob Birkett Date: Sat, 31 May 2025 13:11:25 -0700 Subject: [PATCH 6/6] flake: devShells: use same pkgs as for packages output --- flake.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 4c012bb..96f329d 100644 --- a/flake.nix +++ b/flake.nix @@ -27,9 +27,11 @@ }) pkgsForEach; - devShells = forAllSystems (system: { - default = pkgsForEach.${system}.callPackage ./nix/shell.nix {}; - }); + devShells = + nixpkgs.lib.mapAttrs (system: pkgs: { + default = pkgs.callPackage ./nix/shell.nix {}; + }) + pkgsForEach; nixosModules = { superfreq = import ./nix/module.nix inputs;