common: profiles: migrate gtk

This commit is contained in:
Bruno BELANYI 2024-01-03 17:03:47 +00:00
parent ac03fb3b31
commit 9f82f2a7e8
4 changed files with 22 additions and 18 deletions

View file

@ -4,5 +4,6 @@
imports = [ imports = [
./bluetooth ./bluetooth
./devices ./devices
./gtk
]; ];
} }

View file

@ -0,0 +1,21 @@
{ config, lib, type, ... }:
let
cfg = config.my.profiles.gtk;
in
{
options.my.profiles.gtk = with lib; {
enable = mkEnableOption "gtk profile";
};
config = lib.mkIf cfg.enable (lib.mkMerge [
(lib.optionalAttrs (type == "home") {
# GTK theme configuration
my.home.gtk.enable = true;
})
(lib.optionalAttrs (type == "nixos") {
# Allow setting GTK configuration using home-manager
programs.dconf.enable = true;
})
]);
}

View file

@ -2,7 +2,6 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./gtk
./laptop ./laptop
./wm ./wm
./x ./x

View file

@ -1,17 +0,0 @@
{ config, lib, ... }:
let
cfg = config.my.profiles.gtk;
in
{
options.my.profiles.gtk = with lib; {
enable = mkEnableOption "gtk profile";
};
config = lib.mkIf cfg.enable {
# Allow setting GTK configuration using home-manager
programs.dconf.enable = true;
# GTK theme configuration
my.home.gtk.enable = true;
};
}