mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
Switch to nixfmt
This commit is contained in:
parent
1d70117186
commit
b38d2df431
55 changed files with 1559 additions and 1540 deletions
|
|
@ -1,19 +1,22 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.clipboard.enable = lib.mkEnableOption "";
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myConfig.clipboard.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.clipboard.enable {
|
||||
services.cliphist.enable = true;
|
||||
config = lib.mkIf config.myConfig.clipboard.enable {
|
||||
services.cliphist.enable = true;
|
||||
|
||||
home.packages = [
|
||||
(pkgs.writeScriptBin "clipboard" ''
|
||||
${lib.getExe pkgs.cliphist} list | ${lib.getExe (wrappers.rofi {inherit (config.myConfig.de) theme;})} -dmenu -display-columns 2 | ${lib.getExe pkgs.cliphist} decode | ${lib.getExe' pkgs.wl-clipboard "wl-copy"}
|
||||
'')
|
||||
];
|
||||
};
|
||||
home.packages = [
|
||||
(pkgs.writeScriptBin "clipboard" ''
|
||||
${lib.getExe pkgs.cliphist} list | ${
|
||||
lib.getExe (wrappers.rofi { inherit (config.myConfig.de) theme; })
|
||||
} -dmenu -display-columns 2 | ${lib.getExe pkgs.cliphist} decode | ${lib.getExe' pkgs.wl-clipboard "wl-copy"}
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./hyprland
|
||||
./theme.nix
|
||||
./waybar.nix
|
||||
./hypridlelock.nix
|
||||
];
|
||||
imports = [
|
||||
./hyprland
|
||||
./theme.nix
|
||||
./waybar.nix
|
||||
./hypridlelock.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,31 +1,34 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.de.hypridlelock.enable = lib.mkEnableOption "";
|
||||
config,
|
||||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myConfig.de.hypridlelock.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.de.hypridlelock.enable {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
config = lib.mkIf config.myConfig.de.hypridlelock.enable {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = let
|
||||
hyprlockExe = "${lib.getExe wrappers.hyprlock}";
|
||||
in "pidof ${hyprlockExe} || ${hyprlockExe}";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
];
|
||||
};
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd =
|
||||
let
|
||||
hyprlockExe = "${lib.getExe wrappers.hyprlock}";
|
||||
in
|
||||
"pidof ${hyprlockExe} || ${hyprlockExe}";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,60 +1,61 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
config,
|
||||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
exec-once = ["${lib.getExe wrappers.hyprpaper}"];
|
||||
settings = {
|
||||
exec-once = [ "${lib.getExe wrappers.hyprpaper}" ];
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
kb_variant = "nodeadkeys";
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
kb_variant = "nodeadkeys";
|
||||
|
||||
accel_profile = "flat";
|
||||
};
|
||||
|
||||
device = {
|
||||
name = "dell0b9f:00-27c6:0d43-touchpad";
|
||||
accel_profile = "adaptive";
|
||||
disable_while_typing = true;
|
||||
natural_scroll = true;
|
||||
middle_button_emulation = true;
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 1;
|
||||
|
||||
layout = "master";
|
||||
};
|
||||
|
||||
master = {
|
||||
new_is_master = false;
|
||||
no_gaps_when_only = 1;
|
||||
mfact = "0.5";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 6;
|
||||
drop_shadow = false;
|
||||
};
|
||||
|
||||
animations.enabled = false;
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
force_default_wallpaper = 0;
|
||||
|
||||
key_press_enables_dpms = true;
|
||||
};
|
||||
};
|
||||
accel_profile = "flat";
|
||||
};
|
||||
|
||||
device = {
|
||||
name = "dell0b9f:00-27c6:0d43-touchpad";
|
||||
accel_profile = "adaptive";
|
||||
disable_while_typing = true;
|
||||
natural_scroll = true;
|
||||
middle_button_emulation = true;
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 1;
|
||||
|
||||
layout = "master";
|
||||
};
|
||||
|
||||
master = {
|
||||
new_is_master = false;
|
||||
no_gaps_when_only = 1;
|
||||
mfact = "0.5";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 6;
|
||||
drop_shadow = false;
|
||||
};
|
||||
|
||||
animations.enabled = false;
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
force_default_wallpaper = 0;
|
||||
|
||||
key_press_enables_dpms = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,16 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.de;
|
||||
in {
|
||||
imports = [
|
||||
./config.nix
|
||||
./keybinds.nix
|
||||
];
|
||||
imports = [
|
||||
./config.nix
|
||||
./keybinds.nix
|
||||
];
|
||||
|
||||
options.myConfig.de.hyprland.enable = lib.mkEnableOption "";
|
||||
options.myConfig.de.hyprland.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
myConfig.de = {
|
||||
hypridlelock.enable = true;
|
||||
waybar.enable = true;
|
||||
};
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
myConfig.de = {
|
||||
hypridlelock.enable = true;
|
||||
waybar.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,125 +1,133 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
# Bindflags:
|
||||
# r = release
|
||||
# e = repeat
|
||||
# l = locked
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
# Bindflags:
|
||||
# r = release
|
||||
# e = repeat
|
||||
# l = locked
|
||||
|
||||
# Essentials
|
||||
bind = SUPER SHIFT, C, killactive,
|
||||
bind = SUPER SHIFT, V, togglefloating,
|
||||
bind = SUPER SHIFT, F, fullscreen, 0
|
||||
bind = SUPER, TAB, cyclenext,
|
||||
# Essentials
|
||||
bind = SUPER SHIFT, C, killactive,
|
||||
bind = SUPER SHIFT, V, togglefloating,
|
||||
bind = SUPER SHIFT, F, fullscreen, 0
|
||||
bind = SUPER, TAB, cyclenext,
|
||||
|
||||
# Launch programs
|
||||
bind = SUPER, R, exec, rofi -show drun
|
||||
bind = SUPER, RETURN, exec, kitty
|
||||
bind = SUPER, V, exec, clipboard
|
||||
bind = SUPER, B, exec, brave
|
||||
bind = SUPER, F, exec, nemo
|
||||
bind = SUPER, C, exec, codium
|
||||
|
||||
# Launch programs
|
||||
bind = SUPER, R, exec, rofi -show drun
|
||||
bind = SUPER, RETURN, exec, kitty
|
||||
bind = SUPER, V, exec, clipboard
|
||||
bind = SUPER, B, exec, brave
|
||||
bind = SUPER, F, exec, nemo
|
||||
bind = SUPER, C, exec, codium
|
||||
|
||||
# Move focus
|
||||
bind = SUPER, left, movefocus, l
|
||||
bind = SUPER, right, movefocus, r
|
||||
bind = SUPER, up, movefocus, u
|
||||
bind = SUPER, down, movefocus, d
|
||||
|
||||
# Move window
|
||||
bind = SUPER SHIFT, left, movewindow, l
|
||||
bind = SUPER SHIFT, right, movewindow, r
|
||||
bind = SUPER SHIFT, up, movewindow, u
|
||||
bind = SUPER SHIFT, down, movewindow, d
|
||||
bindm = SUPER, mouse:272, movewindow
|
||||
# Move focus
|
||||
bind = SUPER, left, movefocus, l
|
||||
bind = SUPER, right, movefocus, r
|
||||
bind = SUPER, up, movefocus, u
|
||||
bind = SUPER, down, movefocus, d
|
||||
|
||||
# Resize window
|
||||
binde = SUPER CONTROL, left, resizeactive, -100 0
|
||||
binde = SUPER CONTROL, right, resizeactive, 100 0
|
||||
binde = SUPER CONTROL, up, resizeactive, 0 -100
|
||||
binde = SUPER CONTROL, down, resizeactive, 0 100
|
||||
bindm = SUPER, mouse:273, resizewindow
|
||||
# Move window
|
||||
bind = SUPER SHIFT, left, movewindow, l
|
||||
bind = SUPER SHIFT, right, movewindow, r
|
||||
bind = SUPER SHIFT, up, movewindow, u
|
||||
bind = SUPER SHIFT, down, movewindow, d
|
||||
bindm = SUPER, mouse:272, movewindow
|
||||
|
||||
# Minimize window
|
||||
bind = SUPER SHIFT, M, togglespecialworkspace, minimize
|
||||
bind = SUPER SHIFT, M, movetoworkspace, +0
|
||||
bind = SUPER SHIFT, M, togglespecialworkspace, minimize
|
||||
bind = SUPER SHIFT, M, movetoworkspace, special:minimize
|
||||
bind = SUPER SHIFT, M, togglespecialworkspace, minimize
|
||||
# Resize window
|
||||
binde = SUPER CONTROL, left, resizeactive, -100 0
|
||||
binde = SUPER CONTROL, right, resizeactive, 100 0
|
||||
binde = SUPER CONTROL, up, resizeactive, 0 -100
|
||||
binde = SUPER CONTROL, down, resizeactive, 0 100
|
||||
bindm = SUPER, mouse:273, resizewindow
|
||||
|
||||
# Switch workspace
|
||||
${lib.concatMapStringsSep "\n" (n: "bind=SUPER, ${toString n}, workspace, ${toString n}") (lib.range 1 9)}
|
||||
${lib.concatMapStringsSep "\n" (n: "bind=SUPER:SHIFT, ${toString n}, movetoworkspacesilent, ${toString n}") (lib.range 1 9)}
|
||||
# Minimize window
|
||||
bind = SUPER SHIFT, M, togglespecialworkspace, minimize
|
||||
bind = SUPER SHIFT, M, movetoworkspace, +0
|
||||
bind = SUPER SHIFT, M, togglespecialworkspace, minimize
|
||||
bind = SUPER SHIFT, M, movetoworkspace, special:minimize
|
||||
bind = SUPER SHIFT, M, togglespecialworkspace, minimize
|
||||
|
||||
# Scroll through workspaces
|
||||
bind = SUPER, mouse_down, workspace, e-1
|
||||
bind = SUPER, mouse_up, workspace, e+1
|
||||
# Switch workspace
|
||||
${lib.concatMapStringsSep "\n" (n: "bind=SUPER, ${toString n}, workspace, ${toString n}") (
|
||||
lib.range 1 9
|
||||
)}
|
||||
${lib.concatMapStringsSep "\n" (
|
||||
n: "bind=SUPER:SHIFT, ${toString n}, movetoworkspacesilent, ${toString n}"
|
||||
) (lib.range 1 9)}
|
||||
|
||||
# Manage session
|
||||
bindrl = SUPER CONTROL, Q, exit,
|
||||
bindrl = SUPER CONTROL, P, exec, poweroff
|
||||
bindrl = SUPER CONTROL, R, exec, reboot
|
||||
bindrl = SUPER CONTROL, S, exec, systemctl suspend
|
||||
bindrl = SUPER CONTROL, L, exec, loginctl lock-session
|
||||
bindrl = SUPER CONTROL, B, exec, sleep 1 && hyprctl dispatch dpms off
|
||||
bindl = , switch:on:Lid Switch, exec, systemctl suspend
|
||||
# Scroll through workspaces
|
||||
bind = SUPER, mouse_down, workspace, e-1
|
||||
bind = SUPER, mouse_up, workspace, e+1
|
||||
|
||||
# Control media
|
||||
${let
|
||||
play-pause = "${lib.getExe pkgs.playerctl} --ignore-player=brave play-pause";
|
||||
play-next = "${lib.getExe pkgs.playerctl} --ignore-player=brave next";
|
||||
play-previous = "${lib.getExe pkgs.playerctl} --ignore-player=brave previous";
|
||||
mute = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
volume-up = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||
volume-down = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||
in ''
|
||||
bindl = , XF86AudioPlay, exec, ${play-pause}
|
||||
bindel = SHIFT, XF86AudioRaiseVolume, exec, ${play-next}
|
||||
bindel = SHIFT, XF86AudioLowerVolume, exec, ${play-previous}
|
||||
bindl = , XF86AudioMute, exec, ${mute}
|
||||
bindel = , XF86AudioRaiseVolume, exec, ${volume-up}
|
||||
bindel = , XF86AudioLowerVolume, exec, ${volume-down}
|
||||
# Manage session
|
||||
bindrl = SUPER CONTROL, Q, exit,
|
||||
bindrl = SUPER CONTROL, P, exec, poweroff
|
||||
bindrl = SUPER CONTROL, R, exec, reboot
|
||||
bindrl = SUPER CONTROL, S, exec, systemctl suspend
|
||||
bindrl = SUPER CONTROL, L, exec, loginctl lock-session
|
||||
bindrl = SUPER CONTROL, B, exec, sleep 1 && hyprctl dispatch dpms off
|
||||
bindl = , switch:on:Lid Switch, exec, systemctl suspend
|
||||
|
||||
bindl = SUPER ALT, RETURN, exec, ${play-pause}
|
||||
bindel = SUPER ALT, right, exec, ${play-next}
|
||||
bindel = SUPER ALT, left, exec, ${play-previous}
|
||||
bindl = SUPER ALT, BACKSPACE, exec, ${mute}
|
||||
bindel = SUPER ALT, up, exec, ${volume-up}
|
||||
bindel = SUPER ALT, down, exec, ${volume-down}
|
||||
''}
|
||||
# Control media
|
||||
${
|
||||
let
|
||||
play-pause = "${lib.getExe pkgs.playerctl} --ignore-player=brave play-pause";
|
||||
play-next = "${lib.getExe pkgs.playerctl} --ignore-player=brave next";
|
||||
play-previous = "${lib.getExe pkgs.playerctl} --ignore-player=brave previous";
|
||||
mute = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
volume-up = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||
volume-down = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||
in
|
||||
''
|
||||
bindl = , XF86AudioPlay, exec, ${play-pause}
|
||||
bindel = SHIFT, XF86AudioRaiseVolume, exec, ${play-next}
|
||||
bindel = SHIFT, XF86AudioLowerVolume, exec, ${play-previous}
|
||||
bindl = , XF86AudioMute, exec, ${mute}
|
||||
bindel = , XF86AudioRaiseVolume, exec, ${volume-up}
|
||||
bindel = , XF86AudioLowerVolume, exec, ${volume-down}
|
||||
|
||||
# Adjust brightness
|
||||
bindel = , XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -e set +2%
|
||||
bindel = , XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -e set 2%-
|
||||
bindl = SUPER ALT, RETURN, exec, ${play-pause}
|
||||
bindel = SUPER ALT, right, exec, ${play-next}
|
||||
bindel = SUPER ALT, left, exec, ${play-previous}
|
||||
bindl = SUPER ALT, BACKSPACE, exec, ${mute}
|
||||
bindel = SUPER ALT, up, exec, ${volume-up}
|
||||
bindel = SUPER ALT, down, exec, ${volume-down}
|
||||
''
|
||||
}
|
||||
|
||||
# Screenshot
|
||||
bind = , Print, exec, ${lib.getExe pkgs.grimblast} --notify --freeze copysave output
|
||||
bind = SHIFT, Print, exec, ${lib.getExe pkgs.grimblast} --notify --freeze copysave area
|
||||
# Adjust brightness
|
||||
bindel = , XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -e set +2%
|
||||
bindel = , XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -e set 2%-
|
||||
|
||||
# Escape special workspace
|
||||
bind = SUPER, ESCAPE, togglespecialworkspace, blank
|
||||
bind = SUPER, ESCAPE, togglespecialworkspace, blank
|
||||
# Screenshot
|
||||
bind = , Print, exec, ${lib.getExe pkgs.grimblast} --notify --freeze copysave output
|
||||
bind = SHIFT, Print, exec, ${lib.getExe pkgs.grimblast} --notify --freeze copysave area
|
||||
|
||||
# Music workspace
|
||||
exec-once = [workspace special:music silent] spotify
|
||||
workspace = special:music, border:false, gapsout:20, on-created-empty:spotify
|
||||
bind = SUPER, S, togglespecialworkspace, music
|
||||
# Escape special workspace
|
||||
bind = SUPER, ESCAPE, togglespecialworkspace, blank
|
||||
bind = SUPER, ESCAPE, togglespecialworkspace, blank
|
||||
|
||||
# Chat workspace
|
||||
exec-once = [workspace special:chat silent] webcord
|
||||
workspace = special:chat, border:false, gapsout:20, on-created-empty:webcord
|
||||
bind = SUPER, D, togglespecialworkspace, chat
|
||||
# Music workspace
|
||||
exec-once = [workspace special:music silent] spotify
|
||||
workspace = special:music, border:false, gapsout:20, on-created-empty:spotify
|
||||
bind = SUPER, S, togglespecialworkspace, music
|
||||
|
||||
# Flake workspace
|
||||
workspace = special:flake, border:false, gapsout:40, on-created-empty:kitty --directory $FLAKE --override background_opacity=0.6
|
||||
windowrulev2 = noblur, class:(kitty), onworkspace:special:flake
|
||||
bind = SUPER, Q, togglespecialworkspace, flake
|
||||
'';
|
||||
};
|
||||
# Chat workspace
|
||||
exec-once = [workspace special:chat silent] webcord
|
||||
workspace = special:chat, border:false, gapsout:20, on-created-empty:webcord
|
||||
bind = SUPER, D, togglespecialworkspace, chat
|
||||
|
||||
# Flake workspace
|
||||
workspace = special:flake, border:false, gapsout:40, on-created-empty:kitty --directory $FLAKE --override background_opacity=0.6
|
||||
windowrulev2 = noblur, class:(kitty), onworkspace:special:flake
|
||||
bind = SUPER, Q, togglespecialworkspace, flake
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,78 +1,80 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.de;
|
||||
in {
|
||||
options.myConfig.de.theme = lib.mkOption {type = lib.types.str;};
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.de;
|
||||
in
|
||||
{
|
||||
options.myConfig.de.theme = lib.mkOption { type = lib.types.str; };
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (cfg.theme == "dark") {
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (cfg.theme == "dark") {
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
||||
theme.name = "Adwaita-dark";
|
||||
theme.package = pkgs.gnome.gnome-themes-extra;
|
||||
theme.name = "Adwaita-dark";
|
||||
theme.package = pkgs.gnome.gnome-themes-extra;
|
||||
|
||||
iconTheme.name = "Papirus-Dark";
|
||||
iconTheme.package = pkgs.papirus-icon-theme;
|
||||
iconTheme.name = "Papirus-Dark";
|
||||
iconTheme.package = pkgs.papirus-icon-theme;
|
||||
|
||||
font.name = "Open Sans";
|
||||
font.package = pkgs.open-sans;
|
||||
};
|
||||
font.name = "Open Sans";
|
||||
font.package = pkgs.open-sans;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita-dark";
|
||||
style.package = pkgs.adwaita-qt;
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita-dark";
|
||||
style.package = pkgs.adwaita-qt;
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Original-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
};
|
||||
})
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Original-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf (cfg.theme == "light") {
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-light";
|
||||
(lib.mkIf (cfg.theme == "light") {
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-light";
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
||||
theme.name = "Adwaita";
|
||||
theme.package = pkgs.gnome.gnome-themes-extra;
|
||||
theme.name = "Adwaita";
|
||||
theme.package = pkgs.gnome.gnome-themes-extra;
|
||||
|
||||
iconTheme.name = "Papirus";
|
||||
iconTheme.package = pkgs.papirus-icon-theme;
|
||||
iconTheme.name = "Papirus";
|
||||
iconTheme.package = pkgs.papirus-icon-theme;
|
||||
|
||||
font.name = "Open Sans";
|
||||
font.package = pkgs.open-sans;
|
||||
};
|
||||
font.name = "Open Sans";
|
||||
font.package = pkgs.open-sans;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita";
|
||||
style.package = pkgs.adwaita-qt;
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita";
|
||||
style.package = pkgs.adwaita-qt;
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Original-Ice";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Original-Ice";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.de.waybar.enable = lib.mkEnableOption "";
|
||||
config,
|
||||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myConfig.de.waybar.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.de.waybar.enable {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = wrappers.waybar;
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
systemd.user.services.waybar.Unit.After = ["sound.target"];
|
||||
config = lib.mkIf config.myConfig.de.waybar.enable {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = wrappers.waybar;
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
systemd.user.services.waybar.Unit.After = [ "sound.target" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
imports = [
|
||||
./de
|
||||
./vscode.nix
|
||||
./shell
|
||||
./ssh-client.nix
|
||||
./git.nix
|
||||
./equalizer
|
||||
./sops.nix
|
||||
./clipboard.nix
|
||||
];
|
||||
imports = [
|
||||
./de
|
||||
./vscode.nix
|
||||
./shell
|
||||
./ssh-client.nix
|
||||
./git.nix
|
||||
./equalizer
|
||||
./sops.nix
|
||||
./clipboard.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,13 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.equalizer.enable = lib.mkEnableOption "";
|
||||
options.myConfig.equalizer.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.equalizer.enable {
|
||||
services.easyeffects.enable = true;
|
||||
config = lib.mkIf config.myConfig.equalizer.enable {
|
||||
services.easyeffects.enable = true;
|
||||
|
||||
xdg.configFile."easyeffects/output" = {
|
||||
source = ./output;
|
||||
recursive = true;
|
||||
};
|
||||
xdg.configFile."easyeffects/output" = {
|
||||
source = ./output;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.git.enable = lib.mkEnableOption "";
|
||||
options.myConfig.git.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.git.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = lib.mkIf config.myConfig.git.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
userName = "SebastianStork";
|
||||
userEmail = "sebastian.stork@pm.me";
|
||||
userName = "SebastianStork";
|
||||
userEmail = "sebastian.stork@pm.me";
|
||||
|
||||
extraConfig.init.defaultBranch = "main";
|
||||
};
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
extraConfig.init.defaultBranch = "main";
|
||||
};
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.myConfig.shell;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell;
|
||||
in {
|
||||
imports = [
|
||||
./starship.nix
|
||||
./enhancement.nix
|
||||
];
|
||||
imports = [
|
||||
./starship.nix
|
||||
./enhancement.nix
|
||||
];
|
||||
|
||||
options.myConfig.shell = {
|
||||
bash.enable = lib.mkEnableOption "";
|
||||
zsh.enable = lib.mkEnableOption "";
|
||||
};
|
||||
options.myConfig.shell = {
|
||||
bash.enable = lib.mkEnableOption "";
|
||||
zsh.enable = lib.mkEnableOption "";
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.bash.enable = cfg.bash.enable;
|
||||
programs.zsh.enable = cfg.zsh.enable;
|
||||
};
|
||||
config = {
|
||||
programs.bash.enable = cfg.bash.enable;
|
||||
programs.zsh.enable = cfg.zsh.enable;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +1,93 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.shell.enhancement.enable = lib.mkEnableOption "";
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myConfig.shell.enhancement.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.shell.enhancement.enable {
|
||||
programs.fzf.enable = true;
|
||||
config = lib.mkIf config.myConfig.shell.enhancement.enable {
|
||||
programs.fzf.enable = true;
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
options = ["--cmd cd"];
|
||||
};
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
options = [ "--cmd cd" ];
|
||||
};
|
||||
|
||||
home.shellAliases = let
|
||||
lsAliases = let
|
||||
listCmd = "${lib.getExe pkgs.eza} --header --group --time-style=long-iso --group-directories-first --sort=name --icons=auto --git --git-repos-no-status --binary";
|
||||
aliasList = lib.mapCartesianProduct ({
|
||||
home.shellAliases =
|
||||
let
|
||||
lsAliases =
|
||||
let
|
||||
listCmd = "${lib.getExe pkgs.eza} --header --group --time-style=long-iso --group-directories-first --sort=name --icons=auto --git --git-repos-no-status --binary";
|
||||
aliasList =
|
||||
lib.mapCartesianProduct
|
||||
(
|
||||
{
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
}:
|
||||
a + b + c) {
|
||||
a = ["ll" "lt" "l"];
|
||||
b = ["" "a"];
|
||||
c = ["" "d" "f"];
|
||||
}:
|
||||
a + b + c
|
||||
)
|
||||
{
|
||||
a = [
|
||||
"ll"
|
||||
"lt"
|
||||
"l"
|
||||
];
|
||||
b = [
|
||||
""
|
||||
"a"
|
||||
];
|
||||
c = [
|
||||
""
|
||||
"d"
|
||||
"f"
|
||||
];
|
||||
};
|
||||
convertAliasToCmd = str: "${listCmd} " + (builtins.replaceStrings ["ll" "lt" "l" "a" "d" "f"] ["--long " "--tree " "--oneline --dereference " "--all " "--only-dirs " "--only-files "] str);
|
||||
aliasAttrs = lib.genAttrs aliasList convertAliasToCmd;
|
||||
in
|
||||
aliasAttrs // {ls = "l";};
|
||||
convertAliasToCmd =
|
||||
str:
|
||||
"${listCmd} "
|
||||
+ (builtins.replaceStrings
|
||||
[
|
||||
"ll"
|
||||
"lt"
|
||||
"l"
|
||||
"a"
|
||||
"d"
|
||||
"f"
|
||||
]
|
||||
[
|
||||
"--long "
|
||||
"--tree "
|
||||
"--oneline --dereference "
|
||||
"--all "
|
||||
"--only-dirs "
|
||||
"--only-files "
|
||||
]
|
||||
str
|
||||
);
|
||||
aliasAttrs = lib.genAttrs aliasList convertAliasToCmd;
|
||||
in
|
||||
aliasAttrs // { ls = "l"; };
|
||||
|
||||
catAlias = let
|
||||
theme =
|
||||
{
|
||||
dark = "";
|
||||
light = "GitHub";
|
||||
}
|
||||
.${config.myConfig.de.theme};
|
||||
in {cat = "${lib.getExe pkgs.bat} --plain --theme=${theme}";};
|
||||
in
|
||||
lib.mkMerge [
|
||||
lsAliases
|
||||
catAlias
|
||||
];
|
||||
};
|
||||
catAlias =
|
||||
let
|
||||
theme =
|
||||
{
|
||||
dark = "";
|
||||
light = "GitHub";
|
||||
}
|
||||
.${config.myConfig.de.theme};
|
||||
in
|
||||
{
|
||||
cat = "${lib.getExe pkgs.bat} --plain --theme=${theme}";
|
||||
};
|
||||
in
|
||||
lib.mkMerge [
|
||||
lsAliases
|
||||
catAlias
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.shell.starship.enable = lib.mkEnableOption "";
|
||||
options.myConfig.shell.starship.enable = lib.mkEnableOption "";
|
||||
|
||||
config.programs.starship = lib.mkIf config.myConfig.shell.starship.enable {
|
||||
enable = true;
|
||||
config.programs.starship = lib.mkIf config.myConfig.shell.starship.enable {
|
||||
enable = true;
|
||||
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
|
||||
settings = {
|
||||
directory = {
|
||||
truncation_length = 0;
|
||||
truncation_symbol = "…/";
|
||||
truncate_to_repo = true;
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
directory = {
|
||||
truncation_length = 0;
|
||||
truncation_symbol = "…/";
|
||||
truncate_to_repo = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.sops-nix.homeManagerModules.sops];
|
||||
self,
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ inputs.sops-nix.homeManagerModules.sops ];
|
||||
|
||||
options.myConfig.sops.enable = lib.mkEnableOption "";
|
||||
options.myConfig.sops.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.sops.enable {
|
||||
sops = {
|
||||
age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
|
||||
defaultSopsFile = "${self}/users/${config.home.username}/secrets.yaml";
|
||||
};
|
||||
config = lib.mkIf config.myConfig.sops.enable {
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
||||
defaultSopsFile = "${self}/users/${config.home.username}/secrets.yaml";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,14 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.ssh-client.enable = lib.mkEnableOption "";
|
||||
options.myConfig.ssh-client.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.ssh-client.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
config = lib.mkIf config.myConfig.ssh-client.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
addKeysToAgent = "confirm";
|
||||
};
|
||||
|
||||
services.ssh-agent.enable = true;
|
||||
addKeysToAgent = "confirm";
|
||||
};
|
||||
|
||||
services.ssh-agent.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,59 +1,66 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.vscode.enable = lib.mkEnableOption "";
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myConfig.vscode.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.vscode.enable {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
config = lib.mkIf config.myConfig.vscode.enable {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.vscode-with-extensions.override {
|
||||
vscode = pkgs.vscodium;
|
||||
vscodeExtensions = let
|
||||
open-ext = inputs.nix-vscode-extensions.extensions.${pkgs.system}.open-vsx;
|
||||
in [
|
||||
open-ext.jnoortheen.nix-ide
|
||||
open-ext.yzhang.markdown-all-in-one
|
||||
package = pkgs.vscode-with-extensions.override {
|
||||
vscode = pkgs.vscodium;
|
||||
vscodeExtensions =
|
||||
let
|
||||
open-ext = inputs.nix-vscode-extensions.extensions.${pkgs.system}.open-vsx;
|
||||
in
|
||||
[
|
||||
open-ext.jnoortheen.nix-ide
|
||||
open-ext.yzhang.markdown-all-in-one
|
||||
|
||||
open-ext.github.github-vscode-theme
|
||||
open-ext.pkief.material-icon-theme
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.rules = let
|
||||
settings = builtins.replaceStrings [","] [",\\n"] (builtins.toJSON {
|
||||
"workbench.colorTheme" =
|
||||
{
|
||||
dark = "GitHub Dark";
|
||||
light = "GitHub Light";
|
||||
}
|
||||
.${config.myConfig.de.theme};
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
"editor.fontFamily" = "JetBrainsMono Nerd Font";
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"files.autoSave" = "afterDelay";
|
||||
"git.autofetch" = true;
|
||||
"git.confirmSync" = false;
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "${lib.getExe pkgs.nil}";
|
||||
"update.mode" = "none";
|
||||
"git.suggestSmartCommit" = false;
|
||||
"workbench.sideBar.location" = "right";
|
||||
"editor.renderWhitespace" = "none";
|
||||
"editor.minimap.enabled" = false;
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
"workbench.editor.decorations.colors" = false;
|
||||
});
|
||||
in [
|
||||
"f+ %h/.config/VSCodium/User/settings.json - - - - ${settings}"
|
||||
"f+ %h/.config/VSCodium/User/settings-default.json - - - - ${settings}"
|
||||
];
|
||||
open-ext.github.github-vscode-theme
|
||||
open-ext.pkief.material-icon-theme
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.rules =
|
||||
let
|
||||
settings = builtins.replaceStrings [ "," ] [ ",\\n" ] (
|
||||
builtins.toJSON {
|
||||
"workbench.colorTheme" =
|
||||
{
|
||||
dark = "GitHub Dark";
|
||||
light = "GitHub Light";
|
||||
}
|
||||
.${config.myConfig.de.theme};
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
"editor.fontFamily" = "JetBrainsMono Nerd Font";
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"files.autoSave" = "afterDelay";
|
||||
"git.autofetch" = true;
|
||||
"git.confirmSync" = false;
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "${lib.getExe pkgs.nil}";
|
||||
"update.mode" = "none";
|
||||
"git.suggestSmartCommit" = false;
|
||||
"workbench.sideBar.location" = "right";
|
||||
"editor.renderWhitespace" = "none";
|
||||
"editor.minimap.enabled" = false;
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
"workbench.editor.decorations.colors" = false;
|
||||
}
|
||||
);
|
||||
in
|
||||
[
|
||||
"f+ %h/.config/VSCodium/User/settings.json - - - - ${settings}"
|
||||
"f+ %h/.config/VSCodium/User/settings-default.json - - - - ${settings}"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue