Files
nix-flake/modules/features/nixos/stylix.nix
T
greyweather 7f49c289d5 all application options will adapt to environment
when used either with nixos (no home-manager) or home-manager standalone, `features.applications.<name>.enable` options still perform some functionality, rather than assuming a full nixos + home-manager setup like before
2026-08-29 13:48:20 +01:00

24 lines
721 B
Nix

{ inputs, self, ... }: {
flake.nixosModules.graphics = { pkgs, lib, config, ... }: {
imports = [
inputs.stylix.nixosModules.stylix
];
options.features.nixos.stylix.enable = lib.mkEnableOption "stylix";
config = let
mkIfElse = with lib; p: yes: no: mkMerge [
(mkIf p yes)
(mkIf (!p) no)
];
in lib.mkIf (config.features.nixos.stylix.enable) {
stylix.enable = true;
stylix.image = builtins.path { path = "${self}/modules/hosts/${config.info.hostName}/wallpaper.jpg"; };
stylix.polarity = "dark";
};
};
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
options.features.nixos.stylix.enable = lib.mkEnableOption "stylix";
};
}