use imports and split programs into their own files for organization

This commit is contained in:
= 2024-03-11 03:30:34 -05:00
parent 88107ecd41
commit a442323649
25 changed files with 850 additions and 357 deletions

View file

@ -1,8 +1,9 @@
{ pkgs, settings, ... }: {
{ settings, ylib, ... } @ args: {
home.stateVersion = "23.11";
programs.home-manager.enable = true;
home.username = settings.user.username;
home.homeDirectory = "/home/${settings.user.username}";
programs.home-manager.enable = true;
imports = ylib.umport { paths = [ ./programs ]; recursive = true; };
}

View file

@ -0,0 +1,55 @@
{ settings, ... }:
{
programs.git = {
enable = true;
userEmail = settings.user.git.email;
userName = settings.user.git.name;
extraConfig = {
core.pager = "cat";
core.editor = "nvim";
pull.rebase = false;
};
difftastic = {
enable = true;
background = "dark";
};
# TODO move from common system? Need root user home managed too...
# aliases: {}
ignores = [
# --------------
# Intellij
# --------------
"*.iml"
# --------------
# MAC OS
# --------------
".DS_Store"
".AppleDouble"
".LSOverride"
# Icon must end with two \r
"Icon"
# Thumbnails
"._*"
# Files that might appear in the root of a volume
".DocumentRevisions-V100"
".fseventsd"
".Spotlight-V100"
".TemporaryItems"
".Trashes"
".VolumeIcon.icns"
".com.apple.timemachine.donotpresent"
# Directories potentially created on remote AFP share
".AppleDB"
".AppleDesktop"
"Network Trash Folder"
"Temporary Items"
".apdisk"
];
};
}

View file

@ -1,82 +0,0 @@
{ pkgs, ... }:
{
"org/gnome/shell" = {
favorite-apps = [
"vivaldi-stable.desktop"
"org.wezfurlong.wezterm.desktop"
"org.gnome.Nautilus.desktop"
];
enabled-extensions = with pkgs.gnomeExtensions; [
workspace-switch-wraparound.extensionUuid
];
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
enable-hot-corners = false;
show-battery-percentage = true;
};
"org/gnome/desktop/wm/preferences" = {
resize-with-right-button = true;
button-layout = "maximize:appmenu,close";
audible-bell = false;
wrap-around = true;
};
"org/gnome/settings-daemon/plugins/media-keys" = {
# Disable the lock screen shortcut
screensaver = [ "" ];
};
"org/gnome/desktop/wm/keybindings" = {
minimize = [ "" ];
move-to-workspace-1 = [ "" ];
move-to-workspace-2 = [ "" ];
move-to-workspace-3 = [ "" ];
move-to-workspace-4 = [ "" ];
move-to-workspace-down = [ "" ];
move-to-workspace-last = [ "" ];
move-to-workspace-left = [ "" ];
move-to-workspace-right = [ "" ];
switch-to-workspace-1 = [ "<Super>1" ];
switch-to-workspace0 = [ "<Super>2" ];
switch-to-workspace-3 = [ "<Super>3" ];
switch-to-workspace-4 = [ "<Super>4" ];
switch-to-workspace-down = [ "" ];
switch-to-workspace-last = [ "" ];
switch-to-workspace-left = [ "<Super>h" ];
switch-to-workspace-right = [ "<Super>l" ];
};
"org/gnome/mutter" = {
edge-tiling = true;
workspaces-only-on-primary = true;
};
"org/gnome/settings-daemon/plugins/power" = {
power-button-action = "nothing";
sleep-inactive-ac-type = "nothing";
sleep-inactive-battery-type = "nothing";
idle-brightness = 15;
power-saver-profile-on-low-battery = false;
};
"org/gnome/desktop/screensaver" = {
lock-enabled = false;
idle-activation-enabled = false;
};
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = false;
night-light-schedule-automatic = false;
};
"org/gnome/shell/keybindings" = {
shift-overview-down = [ "<Super>j" ];
shift-overview-up = [ "<Super>k" ];
switch-to-application-1 = [ "" ];
switch-to-application-2 = [ "" ];
switch-to-application-3 = [ "" ];
switch-to-application-4 = [ "" ];
switch-to-application-5 = [ "" ];
switch-to-application-6 = [ "" ];
switch-to-application-7 = [ "" ];
switch-to-application-8 = [ "" ];
switch-to-application-9 = [ "" ];
toggle-quick-settings = [ "" ];
};
}

