add new external flake to provide helper functions

This commit is contained in:
greyweather committed 2026-08-29 19:07:48 +01:00
1 parent 50bb736c51
commit 49985ce9a3
18 files changed
+73 -163

No files matched your search

+2 -7
View File
@@ -63,11 +63,6 @@
platforms = [ "x86_64-linux" ];
};
};
mkIfElse = with lib; p: yes: no:
mkMerge [
(mkIf p yes)
(mkIf (!p) no)
];
in {
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
options.features.applications.gui = {
@@ -75,13 +70,13 @@ in {
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
};
config = lib.mkIf (config.features.applications.gui.fluxer.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
config = lib.mkIf (config.features.applications.gui.fluxer.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.fluxer.enable = lib.mkDefault true;
} {
environment.systemPackages = [
(pkgs.callPackage (fluxer-package) {})
];
}) // lib.mkIf (config.features.applications.gui.fluxer-canary.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
}) // lib.mkIf (config.features.applications.gui.fluxer-canary.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.fluxer-canary.enable = lib.mkDefault true;
} {
environment.systemPackages = [