diff --git a/2configs/nixpkgs-config.nix b/2configs/nixpkgs-config.nix new file mode 100644 index 0000000..4ac4514 --- /dev/null +++ b/2configs/nixpkgs-config.nix @@ -0,0 +1,21 @@ +{lib, self, inputs, config, ... }:{ + nixpkgs = { + config.allowUnfree = true; + config.packageOverrides = lib.mkForce (pkgs: { tinc = pkgs.tinc_pre; }); + config.allowUnfreePredicate = pkg: lib.packageName pkg == "unrar"; + config.android_sdk.accept_license = true; + config.oraclejdk.accept_license = true; + overlays = [ + self.overlays.default + inputs.nix-writers.overlays.default + (import (inputs.stockholm.inputs.nix-writers + "/pkgs")) + (this: super: { + inherit (this.writers) writeDash writeDashBin; + stockholm.lib = inputs.stockholm.lib; + ha-ara-menu = inputs.ha-ara-menu.packages.${config.nixpkgs.hostPlatform}.default; + inventory4ce = inputs.inventory4ce.packages.${config.nixpkgs.hostPlatform}.default; + }) + inputs.stockholm.overlays.default + ]; + }; +} diff --git a/flake.nix b/flake.nix index ee4414e..8fc4841 100644 --- a/flake.nix +++ b/flake.nix @@ -52,26 +52,26 @@ home-manager, nix-writers, vscode-server, ...}@inputs: let inherit (nixpkgs) lib pkgs; - pkgsForSystem = system: (import nixpkgs { - inherit system; - config.allowUnfree = true; - config.packageOverrides = lib.mkForce (pkgs: { tinc = pkgs.tinc_pre; }); - config.allowUnfreePredicate = pkg: lib.packageName pkg == "unrar"; - config.android_sdk.accept_license = true; - config.oraclejdk.accept_license = true; - overlays = [ - self.overlays.default - inputs.nix-writers.overlays.default - (import (inputs.stockholm.inputs.nix-writers + "/pkgs")) - (this: super: { - inherit (this.writers) writeDash writeDashBin; - stockholm.lib = inputs.stockholm.lib; - ha-ara-menu = inputs.ha-ara-menu.packages.${system}.default; - inventory4ce = inputs.inventory4ce.packages.${system}.default; - }) - inputs.stockholm.overlays.default - ]; - }); + #pkgsForSystem = system: (import nixpkgs { + # inherit system; + # config.allowUnfree = true; + # config.packageOverrides = lib.mkForce (pkgs: { tinc = pkgs.tinc_pre; }); + # config.allowUnfreePredicate = pkg: lib.packageName pkg == "unrar"; + # config.android_sdk.accept_license = true; + # config.oraclejdk.accept_license = true; + # overlays = [ + # self.overlays.default + # inputs.nix-writers.overlays.default + # (import (inputs.stockholm.inputs.nix-writers + "/pkgs")) + # (this: super: { + # inherit (this.writers) writeDash writeDashBin; + # stockholm.lib = inputs.stockholm.lib; + # ha-ara-menu = inputs.ha-ara-menu.packages.${system}.default; + # inventory4ce = inputs.inventory4ce.packages.${system}.default; + # }) + # inputs.stockholm.overlays.default + # ]; + #}); #pkgsForSystem = system: nixpkgs.legacyPackages.${system}; clan = clan-core.lib.buildClan { clanName = "makefu"; @@ -82,9 +82,10 @@ }; machines = lib.genAttrs [ "filepimp" "mrdavid" "x" "cake" "tsp" "wbob" "omo" "gum" "savarcast" ] (host: rec { # TODO inject the system somewhere else - #nixpkgs.hostPlatform = if host == "cake" then "aarch64-linux" else "x86_64-linux"; - nixpkgs.pkgs = if host == "cake" then pkgsForSystem "aarch64-linux" else pkgsForSystem "x86_64-linux"; + nixpkgs.hostPlatform = if host == "cake" then "aarch64-linux" else "x86_64-linux"; + #nixpkgs.pkgs = if host == "cake" then pkgsForSystem "aarch64-linux" else pkgsForSystem "x86_64-linux"; imports = [ + ./2configs/nixpkgs-config.nix disko.nixosModules.disko nix-ld.nixosModules.nix-ld home-manager.nixosModules.default