View file

@ -1,217 +1,16 @@
{ pkgs, lib, settings, ... } @ args:
let
# TODO update to be in this config normally
# cursor fix? https://github.com/wez/wezterm/issues/1742#issuecomment-1075333507
weztermConfig = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/RingOfStorms/setup/72635c6674540bfefa2325f69e6ee6de9a11a62b/home/dotfiles/wezterm.lua";
sha256 = "sha256-kwbg9S9IHhAw6RTPvRjqGew5qz8a8VxjqonkgEKGtys=";
};
tmux = pkgs.tmuxPlugins;
in
{ settings, ylib, ... } @ _args:
{
imports = [
(settings.usersDir + "/_common/home.nix")
];
home.packages = with pkgs; [
firefox-esr
wezterm
vivaldi
ollama
# Desktop Environment stuff
wofi # app launcher TODO configure this somehow
gnome.dconf-editor # use `dump dconf /` before and after and diff the files for easy editing of dconf below
gnomeExtensions.workspace-switch-wraparound
#gnome.gnome-tweaks
#gnomeExtensions.forge # probably dont need on this on tiny laptop but may explore this instead of sway for my desktop
];
home.file.".wezterm.lua".source = weztermConfig; # todo actual configure this in nix instead of pulling from existing one. Maybe lookup the more official home manager dotfile solutions instead of inline
home.file.".psqlrc".text = ''
\pset pager off
'';
programs.zsh = {
enable = true;
enableAutosuggestions = true;
};
# home manager doesn't give us an option to add tmux extra config at the top so we do it ourselves here.
xdg.configFile."tmux/tmux.conf".text = lib.mkBefore ''
# Reset everything then add what we want exactly
unbind-key -a
# Window stuff
bind -r H previous-window
bind -r L next-window
bind -r 1 select-window -t:1
bind -r 2 select-window -t:2
bind -r 3 select-window -t:3
bind -r 4 select-window -t:4
bind -r 5 select-window -t:5
bind -r 6 select-window -t:6
bind -r 7 select-window -t:7
bind -r 8 select-window -t:8
bind -r 9 select-window -t:9
bind r command-prompt "rename-window %%"
bind | split-window -h -c "#{pane_current_path}"
bind \\ split-window -v -c "#{pane_current_path}"
bind t new-window
bind T command-prompt -p "window name:" "new-window; rename-window '%%'"
bind m command-prompt -p "Swap with window index:" "swap-window -t '%%'"
bind -r [ swap-window -t -1 \; previous-window
bind -r ] swap-window -t +1 \; next-window
# Sessions
bind C-s command-prompt -p "session name:" "new-session -s '%%'"
bind C-r command-prompt "rename-session %%"
bind -r C-L switch-client -n
bind -r C-H switch-client -p
# Pane stuff
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
bind -r , resize-pane -L 20
bind -r . resize-pane -R 20
bind -r - resize-pane -D 7
bind -r = resize-pane -U 7
bind q kill-pane
bind w kill-window
bind x swap-pane -D
# Tmux util
bind p paste-buffer
bind X source-file ~/.config/tmux/tmux.conf
bind z resize-pane -Z
bind : command-prompt
bind ^Q detach
# ==========
# My options
set-option -g terminal-overrides ',xterm-256color:RGB'
set -g detach-on-destroy off
set -g renumber-windows on
set -g status-position top
'';
programs.tmux = {
enable = true;
# Revisit this later, permission denied to make anything in run as my user...
secureSocket = false;
shortcut = "a";
prefix = "C-a";
baseIndex = 1;
mouse = true;
keyMode = "vi";
newSession = true;
shell = "${pkgs.zsh}/bin/zsh";
terminal = "screen-256color";
aggressiveResize = true;
plugins = [
{
plugin = tmux.sessionist;
extraConfig = ''
set -g @sessionist-join-pane "j"
set -g @sessionist-goto "o"
set -g @default_key_bindings_new "UNSET"
'';
}
tmux.yank
tmux.tmux-thumbs
{
plugin = tmux.fzf-tmux-url;
extraConfig = ''
set -g @fzf-url-fzf-options '-p 60%,30% --prompt = " " - -border-label=" Open URL "'
set -g @fzf-url-history-limit '2000'
'';
}
{
plugin = tmux.catppuccin.overrideAttrs (_: {
src = pkgs.fetchFromGitHub {
owner = "ringofstorms";
repo = "tmux-catppuccin-coal";
rev = "e6d7c658e2d11798912ca1ed4e3626e3e1fad3fc";
sha256 = "sha256-M1XAeCz/lqgjZ7CnWCykJxZCDk+WVoawwHrR9SEO9ns=";
};
});
extraConfig = ''
set -g @catppuccin_flavour 'mocha'
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(),}"
set -g @catppuccin_status_modules_right "directory application date_time"
set -g @catppuccin_status_modules_left "session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{b:pane_current_path}"
set -g @catppuccin_date_time_text "%H:%M"
'';
}
];
};
programs.atuin = {
enable = true;
enableZshIntegration = true;
flags = [ "--disable-up-arrow" ];
settings = {
workspaces = true;
exit-mode = "return-query";
enter_accept = true;
imports =
# Common settings all users share
[ (settings.usersDir + "/_common/home.nix") ]
# User programs
++ ylib.umport {
paths = [ ./programs ];
recursive = true;
}
# User theme
++ ylib.umport {
paths = [ ./theme ];
recursive = true;
};
};
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = false;
palette = "catppuccin_coal";
palettes.catppuccin_coal = import "${settings.commonDir}/catppuccin_coal.nix";
};
};
programs.zoxide = {
enable = true;
enableZshIntegration = true;
options = [ "--cmd cd" ];
};
dconf = {
enable = true;
settings = (import ./gnome_settings.nix args);
};
gtk = {
enable = true;
cursorTheme = {
name = "Numix-Cursor";
package = pkgs.numix-cursor-theme;
};
gtk3.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
gtk4.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
};
home.sessionVariables.GTK_THEME = "palenight";
}

