feat (home): begin graphical split, vcs tweaks
This commit is contained in:
parent
a9951d5a2f
commit
d1c0846cf8
4 changed files with 256 additions and 238 deletions
141
home/cli.nix
Normal file
141
home/cli.nix
Normal file
|
|
@ -0,0 +1,141 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./packages/helix
|
||||||
|
];
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "hms";
|
||||||
|
homeDirectory = "/home/hms";
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
packages = with pkgs; [
|
||||||
|
xz
|
||||||
|
zip
|
||||||
|
unzip
|
||||||
|
ripgrep
|
||||||
|
tealdeer
|
||||||
|
zoxide
|
||||||
|
just
|
||||||
|
xclip
|
||||||
|
tinymist
|
||||||
|
texliveFull
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bash configuration
|
||||||
|
shell.enableBashIntegration = true;
|
||||||
|
shellAliases = {
|
||||||
|
":q" = "exit";
|
||||||
|
"h" = "hx";
|
||||||
|
"o" = "xdg-open";
|
||||||
|
"update" = "sudo nixos-rebuild switch --flake ~/dev/nixos";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Custom files
|
||||||
|
stateVersion = "25.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
programs.taskwarrior = {
|
||||||
|
enable = true;
|
||||||
|
dataLocation = "${config.home.homeDirectory}/.local/share/task";
|
||||||
|
# colorTheme = "light-256";
|
||||||
|
config.editor = "hx";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.jujutsu = {
|
||||||
|
enable = true;
|
||||||
|
settings.user.name = "Henri Saudubray";
|
||||||
|
settings.user.email = "henri.saudubray@proton.me";
|
||||||
|
settings.ui.default-command = "log";
|
||||||
|
settings.ui.diff-editor = ":builtin";
|
||||||
|
settings.signing.behavior = "own";
|
||||||
|
settings.signing.backend = "gpg";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.bat.enable = true;
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
user = {
|
||||||
|
email = "henri.saudubray@proton.me";
|
||||||
|
name = "Henri Saudubray";
|
||||||
|
};
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
merge.conflictstyle = "diff3";
|
||||||
|
};
|
||||||
|
signing = {
|
||||||
|
format = "openpgp";
|
||||||
|
signByDefault = true;
|
||||||
|
key = "0x7065F57ED8856128";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
bashrcExtra = ''
|
||||||
|
export PS1=" \W \[\e[33m\]λ\[\e[0m\] "
|
||||||
|
task ls
|
||||||
|
if [ "$(ls -A ~/dwn)" ]; then echo "TODO: organize downloads."; fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.gpg.enable = true;
|
||||||
|
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
options = [ "--cmd cd" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.userDirs = {
|
||||||
|
enable = true;
|
||||||
|
desktop = "${config.home.homeDirectory}/dsk";
|
||||||
|
documents = "${config.home.homeDirectory}/doc";
|
||||||
|
download = "${config.home.homeDirectory}/dwn";
|
||||||
|
music = "${config.home.homeDirectory}/aud";
|
||||||
|
pictures = "${config.home.homeDirectory}/img";
|
||||||
|
publicShare = "${config.home.homeDirectory}/pub";
|
||||||
|
templates = "${config.home.homeDirectory}/tpl";
|
||||||
|
videos = "${config.home.homeDirectory}/vid";
|
||||||
|
};
|
||||||
|
|
||||||
|
## FIXME: Find an alternative.
|
||||||
|
# systemd.user.services.helix-theme = {
|
||||||
|
# Unit = {
|
||||||
|
# Description = "Helix System Colour Scheme Synchronisation Service";
|
||||||
|
# Documentation = "https://github.com/helix-editor/helix/issues/2158";
|
||||||
|
# After = "gnome-session.target";
|
||||||
|
# };
|
||||||
|
# Install.WantedBy = [ "gnome-session.target" ];
|
||||||
|
# Service = {
|
||||||
|
# Type = "simple";
|
||||||
|
# RestartSec = 5;
|
||||||
|
# Restart = "always";
|
||||||
|
# ExecStart =
|
||||||
|
# let
|
||||||
|
# update-script = pkgs.writeShellScript "helix-theme-update" ''
|
||||||
|
# set -eu -o pipefail
|
||||||
|
# if [ "$1" = "default" ]; then
|
||||||
|
# sed -i 's/theme = ".*"/theme = "adwaita-light"/' \
|
||||||
|
# $HOME/.config/helix/config.toml
|
||||||
|
# else
|
||||||
|
# sed -i 's/theme = ".*"/theme = "adwaita-dark"/' \
|
||||||
|
# $HOME/.config/helix/config.toml
|
||||||
|
# fi
|
||||||
|
# killall -s SIGUSR1 hx
|
||||||
|
# '';
|
||||||
|
# in
|
||||||
|
# "${pkgs.writeShellScript "helix-theme-monitor" ''
|
||||||
|
# gsettings monitor org.gnome.desktop.interface color-scheme \
|
||||||
|
# | xargs -L1 bash -c "source ${update-script}"
|
||||||
|
# ''}";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
}
|
||||||
245
home/default.nix
245
home/default.nix
|
|
@ -1,240 +1,13 @@
|
||||||
{ config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
# enableGraphical ? false,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./packages/helix
|
./cli.nix
|
||||||
];
|
./graphical.nix
|
||||||
|
|
||||||
home = {
|
|
||||||
username = "hms";
|
|
||||||
homeDirectory = "/home/hms";
|
|
||||||
|
|
||||||
# Packages
|
|
||||||
packages =
|
|
||||||
with pkgs;
|
|
||||||
[
|
|
||||||
# Utilities
|
|
||||||
xz
|
|
||||||
zip
|
|
||||||
unzip
|
|
||||||
ripgrep
|
|
||||||
tealdeer
|
|
||||||
zoxide
|
|
||||||
just
|
|
||||||
gnome-tweaks
|
|
||||||
protonmail-bridge-gui
|
|
||||||
xclip
|
|
||||||
adw-gtk3
|
|
||||||
nerd-fonts.adwaita-mono
|
|
||||||
|
|
||||||
# Applications
|
|
||||||
blackbox-terminal
|
|
||||||
zotero
|
|
||||||
zulip
|
|
||||||
discord
|
|
||||||
signal-desktop
|
|
||||||
gapless
|
|
||||||
newsflash
|
|
||||||
gnome-solanum
|
|
||||||
|
|
||||||
# Development
|
|
||||||
## Typst, LaTeX
|
|
||||||
tinymist
|
|
||||||
texliveFull
|
|
||||||
]
|
]
|
||||||
++ (with gnomeExtensions; [
|
#++ (lib.optionals (enableGraphical) [ ./graphical.nix ])
|
||||||
blur-my-shell
|
;
|
||||||
clipboard-indicator
|
|
||||||
rounded-window-corners-reborn
|
|
||||||
runcat
|
|
||||||
caffeine
|
|
||||||
launch-new-instance
|
|
||||||
light-style
|
|
||||||
]);
|
|
||||||
|
|
||||||
# Bash configuration
|
|
||||||
shell.enableBashIntegration = true;
|
|
||||||
shellAliases = {
|
|
||||||
":q" = "exit";
|
|
||||||
"h" = "hx";
|
|
||||||
"o" = "xdg-open";
|
|
||||||
"update" = "sudo nixos-rebuild switch --flake ~/dev/nixos";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Custom files
|
|
||||||
|
|
||||||
file."librewolf-gnome-theme" = {
|
|
||||||
target = ".librewolf/default/chrome/librewolf-gnome-theme";
|
|
||||||
source = fetchTarball {
|
|
||||||
url = "https://github.com/rafaelmardojai/firefox-gnome-theme/archive/v143.tar.gz";
|
|
||||||
sha256 = "1gkfi77n8cn5xzl3wi9mggh7adirjrsnbqygg1mcvjy0ynmd6kfh";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
stateVersion = "25.11";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
programs.taskwarrior = {
|
|
||||||
enable = true;
|
|
||||||
dataLocation = "${config.home.homeDirectory}/.local/share/task";
|
|
||||||
colorTheme = "light-256";
|
|
||||||
config.editor = "hx";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.jujutsu = {
|
|
||||||
enable = true;
|
|
||||||
settings.user.name = "Henri Saudubray";
|
|
||||||
settings.user.email = "henri.saudubray@proton.me";
|
|
||||||
settings.ui.default-command = "log";
|
|
||||||
settings.ui.diff-editor = ":builtin";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.librewolf = {
|
|
||||||
enable = true;
|
|
||||||
profiles.default = {
|
|
||||||
name = "Default";
|
|
||||||
settings = {
|
|
||||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
|
||||||
"svg.context-properties.content.enabled" = true;
|
|
||||||
"gnomeTheme.hideSingleTab" = true;
|
|
||||||
};
|
|
||||||
userChrome = ''
|
|
||||||
@import "librewolf-gnome-theme/userChrome.css";
|
|
||||||
@import "librewolf-gnome-theme/theme/colors/dark.css";
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bat.enable = true;
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
user = {
|
|
||||||
email = "henri.saudubray@proton.me";
|
|
||||||
name = "Henri Saudubray";
|
|
||||||
};
|
|
||||||
init.defaultBranch = "main";
|
|
||||||
};
|
|
||||||
signing = {
|
|
||||||
format = "openpgp";
|
|
||||||
signByDefault = true;
|
|
||||||
key = "0x7065F57ED8856128";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
|
||||||
bashrcExtra = ''
|
|
||||||
export PS1=" \W \[\e[33m\]λ\[\e[0m\] "
|
|
||||||
task ls
|
|
||||||
if [ "$(ls -A ~/dwn)" ]; then echo "TODO: organize downloads."; fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.gpg.enable = true;
|
|
||||||
|
|
||||||
programs.zoxide = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
options = [ "--cmd cd" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.userDirs = {
|
|
||||||
enable = true;
|
|
||||||
# createDirectories = true;
|
|
||||||
desktop = "${config.home.homeDirectory}/dsk";
|
|
||||||
documents = "${config.home.homeDirectory}/doc";
|
|
||||||
download = "${config.home.homeDirectory}/dwn";
|
|
||||||
music = "${config.home.homeDirectory}/aud";
|
|
||||||
pictures = "${config.home.homeDirectory}/img";
|
|
||||||
publicShare = "${config.home.homeDirectory}/pub";
|
|
||||||
templates = "${config.home.homeDirectory}/tpl";
|
|
||||||
videos = "${config.home.homeDirectory}/vid";
|
|
||||||
};
|
|
||||||
|
|
||||||
## FIXME: Find an alternative.
|
|
||||||
# systemd.user.services.helix-theme = {
|
|
||||||
# Unit = {
|
|
||||||
# Description = "Helix System Colour Scheme Synchronisation Service";
|
|
||||||
# Documentation = "https://github.com/helix-editor/helix/issues/2158";
|
|
||||||
# After = "gnome-session.target";
|
|
||||||
# };
|
|
||||||
# Install.WantedBy = [ "gnome-session.target" ];
|
|
||||||
# Service = {
|
|
||||||
# Type = "simple";
|
|
||||||
# RestartSec = 5;
|
|
||||||
# Restart = "always";
|
|
||||||
# ExecStart =
|
|
||||||
# let
|
|
||||||
# update-script = pkgs.writeShellScript "helix-theme-update" ''
|
|
||||||
# set -eu -o pipefail
|
|
||||||
# if [ "$1" = "default" ]; then
|
|
||||||
# sed -i 's/theme = ".*"/theme = "adwaita-light"/' \
|
|
||||||
# $HOME/.config/helix/config.toml
|
|
||||||
# else
|
|
||||||
# sed -i 's/theme = ".*"/theme = "adwaita-dark"/' \
|
|
||||||
# $HOME/.config/helix/config.toml
|
|
||||||
# fi
|
|
||||||
# killall -s SIGUSR1 hx
|
|
||||||
# '';
|
|
||||||
# in
|
|
||||||
# "${pkgs.writeShellScript "helix-theme-monitor" ''
|
|
||||||
# gsettings monitor org.gnome.desktop.interface color-scheme \
|
|
||||||
# | xargs -L1 bash -c "source ${update-script}"
|
|
||||||
# ''}";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
dconf.settings = {
|
|
||||||
"org/gnome/TextEditor".keybindings = "vim";
|
|
||||||
"org/gnome/shell" = {
|
|
||||||
disable-user-extensions = false;
|
|
||||||
enabled-extensions = [
|
|
||||||
"clipboard-indicator@tudmotu.com"
|
|
||||||
"rounded-window-corners@fxgn"
|
|
||||||
"runcat@kolesnikov.se"
|
|
||||||
"caffeine@patapon.info"
|
|
||||||
"launch-new-instance@gnome-shell-extensions.gcampax.github.com"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"org/gnome/desktop/interface" = {
|
|
||||||
gtk-theme = "adw-gtk3";
|
|
||||||
show-battery-percentage = true;
|
|
||||||
};
|
|
||||||
"org/gnome/desktop/wm/preferences".button-layout = "appmenu:minimize,maximize,close";
|
|
||||||
"org/gnome/desktop/wm/keybindings" = {
|
|
||||||
switch-applications = [ "<Alt>grave" ];
|
|
||||||
switch-applications-backwards = [ "<Shift><Alt>grave" ];
|
|
||||||
switch-windows = [ "<Alt>Tab" ];
|
|
||||||
switch-windows-backwards = [ "<Shift><Alt>Tab" ];
|
|
||||||
};
|
|
||||||
"org/gnome/settings-daemon/plugins/media-keys".custom-keybindings = [
|
|
||||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
|
||||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
|
|
||||||
];
|
|
||||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
|
||||||
name = "Terminal";
|
|
||||||
command = "blackbox";
|
|
||||||
binding = "<Super>Return";
|
|
||||||
};
|
|
||||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
|
||||||
name = "Dark mode switcher";
|
|
||||||
command = "${pkgs.writeShellScript "gnome-dark-mode-switcher" ''
|
|
||||||
SCHEMA=org.gnome.desktop.interface
|
|
||||||
KEY=color-scheme
|
|
||||||
if [ "$(gsettings get "$SCHEMA" "$KEY")" = "'prefer-dark'" ]; then
|
|
||||||
gsettings set "$SCHEMA" "$KEY" "prefer-light";
|
|
||||||
else
|
|
||||||
gsettings set "$SCHEMA" "$KEY" "prefer-dark";
|
|
||||||
fi
|
|
||||||
''}";
|
|
||||||
binding = "<Super>d";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
101
home/graphical.nix
Normal file
101
home/graphical.nix
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
packages =
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
gnome-tweaks
|
||||||
|
protonmail-bridge-gui
|
||||||
|
adw-gtk3
|
||||||
|
nerd-fonts.adwaita-mono
|
||||||
|
blackbox-terminal
|
||||||
|
zotero
|
||||||
|
zulip
|
||||||
|
discord
|
||||||
|
signal-desktop
|
||||||
|
gapless
|
||||||
|
newsflash
|
||||||
|
gnome-solanum
|
||||||
|
]
|
||||||
|
++ (with gnomeExtensions; [
|
||||||
|
blur-my-shell
|
||||||
|
clipboard-indicator
|
||||||
|
rounded-window-corners-reborn
|
||||||
|
runcat
|
||||||
|
caffeine
|
||||||
|
launch-new-instance
|
||||||
|
light-style
|
||||||
|
]);
|
||||||
|
|
||||||
|
file."librewolf-gnome-theme" = {
|
||||||
|
target = ".librewolf/default/chrome/librewolf-gnome-theme";
|
||||||
|
source = fetchTarball {
|
||||||
|
url = "https://github.com/rafaelmardojai/firefox-gnome-theme/archive/v143.tar.gz";
|
||||||
|
sha256 = "1gkfi77n8cn5xzl3wi9mggh7adirjrsnbqygg1mcvjy0ynmd6kfh";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.librewolf = {
|
||||||
|
enable = true;
|
||||||
|
profiles.default = {
|
||||||
|
name = "Default";
|
||||||
|
settings = {
|
||||||
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||||
|
"svg.context-properties.content.enabled" = true;
|
||||||
|
"gnomeTheme.hideSingleTab" = true;
|
||||||
|
};
|
||||||
|
userChrome = ''
|
||||||
|
@import "librewolf-gnome-theme/userChrome.css";
|
||||||
|
@import "librewolf-gnome-theme/theme/colors/dark.css";
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/TextEditor".keybindings = "vim";
|
||||||
|
"org/gnome/shell" = {
|
||||||
|
disable-user-extensions = false;
|
||||||
|
enabled-extensions = [
|
||||||
|
"clipboard-indicator@tudmotu.com"
|
||||||
|
"rounded-window-corners@fxgn"
|
||||||
|
"runcat@kolesnikov.se"
|
||||||
|
"caffeine@patapon.info"
|
||||||
|
"launch-new-instance@gnome-shell-extensions.gcampax.github.com"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
gtk-theme = "adw-gtk3";
|
||||||
|
show-battery-percentage = true;
|
||||||
|
};
|
||||||
|
"org/gnome/desktop/wm/preferences".button-layout = "appmenu:minimize,maximize,close";
|
||||||
|
"org/gnome/desktop/wm/keybindings" = {
|
||||||
|
switch-applications = [ "<Alt>grave" ];
|
||||||
|
switch-applications-backwards = [ "<Shift><Alt>grave" ];
|
||||||
|
switch-windows = [ "<Alt>Tab" ];
|
||||||
|
switch-windows-backwards = [ "<Shift><Alt>Tab" ];
|
||||||
|
};
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys".custom-keybindings = [
|
||||||
|
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||||
|
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
|
||||||
|
];
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||||
|
name = "Terminal";
|
||||||
|
command = "blackbox";
|
||||||
|
binding = "<Super>Return";
|
||||||
|
};
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
||||||
|
name = "Dark mode switcher";
|
||||||
|
command = "${pkgs.writeShellScript "gnome-dark-mode-switcher" ''
|
||||||
|
SCHEMA=org.gnome.desktop.interface
|
||||||
|
KEY=color-scheme
|
||||||
|
if [ "$(gsettings get "$SCHEMA" "$KEY")" = "'prefer-dark'" ]; then
|
||||||
|
gsettings set "$SCHEMA" "$KEY" "prefer-light";
|
||||||
|
else
|
||||||
|
gsettings set "$SCHEMA" "$KEY" "prefer-dark";
|
||||||
|
fi
|
||||||
|
''}";
|
||||||
|
binding = "<Super>d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -8,7 +8,10 @@
|
||||||
editor.lsp.display-messages = true;
|
editor.lsp.display-messages = true;
|
||||||
editor.inline-diagnostics.cursor-line = "hint";
|
editor.inline-diagnostics.cursor-line = "hint";
|
||||||
editor.rulers = [ 81 ];
|
editor.rulers = [ 81 ];
|
||||||
editor.gutters.layout = [ "diagnostics" ];
|
editor.gutters.layout = [
|
||||||
|
"diff"
|
||||||
|
"diagnostics"
|
||||||
|
];
|
||||||
keys.insert.j.k = "normal_mode";
|
keys.insert.j.k = "normal_mode";
|
||||||
};
|
};
|
||||||
languages = {
|
languages = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue