Refactor with nixfmt

This commit is contained in:
2026-02-06 08:36:47 +01:00
parent fe643f065b
commit 82e4ea3c73
41 changed files with 1259 additions and 1112 deletions

View File

@@ -1,38 +1,48 @@
{ currentSystemUser, currentSystemDe, pkgs, ... }:
{
imports = [
./fish.nix
./git.nix
./gnome.nix
./kitty.nix
./mangohud.nix
./tmux.nix
./zoxide.nix
] ++ (if currentSystemDe == "hyprland" then [
./hyprland
] else []
);
currentSystemUser,
currentSystemDe,
pkgs,
...
}:
{
imports = [
./fish.nix
./git.nix
./gnome.nix
./kitty.nix
./mangohud.nix
./tmux.nix
./zoxide.nix
]
++ (
if currentSystemDe == "hyprland" then
[
./hyprland
]
else
[ ]
);
home = {
username = "${currentSystemUser}";
sessionVariables = {
EDITOR = "nvim";
BROWSER = "firefox";
TERMINAL = "gnome-boxes";
};
packages = [
pkgs.dconf
];
pointerCursor = {
enable = false;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
};
};
home = {
username = "${currentSystemUser}";
sessionVariables = {
EDITOR = "nvim";
BROWSER = "firefox";
TERMINAL = "gnome-boxes";
};
packages = [
pkgs.dconf
];
pointerCursor = {
enable = false;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
};
};
dconf.enable = true;
dconf.enable = true;
programs.home-manager.enable = true;
programs.home-manager.enable = true;
home.stateVersion = "24.11";
home.stateVersion = "24.11";
}

View File

@@ -1,28 +1,28 @@
{ pkgs, ... }:
{
programs.fish = {
enable = true;
interactiveShellInit = ''
# This is commented until a good way of installing themes is found
# fish_config theme choose Catppuccin\ Mocha
programs.fish = {
enable = true;
interactiveShellInit = ''
# This is commented until a good way of installing themes is found
# fish_config theme choose Catppuccin\ Mocha
function fish_greeting
krabby random --no-title --padding-left 2
end
function weather
curl "wttr.in/Bolzano?0?Q?"
end
function fish_greeting
krabby random --no-title --padding-left 2
end
function weather
curl "wttr.in/Bolzano?0?Q?"
end
function dev
nix develop --command "fish"
end
'';
plugins = with pkgs.fishPlugins; [
{
name = "fzf.fish";
src = fzf-fish.src;
}
];
};
function dev
nix develop --command "fish"
end
'';
plugins = with pkgs.fishPlugins; [
{
name = "fzf.fish";
src = fzf-fish.src;
}
];
};
}

View File

@@ -1,14 +1,14 @@
{ ... }:
{
programs.git = {
enable = true;
settings = {
user = {
name = "Superredstone";
email = "patrickcanal3@gmail.com";
};
init.defaultBranch = "main";
pull.rebase = true;
};
};
programs.git = {
enable = true;
settings = {
user = {
name = "Superredstone";
email = "patrickcanal3@gmail.com";
};
init.defaultBranch = "main";
pull.rebase = true;
};
};
}

View File

@@ -1,13 +1,13 @@
{ pkgs, ... }:
{
dconf = {
settings."org/gnome/shell" = {
enabled-extensions = with pkgs.gnomeExtensions; [
appindicator.extensionUuid
caffeine.extensionUuid
dash-to-dock.extensionUuid
wallpaper-slideshow.extensionUuid
];
};
};
dconf = {
settings."org/gnome/shell" = {
enabled-extensions = with pkgs.gnomeExtensions; [
appindicator.extensionUuid
caffeine.extensionUuid
dash-to-dock.extensionUuid
wallpaper-slideshow.extensionUuid
];
};
};
}

View File

@@ -1,9 +1,9 @@
{ ... }:
{ ... }:
{
imports = [
./hyprland.nix
./hyprlock.nix
./waybar.nix
./wofi.nix
];
imports = [
./hyprland.nix
./hyprlock.nix
./waybar.nix
./wofi.nix
];
}

View File

@@ -1,83 +1,86 @@
{ currentSystemUser, ... }:
{
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "SUPER";
bind = [
"$mod, Return, exec, kitty"
"$mod, SPACE, exec, wofi --show run"
"$mod SHIFT, L, exec, hyprlock"
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "SUPER";
bind = [
"$mod, Return, exec, kitty"
"$mod, SPACE, exec, wofi --show run"
"$mod SHIFT, L, exec, hyprlock"
"$mod SHIFT, Q, killactive"
"$mod, F, fullscreen"
"$mod, H, movefocus, l"
"$mod, L, movefocus, r"
"$mod, K, movefocus, u"
"$mod, J, movefocus, d"
"$mod SHIFT, H, movewindow, l"
"$mod SHIFT, L, movewindow, r"
"$mod SHIFT, K, movewindow, u"
"$mod SHIFT, J, movewindow, d"
"$mod SHIFT, right, resizeactive, 30 0"
"$mod SHIFT, left, resizeactive, -30 0"
"$mod SHIFT, up, resizeactive, 0 -30"
"$mod SHIFT, down, resizeactive, 0 30"
"$mod SHIFT, U, togglefloating"
"$mod SHIFT, Q, killactive"
"$mod, F, fullscreen"
"$mod, H, movefocus, l"
"$mod, L, movefocus, r"
"$mod, K, movefocus, u"
"$mod, J, movefocus, d"
"$mod SHIFT, H, movewindow, l"
"$mod SHIFT, L, movewindow, r"
"$mod SHIFT, K, movewindow, u"
"$mod SHIFT, J, movewindow, d"
"$mod SHIFT, right, resizeactive, 30 0"
"$mod SHIFT, left, resizeactive, -30 0"
"$mod SHIFT, up, resizeactive, 0 -30"
"$mod SHIFT, down, resizeactive, 0 30"
"$mod SHIFT, U, togglefloating"
",XF86MonBrightnessDown, exec, brightnessctl set 2%-"
",XF86MonBrightnessUp, exec, brightnessctl set +2%"
",XF86AudioLowerVolume, exec, pamixer -d 2"
",XF86AudioRaiseVolume, exec, pamixer -i 2"
",XF86MonBrightnessDown, exec, brightnessctl set 2%-"
",XF86MonBrightnessUp, exec, brightnessctl set +2%"
",XF86AudioLowerVolume, exec, pamixer -d 2"
",XF86AudioRaiseVolume, exec, pamixer -i 2"
"$mod, delete, exit"
] ++ (
builtins.concatLists (builtins.genList (i:
let ws = i + 1;
in [
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
]
)
9)
);
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
"$mod, delete, exit"
]
++ (builtins.concatLists (
builtins.genList (
i:
let
ws = i + 1;
in
[
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
]
) 9
));
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
monitor = ", preferred, auto, 1";
monitor = ", preferred, auto, 1";
input = {
touchpad = {
natural_scroll = "yes";
};
input = {
touchpad = {
natural_scroll = "yes";
};
sensitivity = "0";
accel_profile = "flat";
};
sensitivity = "0";
accel_profile = "flat";
};
exec-once = [
"waybar"
"hyprpaper"
];
exec-once = [
"waybar"
"hyprpaper"
];
exec = [
];
};
};
exec = [
];
};
};
services.hyprpaper = {
enable = true;
settings = {
preload = ["/home/${currentSystemUser}/Pictures/wallpaper.jpg"];
wallpaper = [",/home/${currentSystemUser}/Pictures/wallpaper.jpg"];
};
};
services.hyprpaper = {
enable = true;
settings = {
preload = [ "/home/${currentSystemUser}/Pictures/wallpaper.jpg" ];
wallpaper = [ ",/home/${currentSystemUser}/Pictures/wallpaper.jpg" ];
};
};
}

View File

@@ -1,6 +1,6 @@
{ ... }:
{
programs.hyprlock = {
enable = true;
};
programs.hyprlock = {
enable = true;
};
}

View File