View file

@ -0,0 +1,14 @@
{ ... }:
{
programs.atuin = {
enable = true;
enableZshIntegration = true;
flags = [ "--disable-up-arrow" ];
settings = {
workspaces = true;
exit-mode = "return-query";
enter_accept = true;
};
};
}

View file

@ -0,0 +1,5 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.firefox-esr ];
}

View file

@ -0,0 +1,5 @@
{ settings, pkgs, ... }:
{
home.packages = [ pkgs.ollama ];
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
home.file.".psqlrc".text = ''
\pset pager off
'';
}

View file

@ -0,0 +1,43 @@
{ ... }:
{
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = false;
palette = "catppuccin_coal";
palettes.catppuccin_coal = {
# Same as catppuccin mocha for these
rosewater = "#f5e0dc";
flamingo = "#f2cdcd";
pink = "#f5c2e7";
mauve = "#cba6f7";
red = "#f38ba8";
maroon = "#eba0ac";
peach = "#fab387";
yellow = "#f9e2af";
green = "#a6e3a1";
teal = "#94e2d5";
sky = "#89dceb";
sapphire = "#74c7ec";
blue = "#89b4fa";
lavender = "#b4befe";
# Coal variant: https://gist.github.com/RingOfStorms/b2ff0c4e37f5be9f985c72c3ec9a3e62
text = "#e0e0e0";
subtext1 = "#cccccc";
subtext0 = "#b8b8b8";
overlay2 = "#a3a3a3";
overlay1 = "#8c8c8c";
overlay0 = "#787878";
surface2 = "#636363";
surface1 = "#4f4f4f";
surface0 = "#3b3b3b";
base = "#262626";
mantle = "#1f1f1f";
crust = "#171717";
};
};
};
}

View file

