This commit is contained in:
Fabian Montero 2024-09-05 12:28:09 -06:00
commit c8791adf39
Signed by untrusted user: fabian
GPG key ID: 1FFAC35E1798174F
33 changed files with 1844 additions and 0 deletions

17
home/apps/default.nix Normal file
View file

@ -0,0 +1,17 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.apps;
in {
options.local.apps.enable = mkEnableOption "Applications and tools";
imports = [
./library.nix
./steam
./terminal
./virtmanager.nix
];
}

55
home/apps/library.nix Normal file
View file

@ -0,0 +1,55 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.apps.defaultApps;
in {
options.local.apps.defaultApps.enable = mkEnableOption "Default app library";
config = mkIf cfg.enable {
home.packages = with pkgs; [
chromium
darktable
deluge
discord
element-desktop
firefox
gperftools
gwenview
helix
libreoffice-fresh
lutris
mpv
neovim
obs-studio
openrct2
pavucontrol
pdfarranger
prismlauncher
qpdfview
runelite
spotify
tdesktop
vlc
vpsfree-client
vscodium-fhs
zola
zoom-us
];
xdg.mimeApps.defaultApplications = {
"application/x-extension-htm" = ["firefox.desktop"];
"application/x-extension-html" = ["firefox.desktop"];
"application/x-extension-shtml" = ["firefox.desktop"];
"application/x-extension-xht" = ["firefox.desktop"];
"application/x-extension-xhtml" = ["firefox.desktop"];
"application/xhtml+xml" = ["firefox.desktop"];
"text/html" = ["firefox.desktop"];
"x-scheme-handler/http" = ["firefox.desktop"];
"x-scheme-handler/https" = ["firefox.desktop"];
"application/pdf" = ["qpdfview.desktop"];
};
};
}

View file

@ -0,0 +1,19 @@
{
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.local.apps.steam;
in {
options.local.apps.steam.enable = mkEnableOption "Steam";
config = mkIf cfg.enable {
home.packages = [
(pkgs.callPackage ./package.nix {})
pkgs.protonup
pkgs.winetricks
pkgs.protontricks
];
};
}

View file

@ -0,0 +1,9 @@
{
writeShellScriptBin,
steam-run,
steam,
...
}:
writeShellScriptBin "steam" ''
exec ${steam-run}/bin/steam-run ${steam}/bin/steam -console
''

View file

@ -0,0 +1,35 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.apps.terminal;
in {
options.local.apps.terminal.enable = mkEnableOption "Terminal emulator settings";
config.programs = mkIf cfg.enable {
kitty = {
enable = true;
extraConfig = import ./kitty.conf.nix;
};
tmux = {
enable = true;
aggressiveResize = true;
clock24 = true;
escapeTime = 10;
terminal = "xterm-256color";
keyMode = "emacs";
extraConfig = ''
set -g mouse on
set -ga update-environment " LIFT_PID"
set -g set-titles on
set -g renumber-windows on
set -sa terminal-overrides ',xterm-termite:RGB'
set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,} %H:%M %d-%b-%y"
'';
};
};
}

View file

@ -0,0 +1,87 @@
''
# Fonts
font_family JetBrains Mono Medium
bold_font JetBrains Mono Bold
italic_font JetBrains Mono Italic
bold_italic_font JetBrains Mono Bold Italic
font_size 15
disable_ligatures cursor
initial_window_width 1200
initial_window_height 600
# Cursor
cursor_shape beam
cursor_beam_thickness 1.9
cursor_stop_blinking_after 0
# Audio
enable_audio_bell no
# Tabs
tab_bar_style separator
tab_separator " | "
tab_title_template "{index}: {title}"
# Color
# special
foreground #ffffff
foreground_bold #ffffff
cursor #ffffff
background #000000
background_opacity 1
# Shortcuts
map ctrl+shift+c copy_to_clipboard
map ctrl+shift+v paste_from_clipboard
map ctrl+shift+s paste_from_selection
map shift+insert paste_from_selection
map ctrl+shift+up scroll_line_up
map ctrl+shift+down scroll_line_down
map ctrl+shift+page_up scroll_page_up
map ctrl+shift+page_down scroll_page_down
map ctrl+shift+home scroll_home
map ctrl+shift+end scroll_end
map ctrl+shift+enter new_window
map ctrl+alt+enter launch --cwd=current
map ctrl+shift+w close_window
map ctrl+shift+] next_window
map ctrl+shift+[ previous_window
map ctrl+shift+1 first_window
map ctrl+shift+2 second_window
map ctrl+shift+3 third_window
map ctrl+shift+4 fourth_window
map ctrl+shift+5 fifth_window
map ctrl+shift+6 sixth_window
map ctrl+shift+7 seventh_window
map ctrl+shift+8 eighth_window
map ctrl+shift+9 ninth_window
map ctrl+shift+0 tenth_window
map ctrl+shift+right next_tab
map ctrl+shift+left previous_tab
map ctrl+shift+t new_tab
map ctrl+shift+q close_tab
map ctrl+shift+. move_tab_forward
map ctrl+shift+, move_tab_backward
map ctrl+shift+alt+t set_tab_title
map ctrl+alt+1 goto_tab 1
map ctrl+alt+2 goto_tab 2
map ctrl+alt+3 goto_tab 3
map ctrl+alt+4 goto_tab 4
map ctrl+alt+5 goto_tab 5
map ctrl+alt+6 goto_tab 6
map ctrl+alt+7 goto_tab 7
map ctrl+alt+8 goto_tab 8
map ctrl+alt+9 goto_tab 9
map ctrl+alt+0 goto_tab 10
map ctrl+shift+equal change_font_size all +1.0
map ctrl+shift+minus change_font_size all -1.0
map ctrl+shift+backspace change_font_size all 0
map ctrl+shift+delete clear_terminal reset active
''

16
home/apps/virtmanager.nix Normal file
View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.apps.virtmanager;
in {
options.local.apps.virtmanager.enable = mkEnableOption "Virtmanager";
config = mkIf cfg.enable {
home.packages = with pkgs; [
virt-manager
];
};
}