summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix38
1 files changed, 28 insertions, 10 deletions
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; }
];
};