mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
Update modules
- 'A happy GNOME' config - Refactoring some parts of the codebase
This commit is contained in:
parent
97ef9f3382
commit
b7b641aacd
@ -20,6 +20,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
dev.enable = true;
|
dev.enable = true;
|
||||||
nixos.enable = true;
|
nixos.enable = true;
|
||||||
|
man.generateCaches = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure all of the development-related configuration in the system.
|
# Configure all of the development-related configuration in the system.
|
||||||
@ -36,6 +37,7 @@ in {
|
|||||||
curl # Our favorite network client.
|
curl # Our favorite network client.
|
||||||
cmake # The poster boy for the hated build system.
|
cmake # The poster boy for the hated build system.
|
||||||
direnv # The power of local development environment.
|
direnv # The power of local development environment.
|
||||||
|
gcc # The usual toolchain.
|
||||||
gnumake # Make your life easier with GNU Make.
|
gnumake # Make your life easier with GNU Make.
|
||||||
moreutils # Less is more but more utilities, the merrier.
|
moreutils # Less is more but more utilities, the merrier.
|
||||||
];
|
];
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
{ config, options, lib, pkgs, ... }:
|
{ config, options, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
name = "a-happy-gnome";
|
||||||
cfg = config.modules.themes.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
|
in
|
||||||
{
|
{
|
||||||
options.modules.themes.a-happy-gnome.enable = lib.mkEnableOption "Enables my configuration of GNOME Shell.";
|
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.displayManager.gdm.enable = true;
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
|
|
||||||
# Import the configuration with dconf.
|
# Don't need most of the GNOME's offering so...
|
||||||
programs.dconf.enable = true;
|
environment.gnome.excludePackages = with pkgs.gnome; [
|
||||||
environment.etc."dconf/profile/gnome".text = "user-db:user";
|
gedit
|
||||||
environment.etc."dconf/db/gnome".source = ./schemas;
|
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.
|
# I'm pretty sure this is already done but just to make sure.
|
||||||
services.gnome.chrome-gnome-shell.enable = true;
|
services.gnome.chrome-gnome-shell.enable = true;
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
[org/gnome/desktop/interface]
|
[org/gnome/desktop/interface]
|
||||||
enable-animations=true
|
enable-animations = true
|
||||||
enable-hot-corners=false
|
enable-hot-corners = false
|
||||||
gtk-im-module='gtk-im-context-simple'
|
gtk-im-module = 'gtk-im-context-simple'
|
||||||
show-battery-percentage=true
|
show-battery-percentage = true
|
||||||
|
|
||||||
[org/gnome/desktop/notifications]
|
[org/gnome/desktop/notifications]
|
||||||
show-banners=true
|
show-banners = true
|
||||||
|
|
||||||
[org/gnome/desktop/privacy]
|
[org/gnome/desktop/privacy]
|
||||||
disable-microphone=false
|
disable-microphone = false
|
||||||
|
|
||||||
[org/gnome/shell]
|
[org/gnome/shell]
|
||||||
disable-user-extensions=false
|
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']
|
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]
|
[org/gnome/mutter]
|
||||||
attach-modal-dialogs=true
|
attach-modal-dialogs = true
|
||||||
dynamic-workspaces=true
|
dynamic-workspaces = true
|
||||||
edge-tiling=true
|
edge-tiling = true
|
||||||
focus-change-on-pointer-rest=true
|
focus-change-on-pointer-rest = true
|
||||||
overlay-key='Super_L'
|
overlay-key = 'Super_L'
|
||||||
workspaces-only-on-primary=true
|
workspaces-only-on-primary = true
|
||||||
|
|
||||||
[org/gnome/shell/world-clocks]
|
[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]
|
[org/gnome/system/location]
|
||||||
enabled=false
|
enabled = false
|
||||||
|
|
||||||
|
@ -1,11 +1,26 @@
|
|||||||
|
# This is used in tandem with Pop shell plugin.
|
||||||
[org/gnome/desktop/wm/keybindings]
|
[org/gnome/desktop/wm/keybindings]
|
||||||
begin-resize=['<Super>r']
|
begin-resize=['<Super>r']
|
||||||
close=['<Super>q']
|
close=['<Alt>F4', '<Super>q']
|
||||||
|
cycle-group=@as []
|
||||||
|
cycle-group-backward=@as []
|
||||||
|
cycle-windows=['<Super>grave']
|
||||||
|
cycle-windows-backward=['<Shift><Super>grave']
|
||||||
maximize=@as []
|
maximize=@as []
|
||||||
minimize=@as []
|
minimize=@as []
|
||||||
|
move-to-monitor-down=['<Alt><Super>j']
|
||||||
|
move-to-monitor-left=['<Alt><Super>h']
|
||||||
|
move-to-monitor-right=['<Alt><Super>l']
|
||||||
|
move-to-monitor-up=['<Alt><Super>k']
|
||||||
|
move-to-workspace-left=['<Shift><Super>h']
|
||||||
|
move-to-workspace-right=['<Shift><Super>l']
|
||||||
panel-main-menu=@as []
|
panel-main-menu=@as []
|
||||||
|
switch-group=@as []
|
||||||
|
switch-group-backward=@as []
|
||||||
switch-input-source=['<Super>i']
|
switch-input-source=['<Super>i']
|
||||||
switch-input-source-backward=['<Shift><Super>i']
|
switch-input-source-backward=['<Shift><Super>i']
|
||||||
|
switch-to-workspace-left=['<Primary><Super>h']
|
||||||
|
switch-to-workspace-right=['<Primary><Super>l']
|
||||||
toggle-fullscreen=['<Super>f']
|
toggle-fullscreen=['<Super>f']
|
||||||
toggle-maximized=['<Shift><Super>f']
|
toggle-maximized=['<Shift><Super>f']
|
||||||
toggle-overview=['<Shift><Super>s']
|
toggle-overview=['<Shift><Super>s']
|
||||||
@ -15,6 +30,7 @@ toggle-tiled-right=@as []
|
|||||||
[org/gnome/shell/keybindings]
|
[org/gnome/shell/keybindings]
|
||||||
toggle-message-tray=['<Super>v']
|
toggle-message-tray=['<Super>v']
|
||||||
|
|
||||||
|
# We don't want to restore them shortcuts.
|
||||||
[org/gnome/mutter/wayland/keybindings]
|
[org/gnome/mutter/wayland/keybindings]
|
||||||
restore-shortcuts=@as []
|
restore-shortcuts=@as []
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ workspace-wrap-around=true
|
|||||||
window-demands-attention-focus=true
|
window-demands-attention-focus=true
|
||||||
ripple-box=false
|
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]
|
[org/gnome/shell/extensions/pop-shell]
|
||||||
active-hint=true
|
active-hint=true
|
||||||
smart-gaps=true
|
smart-gaps=true
|
||||||
|
@ -3,17 +3,14 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.users;
|
cfg = config.modules.users;
|
||||||
invalidUsernames = [ "config" "modules" ];
|
|
||||||
userModules = lib.getUsers cfg.users;
|
userModules = lib.getUsers cfg.users;
|
||||||
homeManagerModules =
|
homeManagerModules = lib.filesToAttr ../users/modules;
|
||||||
lib.filterAttrs (n: _: n == "modules") (lib.filesToAttr ../users);
|
|
||||||
|
|
||||||
users = lib.attrNames userModules;
|
users = lib.attrNames userModules;
|
||||||
nonexistentUsers = lib.filter (name: !lib.elem name users) cfg.users;
|
nonexistentUsers = lib.filter (name: !lib.elem name users) cfg.users;
|
||||||
|
|
||||||
mkUser = user: modulePath:
|
mkUser = user: modulePath:
|
||||||
let
|
let
|
||||||
userModule = import modulePath;
|
|
||||||
defaultConfig = {
|
defaultConfig = {
|
||||||
home.username = user;
|
home.username = user;
|
||||||
home.homeDirectory = "/home/${user}";
|
home.homeDirectory = "/home/${user}";
|
||||||
|
Loading…
Reference in New Issue
Block a user