Made productive a specialisation, fixes #15 and #21

This commit is contained in:
EsVagy42 2025-07-15 16:55:59 +02:00
parent c85b912998
commit 1c43207211
4 changed files with 213 additions and 177 deletions

View file

@ -19,7 +19,13 @@
};
outputs =
{ nixpkgs, home-manager, plasma-manager, nixvim, ... }@inputs:
{
nixpkgs,
home-manager,
plasma-manager,
nixvim,
...
}@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
@ -27,38 +33,29 @@
config.allowUnfree = false;
};
lib = nixpkgs.lib;
in {
nixosConfigurations = let
baseSystem = { productiveBuild }:
lib.nixosSystem {
inherit system;
modules = [
{
environment.systemPackages =
[ inputs.nixvim.packages.${system}.default ];
}
({ lib, ... }: {
options.productiveBuild = lib.mkOption {
type = lib.types.bool;
default = productiveBuild;
};
})
./configuration.nix
./devices/default/default.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules =
[ plasma-manager.homeManagerModules.plasma-manager ];
in
{
nixosConfigurations = {
nixos = lib.nixosSystem {
inherit system;
modules = [
{
environment.systemPackages = [ inputs.nixvim.packages.${system}.default ];
}
./configuration.nix
./devices/default/default.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
home-manager.users.esvagy = { imports = [ ./home.nix ]; };
}
];
};
in {
nixos = baseSystem { productiveBuild = false; };
productive = baseSystem { productiveBuild = true; };
home-manager.users.esvagy = {
imports = [ ./home.nix ];
};
}
];
};
};
};
}