dconf: simplify default override
This commit is contained in:
parent
31bf48154c
commit
e1ae112e8a
|
@ -4,23 +4,12 @@
|
||||||
|
|
||||||
# home-manager, in its infinite wisdom, sets `dconf.enable` to true by default.
|
# home-manager, in its infinite wisdom, sets `dconf.enable` to true by default.
|
||||||
# This is a problem because we don't want it to attempt to apply our settings on
|
# This is a problem because we don't want it to attempt to apply our settings on
|
||||||
# a system that doesn't actually have GNOME installed.
|
# a system that doesn't actually have GNOME installed. So, we override the
|
||||||
|
# default to false.
|
||||||
|
|
||||||
# To work around it, we create our own option `qenya.dconf.enable`, which
|
let inherit (lib) mkDefault;
|
||||||
# defaults to false, and pass it to `dconf.enable`.
|
in {
|
||||||
|
dconf.enable = mkDefault false;
|
||||||
let
|
|
||||||
inherit (lib) mkIf mkEnableOption;
|
|
||||||
cfg = config.qenya.dconf;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.qenya.dconf = {
|
|
||||||
enable = mkEnableOption "dconf";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
dconf.enable = config.qenya.dconf.enable;
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
# TODO: nix-ify other parts of GNOME config
|
# TODO: nix-ify other parts of GNOME config
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
home-manager.users.qenya = { pkgs, ... }: {
|
home-manager.users.qenya = { pkgs, ... }: {
|
||||||
qenya.dconf.enable = true;
|
dconf.enable = true;
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
firefox.enable = true; # TODO: config is not yet nix-ified
|
firefox.enable = true; # TODO: config is not yet nix-ified
|
||||||
|
|
Loading…
Reference in a new issue