@@ -1,373 +1,377 @@
{ ... }:
{ ... }:
{
programs.waybar = {
enable = true;
programs.waybar = {
enable = true;
settings = {
mainBar = {
height = 30;
spacing = 1;
modules-left = [
"hyprland/workspaces"
];
modules-center = [
"hyprland/window"
];
modules-right = [
"tray"
"pulseaudio"
"network"
"power-profiles-daemon"
"backlight"
"battery"
"clock"
];
settings = {
mainBar = {
height = 30;
spacing = 1;
modules-left = [
"hyprland/workspaces"
];
modules-center = [
"hyprland/window"
];
modules-right = [
"tray"
"pulseaudio"
"network"
"power-profiles-daemon"
"backlight"
"battery"
"clock"
];
"hyprland/workspaces" = {
format = "{name} {icon}";
format-icons = {
"1" = "";
"2" = "";
"3" = "";
"4" = "";
"5" = "";
};
};
"tray" = {
spacing = 10;
};
"pulseaudio" = {
format = "{volume}% {icon}";
format-icons = {
headphones = "";
bluetooth = "󰥰";
handsfree = "";
headset = "󱡬";
phone = "";
portable = "";
car = "";
default = ["🕨" "🕩" "🕪"];
};
on-click = "pavucontrol";
};
"hyprland/window" = {
format = "{class}";
};
"battery" = {
"interval" = 1;
states = {
good = 80;
warning = 30;
critical = 20;
};
format = "{capacity}% {icon}";
format-charging = "{capacity}% 󰂄";
format-plugged = "{capacity}% ";
format-alt = "{time} {icon}";
format-icons = [
"󰁻"
"󰁼"
"󰁾"
"󰂀"
"󰂂"
"󰁹"
];
};
# Currently not enabled because i don't want to add some external tools to manage brightness
# backlight = {
# format = "{percent}% {icon}";
# format-icons = [
# ""
# ""
# ""
# ""
# ""
# ""
# ""
# ""
# ""
# ""
# ];
# on-scroll-down = "light -A 10";
# on-scroll-up = "light -U 10";
# smooth-scrolling-threshold = 1;
# };
"network" = {
format-wifi = "{ipaddr} Wi-Fi";
format-ethernet = "{ipaddr} Eth";
};
"power-profiles-daemon" = {
"format" = "{icon}";
"tooltip-format" = "Power profile: {profile}\nDriver: {driver}";
"tooltip" = true;
"format-icons" = {
"default" = "";
"performance" = "";
"balanced" = "";
"power-saver" = "";
};
};
};
};
"hyprland/workspaces" = {
format = "{name} {icon}";
format-icons = {
"1" = "";
"2" = "";
"3" = "";
"4" = "";
"5" = "";
};
};
"tray" = {
spacing = 10;
};
"pulseaudio" = {
format = "{volume}% {icon}";
format-icons = {
headphones = "";
bluetooth = "󰥰";
handsfree = "";
headset = "󱡬";
phone = "";
portable = "";
car = "";
default = [
"🕨"
"🕩"
"🕪"
];
};
on-click = "pavucontrol";
};
"hyprland/window" = {
format = "{class}";
};
"battery" = {
"interval" = 1;
states = {
good = 80;
warning = 30;
critical = 20;
};
format = "{capacity}% {icon}";
format-charging = "{capacity}% 󰂄";
format-plugged = "{capacity}% ";
format-alt = "{time} {icon}";
format-icons = [
"󰁻"
"󰁼"
"󰁾"
"󰂀"
"󰂂"
"󰁹"
];
};
# Currently not enabled because i don't want to add some external tools to manage brightness
# backlight = {
# format = "{percent}% {icon}";
# format-icons = [
# ""
# ""
# ""
# ""
# ""
# ""
# ""
# ""
# ""
# ""
# ];
# on-scroll-down = "light -A 10";
# on-scroll-up = "light -U 10";
# smooth-scrolling-threshold = 1;
# };
"network" = {
format-wifi = "{ipaddr} Wi-Fi";
format-ethernet = "{ipaddr} Eth";
};
"power-profiles-daemon" = {
"format" = "{icon}";
"tooltip-format" = "Power profile: {profile}\nDriver: {driver}";
"tooltip" = true;
"format-icons" = {
"default" = "";
"performance" = "";
"balanced" = "";
"power-saver" = "";
};
};
};
};
style = ''
@define-color rosewater #f5e0dc;
@define-color flamingo #f2cdcd;
@define-color pink #f5c2e7;
@define-color mauve #cba6f7;
@define-color red #f38ba8;
@define-color maroon #eba0ac;
@define-color peach #fab387;
@define-color yellow #f9e2af;
@define-color green #a6e3a1;
@define-color teal #94e2d5;
@define-color sky #89dceb;
@define-color sapphire #74c7ec;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color text #cdd6f4;
@define-color subtext1 #bac2de;
@define-color subtext0 #a6adc8;
@define-color overlay2 #9399b2;
@define-color overlay1 #7f849c;
@define-color overlay0 #6c7086;
@define-color surface2 #585b70;
@define-color surface1 #45475a;
@define-color surface0 #313244;
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
style = ''
@define-color rosewater #f5e0dc;
@define-color flamingo #f2cdcd;
@define-color pink #f5c2e7;
@define-color mauve #cba6f7;
@define-color red #f38ba8;
@define-color maroon #eba0ac;
@define-color peach #fab387;
@define-color yellow #f9e2af;
@define-color green #a6e3a1;
@define-color teal #94e2d5;
@define-color sky #89dceb;
@define-color sapphire #74c7ec;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color text #cdd6f4;
@define-color subtext1 #bac2de;
@define-color subtext0 #a6adc8;
@define-color overlay2 #9399b2;
@define-color overlay1 #7f849c;
@define-color overlay0 #6c7086;
@define-color surface2 #585b70;
@define-color surface1 #45475a;
@define-color surface0 #313244;
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
* {
border: none;
border-radius: 1px;
font-family: JetBrainsMono Nerd Font;
font-size: 13px;
min-height: 0;
}
window#waybar {
background-color: @mantle;
color: @text;
}
window#waybar.hidden {
opacity: 0.2;
}
tooltip {
background-color: @base;
border: 1px solid @surface1;
}
tooltip label {
color: @text;
}
button {
box-shadow: inset 0 -3px transparent;
border: none;
border-radius: 1px;
}
button:hover {
background: inherit;
box-shadow: inset 0 -3px @text;
}
#workspaces button {
padding: 0 0;
background-color: @mantle;
color: @text;
}
#workspaces button:hover {
box-shadow: inherit;
text-shadow: inherit;
background-image: linear-gradient(0deg, @surface1, @mantle);
}
#workspaces button.focused {
background-image: linear-gradient(0deg, @mauve, @surface1);
box-shadow: inset 0 -3px @text;
}
#workspaces button.urgent {
background-image: linear-gradient(0deg, @red, @mantle);
}
#taskbar button.active {
background-image: linear-gradient(0deg, @surface1, @mantle);
}
#mode {
background-color: @base;
box-shadow: inset 0 -2px @text;
}
#mpris,
#custom-weather,
#clock,
#language,
#pulseaudio,
#bluetooth,
#network,
#memory,
#cpu,
#temperature,
#disk,
#custom-kernel,
#idle_inhibitor,
#scratchpad,
#mode,
#power-profiles-daemon,
#backlight,
#battery,
#tray {
padding: 0 10px;
margin: 5px 1px;
color: @text;
}
#window,
#workspaces {
margin: 0 4px;
}
#power-profiles-daemon {
background-color: @red;
color: @base;
}
#custom-weather {
background-color: @teal;
color: @mantle;
margin-right: 5px;
}
#custom-kernel {
background-color: @rosewater;
color: @mantle;
}
#clock {
background-color: @green;
color: @mantle;
}
@keyframes blink {
to {
background-color: @mantle;
color: @text;
}
}
label:focus {
background-color: @mantle;
}
#cpu {
background-color: @mauve;
color: @mantle;
min-width: 45px;
}
#memory {
background-color: @red;
color: @mantle;
}
#disk {
background-color: @flamingo;
color: @mantle;
}
#battery {
background-color: @mauve;
color: @base;
}
#backlight {
background-color: @sky;
color: @base;
}
#network {
background-color: @peach;
color: @mantle;
}
#network.disconnected {
background-color: red;
color: @mantle;
}
#bluetooth {
background-color: @maroon;
color: @mantle;
min-width: 40px;
}
#pulseaudio {
background-color: @yellow;
color: @mantle;
}
#pulseaudio.muted {
background-color: red;
color: @mantle;
}
#temperature {
background-color: @pink;
color: @mantle;
min-width: 37px;
}
#temperature.critical {
background-color: red;
color: @mantle;
min-width: 37px;
}
#mpris {
background-color: @base;
color: @text;
}
#tray {
background-color: @overlay0;
color: @text;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: @mantle;
}
#idle_inhibitor {
background-color: @base;
color: @text;
font-family: Inter;
}
#idle_inhibitor.activated {
background-color: @text;
color: @base;
}
#scratchpad {
background-color: @base;
color: @text;
}
#scratchpad.empty {
background-color: transparent;
}
'';
};
* {
border: none;
border-radius: 1px;
font-family: JetBrainsMono Nerd Font;
font-size: 13px;
min-height: 0;
}
window#waybar {
background-color: @mantle;
color: @text;
}
window#waybar.hidden {
opacity: 0.2;
}
tooltip {
background-color: @base;
border: 1px solid @surface1;
}
tooltip label {
color: @text;
}
button {
box-shadow: inset 0 -3px transparent;
border: none;
border-radius: 1px;
}
button:hover {
background: inherit;
box-shadow: inset 0 -3px @text;
}
#workspaces button {
padding: 0 0;
background-color: @mantle;
color: @text;
}
#workspaces button:hover {
box-shadow: inherit;
text-shadow: inherit;
background-image: linear-gradient(0deg, @surface1, @mantle);
}
#workspaces button.focused {
background-image: linear-gradient(0deg, @mauve, @surface1);
box-shadow: inset 0 -3px @text;
}
#workspaces button.urgent {
background-image: linear-gradient(0deg, @red, @mantle);
}
#taskbar button.active {
background-image: linear-gradient(0deg, @surface1, @mantle);
}
#mode {
background-color: @base;
box-shadow: inset 0 -2px @text;
}
#mpris,
#custom-weather,
#clock,
#language,
#pulseaudio,
#bluetooth,
#network,
#memory,
#cpu,
#temperature,
#disk,
#custom-kernel,
#idle_inhibitor,
#scratchpad,
#mode,
#power-profiles-daemon,
#backlight,
#battery,
#tray {
padding: 0 10px;
margin: 5px 1px;
color: @text;
}
#window,
#workspaces {
margin: 0 4px;
}
#power-profiles-daemon {
background-color: @red;
color: @base;
}
#custom-weather {
background-color: @teal;
color: @mantle;
margin-right: 5px;
}
#custom-kernel {
background-color: @rosewater;
color: @mantle;
}
#clock {
background-color: @green;
color: @mantle;
}
@keyframes blink {
to {
background-color: @mantle;
color: @text;
}
}
label:focus {
background-color: @mantle;
}
#cpu {
background-color: @mauve;
color: @mantle;
min-width: 45px;
}
#memory {
background-color: @red;
color: @mantle;
}
#disk {
background-color: @flamingo;
color: @mantle;
}
#battery {
background-color: @mauve;
color: @base;
}
#backlight {
background-color: @sky;
color: @base;
}
#network {
background-color: @peach;
color: @mantle;
}
#network.disconnected {
background-color: red;
color: @mantle;
}
#bluetooth {
background-color: @maroon;
color: @mantle;
min-width: 40px;
}
#pulseaudio {
background-color: @yellow;
color: @mantle;
}
#pulseaudio.muted {
background-color: red;
color: @mantle;
}
#temperature {
background-color: @pink;
color: @mantle;
min-width: 37px;
}
#temperature.critical {
background-color: red;
color: @mantle;
min-width: 37px;
}
#mpris {
background-color: @base;
color: @text;
}
#tray {
background-color: @overlay0;
color: @text;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: @mantle;
}
#idle_inhibitor {
background-color: @base;
color: @text;
font-family: Inter;
}
#idle_inhibitor.activated {
background-color: @text;
color: @base;
}
#scratchpad {
background-color: @base;
color: @text;
}
#scratchpad.empty {
background-color: transparent;
}
'';
};
}

View File

@@ -1,6 +1,6 @@
{ ... }:
{
programs.wofi = {
enable = true;
};
programs.wofi = {
enable = true;
};
}

View File

@@ -1,18 +1,17 @@
{ pkgs, ... }:
{
programs.kitty = {
enable = false;
settings = {
enable_audio_bell = false;
linux_display_server = "x11"; # This is how you get borders in gnome!
};
font = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font";
size = 16;
};
themeFile = "Catppuccin-Mocha";
extraConfig = ''
'';
};
programs.kitty = {
enable = false;
settings = {
enable_audio_bell = false;
linux_display_server = "x11"; # This is how you get borders in gnome!
};
font = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font";
size = 16;
};
themeFile = "Catppuccin-Mocha";
extraConfig = " ";
};
}

View File

@@ -1,9 +1,9 @@
{ ... }:
{
programs.mangohud = {
enable = true;
settings = {
fps_limit = 75;
};
};
programs.mangohud = {
enable = true;
settings = {
fps_limit = 75;
};
};
}

View File

@@ -1,13 +1,13 @@
{ pkgs, ... }:
{
programs.tmux = {
enable = true;
escapeTime = 0;
extraConfig = ''
set -g @catppuccin_flavor 'mocha'
'';
plugins = with pkgs; [
tmuxPlugins.catppuccin
];
};
programs.tmux = {
enable = true;
escapeTime = 0;
extraConfig = ''
set -g @catppuccin_flavor 'mocha'
'';
plugins = with pkgs; [
tmuxPlugins.catppuccin
];
};
}

View File

@@ -1,10 +1,10 @@
{ ... }:
{
programs.zoxide = {
enable = true;
enableFishIntegration= true;
options = [
"--cmd cd"
];
};
programs.zoxide = {
enable = true;
enableFishIntegration = true;
options = [
"--cmd cd"
];
};
}