flake: move nixpkgs config to flake
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / clean-install-build (push) Waiting to run
nix-build / rofi-bluetooth-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-build / slateport-build (push) Waiting to run
nix-build / aly_petalburg-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run

This commit is contained in:
Aly Raffauf 2024-12-15 14:09:58 -05:00
parent 6977b48085
commit 33e8f27b11
2 changed files with 22 additions and 16 deletions

View file

@ -1,4 +1,4 @@
{self, ...}: { {...}: {
nix = { nix = {
gc = { gc = {
automatic = true; automatic = true;
@ -36,12 +36,4 @@
trusted-users = ["aly"]; trusted-users = ["aly"];
}; };
}; };
nixpkgs = {
config.allowUnfree = true; # Allow unfree packages
overlays = [
self.inputs.nur.overlays.default
self.overlays.default
];
};
} }

View file

@ -79,13 +79,19 @@
forAllLinuxSystems = f: forAllLinuxSystems = f:
self.inputs.nixpkgs.lib.genAttrs allLinuxSystems (system: self.inputs.nixpkgs.lib.genAttrs allLinuxSystems (system:
f { f {
pkgs = import self.inputs.nixpkgs {inherit system;}; pkgs = import self.inputs.nixpkgs {
inherit overlays system;
config.allowUnfree = true;
};
}); });
forAllSystems = f: forAllSystems = f:
self.inputs.nixpkgs.lib.genAttrs allSystems (system: self.inputs.nixpkgs.lib.genAttrs allSystems (system:
f { f {
pkgs = import self.inputs.nixpkgs {inherit system;}; pkgs = import self.inputs.nixpkgs {
inherit overlays system;
config.allowUnfree = true;
};
}); });
forAllHosts = self.inputs.nixpkgs.lib.genAttrs [ forAllHosts = self.inputs.nixpkgs.lib.genAttrs [
@ -96,6 +102,11 @@
"rustboro" "rustboro"
"slateport" "slateport"
]; ];
overlays = [
self.inputs.nur.overlays.default
self.overlays.default
];
in { in {
devShells = forAllLinuxSystems ({pkgs}: { devShells = forAllLinuxSystems ({pkgs}: {
default = pkgs.mkShell { default = pkgs.mkShell {
@ -127,11 +138,8 @@
"aly@petalburg" = self.inputs.home-manager.lib.homeManagerConfiguration { "aly@petalburg" = self.inputs.home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = {inherit self;}; extraSpecialArgs = {inherit self;};
pkgs = import self.inputs.nixpkgs { pkgs = import self.inputs.nixpkgs {
overlays = [ inherit overlays;
self.inputs.nur.overlays.default config.allowUnfree = true; # Allow unfree packages
self.overlays.default
];
system = "x86_64-linux"; system = "x86_64-linux";
}; };
@ -184,6 +192,7 @@
host: host:
self.inputs.nixpkgs.lib.nixosSystem { self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit self;}; specialArgs = {inherit self;};
modules = [ modules = [
./hosts/${host} ./hosts/${host}
self.inputs.agenix.nixosModules.default self.inputs.agenix.nixosModules.default
@ -200,6 +209,11 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
}; };
nixpkgs = {
inherit overlays;
config.allowUnfree = true;
};
} }
]; ];
} }