Modularize programs and add starship
This commit is contained in:
parent
1a0064894d
commit
44ac35d6e2
24 changed files with 646 additions and 530 deletions
|
|
@ -3,6 +3,5 @@
|
||||||
./env.nix
|
./env.nix
|
||||||
./xkb_layout.nix
|
./xkb_layout.nix
|
||||||
./common_hardware.nix
|
./common_hardware.nix
|
||||||
./theme.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{ lib, config, ... }: {
|
|
||||||
# imports = lib.mkIf config.conf.default_base_packages.enable [
|
|
||||||
imports = [
|
|
||||||
# is wrapped in if statement to enable when needed
|
|
||||||
../programs/gaming/default.nix
|
|
||||||
../programs/themes/stylix.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -10,9 +10,9 @@
|
||||||
device = 1;
|
device = 1;
|
||||||
};
|
};
|
||||||
hostname = "marmo";
|
hostname = "marmo";
|
||||||
colorscheme = "catppuccin-mocha";
|
|
||||||
};
|
};
|
||||||
mods = {
|
mods = {
|
||||||
|
stylix.colorscheme = "catppuccin-mocha";
|
||||||
hyprland.monitor = [
|
hyprland.monitor = [
|
||||||
# default
|
# default
|
||||||
"DP-1,1920x1080@144,0x0,1"
|
"DP-1,1920x1080@144,0x0,1"
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@
|
||||||
ironbar.modules = [
|
ironbar.modules = [
|
||||||
{ type = "upower"; class = "memory-usage"; }
|
{ type = "upower"; class = "memory-usage"; }
|
||||||
];
|
];
|
||||||
colorscheme = "catppuccin-mocha";
|
|
||||||
};
|
};
|
||||||
mods = {
|
mods = {
|
||||||
|
stylix.colorscheme = "catppuccin-mocha";
|
||||||
hyprland = {
|
hyprland = {
|
||||||
monitor = [
|
monitor = [
|
||||||
# default
|
# default
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@ in
|
||||||
};
|
};
|
||||||
streamdeck.enable = true;
|
streamdeck.enable = true;
|
||||||
hostname = "spaceship";
|
hostname = "spaceship";
|
||||||
colorscheme = "catppuccin-mocha";
|
|
||||||
};
|
};
|
||||||
mods = {
|
mods = {
|
||||||
|
stylix.colorscheme = "catppuccin-mocha";
|
||||||
hyprland = {
|
hyprland = {
|
||||||
monitor = [
|
monitor = [
|
||||||
# default
|
# default
|
||||||
|
|
|
||||||
|
|
@ -173,43 +173,6 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
colorscheme = lib.mkOption {
|
|
||||||
default = {
|
|
||||||
# custom tokyo night
|
|
||||||
base00 = "1A1B26";
|
|
||||||
# base01 = "16161E";
|
|
||||||
# base01 = "15161e";
|
|
||||||
base01 = "191a25";
|
|
||||||
base02 = "2F3549";
|
|
||||||
base03 = "444B6A";
|
|
||||||
base04 = "787C99";
|
|
||||||
base05 = "A9B1D6";
|
|
||||||
base06 = "CBCCD1";
|
|
||||||
base07 = "D5D6DB";
|
|
||||||
base08 = "C0CAF5";
|
|
||||||
base09 = "A9B1D6";
|
|
||||||
base0A = "0DB9D7";
|
|
||||||
base0B = "9ECE6A";
|
|
||||||
base0C = "B4F9F8";
|
|
||||||
# base0D = "2AC3DE";
|
|
||||||
# base0D = "A9B1D6";
|
|
||||||
# base0D = "62A0EA";
|
|
||||||
# base0D = "779EF1";
|
|
||||||
base0D = "366fea";
|
|
||||||
base0E = "BB9AF7";
|
|
||||||
base0F = "F7768E";
|
|
||||||
};
|
|
||||||
example = "catppuccin-mocha";
|
|
||||||
type = with lib.types; oneOf [ str attrs path ];
|
|
||||||
description = ''
|
|
||||||
Base16 colorscheme.
|
|
||||||
Can be an attribute set with base00 to base0F,
|
|
||||||
a string that leads to a yaml file in base16-schemes path,
|
|
||||||
or a path to a custom yaml file.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
|
||||||
|
|
@ -77,97 +77,6 @@
|
||||||
nssmdns4 = true;
|
nssmdns4 = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
programs.starship =
|
|
||||||
let
|
|
||||||
base16 = pkgs.callPackage inputs.base16.lib { };
|
|
||||||
scheme = (base16.mkSchemeAttrs config.stylix.base16Scheme);
|
|
||||||
code_format = "[](bg:prev_bg fg:#5256c3)[ $symbol ($version)](bg:#5256c3)";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
interactiveOnly = true;
|
|
||||||
presets = [ "pastel-powerline" ];
|
|
||||||
settings =
|
|
||||||
{
|
|
||||||
# derived from https://starship.rs/presets/pastel-powerline
|
|
||||||
format = ''$username$directory$git_branch$git_status$git_metrics[ ](bg:none fg:prev_bg)'';
|
|
||||||
right_format = ''$c$elixir$elm$golang$gradle$haskell$java$julia$nodejs$nim$rust$scala$python$ocaml$opa$perl$zig$dart$dotnet$nix_shell$shell$solidity[](bg:prev_bg fg:#3465A4)$time$os'';
|
|
||||||
username = {
|
|
||||||
show_always = false;
|
|
||||||
style_user = "bg:#5277C3 fg:#${scheme.base05}";
|
|
||||||
style_root = "bg:#5277C3 fg:#${scheme.base05}";
|
|
||||||
format = "[ $user ]($style)[](bg:#3465A4 fg:#5277C3)";
|
|
||||||
disabled = false;
|
|
||||||
};
|
|
||||||
os = {
|
|
||||||
symbols = { NixOS = " "; };
|
|
||||||
style = "bg:#3465A4 fg:#${scheme.base05}";
|
|
||||||
disabled = false;
|
|
||||||
};
|
|
||||||
directory = {
|
|
||||||
style = "bg:#3465A4 fg:#${scheme.base05}";
|
|
||||||
format = "[ $path ]($style)";
|
|
||||||
truncation_length = 3;
|
|
||||||
truncation_symbol = "…/";
|
|
||||||
};
|
|
||||||
git_branch = {
|
|
||||||
symbol = "";
|
|
||||||
style = "bg:#5256c3 fg:#${scheme.base05}";
|
|
||||||
format = "[ ](bg:#5256c3 fg:prev_bg)[$symbol $branch ]($style)";
|
|
||||||
};
|
|
||||||
git_status = {
|
|
||||||
staged = "+\${count} (fg:#C4A000)";
|
|
||||||
ahead = "⇡\${count} (fg:#C4A000)";
|
|
||||||
diverged = "⇕⇡\${count} (fg:#C4A000)";
|
|
||||||
behind = "⇣\${count} (fg:#C4A000)";
|
|
||||||
stashed = " ";
|
|
||||||
untracked = "?\${count} (fg:#C4A000)";
|
|
||||||
modified = "!\${count} (fg:#C4A000)";
|
|
||||||
deleted = "✘\${count} (fg:#C4A000)";
|
|
||||||
conflicted = "=\${count} (fg:#C4A000)";
|
|
||||||
renamed = "»\${count} (fg:#C4A000)";
|
|
||||||
style = "bg:#5256c3 fg:fg:#C4A000";
|
|
||||||
format = "[$all_status$ahead_behind]($style)";
|
|
||||||
};
|
|
||||||
git_metrics = {
|
|
||||||
disabled = false;
|
|
||||||
format = "([| ](bg:#5256c3)[+$added]($added_style bg:#5256c3)[ -$deleted]($deleted_style bg:#5256c3))";
|
|
||||||
};
|
|
||||||
c = { format = code_format; };
|
|
||||||
elixir = { format = code_format; };
|
|
||||||
elm = { format = code_format; };
|
|
||||||
golang = { format = code_format; };
|
|
||||||
gradle = { format = code_format; };
|
|
||||||
haskell = { format = code_format; };
|
|
||||||
java = { format = code_format; };
|
|
||||||
julia = { format = code_format; };
|
|
||||||
nodejs = { format = code_format; };
|
|
||||||
nim = { format = code_format; };
|
|
||||||
nix_shell = { symbol = ""; format = code_format; };
|
|
||||||
rust = { format = code_format; };
|
|
||||||
scala = { format = code_format; };
|
|
||||||
typst = { format = code_format; };
|
|
||||||
python = { format = code_format; };
|
|
||||||
ocaml = { format = code_format; };
|
|
||||||
opa = { format = code_format; };
|
|
||||||
perl = { format = code_format; };
|
|
||||||
zig = { format = code_format; };
|
|
||||||
dart = { format = code_format; };
|
|
||||||
dotnet = { format = code_format; };
|
|
||||||
# docker_context = {
|
|
||||||
# symbol = " ";
|
|
||||||
# style = "bg:#06969A";
|
|
||||||
# format = "[](bg:#06969A fg:prev_bg)[ $symbol $context ]($style)";
|
|
||||||
# };
|
|
||||||
time = {
|
|
||||||
disabled = false;
|
|
||||||
time_format = "%R"; # Hour:Minute Format
|
|
||||||
style = "bg:#3465A4 fg:#${scheme.base05}";
|
|
||||||
format = "[ $time ]($style)";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
programs.fish.promptInit = ''
|
programs.fish.promptInit = ''
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
config = lib.mkIf config.mods.coding.enable (lib.optionalAttrs (options?home.packages) {
|
config = lib.mkIf config.mods.coding.enable (lib.optionalAttrs (options?home.packages) {
|
||||||
programs.dashvim = lib.mkIf config.mods.coding.dashvim {
|
programs.dashvim = lib.mkIf config.mods.coding.dashvim {
|
||||||
enable = true;
|
enable = true;
|
||||||
colorscheme = config.conf.colorscheme;
|
colorscheme = config.mods.stylix.colorscheme;
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
#basics
|
#basics
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,11 @@
|
||||||
./coding.nix
|
./coding.nix
|
||||||
./flatpak.nix
|
./flatpak.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
|
./starship.nix
|
||||||
|
./git.nix
|
||||||
|
./keepassxc.nix
|
||||||
|
./gaming.nix
|
||||||
|
./stylix.nix
|
||||||
./hyprland
|
./hyprland
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
72
modules/programs/gaming.nix
Normal file
72
modules/programs/gaming.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
{ lib, config, options, pkgs, ... }: {
|
||||||
|
options.mods.gaming = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Enabled gaming related features.";
|
||||||
|
};
|
||||||
|
tools = lib.mkOption {
|
||||||
|
default = with pkgs; [
|
||||||
|
gamemode
|
||||||
|
steam
|
||||||
|
lutris
|
||||||
|
wine
|
||||||
|
adwsteamgtk
|
||||||
|
heroic
|
||||||
|
];
|
||||||
|
example = [ ];
|
||||||
|
type = with lib.types; listOf packages;
|
||||||
|
description = "Install gaming related packages";
|
||||||
|
};
|
||||||
|
steam = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Whether to use steam";
|
||||||
|
};
|
||||||
|
gamemode = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Whether to use gamemode";
|
||||||
|
};
|
||||||
|
gpu_optimization = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Whether to use GPU performance setting. NOTE: this is at your own risk!";
|
||||||
|
};
|
||||||
|
gpu_device = lib.mkOption {
|
||||||
|
default = "0";
|
||||||
|
example = "1";
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Your gpu device.(Physical id of lshw)";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.mods.gaming.enable
|
||||||
|
(lib.optionalAttrs (options?environment.systemPackages) {
|
||||||
|
environment.systemPackages = config.mods.gaming.tools;
|
||||||
|
|
||||||
|
programs.steam.enable = config.mods.gaming.steam;
|
||||||
|
programs.gamemode.enable = true;
|
||||||
|
programs.gamemode = {
|
||||||
|
enableRenice = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
governor = "performance";
|
||||||
|
};
|
||||||
|
gpu = lib.mkIf config.mods.gaming.gpu_optimization {
|
||||||
|
apply_gpu_optimisations = "accept-responsibility";
|
||||||
|
gpu_device = config.mods.gaming.gpu_device;
|
||||||
|
amd_performance_level = "high";
|
||||||
|
nv_powermizer_mode = 1;
|
||||||
|
};
|
||||||
|
custom = {
|
||||||
|
start = "notify-send -a 'Gamemode' 'Optimizations activated'";
|
||||||
|
end = "notify-send -a 'Gamemode' 'Optimizations deactivated'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
46
modules/programs/git.nix
Normal file
46
modules/programs/git.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
{ lib, config, options, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.mods.git = {
|
||||||
|
username = lib.mkOption {
|
||||||
|
default = "DashieTM";
|
||||||
|
example = "globi";
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Git user name";
|
||||||
|
};
|
||||||
|
email = lib.mkOption {
|
||||||
|
default = "fabio.lenherr@gmail.com";
|
||||||
|
example = "globi@globus.glob";
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Git email";
|
||||||
|
};
|
||||||
|
ssh_config = lib.mkOption {
|
||||||
|
default = ''
|
||||||
|
Host github.com
|
||||||
|
${if (config.sops.secrets?hub.path) then "IdentityFile ${config.sops.secrets.hub.path}" else ""}
|
||||||
|
Host gitlab.com
|
||||||
|
${if (config.sops.secrets?lab.path) then "IdentityFile ${config.sops.secrets.lab.path}" else ""}
|
||||||
|
Host dashie.org
|
||||||
|
${if (config.sops.secrets?dashie.path) then "IdentityFile ${config.sops.secrets.dashie.path}" else ""}
|
||||||
|
'';
|
||||||
|
example = '''';
|
||||||
|
type = lib.types.lines;
|
||||||
|
description = "ssh configuration (keys for git)";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = (lib.optionalAttrs (options?programs.git && options?home.file) {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = config.mods.git.username;
|
||||||
|
userEmail = config.mods.git.email;
|
||||||
|
extraConfig = {
|
||||||
|
merge = {
|
||||||
|
tool = "nvimdiff";
|
||||||
|
};
|
||||||
|
diff = {
|
||||||
|
tool = "nvimdiff";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.file.".ssh/config".text = config.mods.git.ssh_config;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ lib, config, options, pkgs, ... }: {
|
{ lib, config, options, pkgs, ... }: {
|
||||||
|
|
||||||
options.mods = {
|
options.mods = {
|
||||||
gnome_services.enable = lib.mkOption {
|
gnome_services.enable = lib.mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@
|
||||||
qt5ct
|
qt5ct
|
||||||
qt6ct
|
qt6ct
|
||||||
gnutar
|
gnutar
|
||||||
fishPlugins.tide
|
|
||||||
nix-index
|
nix-index
|
||||||
libnotify
|
libnotify
|
||||||
zenith
|
zenith
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,23 @@
|
||||||
Extra exec_once.
|
Extra exec_once.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
use_default_config = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = ''
|
||||||
|
Use preconfigured Hyprland config.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
custom_config = lib.mkOption {
|
||||||
|
default = { };
|
||||||
|
example = { };
|
||||||
|
type = with lib.types; attrsOf anything;
|
||||||
|
description = ''
|
||||||
|
Custom Hyprland configuration.
|
||||||
|
Will be merged with default configuration if enabled.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -62,262 +79,263 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland.enable = true;
|
wayland.windowManager.hyprland.enable = true;
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = lib.mkIf config.mods.hyprland.use_default_config
|
||||||
"$mod" = "SUPER";
|
{
|
||||||
"source" = "/home/${config.conf.username}/.config/reset/keyboard.conf";
|
"$mod" = "SUPER";
|
||||||
|
"source" = "/home/${config.conf.username}/.config/reset/keyboard.conf";
|
||||||
|
|
||||||
bindm = [
|
bindm = [
|
||||||
"$mod, mouse:272, movewindow"
|
"$mod, mouse:272, movewindow"
|
||||||
"$mod, mouse:273, resizewindow"
|
"$mod, mouse:273, resizewindow"
|
||||||
];
|
|
||||||
|
|
||||||
bind = [
|
|
||||||
# screenshots
|
|
||||||
"$mod SUPER,S,exec,grim -g \"$(slurp)\" - | wl-copy"
|
|
||||||
"$mod SUPERSHIFTALT,S,exec, grim -g \"$(slurp)\" $HOME/gits/ost-5semester/Screenshots/$(date +'%Y_%m_%d_%I_%M_%S.png') && (date +'%Y_%m_%d_%I_%M_%S.png') | wl-copy"
|
|
||||||
"$mod SUPERSHIFT,S,exec,grim -g \"$(slurp)\" - | satty -f -"
|
|
||||||
"$mod SUPERCONTROLSHIFT,S,exec,grim -c -g \"2560,0 3440x1440\" - | wl-copy"
|
|
||||||
|
|
||||||
# regular programs
|
|
||||||
"$mod SUPER,F,exec,firefox"
|
|
||||||
"$mod SUPER,T,exec,kitty -1"
|
|
||||||
"$mod SUPER,E,exec,nautilus -w"
|
|
||||||
"$mod SUPER,N,exec,neovide"
|
|
||||||
"$mod SUPER,M,exec,oxidash"
|
|
||||||
"$mod SUPER,R,exec,anyrun"
|
|
||||||
"$mod SUPER,G,exec,oxicalc"
|
|
||||||
"$mod SUPER,D,exec,oxishut"
|
|
||||||
"$mod SUPER,A,exec,oxipaste"
|
|
||||||
"$mod SUPERSHIFT,P,exec,hyprdock --gui"
|
|
||||||
"$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend"
|
|
||||||
"$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate"
|
|
||||||
|
|
||||||
# media keys
|
|
||||||
",XF86AudioMute,exec, $HOME/.config/scripts/audio_control.sh mute"
|
|
||||||
",XF86AudioLowerVolume,exec, $HOME/.config/scripts/audio_control.sh sink -5%"
|
|
||||||
",XF86AudioRaiseVolume,exec, $HOME/.config/scripts/audio_control.sh sink +5%"
|
|
||||||
",XF86AudioPlay,exec, playerctl play-pause"
|
|
||||||
",XF86AudioNext,exec, playerctl next"
|
|
||||||
",XF86AudioPrev,exec, playerctl previous"
|
|
||||||
",XF86MonBrightnessDown,exec, $HOME/.config/scripts/change-brightness brightness 10%-"
|
|
||||||
",XF86MonBrightnessUp,exec, $HOME/.config/scripts/change-brightness brightness +10%"
|
|
||||||
|
|
||||||
# hyprland keybinds
|
|
||||||
# misc
|
|
||||||
"$mod SUPER,V,togglefloating,"
|
|
||||||
"$mod SUPER,B,fullscreen,"
|
|
||||||
"$mod SUPER,C,togglesplit"
|
|
||||||
"$mod SUPER,Q,killactive,"
|
|
||||||
"$mod SUPERSHIFTALT,M,exit,"
|
|
||||||
"$mod SUPERSHIFT,W,togglespecialworkspace"
|
|
||||||
|
|
||||||
# move
|
|
||||||
"$mod SUPER,left,movewindow,l"
|
|
||||||
"$mod SUPER,right,movewindow,r"
|
|
||||||
"$mod SUPER,up,movewindow,u"
|
|
||||||
"$mod SUPER,down,movewindow,d"
|
|
||||||
|
|
||||||
# workspaces
|
|
||||||
"$mod SUPER,1,workspace,1"
|
|
||||||
"$mod SUPER,2,workspace,2"
|
|
||||||
"$mod SUPER,3,workspace,3"
|
|
||||||
"$mod SUPER,4,workspace,4"
|
|
||||||
"$mod SUPER,5,workspace,5"
|
|
||||||
"$mod SUPER,6,workspace,6"
|
|
||||||
"$mod SUPER,7,workspace,7"
|
|
||||||
"$mod SUPER,8,workspace,8"
|
|
||||||
"$mod SUPER,9,workspace,9"
|
|
||||||
"$mod SUPER,0,workspace,10"
|
|
||||||
|
|
||||||
# move to workspace
|
|
||||||
"$mod SUPERSHIFT,1,movetoworkspace,1"
|
|
||||||
"$mod SUPERSHIFT,2,movetoworkspace,2"
|
|
||||||
"$mod SUPERSHIFT,3,movetoworkspace,3"
|
|
||||||
"$mod SUPERSHIFT,4,movetoworkspace,4"
|
|
||||||
"$mod SUPERSHIFT,5,movetoworkspace,5"
|
|
||||||
"$mod SUPERSHIFT,6,movetoworkspace,6"
|
|
||||||
"$mod SUPERSHIFT,7,movetoworkspace,7"
|
|
||||||
"$mod SUPERSHIFT,8,movetoworkspace,8"
|
|
||||||
"$mod SUPERSHIFT,9,movetoworkspace,9"
|
|
||||||
"$mod SUPERSHIFT,0,movetoworkspace,10"
|
|
||||||
|
|
||||||
|
|
||||||
# move to workspace silent
|
|
||||||
"$mod SUPERSHIFTALT,1,movetoworkspacesilent,1"
|
|
||||||
"$mod SUPERSHIFTALT,2,movetoworkspacesilent,2"
|
|
||||||
"$mod SUPERSHIFTALT,3,movetoworkspacesilent,3"
|
|
||||||
"$mod SUPERSHIFTALT,4,movetoworkspacesilent,4"
|
|
||||||
"$mod SUPERSHIFTALT,5,movetoworkspacesilent,5"
|
|
||||||
"$mod SUPERSHIFTALT,6,movetoworkspacesilent,6"
|
|
||||||
"$mod SUPERSHIFTALT,7,movetoworkspacesilent,7"
|
|
||||||
"$mod SUPERSHIFTALT,8,movetoworkspacesilent,8"
|
|
||||||
"$mod SUPERSHIFTALT,9,movetoworkspacesilent,9"
|
|
||||||
"$mod SUPERSHIFTALT,0,movetoworkspacesilent,10"
|
|
||||||
|
|
||||||
# preselection
|
|
||||||
"$mod SUPERALT,j,layoutmsg,preselect l"
|
|
||||||
"$mod SUPERALT,k,layoutmsg,preselect d"
|
|
||||||
"$mod SUPERALT,l,layoutmsg,preselect u"
|
|
||||||
"$mod SUPERALT,semicolon,layoutmsg,preselect r"
|
|
||||||
"$mod SUPERALT,h,layoutmsg,preselect n"
|
|
||||||
];
|
|
||||||
|
|
||||||
binde = [
|
|
||||||
# hyprland keybinds
|
|
||||||
# focus
|
|
||||||
"$mod SUPER,J,movefocus,l"
|
|
||||||
"$mod SUPER,semicolon,movefocus,r"
|
|
||||||
"$mod SUPER,L,movefocus,u"
|
|
||||||
"$mod SUPER,K,movefocus,d"
|
|
||||||
|
|
||||||
# resize
|
|
||||||
"$mod SUPER,U,resizeactive,-20 0"
|
|
||||||
"$mod SUPER,P,resizeactive,20 0"
|
|
||||||
"$mod SUPER,O,resizeactive,0 -20"
|
|
||||||
"$mod SUPER,I,resizeactive,0 20"
|
|
||||||
];
|
|
||||||
|
|
||||||
general = {
|
|
||||||
gaps_out = "3,5,5,5";
|
|
||||||
border_size = 3;
|
|
||||||
"col.active_border" = lib.mkForce "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
|
|
||||||
# "col.inactive_border" = "0x66333333";
|
|
||||||
allow_tearing = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
decoration = {
|
|
||||||
rounding = 4;
|
|
||||||
};
|
|
||||||
|
|
||||||
animations = {
|
|
||||||
bezier = "penguin,0.05,0.9,0.1,1.0";
|
|
||||||
animation = [
|
|
||||||
"windowsMove,1,4,default"
|
|
||||||
"windows,1,7,default,popin 70%"
|
|
||||||
"windowsOut,1,7,default,popin 70%"
|
|
||||||
"border,1,10,default"
|
|
||||||
"fade,1,7,default"
|
|
||||||
"workspaces,1,6,default"
|
|
||||||
"layers,1,3,default,popin"
|
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
|
||||||
dwindle = {
|
bind = [
|
||||||
preserve_split = true;
|
# screenshots
|
||||||
pseudotile = 0;
|
"$mod SUPER,S,exec,grim -g \"$(slurp)\" - | wl-copy"
|
||||||
permanent_direction_override = false;
|
"$mod SUPERSHIFTALT,S,exec, grim -g \"$(slurp)\" $HOME/gits/ost-5semester/Screenshots/$(date +'%Y_%m_%d_%I_%M_%S.png') && (date +'%Y_%m_%d_%I_%M_%S.png') | wl-copy"
|
||||||
};
|
"$mod SUPERSHIFT,S,exec,grim -g \"$(slurp)\" - | satty -f -"
|
||||||
|
"$mod SUPERCONTROLSHIFT,S,exec,grim -c -g \"2560,0 3440x1440\" - | wl-copy"
|
||||||
|
|
||||||
input = {
|
# regular programs
|
||||||
kb_layout = "${config.mods.xkb.layout}";
|
"$mod SUPER,F,exec,firefox"
|
||||||
kb_variant = "${config.mods.xkb.variant}";
|
"$mod SUPER,T,exec,kitty -1"
|
||||||
repeat_delay = 200;
|
"$mod SUPER,E,exec,nautilus -w"
|
||||||
force_no_accel = true;
|
"$mod SUPER,N,exec,neovide"
|
||||||
touchpad = {
|
"$mod SUPER,M,exec,oxidash"
|
||||||
natural_scroll = true;
|
"$mod SUPER,R,exec,anyrun"
|
||||||
tap-to-click = true;
|
"$mod SUPER,G,exec,oxicalc"
|
||||||
tap-and-drag = true;
|
"$mod SUPER,D,exec,oxishut"
|
||||||
|
"$mod SUPER,A,exec,oxipaste"
|
||||||
|
"$mod SUPERSHIFT,P,exec,hyprdock --gui"
|
||||||
|
"$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend"
|
||||||
|
"$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate"
|
||||||
|
|
||||||
|
# media keys
|
||||||
|
",XF86AudioMute,exec, $HOME/.config/scripts/audio_control.sh mute"
|
||||||
|
",XF86AudioLowerVolume,exec, $HOME/.config/scripts/audio_control.sh sink -5%"
|
||||||
|
",XF86AudioRaiseVolume,exec, $HOME/.config/scripts/audio_control.sh sink +5%"
|
||||||
|
",XF86AudioPlay,exec, playerctl play-pause"
|
||||||
|
",XF86AudioNext,exec, playerctl next"
|
||||||
|
",XF86AudioPrev,exec, playerctl previous"
|
||||||
|
",XF86MonBrightnessDown,exec, $HOME/.config/scripts/change-brightness brightness 10%-"
|
||||||
|
",XF86MonBrightnessUp,exec, $HOME/.config/scripts/change-brightness brightness +10%"
|
||||||
|
|
||||||
|
# hyprland keybinds
|
||||||
|
# misc
|
||||||
|
"$mod SUPER,V,togglefloating,"
|
||||||
|
"$mod SUPER,B,fullscreen,"
|
||||||
|
"$mod SUPER,C,togglesplit"
|
||||||
|
"$mod SUPER,Q,killactive,"
|
||||||
|
"$mod SUPERSHIFTALT,M,exit,"
|
||||||
|
"$mod SUPERSHIFT,W,togglespecialworkspace"
|
||||||
|
|
||||||
|
# move
|
||||||
|
"$mod SUPER,left,movewindow,l"
|
||||||
|
"$mod SUPER,right,movewindow,r"
|
||||||
|
"$mod SUPER,up,movewindow,u"
|
||||||
|
"$mod SUPER,down,movewindow,d"
|
||||||
|
|
||||||
|
# workspaces
|
||||||
|
"$mod SUPER,1,workspace,1"
|
||||||
|
"$mod SUPER,2,workspace,2"
|
||||||
|
"$mod SUPER,3,workspace,3"
|
||||||
|
"$mod SUPER,4,workspace,4"
|
||||||
|
"$mod SUPER,5,workspace,5"
|
||||||
|
"$mod SUPER,6,workspace,6"
|
||||||
|
"$mod SUPER,7,workspace,7"
|
||||||
|
"$mod SUPER,8,workspace,8"
|
||||||
|
"$mod SUPER,9,workspace,9"
|
||||||
|
"$mod SUPER,0,workspace,10"
|
||||||
|
|
||||||
|
# move to workspace
|
||||||
|
"$mod SUPERSHIFT,1,movetoworkspace,1"
|
||||||
|
"$mod SUPERSHIFT,2,movetoworkspace,2"
|
||||||
|
"$mod SUPERSHIFT,3,movetoworkspace,3"
|
||||||
|
"$mod SUPERSHIFT,4,movetoworkspace,4"
|
||||||
|
"$mod SUPERSHIFT,5,movetoworkspace,5"
|
||||||
|
"$mod SUPERSHIFT,6,movetoworkspace,6"
|
||||||
|
"$mod SUPERSHIFT,7,movetoworkspace,7"
|
||||||
|
"$mod SUPERSHIFT,8,movetoworkspace,8"
|
||||||
|
"$mod SUPERSHIFT,9,movetoworkspace,9"
|
||||||
|
"$mod SUPERSHIFT,0,movetoworkspace,10"
|
||||||
|
|
||||||
|
|
||||||
|
# move to workspace silent
|
||||||
|
"$mod SUPERSHIFTALT,1,movetoworkspacesilent,1"
|
||||||
|
"$mod SUPERSHIFTALT,2,movetoworkspacesilent,2"
|
||||||
|
"$mod SUPERSHIFTALT,3,movetoworkspacesilent,3"
|
||||||
|
"$mod SUPERSHIFTALT,4,movetoworkspacesilent,4"
|
||||||
|
"$mod SUPERSHIFTALT,5,movetoworkspacesilent,5"
|
||||||
|
"$mod SUPERSHIFTALT,6,movetoworkspacesilent,6"
|
||||||
|
"$mod SUPERSHIFTALT,7,movetoworkspacesilent,7"
|
||||||
|
"$mod SUPERSHIFTALT,8,movetoworkspacesilent,8"
|
||||||
|
"$mod SUPERSHIFTALT,9,movetoworkspacesilent,9"
|
||||||
|
"$mod SUPERSHIFTALT,0,movetoworkspacesilent,10"
|
||||||
|
|
||||||
|
# preselection
|
||||||
|
"$mod SUPERALT,j,layoutmsg,preselect l"
|
||||||
|
"$mod SUPERALT,k,layoutmsg,preselect d"
|
||||||
|
"$mod SUPERALT,l,layoutmsg,preselect u"
|
||||||
|
"$mod SUPERALT,semicolon,layoutmsg,preselect r"
|
||||||
|
"$mod SUPERALT,h,layoutmsg,preselect n"
|
||||||
|
];
|
||||||
|
|
||||||
|
binde = [
|
||||||
|
# hyprland keybinds
|
||||||
|
# focus
|
||||||
|
"$mod SUPER,J,movefocus,l"
|
||||||
|
"$mod SUPER,semicolon,movefocus,r"
|
||||||
|
"$mod SUPER,L,movefocus,u"
|
||||||
|
"$mod SUPER,K,movefocus,d"
|
||||||
|
|
||||||
|
# resize
|
||||||
|
"$mod SUPER,U,resizeactive,-20 0"
|
||||||
|
"$mod SUPER,P,resizeactive,20 0"
|
||||||
|
"$mod SUPER,O,resizeactive,0 -20"
|
||||||
|
"$mod SUPER,I,resizeactive,0 20"
|
||||||
|
];
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_out = "3,5,5,5";
|
||||||
|
border_size = 3;
|
||||||
|
"col.active_border" = lib.mkForce "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
|
||||||
|
# "col.inactive_border" = "0x66333333";
|
||||||
|
allow_tearing = true;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
misc = {
|
decoration = {
|
||||||
animate_manual_resizes = 1;
|
rounding = 4;
|
||||||
enable_swallow = true;
|
};
|
||||||
disable_splash_rendering = true;
|
|
||||||
disable_hyprland_logo = true;
|
|
||||||
swallow_regex = "^(.*)(kitty)(.*)$";
|
|
||||||
initial_workspace_tracking = 1;
|
|
||||||
no_direct_scanout = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
cursor = {
|
animations = {
|
||||||
# conversion seems to be borked right now, i want a smooth bibata :(
|
bezier = "penguin,0.05,0.9,0.1,1.0";
|
||||||
enable_hyprcursor = false;
|
animation = [
|
||||||
# no_hardware_cursors = true;
|
"windowsMove,1,4,default"
|
||||||
# no_break_fs_vrr = true;
|
"windows,1,7,default,popin 70%"
|
||||||
};
|
"windowsOut,1,7,default,popin 70%"
|
||||||
|
"border,1,10,default"
|
||||||
|
"fade,1,7,default"
|
||||||
|
"workspaces,1,6,default"
|
||||||
|
"layers,1,3,default,popin"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
gestures = {
|
dwindle = {
|
||||||
workspace_swipe = true;
|
preserve_split = true;
|
||||||
};
|
pseudotile = 0;
|
||||||
|
permanent_direction_override = false;
|
||||||
|
};
|
||||||
|
|
||||||
monitor = config.mods.hyprland.monitor;
|
input = {
|
||||||
workspace = config.mods.hyprland.workspace;
|
kb_layout = "${config.mods.xkb.layout}";
|
||||||
|
kb_variant = "${config.mods.xkb.variant}";
|
||||||
|
repeat_delay = 200;
|
||||||
|
force_no_accel = true;
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = true;
|
||||||
|
tap-to-click = true;
|
||||||
|
tap-and-drag = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
env = [
|
misc = {
|
||||||
"GTK_CSD,0"
|
animate_manual_resizes = 1;
|
||||||
"TERM,\"kitty /bin/fish\""
|
enable_swallow = true;
|
||||||
"XDG_CURRENT_DESKTOP=Hyprland"
|
disable_splash_rendering = true;
|
||||||
"XDG_SESSION_TYPE=wayland"
|
disable_hyprland_logo = true;
|
||||||
"XDG_SESSION_DESKTOP=Hyprland"
|
swallow_regex = "^(.*)(kitty)(.*)$";
|
||||||
"HYPRCURSOR_THEME,Bibata-Modern-Classic"
|
initial_workspace_tracking = 1;
|
||||||
"HYPRCURSOR_SIZE,24"
|
no_direct_scanout = false;
|
||||||
"XCURSOR_THEME,Bibata-Modern-Classic"
|
};
|
||||||
"XCURSOR_SIZE,24"
|
|
||||||
"QT_QPA_PLATFORM,wayland"
|
|
||||||
"QT_QPA_PLATFORMTHEME,qt5ct"
|
|
||||||
"QT_WAYLAND_FORCE_DPI,96"
|
|
||||||
"QT_AUTO_SCREEN_SCALE_FACTOR,0"
|
|
||||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
|
||||||
"QT_SCALE_FACTOR,1"
|
|
||||||
"EDITOR,\"neovide --novsync --nofork\""
|
|
||||||
"WLR_DRM_NO_ATOMIC,1"
|
|
||||||
"GTK_USE_PORTAL, 1"
|
|
||||||
];
|
|
||||||
|
|
||||||
layerrule = [
|
cursor = {
|
||||||
# layer rules
|
# conversion seems to be borked right now, i want a smooth bibata :(
|
||||||
# mainly to disable animations within slurp and grim
|
enable_hyprcursor = false;
|
||||||
"noanim, selection"
|
# no_hardware_cursors = true;
|
||||||
];
|
# no_break_fs_vrr = true;
|
||||||
|
};
|
||||||
|
|
||||||
windowrule = [
|
gestures = {
|
||||||
# window rules
|
workspace_swipe = true;
|
||||||
"tile,^(.*)(Spotify)(.*)$"
|
};
|
||||||
"float,^(.*)(OxiCalc)(.*)$"
|
|
||||||
"float,^(.*)(winecfg.exe)(.*)$"
|
|
||||||
"float,^(.*)(speed.exe)(.*)$"
|
|
||||||
"float,^(.*)(copyq)(.*)$"
|
|
||||||
"center,^(.*)(swappy)(.*)$"
|
|
||||||
"float,title:^(.*)(Spirit)(.*)$"
|
|
||||||
"float,title:^(.*)(reset)(.*)$"
|
|
||||||
"workspace 10 silent,^(.*)(steam)(.*)$"
|
|
||||||
"workspace 9 silent,^(.*)(dota)(.*)$"
|
|
||||||
"workspace 9 silent,^(.*)(battlebits)(.*)$"
|
|
||||||
"workspace 9 silent,^(.*)(aoe)(.*)$"
|
|
||||||
"suppressevent fullscreen maximize,^(.*)(neovide)(.*)$"
|
|
||||||
];
|
|
||||||
|
|
||||||
windowrulev2 = [
|
monitor = config.mods.hyprland.monitor;
|
||||||
"immediate,class:^(.*)(Pal)$"
|
workspace = config.mods.hyprland.workspace;
|
||||||
"immediate,class:^(.*)(dota2)$"
|
|
||||||
"immediate,class:^(.*)(needforspeedheat.exe)$"
|
|
||||||
];
|
|
||||||
|
|
||||||
exec-once = [
|
env = [
|
||||||
# environment
|
"GTK_CSD,0"
|
||||||
"systemctl --user import-environment"
|
"TERM,\"kitty /bin/fish\""
|
||||||
"dbus-update-activation-environment --systemd --all"
|
"XDG_CURRENT_DESKTOP=Hyprland"
|
||||||
"hyprctl setcursor Bibata-Modern-Classic 24"
|
"XDG_SESSION_TYPE=wayland"
|
||||||
|
"XDG_SESSION_DESKTOP=Hyprland"
|
||||||
|
"HYPRCURSOR_THEME,Bibata-Modern-Classic"
|
||||||
|
"HYPRCURSOR_SIZE,24"
|
||||||
|
"XCURSOR_THEME,Bibata-Modern-Classic"
|
||||||
|
"XCURSOR_SIZE,24"
|
||||||
|
"QT_QPA_PLATFORM,wayland"
|
||||||
|
"QT_QPA_PLATFORMTHEME,qt5ct"
|
||||||
|
"QT_WAYLAND_FORCE_DPI,96"
|
||||||
|
"QT_AUTO_SCREEN_SCALE_FACTOR,0"
|
||||||
|
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||||
|
"QT_SCALE_FACTOR,1"
|
||||||
|
"EDITOR,\"neovide --novsync --nofork\""
|
||||||
|
"WLR_DRM_NO_ATOMIC,1"
|
||||||
|
"GTK_USE_PORTAL, 1"
|
||||||
|
];
|
||||||
|
|
||||||
# other programs
|
layerrule = [
|
||||||
"hyprpaper"
|
# layer rules
|
||||||
"ironbar"
|
# mainly to disable animations within slurp and grim
|
||||||
"firefox"
|
"noanim, selection"
|
||||||
"oxipaste_daemon"
|
];
|
||||||
# should be taken care of with the new systemd services
|
|
||||||
# "nextcloud --background"
|
|
||||||
"oxinoti"
|
|
||||||
] ++ config.mods.hyprland.extra_autostart;
|
|
||||||
|
|
||||||
# plugin = {
|
windowrule = [
|
||||||
# hyprspace = {
|
# window rules
|
||||||
# bind = [
|
"tile,^(.*)(Spotify)(.*)$"
|
||||||
# "SUPER, W, overview:toggle, toggle"
|
"float,^(.*)(OxiCalc)(.*)$"
|
||||||
# ];
|
"float,^(.*)(winecfg.exe)(.*)$"
|
||||||
# };
|
"float,^(.*)(speed.exe)(.*)$"
|
||||||
# };
|
"float,^(.*)(copyq)(.*)$"
|
||||||
};
|
"center,^(.*)(swappy)(.*)$"
|
||||||
|
"float,title:^(.*)(Spirit)(.*)$"
|
||||||
|
"float,title:^(.*)(reset)(.*)$"
|
||||||
|
"workspace 10 silent,^(.*)(steam)(.*)$"
|
||||||
|
"workspace 9 silent,^(.*)(dota)(.*)$"
|
||||||
|
"workspace 9 silent,^(.*)(battlebits)(.*)$"
|
||||||
|
"workspace 9 silent,^(.*)(aoe)(.*)$"
|
||||||
|
"suppressevent fullscreen maximize,^(.*)(neovide)(.*)$"
|
||||||
|
];
|
||||||
|
|
||||||
|
windowrulev2 = [
|
||||||
|
"immediate,class:^(.*)(Pal)$"
|
||||||
|
"immediate,class:^(.*)(dota2)$"
|
||||||
|
"immediate,class:^(.*)(needforspeedheat.exe)$"
|
||||||
|
];
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
# environment
|
||||||
|
"systemctl --user import-environment"
|
||||||
|
"dbus-update-activation-environment --systemd --all"
|
||||||
|
"hyprctl setcursor Bibata-Modern-Classic 24"
|
||||||
|
|
||||||
|
# other programs
|
||||||
|
"hyprpaper"
|
||||||
|
"ironbar"
|
||||||
|
"firefox"
|
||||||
|
"oxipaste_daemon"
|
||||||
|
# should be taken care of with the new systemd services
|
||||||
|
# "nextcloud --background"
|
||||||
|
"oxinoti"
|
||||||
|
] ++ config.mods.hyprland.extra_autostart;
|
||||||
|
|
||||||
|
# plugin = {
|
||||||
|
# hyprspace = {
|
||||||
|
# bind = [
|
||||||
|
# "SUPER, W, overview:toggle, toggle"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
} // config.mods.hyprland.custom_config;
|
||||||
# wayland.windowManager.hyprland.plugins = [
|
# wayland.windowManager.hyprland.plugins = [
|
||||||
# inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
|
# inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
|
||||||
# ];
|
# ];
|
||||||
|
|
|
||||||
59
modules/programs/keepassxc.nix
Normal file
59
modules/programs/keepassxc.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
{ lib, config, options, pkgs, ... }: {
|
||||||
|
options.mods.keepassxc = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Enables the piper program and its daemon";
|
||||||
|
};
|
||||||
|
use_cache_config = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Whether to overwrite the cache config of keepassxc. Note, this means that changes can't be applied via the program anymore!";
|
||||||
|
};
|
||||||
|
cache_config = lib.mkOption {
|
||||||
|
default = ''
|
||||||
|
[General]
|
||||||
|
LastDatabases=/home/dashie/PWs/Passwords.kdbx
|
||||||
|
LastActiveDatabase=/home/dashie/PWs/Passwords.kdbx
|
||||||
|
LastOpenedDatabases=/home/dashie/PWs/Passwords.kdbx
|
||||||
|
LastKeyFiles=@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0>\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0P\0W\0s\0/\0P\0\x61\0s\0s\0w\0o\0r\0\x64\0s\0.\0k\0\x64\0\x62\0x\0\0\0\n\0\0\0>\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0P\0W\0s\0/\0l\0o\0g\0i\0n\0_\0k\0\x65\0y\0.\0k\0\x65\0y\0x)
|
||||||
|
'';
|
||||||
|
example = '''';
|
||||||
|
type = lib.types.lines;
|
||||||
|
description = "Cache config to be used.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.mods.keepassxc.enable
|
||||||
|
(lib.optionalAttrs (options?home.file) {
|
||||||
|
xdg.configFile."keepassxc/keepassxc.ini" = {
|
||||||
|
text =
|
||||||
|
''
|
||||||
|
[General]
|
||||||
|
ConfigVersion=2
|
||||||
|
|
||||||
|
[Browser]
|
||||||
|
Enabled=true
|
||||||
|
|
||||||
|
[GUI]
|
||||||
|
ApplicationTheme=classic
|
||||||
|
HidePasswords=true
|
||||||
|
MinimizeOnClose=true
|
||||||
|
MinimizeToTray=true
|
||||||
|
ShowTrayIcon=true
|
||||||
|
TrayIconAppearance=monochrome-light
|
||||||
|
|
||||||
|
[PasswordGenerator]
|
||||||
|
Length=30
|
||||||
|
|
||||||
|
[Security]
|
||||||
|
EnableCopyOnDoubleClick=true
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".cache/keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.use_cache_config {
|
||||||
|
text = config.mods.keepassxc.cache_config;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
120
modules/programs/starship.nix
Normal file
120
modules/programs/starship.nix
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
{ lib, config, options, pkgs, inputs, ... }: {
|
||||||
|
options.mods = {
|
||||||
|
starship = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = ''
|
||||||
|
Enables starship prompt
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
use_default_prompt = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = ''
|
||||||
|
Enables preconfigured prompt
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
custom_prompt = lib.mkOption {
|
||||||
|
default = { };
|
||||||
|
example = { };
|
||||||
|
type = with lib.types; attrsOf anything;
|
||||||
|
description = ''
|
||||||
|
Custom configuration for prompt.
|
||||||
|
Will be merged with preconfigured prompt if that is used.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# environment.systemPackages needed in order to configure systemwide
|
||||||
|
config = lib.mkIf config.mods.starship.enable (lib.optionalAttrs (options?environment.systemPackages) {
|
||||||
|
programs.starship =
|
||||||
|
let
|
||||||
|
base16 = pkgs.callPackage inputs.base16.lib { };
|
||||||
|
scheme = (base16.mkSchemeAttrs config.stylix.base16Scheme);
|
||||||
|
code_format = "[](bg:prev_bg fg:#5256c3)[ $symbol ($version)](bg:#5256c3)";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
interactiveOnly = true;
|
||||||
|
presets = lib.mkIf config.mods.starship.use_default_prompt [ "pastel-powerline" ];
|
||||||
|
settings = lib.mkIf config.mods.starship.use_default_prompt
|
||||||
|
{
|
||||||
|
# derived from https://starship.rs/presets/pastel-powerline
|
||||||
|
format = ''$username$directory$git_branch$git_status$git_metrics[ ](bg:none fg:prev_bg)'';
|
||||||
|
right_format = ''$c$elixir$elm$golang$gradle$haskell$java$julia$nodejs$nim$rust$scala$python$ocaml$opa$perl$zig$dart$dotnet$nix_shell$shell$solidity[](bg:prev_bg fg:#3465A4)$time$os'';
|
||||||
|
username = {
|
||||||
|
show_always = false;
|
||||||
|
style_user = "bg:#5277C3 fg:#${scheme.base05}";
|
||||||
|
style_root = "bg:#5277C3 fg:#${scheme.base05}";
|
||||||
|
format = "[ $user ]($style)[](bg:#3465A4 fg:#5277C3)";
|
||||||
|
disabled = false;
|
||||||
|
};
|
||||||
|
os = {
|
||||||
|
symbols = { NixOS = " "; };
|
||||||
|
style = "bg:#3465A4 fg:#${scheme.base05}";
|
||||||
|
disabled = false;
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
style = "bg:#3465A4 fg:#${scheme.base05}";
|
||||||
|
format = "[ $path ]($style)";
|
||||||
|
truncation_length = 3;
|
||||||
|
truncation_symbol = "…/";
|
||||||
|
};
|
||||||
|
git_branch = {
|
||||||
|
symbol = "";
|
||||||
|
style = "bg:#5256c3 fg:#${scheme.base05}";
|
||||||
|
format = "[ ](bg:#5256c3 fg:prev_bg)[$symbol $branch ]($style)";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
staged = "+\${count} (fg:#C4A000)";
|
||||||
|
ahead = "⇡\${count} (fg:#C4A000)";
|
||||||
|
diverged = "⇕⇡\${count} (fg:#C4A000)";
|
||||||
|
behind = "⇣\${count} (fg:#C4A000)";
|
||||||
|
stashed = " ";
|
||||||
|
untracked = "?\${count} (fg:#C4A000)";
|
||||||
|
modified = "!\${count} (fg:#C4A000)";
|
||||||
|
deleted = "✘\${count} (fg:#C4A000)";
|
||||||
|
conflicted = "=\${count} (fg:#C4A000)";
|
||||||
|
renamed = "»\${count} (fg:#C4A000)";
|
||||||
|
style = "bg:#5256c3 fg:fg:#C4A000";
|
||||||
|
format = "[$all_status$ahead_behind]($style)";
|
||||||
|
};
|
||||||
|
git_metrics = {
|
||||||
|
disabled = false;
|
||||||
|
format = "([| ](bg:#5256c3)[+$added]($added_style bg:#5256c3)[ -$deleted]($deleted_style bg:#5256c3))";
|
||||||
|
};
|
||||||
|
c = { format = code_format; };
|
||||||
|
elixir = { format = code_format; };
|
||||||
|
elm = { format = code_format; };
|
||||||
|
golang = { format = code_format; };
|
||||||
|
gradle = { format = code_format; };
|
||||||
|
haskell = { format = code_format; };
|
||||||
|
java = { format = code_format; };
|
||||||
|
julia = { format = code_format; };
|
||||||
|
nodejs = { format = code_format; };
|
||||||
|
nim = { format = code_format; };
|
||||||
|
nix_shell = { symbol = ""; format = code_format; };
|
||||||
|
rust = { format = code_format; };
|
||||||
|
scala = { format = code_format; };
|
||||||
|
typst = { format = code_format; };
|
||||||
|
python = { format = code_format; };
|
||||||
|
ocaml = { format = code_format; };
|
||||||
|
opa = { format = code_format; };
|
||||||
|
perl = { format = code_format; };
|
||||||
|
zig = { format = code_format; };
|
||||||
|
dart = { format = code_format; };
|
||||||
|
dotnet = { format = code_format; };
|
||||||
|
time = {
|
||||||
|
disabled = false;
|
||||||
|
time_format = "%R"; # Hour:Minute Format
|
||||||
|
style = "bg:#3465A4 fg:#${scheme.base05}";
|
||||||
|
format = "[ $time ]($style)";
|
||||||
|
};
|
||||||
|
} // config.mods.starship.custom_prompt;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
82
modules/programs/stylix.nix
Normal file
82
modules/programs/stylix.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
{ lib, config, options, pkgs, ... }: {
|
||||||
|
options.mods.stylix = {
|
||||||
|
colorscheme = lib.mkOption {
|
||||||
|
default = {
|
||||||
|
# custom tokyo night
|
||||||
|
base00 = "1A1B26";
|
||||||
|
# base01 = "16161E";
|
||||||
|
# base01 = "15161e";
|
||||||
|
base01 = "191a25";
|
||||||
|
base02 = "2F3549";
|
||||||
|
base03 = "444B6A";
|
||||||
|
base04 = "787C99";
|
||||||
|
base05 = "A9B1D6";
|
||||||
|
base06 = "CBCCD1";
|
||||||
|
base07 = "D5D6DB";
|
||||||
|
base08 = "C0CAF5";
|
||||||
|
base09 = "A9B1D6";
|
||||||
|
base0A = "0DB9D7";
|
||||||
|
base0B = "9ECE6A";
|
||||||
|
base0C = "B4F9F8";
|
||||||
|
# base0D = "2AC3DE";
|
||||||
|
# base0D = "A9B1D6";
|
||||||
|
# base0D = "62A0EA";
|
||||||
|
# base0D = "779EF1";
|
||||||
|
base0D = "366fea";
|
||||||
|
base0E = "BB9AF7";
|
||||||
|
base0F = "F7768E";
|
||||||
|
};
|
||||||
|
example = "catppuccin-mocha";
|
||||||
|
type = with lib.types; oneOf [ str attrs path ];
|
||||||
|
description = ''
|
||||||
|
Base16 colorscheme.
|
||||||
|
Can be an attribute set with base00 to base0F,
|
||||||
|
a string that leads to a yaml file in base16-schemes path,
|
||||||
|
or a path to a custom yaml file.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = (lib.optionalAttrs (options?stylix) {
|
||||||
|
stylix = {
|
||||||
|
enable = true;
|
||||||
|
image = ../../base/black.jpg;
|
||||||
|
polarity = "dark";
|
||||||
|
targets = {
|
||||||
|
nixvim.enable = false;
|
||||||
|
fish.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts = {
|
||||||
|
serif = {
|
||||||
|
package = pkgs.cantarell-fonts;
|
||||||
|
name = "Cantarell";
|
||||||
|
};
|
||||||
|
|
||||||
|
sansSerif = {
|
||||||
|
package = pkgs.cantarell-fonts;
|
||||||
|
name = "Cantarell";
|
||||||
|
};
|
||||||
|
|
||||||
|
monospace = {
|
||||||
|
package = (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; });
|
||||||
|
# name = "JetBrains Mono Nerd";
|
||||||
|
name = "JetBrainsMono Nerd Font Mono";
|
||||||
|
};
|
||||||
|
|
||||||
|
emoji = {
|
||||||
|
package = pkgs.noto-fonts-emoji;
|
||||||
|
name = "Noto Color Emoji";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
package = pkgs.bibata-cursors;
|
||||||
|
name = "Bibata-Modern-Classic";
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
|
||||||
|
base16Scheme =
|
||||||
|
(if builtins.isAttrs config.mods.stylix.colorscheme then config.mods.stylix.colorscheme else "${pkgs.base16-schemes}/share/themes/${config.mods.stylix.colorscheme}.yaml");
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
{ pkgs
|
|
||||||
, lib
|
|
||||||
, config
|
|
||||||
, ...
|
|
||||||
}: lib.mkIf config.conf.gaming.enable {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
gamemode
|
|
||||||
steam
|
|
||||||
lutris
|
|
||||||
wine
|
|
||||||
adwsteamgtk
|
|
||||||
heroic
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.steam.enable = true;
|
|
||||||
programs.gamemode.enable = true;
|
|
||||||
programs.gamemode = {
|
|
||||||
enableRenice = true;
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
governor = "performance";
|
|
||||||
};
|
|
||||||
gpu = lib.mkIf config.conf.gaming.gamemode_gpu {
|
|
||||||
apply_gpu_optimisations = "accept-responsibility";
|
|
||||||
gpu_device = config.conf.gaming.device;
|
|
||||||
amd_performance_level = "high";
|
|
||||||
nv_powermizer_mode = 1;
|
|
||||||
};
|
|
||||||
custom = {
|
|
||||||
start = "notify-send -a 'Gamemode' 'Optimizations activated'";
|
|
||||||
end = "notify-send -a 'Gamemode' 'Optimizations deactivated'";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -3,11 +3,8 @@
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./yazi.nix
|
./yazi.nix
|
||||||
./fish.nix
|
./fish.nix
|
||||||
./ssh.nix
|
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
./git.nix
|
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
./keepass.nix
|
|
||||||
./neovide.nix
|
./neovide.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "DashieTM";
|
|
||||||
userEmail = "fabio.lenherr@gmail.com";
|
|
||||||
extraConfig = {
|
|
||||||
merge = {
|
|
||||||
tool = "nvimdiff";
|
|
||||||
};
|
|
||||||
diff = {
|
|
||||||
tool = "nvimdiff";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
xdg.configFile."keepassxc/keepassxc.ini" = {
|
|
||||||
text =
|
|
||||||
''
|
|
||||||
[General]
|
|
||||||
ConfigVersion=2
|
|
||||||
|
|
||||||
[Browser]
|
|
||||||
Enabled=true
|
|
||||||
|
|
||||||
[GUI]
|
|
||||||
ApplicationTheme=classic
|
|
||||||
HidePasswords=true
|
|
||||||
MinimizeOnClose=true
|
|
||||||
MinimizeToTray=true
|
|
||||||
ShowTrayIcon=true
|
|
||||||
TrayIconAppearance=monochrome-light
|
|
||||||
|
|
||||||
[PasswordGenerator]
|
|
||||||
Length=30
|
|
||||||
|
|
||||||
[Security]
|
|
||||||
EnableCopyOnDoubleClick=true
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".cache/keepassxc/keepassxc.ini" = {
|
|
||||||
text = ''
|
|
||||||
[General]
|
|
||||||
LastDatabases=/home/dashie/PWs/Passwords.kdbx
|
|
||||||
LastActiveDatabase=/home/dashie/PWs/Passwords.kdbx
|
|
||||||
LastOpenedDatabases=/home/dashie/PWs/Passwords.kdbx
|
|
||||||
LastKeyFiles=@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0>\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0P\0W\0s\0/\0P\0\x61\0s\0s\0w\0o\0r\0\x64\0s\0.\0k\0\x64\0\x62\0x\0\0\0\n\0\0\0>\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0P\0W\0s\0/\0l\0o\0g\0i\0n\0_\0k\0\x65\0y\0.\0k\0\x65\0y\0x)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
{ config, ... }: {
|
|
||||||
home.file.".ssh/config".text = ''
|
|
||||||
Host github.com
|
|
||||||
IdentityFile ${config.sops.secrets.hub.path}
|
|
||||||
Host gitlab.com
|
|
||||||
IdentityFile ${config.sops.secrets.lab.path}
|
|
||||||
Host dashie.org
|
|
||||||
IdentityFile ${config.sops.secrets.dashie.path}
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./qt.nix
|
./qt.nix
|
||||||
./stylix.nix
|
|
||||||
# ./gtk3.nix
|
|
||||||
# ./gtk4.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
{ pkgs, config, ... }:
|
|
||||||
{
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
image = ../../base/black.jpg;
|
|
||||||
polarity = "dark";
|
|
||||||
targets = {
|
|
||||||
nixvim.enable = false;
|
|
||||||
fish.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts = {
|
|
||||||
serif = {
|
|
||||||
package = pkgs.cantarell-fonts;
|
|
||||||
name = "Cantarell";
|
|
||||||
};
|
|
||||||
|
|
||||||
sansSerif = {
|
|
||||||
package = pkgs.cantarell-fonts;
|
|
||||||
name = "Cantarell";
|
|
||||||
};
|
|
||||||
|
|
||||||
monospace = {
|
|
||||||
package = (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; });
|
|
||||||
# name = "JetBrains Mono Nerd";
|
|
||||||
name = "JetBrainsMono Nerd Font Mono";
|
|
||||||
};
|
|
||||||
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.bibata-cursors;
|
|
||||||
name = "Bibata-Modern-Classic";
|
|
||||||
size = 24;
|
|
||||||
};
|
|
||||||
|
|
||||||
base16Scheme =
|
|
||||||
(if builtins.isAttrs config.conf.colorscheme then config.conf.colorscheme else "${pkgs.base16-schemes}/share/themes/${config.conf.colorscheme}.yaml");
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue