diff --git a/modules/dev.nix b/modules/dev.nix index 5ce7c484..34855d0b 100644 --- a/modules/dev.nix +++ b/modules/dev.nix @@ -20,6 +20,7 @@ in { enable = true; dev.enable = true; nixos.enable = true; + man.generateCaches = true; }; # Configure all of the development-related configuration in the system. @@ -36,6 +37,7 @@ in { curl # Our favorite network client. cmake # The poster boy for the hated build system. direnv # The power of local development environment. + gcc # The usual toolchain. gnumake # Make your life easier with GNU Make. moreutils # Less is more but more utilities, the merrier. ]; diff --git a/modules/themes/a-happy-gnome/default.nix b/modules/themes/a-happy-gnome/default.nix index 611993e7..8c568395 100644 --- a/modules/themes/a-happy-gnome/default.nix +++ b/modules/themes/a-happy-gnome/default.nix @@ -1,7 +1,13 @@ { config, options, lib, pkgs, ... }: let + name = "a-happy-gnome"; cfg = config.modules.themes.a-happy-gnome; + dconf = pkgs.gnome3.dconf; + customDconfDb = pkgs.stdenv.mkDerivation { + name = "${name}-dconf-db"; + buildCommand = "${dconf}/bin/dconf compile $out ${./schemas}"; + }; in { options.modules.themes.a-happy-gnome.enable = lib.mkEnableOption "Enables my configuration of GNOME Shell."; @@ -11,10 +17,36 @@ in services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; - # Import the configuration with dconf. - programs.dconf.enable = true; - environment.etc."dconf/profile/gnome".text = "user-db:user"; - environment.etc."dconf/db/gnome".source = ./schemas; + # Don't need most of the GNOME's offering so... + environment.gnome.excludePackages = with pkgs.gnome; [ + gedit + eog + geary + totem + epiphany + gnome-terminal + gnome-music + gnome-software + yelp + ] ++ [ + gnome-user-docs + gnome-tour + ]; + + programs.dconf = { + enable = true; + + # This is an internal function which is subject to change. + # However, this seems to be in for some time but still, be wary. + # The function is found on `nixos/programs/dconf.nix` from nixpkgs. + profiles.customGnomeConfig = pkgs.writeTextFile { + name = "${name}-dconf-profile"; + text = '' + user-db:user + file-db:${customDconfDb} + ''; + }; + }; # I'm pretty sure this is already done but just to make sure. services.gnome.chrome-gnome-shell.enable = true; diff --git a/modules/themes/a-happy-gnome/schemas/desktop.conf b/modules/themes/a-happy-gnome/schemas/desktop.conf index aab6629c..2e0f3e7a 100644 --- a/modules/themes/a-happy-gnome/schemas/desktop.conf +++ b/modules/themes/a-happy-gnome/schemas/desktop.conf @@ -1,30 +1,30 @@ [org/gnome/desktop/interface] -enable-animations=true -enable-hot-corners=false -gtk-im-module='gtk-im-context-simple' -show-battery-percentage=true +enable-animations = true +enable-hot-corners = false +gtk-im-module = 'gtk-im-context-simple' +show-battery-percentage = true [org/gnome/desktop/notifications] -show-banners=true +show-banners = true [org/gnome/desktop/privacy] -disable-microphone=false +disable-microphone = false [org/gnome/shell] -disable-user-extensions=false -enabled-extensions=['arcmenu@arcmenu/com', 'just-perfection-desktop@just-perfection', 'gsconnect@andyholmes/github/io', 'pop-shell@system76/com', 'flypie@schneegans/github/com'] +disable-user-extensions = false +enabled-extensions = ['arcmenu@arcmenu.com', 'just-perfection-desktop@just-perfection', 'gsconnect@andyholmes.github.io', 'pop-shell@system76.com', 'flypie@schneegans.github.com'] [org/gnome/mutter] -attach-modal-dialogs=true -dynamic-workspaces=true -edge-tiling=true -focus-change-on-pointer-rest=true -overlay-key='Super_L' -workspaces-only-on-primary=true +attach-modal-dialogs = true +dynamic-workspaces = true +edge-tiling = true +focus-change-on-pointer-rest = true +overlay-key = 'Super_L' +workspaces-only-on-primary = true [org/gnome/shell/world-clocks] -locations=[<(uint32 2, <('New York', 'KNYC', true, [(0/71180344078725644, -1/2909618758762367)], [(0/71059804659265924, -1/2916478949920254)])>)>, <(uint32 2, <('Coordinated Universal Time (UTC)', '@UTC', false, @a(dd) [], @a(dd) [])>)>, <(uint32 2, <('Cairo', 'HECA', true, [(0/52592587544986047, 0/54803338512621935)], [(0/52447144022429604, 0/54541539124822791)])>)>] +locations = [<(uint32 2, <('New York', 'KNYC', true, [(0.71180344078725644, -1.2909618758762367)], [(0.71059804659265924, -1.2916478949920254)])>)>, <(uint32 2, <('Coordinated Universal Time (UTC)', '@UTC', false, @a(dd) [], @a(dd) [])>)>, <(uint32 2, <('Cairo', 'HECA', true, [(0.52592587544986047, 0.54803338512621935)], [(0.52447144022429604, 0.54541539124822791)])>)>] [org/gnome/system/location] -enabled=false +enabled = false diff --git a/modules/themes/a-happy-gnome/schemas/keybindings.conf b/modules/themes/a-happy-gnome/schemas/keybindings.conf index 67fc8dbb..b33eb555 100644 --- a/modules/themes/a-happy-gnome/schemas/keybindings.conf +++ b/modules/themes/a-happy-gnome/schemas/keybindings.conf @@ -1,11 +1,26 @@ +# This is used in tandem with Pop shell plugin. [org/gnome/desktop/wm/keybindings] begin-resize=['r'] -close=['q'] +close=['F4', 'q'] +cycle-group=@as [] +cycle-group-backward=@as [] +cycle-windows=['grave'] +cycle-windows-backward=['grave'] maximize=@as [] minimize=@as [] +move-to-monitor-down=['j'] +move-to-monitor-left=['h'] +move-to-monitor-right=['l'] +move-to-monitor-up=['k'] +move-to-workspace-left=['h'] +move-to-workspace-right=['l'] panel-main-menu=@as [] +switch-group=@as [] +switch-group-backward=@as [] switch-input-source=['i'] switch-input-source-backward=['i'] +switch-to-workspace-left=['h'] +switch-to-workspace-right=['l'] toggle-fullscreen=['f'] toggle-maximized=['f'] toggle-overview=['s'] @@ -15,6 +30,7 @@ toggle-tiled-right=@as [] [org/gnome/shell/keybindings] toggle-message-tray=['v'] +# We don't want to restore them shortcuts. [org/gnome/mutter/wayland/keybindings] restore-shortcuts=@as [] diff --git a/modules/themes/a-happy-gnome/schemas/shell-extensions.conf b/modules/themes/a-happy-gnome/schemas/shell-extensions.conf index c9cf7b34..c3ed8945 100644 --- a/modules/themes/a-happy-gnome/schemas/shell-extensions.conf +++ b/modules/themes/a-happy-gnome/schemas/shell-extensions.conf @@ -19,7 +19,7 @@ workspace-wrap-around=true window-demands-attention-focus=true ripple-box=false -# The default keybindings for this extension are enough but we'll have to adjust the shell keybindings. +# The default keybindings for this extension are enough but we'll have to adjust the shell keybindings/ [org/gnome/shell/extensions/pop-shell] active-hint=true smart-gaps=true diff --git a/modules/users.nix b/modules/users.nix index c12503bd..373ead08 100644 --- a/modules/users.nix +++ b/modules/users.nix @@ -3,17 +3,14 @@ let cfg = config.modules.users; - invalidUsernames = [ "config" "modules" ]; userModules = lib.getUsers cfg.users; - homeManagerModules = - lib.filterAttrs (n: _: n == "modules") (lib.filesToAttr ../users); + homeManagerModules = lib.filesToAttr ../users/modules; users = lib.attrNames userModules; nonexistentUsers = lib.filter (name: !lib.elem name users) cfg.users; mkUser = user: modulePath: let - userModule = import modulePath; defaultConfig = { home.username = user; home.homeDirectory = "/home/${user}";