@ -0,0 +1,57 @@
# Reset everything then add what we want exactly
unbind-key -a
# Window stuff
bind -r H previous-window
bind -r L next-window
bind -r 1 select-window -t:1
bind -r 2 select-window -t:2
bind -r 3 select-window -t:3
bind -r 4 select-window -t:4
bind -r 5 select-window -t:5
bind -r 6 select-window -t:6
bind -r 7 select-window -t:7
bind -r 8 select-window -t:8
bind -r 9 select-window -t:9
bind r command-prompt "rename-window %%"
bind | split-window -h -c "#{pane_current_path}"
bind \\ split-window -v -c "#{pane_current_path}"
bind t new-window
bind T command-prompt -p "window name:" "new-window; rename-window '%%'"
bind m command-prompt -p "Swap with window index:" "swap-window -t '%%'"
bind -r [ swap-window -t -1 \; previous-window
bind -r ] swap-window -t +1 \; next-window
# Sessions
bind C-s command-prompt -p "session name:" "new-session -s '%%'"
bind C-r command-prompt "rename-session %%"
bind -r C-L switch-client -n
bind -r C-H switch-client -p
# Pane stuff
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
bind -r , resize-pane -L 20
bind -r . resize-pane -R 20
bind -r - resize-pane -D 7
bind -r = resize-pane -U 7
bind q kill-pane
bind w kill-window
bind x swap-pane -D
# Tmux util
bind p paste-buffer
bind X source-file ~/.config/tmux/tmux.conf
bind z resize-pane -Z
bind : command-prompt
bind ^Q detach
# ==========
# My options
set-option -g terminal-overrides ',xterm-256color:RGB'
set -g detach-on-destroy off
set -g renumber-windows on
set -g status-position top

View file

@ -0,0 +1,77 @@
{ settings, lib, pkgs, ... } @ args:
let
tmux = pkgs.tmuxPlugins;
in
{
# home manager doesn't give us an option to add tmux extra config at the top so we do it ourselves here.
xdg.configFile."tmux/tmux.conf".text = lib.mkBefore (builtins.readFile ./tmux-reset.conf);
programs.tmux = {
enable = true;
# Revisit this later, permission denied to make anything in `/run` as my user...
secureSocket = false;
shortcut = "a";
prefix = "C-a";
baseIndex = 1;
mouse = true;
keyMode = "vi";
newSession = true;
shell = "${pkgs.zsh}/bin/zsh";
terminal = "screen-256color";
aggressiveResize = true;
plugins = [
{
plugin = tmux.sessionist;
extraConfig = ''
set -g @sessionist-join-pane "j"
set -g @sessionist-goto "o"
set -g @default_key_bindings_new "UNSET"
'';
}
tmux.yank
tmux.tmux-thumbs
{
plugin = tmux.fzf-tmux-url;
extraConfig = ''
set -g @fzf-url-fzf-options '-p 60%,30% --prompt = " " - -border-label=" Open URL "'
set -g @fzf-url-history-limit '2000'
'';
}
{
plugin = tmux.catppuccin.overrideAttrs (_: {
src = pkgs.fetchFromGitHub {
owner = "ringofstorms";
repo = "tmux-catppuccin-coal";
rev = "e6d7c658e2d11798912ca1ed4e3626e3e1fad3fc";
sha256 = "sha256-M1XAeCz/lqgjZ7CnWCykJxZCDk+WVoawwHrR9SEO9ns=";
};
});
extraConfig = ''
set -g @catppuccin_flavour 'mocha'
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(),}"
set -g @catppuccin_status_modules_right "directory application date_time"
set -g @catppuccin_status_modules_left "session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{b:pane_current_path}"
set -g @catppuccin_date_time_text "%H:%M"
'';
}
];
};
}

View file

@ -0,0 +1,5 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.vivaldi ];
}

View file

