pull out nixpkgs config

This commit is contained in:
makefu 2024-01-15 23:09:18 +01:00
parent 755fd388ad
commit f599655185
No known key found for this signature in database
GPG key ID: 36F7711F3FC0F225
2 changed files with 44 additions and 22 deletions

View file

@ -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
];
};
}

View file

@ -52,26 +52,26 @@
home-manager, nix-writers, vscode-server, ...}@inputs: home-manager, nix-writers, vscode-server, ...}@inputs:
let let
inherit (nixpkgs) lib pkgs; inherit (nixpkgs) lib pkgs;
pkgsForSystem = system: (import nixpkgs { #pkgsForSystem = system: (import nixpkgs {
inherit system; # inherit system;
config.allowUnfree = true; # config.allowUnfree = true;
config.packageOverrides = lib.mkForce (pkgs: { tinc = pkgs.tinc_pre; }); # config.packageOverrides = lib.mkForce (pkgs: { tinc = pkgs.tinc_pre; });
config.allowUnfreePredicate = pkg: lib.packageName pkg == "unrar"; # config.allowUnfreePredicate = pkg: lib.packageName pkg == "unrar";
config.android_sdk.accept_license = true; # config.android_sdk.accept_license = true;
config.oraclejdk.accept_license = true; # config.oraclejdk.accept_license = true;
overlays = [ # overlays = [
self.overlays.default # self.overlays.default
inputs.nix-writers.overlays.default # inputs.nix-writers.overlays.default
(import (inputs.stockholm.inputs.nix-writers + "/pkgs")) # (import (inputs.stockholm.inputs.nix-writers + "/pkgs"))
(this: super: { # (this: super: {
inherit (this.writers) writeDash writeDashBin; # inherit (this.writers) writeDash writeDashBin;
stockholm.lib = inputs.stockholm.lib; # stockholm.lib = inputs.stockholm.lib;
ha-ara-menu = inputs.ha-ara-menu.packages.${system}.default; # ha-ara-menu = inputs.ha-ara-menu.packages.${system}.default;
inventory4ce = inputs.inventory4ce.packages.${system}.default; # inventory4ce = inputs.inventory4ce.packages.${system}.default;
}) # })
inputs.stockholm.overlays.default # inputs.stockholm.overlays.default
]; # ];
}); #});
#pkgsForSystem = system: nixpkgs.legacyPackages.${system}; #pkgsForSystem = system: nixpkgs.legacyPackages.${system};
clan = clan-core.lib.buildClan { clan = clan-core.lib.buildClan {
clanName = "makefu"; clanName = "makefu";
@ -82,9 +82,10 @@
}; };
machines = lib.genAttrs [ "filepimp" "mrdavid" "x" "cake" "tsp" "wbob" "omo" "gum" "savarcast" ] (host: rec { machines = lib.genAttrs [ "filepimp" "mrdavid" "x" "cake" "tsp" "wbob" "omo" "gum" "savarcast" ] (host: rec {
# TODO inject the system somewhere else # TODO inject the system somewhere else
#nixpkgs.hostPlatform = if host == "cake" then "aarch64-linux" else "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"; #nixpkgs.pkgs = if host == "cake" then pkgsForSystem "aarch64-linux" else pkgsForSystem "x86_64-linux";
imports = [ imports = [
./2configs/nixpkgs-config.nix
disko.nixosModules.disko disko.nixosModules.disko
nix-ld.nixosModules.nix-ld nix-ld.nixosModules.nix-ld
home-manager.nixosModules.default home-manager.nixosModules.default