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
24 lines
721 B
Nix
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";
|
|
};
|
|
} |