@ -0,0 +1,168 @@
local info = os.getenv("WEZTERM_EXECUTABLE")
local nix_test = os.getenv("NIX_PROFILES")
local isMac = info:find("MacOS") ~= nil
local isNix = not (nix_test == nil or nix_text == "")
-- gets basename of path. From https://stackoverflow.com/a/39872872
-- local function basename(str)
-- return str:sub(str:find("/[^/|\\]*$") + 1)
-- end
local wezterm = require("wezterm")
local config = {}
if wezterm.config_builder then
config = wezterm.config_builder()
end
config.disable_default_key_bindings = true
config.keys = {
-- Manually add Ctrl+Shift+V for Paste
{
key = "v",
mods = "CTRL|SHIFT",
action = wezterm.action.PasteFrom("Clipboard"),
},
-- Manually add Ctrl+Shift+C for Copy
{
key = "c",
mods = "CTRL|SHIFT",
action = wezterm.action.CopyTo("Clipboard"),
},
-- Create new TMUX window
{
key = "t",
mods = "CTRL",
action = wezterm.action.SendString("\x01" .. "t"),
},
-- Close TMUX window
{
key = "w",
mods = "CTRL",
action = wezterm.action.SendString("\x01" .. "w"),
},
-- Close TMUX window
{
key = "o",
mods = "CTRL",
action = wezterm.action.SendString("\x01" .. "o"),
},
}
for i = 1, 9 do
table.insert(config.keys, {
key = tostring(i),
mods = "CTRL",
action = wezterm.action.SendString("\x01" .. tostring(i)),
})
end
-- My modifications: https://gist.github.com/RingOfStorms/b2ff0c4e37f5be9f985c72c3ec9a3e62
local scheme = wezterm.get_builtin_color_schemes()["Catppuccin Mocha"]
local c = {
text = "#e0e0e0",
subtext1 = "#cccccc",
subtext0 = "#b8b8b8",
overlay2 = "#a3a3a3",
overlay1 = "#8c8c8c",
overlay0 = "#787878",
surface2 = "#636363",
surface1 = "#4f4f4f",
surface0 = "#3b3b3b",
base = "#262626",
mantle = "#1f1f1f",
crust = "#171717",
}
scheme.foreground = c.text
scheme.background = c.base
scheme.cursor_fg = c.crust
scheme.selection_fg = c.text
scheme.selection_bg = c.surface2
scheme.scrollbar_thumb = c.surface2
scheme.split = c.overlay0
scheme.ansi[1] = c.surface1
scheme.ansi[8] = c.subtext1
scheme.brights[1] = c.surface2
scheme.brights[8] = c.subtext0
scheme.visual_bell = c.surface0
-- I don't use tab bar so not really needed
scheme.tab_bar.background = c.crust
scheme.tab_bar.active_tab.fg_color = c.crust
scheme.tab_bar.inactive_tab.bg_color = c.mantle
scheme.tab_bar.inactive_tab.fg_color = c.text
scheme.tab_bar.inactive_tab_hover.bg_color = c.base
scheme.tab_bar.inactive_tab_hover.fg_color = c.text
scheme.tab_bar.new_tab.bg_color = c.surface0
scheme.tab_bar.new_tab.fg_color = c.text
scheme.tab_bar.new_tab_hover.bg_color = c.surface1
scheme.tab_bar.new_tab_hover.fg_color = c.text
scheme.tab_bar.inactive_tab_edge = c.surface0
config.color_schemes = { ["Catppuccin Coal"] = scheme }
config.color_scheme = "Catppuccin Coal"
if isMac then
config.font_size = 16
config.window_decorations = "RESIZE"
elseif isNix then
config.window_decorations = "NONE"
-- Fix for cursor disappearing in gnome
-- https://github.com/wez/wezterm/issues/1742#issuecomment-1075333507
local xcursor_size = nil
local xcursor_theme = nil
local success, stdout, stderr = wezterm.run_child_process({"gsettings", "get", "org.gnome.desktop.interface", "cursor-theme"})
if success then
xcursor_theme = stdout:gsub("'(.+)'\n", "%1")
end
local success, stdout, stderr = wezterm.run_child_process({"gsettings", "get", "org.gnome.desktop.interface", "cursor-size"})
if success then
xcursor_size = tonumber(stdout)
end
config.xcursor_theme = xcursor_theme
config.xcursor_size = xcursor_size
end
config.window_frame = {
font = wezterm.font({ family = "JetBrains Mono", weight = "Bold" }),
}
config.enable_tab_bar = false
-- config.colors = {
-- tab_bar = {
-- active_tab = {
-- bg_color = "#1c1c1c",
-- fg_color = "#ababab",
-- },
-- },
-- }
config.font = wezterm.font_with_fallback({
{
family = "JetBrainsMono Nerd Font Mono",
weight = "Regular",
},
{ family = "Terminus" },
})
-- wezterm.on("format-tab-title", function(tab)
-- local p = tab.active_pane
-- local idx = tab.is_active and "" or tab.tab_index + 1
-- local dir = basename(p.current_working_dir)
-- local title = idx .. " " .. dir
-- local proc = basename(p.foreground_process_name)
-- if proc ~= "zsh" then
-- title = title .. " " .. proc
-- end
-- return title
-- end)
return config

View file

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.wezterm ];
home.file.".wezterm.lua".source = ./wezterm.lua;
}

View file

