Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
3874468107
|
|||
|
20b98780bf
|
|||
|
e46c158122
|
|||
|
19b772b1d2
|
|||
|
695e011020
|
|||
|
e26a2bacbb
|
@@ -82,6 +82,7 @@
|
||||
};
|
||||
sound = {
|
||||
enable = true;
|
||||
noisetorch = true;
|
||||
jack = true;
|
||||
scarlett.enable = true;
|
||||
};
|
||||
|
||||
@@ -20,6 +20,9 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
mySystem.users.phundrak = mkIf cfg.mySystem.users.phundrak.enable {
|
||||
extraGroups = ["docker"] ++ lists.optional cfg.podman.enable "podman";
|
||||
};
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
dive # A tool for exploring each layer in a docker image
|
||||
@@ -29,7 +32,7 @@ in {
|
||||
podman-compose
|
||||
podman-desktop
|
||||
];
|
||||
virtualisation = mkIf cfg.enable {
|
||||
virtualisation = {
|
||||
docker = mkIf (!cfg.podman.enable) {
|
||||
enable = true;
|
||||
enableNvidia = cfg.nvidia.enable;
|
||||
|
||||
@@ -9,6 +9,7 @@ with lib; let
|
||||
in {
|
||||
options.mySystem.hardware.sound = {
|
||||
enable = mkEnableOption "Whether to enable sounds with Pipewire";
|
||||
noisetorch = mkEnableOption "Whether to activate noisetorch support";
|
||||
scarlett.enable = mkEnableOption "Activate support for Scarlett sound card";
|
||||
alsa = mkOption {
|
||||
type = types.bool;
|
||||
@@ -44,7 +45,7 @@ in {
|
||||
pulseaudio.enable = false;
|
||||
};
|
||||
programs.noisetorch = mkIf cfg.enable {
|
||||
inherit (cfg) enable;
|
||||
enable = cfg.noisetorch;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,12 +11,8 @@ in {
|
||||
enable = mkEnableOption "Enable Flatpak support";
|
||||
builder.enable = mkEnableOption "Enable Flatpak builder";
|
||||
};
|
||||
config = {
|
||||
services.flatpak = mkIf cfg.enable {
|
||||
inherit (cfg) enable;
|
||||
};
|
||||
environment.systemPackages = mkIf cfg.builder.enable [
|
||||
pkgs.flatpak-buildR
|
||||
];
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = lists.optional cfg.builder.enable pkgs.flatpak-builder;
|
||||
services.flatpak.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,13 +10,20 @@ in {
|
||||
options.mySystem.users.phundrak = {
|
||||
enable = mkEnableOption "Enables user phundrak";
|
||||
trusted = mkEnableOption "Mark the user as trusted by Nix";
|
||||
extraGroups = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = ["feedbackd"];
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
users.users.phundrak = mkIf cfg.enable {
|
||||
isNormalUser = true;
|
||||
description = "Lucien Cartier-Tilet";
|
||||
extraGroups = ["networkmanager" "wheel" "docker" "dialout" "podman" "plugdev" "games" "audio" "input" "uinput"];
|
||||
extraGroups =
|
||||
["networkmanager" "wheel" "dialout" "plugdev" "games" "audio" "input"]
|
||||
++ extraGroups;
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keyFiles = lib.filesystem.listFilesRecursive ../../users/phundrak/keys;
|
||||
};
|
||||
|
||||
@@ -29,84 +29,86 @@ in {
|
||||
detect_urls = true;
|
||||
background_opacity = 0.7;
|
||||
};
|
||||
keybindings = {
|
||||
keybindings = let
|
||||
prefix = "kitty_mod+space";
|
||||
in {
|
||||
"alt+c" = "copy_to_clipboard";
|
||||
"kitty_mod+c" = "copy_to_clipboard";
|
||||
"alt+v" = "paste_from_clipboard";
|
||||
"kitty_mod+v" = "paste_from_clipboard";
|
||||
|
||||
"kitty_mod+s>c" = "show_scrollback";
|
||||
"kitty_mod+s>down" = "scroll_line_down";
|
||||
"kitty_mod+s>t" = "scroll_line_down";
|
||||
"kitty_mod+s>up" = "scroll_line_up";
|
||||
"kitty_mod+s>s" = "scroll_line_up";
|
||||
"kitty_mod+s>end" = "scroll_end";
|
||||
"kitty_mod+s>home" = "scroll_home";
|
||||
"kitty_mod+s>page_down" = "scroll_page_down";
|
||||
"kitty_mod+s>page_up" = "scroll_page_up";
|
||||
"${prefix}>s>c" = "show_scrollback";
|
||||
"${prefix}>s>down" = "scroll_line_down";
|
||||
"${prefix}>s>t" = "scroll_line_down";
|
||||
"${prefix}>s>up" = "scroll_line_up";
|
||||
"${prefix}>s>s" = "scroll_line_up";
|
||||
"${prefix}>s>end" = "scroll_end";
|
||||
"${prefix}>s>home" = "scroll_home";
|
||||
"${prefix}>s>page_down" = "scroll_page_down";
|
||||
"${prefix}>s>page_up" = "scroll_page_up";
|
||||
|
||||
"kitty_mod+enter" = "new_window";
|
||||
"kitty_mod+w>q" = "close_window";
|
||||
"kitty_mod+w>p" = "next_window";
|
||||
"kitty_mod+w>n" = "previous_window";
|
||||
"kitty_mod+w>f" = "move_window_forward";
|
||||
"kitty_mod+w>b" = "move_window_backward";
|
||||
"kitty_mod+w>t" = "move_window_to_top";
|
||||
"kitty_mod+w>r" = "start_resizing_window";
|
||||
"kitty_mod+w>1" = "first_window";
|
||||
"kitty_mod+w>2" = "second_window";
|
||||
"kitty_mod+w>3" = "third_window";
|
||||
"kitty_mod+w>4" = "fourth_window";
|
||||
"kitty_mod+w>5" = "fifth_window";
|
||||
"kitty_mod+w>6" = "sixth_window";
|
||||
"kitty_mod+w>7" = "seventh_window";
|
||||
"kitty_mod+w>8" = "eighth_window";
|
||||
"kitty_mod+w>9" = "ninth_window";
|
||||
"kitty_mod+w>0" = "tenth_window";
|
||||
"${prefix}>enter" = "new_window";
|
||||
"${prefix}>w>q" = "close_window";
|
||||
"${prefix}>w>p" = "next_window";
|
||||
"${prefix}>w>n" = "previous_window";
|
||||
"${prefix}>w>f" = "move_window_forward";
|
||||
"${prefix}>w>b" = "move_window_backward";
|
||||
"${prefix}>w>t" = "move_window_to_top";
|
||||
"${prefix}>w>r" = "start_resizing_window";
|
||||
"${prefix}>w>1" = "first_window";
|
||||
"${prefix}>w>2" = "second_window";
|
||||
"${prefix}>w>3" = "third_window";
|
||||
"${prefix}>w>4" = "fourth_window";
|
||||
"${prefix}>w>5" = "fifth_window";
|
||||
"${prefix}>w>6" = "sixth_window";
|
||||
"${prefix}>w>7" = "seventh_window";
|
||||
"${prefix}>w>8" = "eighth_window";
|
||||
"${prefix}>w>9" = "ninth_window";
|
||||
"${prefix}>w>0" = "tenth_window";
|
||||
|
||||
"kitty_mod+tab>n" = "next_tab";
|
||||
"kitty_mod+tab>p" = "previous_tab";
|
||||
"kitty_mod+tab>c" = "new_tab";
|
||||
"kitty_mod+tab>q" = "close_tab";
|
||||
"kitty_mod+tab>shift+n" = "move_tab_backward";
|
||||
"kitty_mod+tab>shift+p" = "move_tab_forward";
|
||||
"kitty_mod+tab>t" = "set_tab_title";
|
||||
"${prefix}>tab>n" = "next_tab";
|
||||
"${prefix}>tab>p" = "previous_tab";
|
||||
"${prefix}>tab>c" = "new_tab";
|
||||
"${prefix}>tab>q" = "close_tab";
|
||||
"${prefix}>tab>shift+n" = "move_tab_backward";
|
||||
"${prefix}>tab>shift+p" = "move_tab_forward";
|
||||
"${prefix}>tab>t" = "set_tab_title";
|
||||
|
||||
"kitty_mod+l" = "next_layout";
|
||||
"${prefix}>l" = "next_layout";
|
||||
|
||||
"kitty_mod+f>equal" = "change_font_size all 0";
|
||||
"kitty_mod+f>kp_add" = "change_font_size all +2.0";
|
||||
"kitty_mod+f>plus" = "change_font_size all +2.0";
|
||||
"kitty_mod+f>kp_subtract" = "change_font_size all -2.0";
|
||||
"kitty_mod+f>minus" = "change_font_size all -2.0";
|
||||
"${prefix}>f>equal" = "change_font_size all 0";
|
||||
"${prefix}>f>kp_add" = "change_font_size all +2.0";
|
||||
"${prefix}>f>plus" = "change_font_size all +2.0";
|
||||
"${prefix}>f>kp_subtract" = "change_font_size all -2.0";
|
||||
"${prefix}>f>minus" = "change_font_size all -2.0";
|
||||
|
||||
"kitty_mod+shift+h" = "kitten hints";
|
||||
"kitty_mod+h>p" = "kitten hints --type path --program -";
|
||||
"kitty_mod+h>shift+p" = "kitten hints --type path";
|
||||
"kitty_mod+h>l" = "kitten hints --type line --program -";
|
||||
"kitty_mod+h>w" = "kitten hints --type word --program -";
|
||||
"kitty_mod+h>h" = "kitten hints --type hash --program -";
|
||||
"kitty_mod+h>n" = "kitten hints --type linenum";
|
||||
"kitty_mod+h>y" = "kitten hints --type hyperlink";
|
||||
"${prefix}>shift+h" = "kitten hints";
|
||||
"${prefix}>h>p" = "kitten hints --type path --program -";
|
||||
"${prefix}>h>shift+p" = "kitten hints --type path";
|
||||
"${prefix}>h>l" = "kitten hints --type line --program -";
|
||||
"${prefix}>h>w" = "kitten hints --type word --program -";
|
||||
"${prefix}>h>h" = "kitten hints --type hash --program -";
|
||||
"${prefix}>h>n" = "kitten hints --type linenum";
|
||||
"${prefix}>h>y" = "kitten hints --type hyperlink";
|
||||
|
||||
"kitty_mod+f10" = "toggle_maximized";
|
||||
"kitty_mod+f11" = "toggle_fullscreen";
|
||||
"${prefix}>f10" = "toggle_maximized";
|
||||
"${prefix}>f11" = "toggle_fullscreen";
|
||||
|
||||
"kitty_mod+a>equal" = "set_background_opacity 1";
|
||||
"kitty_mod+a>d" = "set_background_opacity default";
|
||||
"kitty_mod+a>plus" = "set_background_opacity +0.1";
|
||||
"kitty_mod+a>up" = "set_background_opacity +0.1";
|
||||
"kitty_mod+a>kp_add" = "set_background_opacity +0.1";
|
||||
"kitty_mod+a>minus" = "set_background_opacity -0.1";
|
||||
"kitty_mod+a>down" = "set_background_opacity -0.1";
|
||||
"kitty_mod+a>kp_substract" = "set_background_opacity -0.1";
|
||||
"${prefix}>a>equal" = "set_background_opacity 1";
|
||||
"${prefix}>a>d" = "set_background_opacity default";
|
||||
"${prefix}>a>plus" = "set_background_opacity +0.1";
|
||||
"${prefix}>a>up" = "set_background_opacity +0.1";
|
||||
"${prefix}>a>kp_add" = "set_background_opacity +0.1";
|
||||
"${prefix}>a>minus" = "set_background_opacity -0.1";
|
||||
"${prefix}>a>down" = "set_background_opacity -0.1";
|
||||
"${prefix}>a>kp_substract" = "set_background_opacity -0.1";
|
||||
|
||||
"kitty_mod+delete" = "clear_terminal reset active";
|
||||
"kitty_mod+escape" = "kitty_shell window";
|
||||
"kitty_mod+f2" = "edit_config_file";
|
||||
"kitty_mod+n" = "new_os_window";
|
||||
"kitty_mod+o" = "pass_selection_to_program";
|
||||
"kitty_mod+u" = "kitten unicode_input";
|
||||
"${prefix}>delete" = "clear_terminal reset active";
|
||||
"${prefix}>escape" = "kitty_shell window";
|
||||
"${prefix}>f2" = "edit_config_file";
|
||||
"${prefix}>n" = "new_os_window";
|
||||
"${prefix}>o" = "pass_selection_to_program";
|
||||
"${prefix}>u" = "kitten unicode_input";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -40,6 +40,12 @@ in {
|
||||
enable = mkEnableOption "Enables jj-cz";
|
||||
alias = mkEnableOption "Enable `jj cz` as an alias to `jj-cz`";
|
||||
};
|
||||
# used in my shell .nix files
|
||||
shellCompletion = mkOption {
|
||||
description = "Enable Jujutsu shell completion";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
@@ -36,6 +36,7 @@ in {
|
||||
concatLines
|
||||
[
|
||||
(strings.optionalString cfg.eatIntegration ''[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/bash"'')
|
||||
(strings.optionalString config.home.dev.vcs.jj.shellCompletion "source <(jj util completion bash)")
|
||||
cfg.bashrcExtra
|
||||
];
|
||||
enableCompletion = cfg.autocompletion;
|
||||
|
||||
@@ -97,15 +97,15 @@ in {
|
||||
config.home.shell = {
|
||||
enableShellIntegration = cfg.bash.enable or cfg.zsh.enable or cfg.fish.enable;
|
||||
bash = {
|
||||
aliases = cfg.aliases // defaultAliases;
|
||||
aliases = defaultAliases // cfg.aliases;
|
||||
enable = mkDefault cfg.fullDesktop;
|
||||
};
|
||||
fish = {
|
||||
abbrs = cfg.aliases // defaultAliases;
|
||||
abbrs = defaultAliases // cfg.aliases;
|
||||
enable = mkDefault cfg.fullDesktop;
|
||||
};
|
||||
zsh = {
|
||||
abbrs = cfg.aliases // defaultAliases;
|
||||
abbrs = defaultAliases // cfg.aliases;
|
||||
enable = mkDefault cfg.fullDesktop;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -41,6 +41,7 @@ in {
|
||||
__fish_default_command_not_found_handler $argv
|
||||
end
|
||||
''
|
||||
(strings.optionalString config.home.dev.vcs.jj.shellCompletion "jj util completion fish | source")
|
||||
cfg.extraShellInit
|
||||
];
|
||||
plugins = [
|
||||
|
||||
@@ -62,6 +62,11 @@ in {
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview '${pkgs.eza}/bin/eza $realpath'
|
||||
''
|
||||
(strings.optionalString cfg.eatIntegration ''[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"'')
|
||||
(strings.optionalString config.home.dev.vcs.jj.shellCompletion ''
|
||||
autoload -U compinit
|
||||
compinit
|
||||
source <(jj util completion zsh)
|
||||
'')
|
||||
cfg.zshrcExtra
|
||||
];
|
||||
oh-my-zsh = {
|
||||
|
||||
@@ -40,7 +40,6 @@ in {
|
||||
|
||||
# Misc
|
||||
# gplates
|
||||
kicad-small
|
||||
qgis
|
||||
handy
|
||||
libnotify
|
||||
|
||||
Reference in New Issue
Block a user