add unstable packages

This commit is contained in:
Vinzenz Schroeter 2025-05-01 22:19:50 +02:00
parent 5f5c7267dc
commit 01f5308c73
3 changed files with 41 additions and 7 deletions

View file

@ -165,12 +165,29 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1746061036,
"narHash": "sha256-OxYwCGJf9VJ2KnUO+w/hVJVTjOgscdDg/lPv8Eus07Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3afd19146cac33ed242fc0fc87481c67c758a59e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"lix-module": "lix-module",
"niri": "niri",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"zerforschen-plus": "zerforschen-plus"
}
},

View file

@ -2,6 +2,8 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
@ -32,6 +34,7 @@
lix-module,
niri,
zerforschen-plus,
nixpkgs-unstable,
}:
let
devices = {
@ -48,14 +51,15 @@
];
forDevice = f: nixpkgs.lib.mapAttrs f devices;
in
{
rec {
nixosConfigurations = forDevice (
device: system:
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
};
let specialArgs = {
inherit inputs device;
pkgs-unstable = nixpkgs-unstable.legacyPackages."${system}";
};
in nixpkgs.lib.nixosSystem {
inherit system specialArgs;
modules =
[
lix-module.nixosModules.default
@ -69,10 +73,12 @@
./hosts/${device}/hardware.nix
./hosts/${device}/imports.nix
./hosts/${device}/configuration.nix
{ nixpkgs.overlays = [ overlays.unstable-packages ]; }
]
++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [
home-manager.nixosModules.home-manager
{ home-manager.extraSpecialArgs = { inherit device; }; }
{ home-manager.extraSpecialArgs = specialArgs; }
./modules/home-manager.nix
./modules/i18n.nix
@ -83,6 +89,15 @@
}
);
overlays = {
unstable-packages = final: prev: {
unstable = import nixpkgs-unstable {
system = prev.system;
config = prev.config;
};
};
};
formatter = {
x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.nixfmt-rfc-style;

View file

@ -49,6 +49,8 @@
arduino-cli
kicad
kikit
unstable.ut1999
];
home.file."policy.json" = {