From 3ed184c48a1154a2548df807c8aaae7888e4792c Mon Sep 17 00:00:00 2001 From: adikro Date: Wed, 8 Apr 2026 16:21:24 +0200 Subject: flake update --- flake.nix | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 1c16c1d..4fd7b8e 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,9 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11"; + # Hardware and gaming nixos-hardware.url = "github:NixOS/nixos-hardware/master"; openmw-nix = { @@ -16,11 +18,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - omnisearch = { - url = "git+https://git.bwaaa.monster/omnisearch"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - + # System Utilities sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -36,6 +34,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + # UI and apps niri = { url = "github:sodiboo/niri-flake"; inputs.nixpkgs.follows = "nixpkgs"; @@ -56,6 +55,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + spicetify-nix = { + url = "github:Gerg-L/spicetify-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # Editors nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; @@ -71,8 +76,9 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - spicetify-nix = { - url = "github:Gerg-L/spicetify-nix"; + # Other + omnisearch = { + url = "git+https://git.bwaaa.monster/omnisearch"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -88,21 +94,33 @@ }; outputs = - { self, nixpkgs, ... }@inputs: + { + self, + nixpkgs, + nixpkgs-stable, + ... + }@inputs: let mkHost = { hostname, user ? "adam", + isStable ? false, path ? ./hosts/${hostname}/configuration.nix, }: - nixpkgs.lib.nixosSystem { + let + basePkgs = if isStable then nixpkgs-stable else nixpkgs; + actualPath = if path != null then path else ./hosts/${hostname}/configuration.nix; + in + basePkgs.lib.nixosSystem { specialArgs = { inherit inputs; username = user; + pkgs-unstable = import inputs.nixpkgs { config.allowUnfree = true; }; + pkgs-stable = import inputs.nixpkgs-stable { config.allowUnfree = true; }; }; modules = [ - path + actualPath { networking.hostName = hostname; } ]; }; -- cgit v1.3