summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix19
1 files changed, 11 insertions, 8 deletions
diff --git a/flake.nix b/flake.nix
index 4fd7b8e..a59d6fe 100644
--- a/flake.nix
+++ b/flake.nix
@@ -60,6 +60,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
+ subtui = {
+ url = "github:MattiaPun/SubTUI";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
# Editors
nixvim = {
url = "github:nix-community/nixvim";
@@ -101,6 +106,8 @@
...
}@inputs:
let
+ unstablePkgs = import nixpkgs { };
+ stablePkgs = import nixpkgs-stable { };
mkHost =
{
hostname,
@@ -108,19 +115,15 @@
isStable ? false,
path ? ./hosts/${hostname}/configuration.nix,
}:
- let
- basePkgs = if isStable then nixpkgs-stable else nixpkgs;
- actualPath = if path != null then path else ./hosts/${hostname}/configuration.nix;
- in
- basePkgs.lib.nixosSystem {
+ nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
username = user;
- pkgs-unstable = import inputs.nixpkgs { config.allowUnfree = true; };
- pkgs-stable = import inputs.nixpkgs-stable { config.allowUnfree = true; };
+ pkgs-unstable = unstablePkgs;
+ pkgs-stable = stablePkgs;
};
modules = [
- actualPath
+ path
{ networking.hostName = hostname; }
];
};