From 24efb8c72c796d3c66afdd4b514bf99b0c8c75d8 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Fri, 21 Jun 2024 19:48:29 -0400 Subject: [PATCH] match nixos and home alyraffauf.desktop.enable state by default --- homeManagerModules/default.nix | 67 ++++++++++++++++------------------ homeManagerModules/options.nix | 5 +++ 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/homeManagerModules/default.nix b/homeManagerModules/default.nix index 97fceaa7..80b094cf 100644 --- a/homeManagerModules/default.nix +++ b/homeManagerModules/default.nix @@ -14,44 +14,41 @@ inputs: self: { ./theme.nix ]; - nixpkgs = { - config = { - allowUnfree = true; + config = lib.mkIf config.alyraffauf.desktop.enable { + dconf = { + enable = true; + settings = { + "org/virt-manager/virt-manager/connections" = { + autoconnect = ["qemu:///system"]; + uris = ["qemu:///system"]; + }; + }; }; - }; - xdg.userDirs = { - enable = true; - createDirectories = true; - desktop = lib.mkDefault "${config.home.homeDirectory}/dsktp"; - documents = lib.mkDefault "${config.home.homeDirectory}/docs"; - download = lib.mkDefault "${config.home.homeDirectory}/dwnlds"; - extraConfig = {XDG_SRC_DIR = "${config.home.homeDirectory}/src";}; - music = lib.mkDefault "${config.home.homeDirectory}/music"; - pictures = lib.mkDefault "${config.home.homeDirectory}/pics"; - publicShare = lib.mkDefault "${config.home.homeDirectory}/pub"; - templates = lib.mkDefault "${config.home.homeDirectory}/tmplts"; - videos = lib.mkDefault "${config.home.homeDirectory}/vids"; - }; + gtk.gtk3.bookmarks = [ + "file://${config.xdg.userDirs.documents}" + "file://${config.xdg.userDirs.download}" + "file://${config.xdg.userDirs.music}" + "file://${config.xdg.userDirs.videos}" + "file://${config.xdg.userDirs.pictures}" + "file://${config.home.homeDirectory}/src" + "file://${config.home.homeDirectory}/sync" + ]; - gtk.gtk3.bookmarks = [ - "file://${config.xdg.userDirs.documents}" - "file://${config.xdg.userDirs.download}" - "file://${config.xdg.userDirs.music}" - "file://${config.xdg.userDirs.videos}" - "file://${config.xdg.userDirs.pictures}" - "file://${config.home.homeDirectory}/src" - "file://${config.home.homeDirectory}/sync" - ]; - - xdg.dataFile."backgrounds/".source = ../files/wallpapers; - - dconf = { - enable = true; - settings = { - "org/virt-manager/virt-manager/connections" = { - autoconnect = ["qemu:///system"]; - uris = ["qemu:///system"]; + xdg = { + dataFile."backgrounds/".source = ../files/wallpapers; + userDirs = { + enable = true; + createDirectories = true; + desktop = lib.mkDefault "${config.home.homeDirectory}/dsktp"; + documents = lib.mkDefault "${config.home.homeDirectory}/docs"; + download = lib.mkDefault "${config.home.homeDirectory}/dwnlds"; + extraConfig = {XDG_SRC_DIR = "${config.home.homeDirectory}/src";}; + music = lib.mkDefault "${config.home.homeDirectory}/music"; + pictures = lib.mkDefault "${config.home.homeDirectory}/pics"; + publicShare = lib.mkDefault "${config.home.homeDirectory}/pub"; + templates = lib.mkDefault "${config.home.homeDirectory}/tmplts"; + videos = lib.mkDefault "${config.home.homeDirectory}/vids"; }; }; }; diff --git a/homeManagerModules/options.nix b/homeManagerModules/options.nix index b8e8539f..60a22577 100644 --- a/homeManagerModules/options.nix +++ b/homeManagerModules/options.nix @@ -184,6 +184,11 @@ }; }; desktop = { + enable = lib.mkOption { + description = "Graphical desktop."; + default = osConfig.alyraffauf.desktop.enable; + type = lib.types.bool; + }; cinnamon.enable = lib.mkOption { description = "Cinnamon with sane defaults"; default = osConfig.alyraffauf.desktop.cinnamon.enable;