@ -0,0 +1,9 @@
{ ... }:
{
programs.zoxide = {
enable = true;
enableZshIntegration = true;
options = [ "--cmd cd" ];
};
}

View file

@ -0,0 +1,20 @@
{ ... }:
{
programs.zsh = {
enable = true;
enableAutosuggestions = true;
shellAliases = { };
profileExtra = ''
autoload -Uz compinit && compinit
setopt correct
setopt extendedglob
setopt nocaseglob
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion
zstyle ':completion:*' list-colors "''${(s.:.)LS_COLORS}" # Colored completion (different colors for dirs/files/etc)
zstyle ':completion:*' rehash true # automatically find new executables in path
'';
};
}

View file

@ -0,0 +1,97 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
# use `dump dconf /` before and after and diff the files for easy editing of dconf below
gnome.dconf-editor
gnomeExtensions.workspace-switch-wraparound
#gnomeExtensions.forge # probably don't need on this on tiny laptop but may explore this instead of sway for my desktop
];
dconf = {
enable = true;
settings = {
"org/gnome/shell" = {
favorite-apps = [
"vivaldi-stable.desktop"
"org.wezfurlong.wezterm.desktop"
"org.gnome.Nautilus.desktop"
];
enabled-extensions = with pkgs.gnomeExtensions; [
workspace-switch-wraparound.extensionUuid
];
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
enable-hot-corners = false;
show-battery-percentage = true;
};
"org/gnome/desktop/wm/preferences" = {
resize-with-right-button = true;
button-layout = "maximize:appmenu,close";
audible-bell = false;
wrap-around = true;
};
"org/gnome/settings-daemon/plugins/media-keys" = {
# Disable the lock screen shortcut
screensaver = [ "" ];
};
"org/gnome/desktop/wm/keybindings" = {
minimize = [ "" ];
move-to-workspace-1 = [ "" ];
move-to-workspace-2 = [ "" ];
move-to-workspace-3 = [ "" ];
move-to-workspace-4 = [ "" ];
move-to-workspace-last = [ "" ];
move-to-workspace-down = [ "<Control><Super>Down" ];
move-to-workspace-up = [ "<Control><Super>Up" ];
move-to-workspace-left = [ "<Control><Super>Left" ];
move-to-workspace-right = [ "<Control><Super>Right" ];
switch-to-workspace-1 = [ "<Super>1" ];
switch-to-workspace0 = [ "<Super>2" ];
switch-to-workspace-3 = [ "<Super>3" ];
switch-to-workspace-4 = [ "<Super>4" ];
switch-to-workspace-down = [ "" ];
switch-to-workspace-last = [ "" ];
switch-to-workspace-left = [ "<Super>h" ];
switch-to-workspace-right = [ "<Super>l" ];
};
"org/gnome/mutter" = {
edge-tiling = true;
workspaces-only-on-primary = true;
};
"org/gnome/settings-daemon/plugins/power" = {
power-button-action = "nothing";
sleep-inactive-ac-type = "nothing";
sleep-inactive-battery-type = "nothing";
idle-brightness = 15;
power-saver-profile-on-low-battery = false;
};
"org/gnome/desktop/screensaver" = {
lock-enabled = false;
idle-activation-enabled = false;
};
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = false;
night-light-schedule-automatic = false;
};
"org/gnome/shell/keybindings" = {
shift-overview-down = [ "<Super>j" ];
shift-overview-up = [ "<Super>k" ];
switch-to-application-1 = [ "" ];
switch-to-application-2 = [ "" ];
switch-to-application-3 = [ "" ];
switch-to-application-4 = [ "" ];
switch-to-application-5 = [ "" ];
switch-to-application-6 = [ "" ];
switch-to-application-7 = [ "" ];
switch-to-application-8 = [ "" ];
switch-to-application-9 = [ "" ];
toggle-quick-settings = [ "" ];
toggle-application-view = [ "<Super>space" ];
};
};
};
}

25
users/josh/theme/gtk.nix Normal file
View file

@ -0,0 +1,25 @@
{ pkgs, ... }:
{
gtk = {
enable = true;
cursorTheme = {
name = "Numix-Cursor";
package = pkgs.numix-cursor-theme;
};
gtk3.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
gtk4.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
};
home.sessionVariables.GTK_THEME = "palenight";
}