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

131
flake.nix
View File

@@ -1,65 +1,74 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixvim = { nixvim = {
url = "github:Superredstone/nixvim"; url = "github:Superredstone/nixvim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nur = { nur = {
url = "github:nix-community/NUR"; url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
millennium.url = "github:SteamClientHomebrew/Millennium?dir=packages/nix"; millennium.url = "github:SteamClientHomebrew/Millennium?dir=packages/nix";
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
}; };
outputs = { nixpkgs, home-manager, nixvim, millennium, nur, ... }@inputs: outputs =
let {
overlays = [ nixpkgs,
millennium.overlays.default home-manager,
nur.overlays.default nixvim,
]; millennium,
personalEmail = "patrickcanal3@gmail.com"; nur,
username = "r3ddy"; ...
mkSystem = import ./lib/mksystem.nix { }@inputs:
inherit let
overlays overlays = [
nixvim millennium.overlays.default
millennium nur.overlays.default
nur ];
inputs personalEmail = "patrickcanal3@gmail.com";
nixpkgs username = "r3ddy";
home-manager; mkSystem = import ./lib/mksystem.nix {
}; inherit
in overlays
{ nixvim
nixosConfigurations.katana = mkSystem "katana" { millennium
system = "x86_64-linux"; nur
user = username; inputs
email = personalEmail; nixpkgs
gamingSystem = true; home-manager
# Currently supported: plasma, gnome, hyprland and none ;
desktopEnvironment = "gnome"; };
additionalModules = [ in
]; {
}; nixosConfigurations.katana = mkSystem "katana" {
nixosConfigurations.workstation = mkSystem "workstation" { system = "x86_64-linux";
system = "x86_64-linux"; user = username;
user = username; email = personalEmail;
email = personalEmail; gamingSystem = true;
workSystem = true; # Currently supported: plasma, gnome, hyprland and none
desktopEnvironment = "gnome"; desktopEnvironment = "gnome";
}; additionalModules = [
nixosConfigurations."bomba" = mkSystem "bomba" { ];
system = "x86_64-linux"; };
email = personalEmail; nixosConfigurations.workstation = mkSystem "workstation" {
user = username; system = "x86_64-linux";
desktopEnvironment = "none"; user = username;
}; email = personalEmail;
}; workSystem = true;
desktopEnvironment = "gnome";
};
nixosConfigurations."bomba" = mkSystem "bomba" {
system = "x86_64-linux";
email = personalEmail;
user = username;
desktopEnvironment = "none";
};
};
} }

View File

@@ -1,38 +1,48 @@
{ currentSystemUser, currentSystemDe, pkgs, ... }:
{ {
imports = [ currentSystemUser,
./fish.nix currentSystemDe,
./git.nix pkgs,
./gnome.nix ...
./kitty.nix }:
./mangohud.nix {
./tmux.nix imports = [
./zoxide.nix ./fish.nix
] ++ (if currentSystemDe == "hyprland" then [ ./git.nix
./hyprland ./gnome.nix
] else [] ./kitty.nix
); ./mangohud.nix
./tmux.nix
./zoxide.nix
]
++ (
if currentSystemDe == "hyprland" then
[
./hyprland
]
else
[ ]
);
home = { home = {
username = "${currentSystemUser}"; username = "${currentSystemUser}";
sessionVariables = { sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
BROWSER = "firefox"; BROWSER = "firefox";
TERMINAL = "gnome-boxes"; TERMINAL = "gnome-boxes";
}; };
packages = [ packages = [
pkgs.dconf pkgs.dconf
]; ];
pointerCursor = { pointerCursor = {
enable = false; enable = false;
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic"; 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, ... }: { pkgs, ... }:
{ {
programs.fish = { programs.fish = {
enable = true; enable = true;
interactiveShellInit = '' interactiveShellInit = ''
# This is commented until a good way of installing themes is found # This is commented until a good way of installing themes is found
# fish_config theme choose Catppuccin\ Mocha # fish_config theme choose Catppuccin\ Mocha
function fish_greeting function fish_greeting
krabby random --no-title --padding-left 2 krabby random --no-title --padding-left 2
end end
function weather function weather
curl "wttr.in/Bolzano?0?Q?" curl "wttr.in/Bolzano?0?Q?"
end end
function dev function dev
nix develop --command "fish" nix develop --command "fish"
end end
''; '';
plugins = with pkgs.fishPlugins; [ plugins = with pkgs.fishPlugins; [
{ {
name = "fzf.fish"; name = "fzf.fish";
src = fzf-fish.src; src = fzf-fish.src;
} }
]; ];
}; };
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,66 +1,66 @@
# This file is based on https://github.com/kahlstrm/nixos-config/blob/main/lib/mksystem.nix # This file is based on https://github.com/kahlstrm/nixos-config/blob/main/lib/mksystem.nix
{ {
overlays, overlays,
nixvim, nixvim,
millennium, millennium,
nur, nur,
inputs, inputs,
nixpkgs, nixpkgs,
home-manager, home-manager,
}: }:
name: name:
{ {
system, system,
user, user,
email, email,
gamingSystem ? false, gamingSystem ? false,
workSystem ? false, workSystem ? false,
desktopEnvironment ? "", desktopEnvironment ? "",
additionalModules ? [], additionalModules ? [ ],
}: }:
let let
nixConfig = ../modules/nix-config/default.nix; nixConfig = ../modules/nix-config/default.nix;
machineConfig = ../machines/${name}/default.nix; machineConfig = ../machines/${name}/default.nix;
HMConfig = ../home; HMConfig = ../home;
systemPackages = ../modules/packages.nix; systemPackages = ../modules/packages.nix;
specialArgs = { specialArgs = {
pkgs-stable = import nixpkgs { pkgs-stable = import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
currentSystem = system; currentSystem = system;
currentSystemName = name; currentSystemName = name;
currentSystemUser = user; currentSystemUser = user;
currentSystemEmail = email; currentSystemEmail = email;
currentSystemDe = desktopEnvironment; currentSystemDe = desktopEnvironment;
gamingSystem = gamingSystem; gamingSystem = gamingSystem;
workSystem = workSystem; workSystem = workSystem;
nixvim = nixvim; nixvim = nixvim;
millennium = millennium; millennium = millennium;
nur = nur; nur = nur;
inputs = inputs; inputs = inputs;
additionalModules = additionalModules; additionalModules = additionalModules;
}; };
in in
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
inherit system specialArgs; inherit system specialArgs;
modules = [ modules = [
{ nixpkgs.overlays = overlays; } { nixpkgs.overlays = overlays; }
nixConfig nixConfig
systemPackages systemPackages
nur.modules.nixos.default nur.modules.nixos.default
nur.legacyPackages."${system}".repos.iopq.modules.xraya nur.legacyPackages."${system}".repos.iopq.modules.xraya
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.backupFileExtension = "backup"; home-manager.backupFileExtension = "backup";
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.${user} = import HMConfig; home-manager.users.${user} = import HMConfig;
home-manager.extraSpecialArgs = specialArgs; home-manager.extraSpecialArgs = specialArgs;
home-manager.sharedModules = [ home-manager.sharedModules = [
]; ];
} }
machineConfig machineConfig
] ++ additionalModules; ]
++ additionalModules;
} }

View File

@@ -1,16 +1,15 @@
{ {
stable, stable,
inputs, inputs,
system, system,
}: }:
let let
nixpkgs-stable = inputs."nixpkgs-unstable"; nixpkgs-stable = inputs."nixpkgs-unstable";
nixpkgs = if stable then nixpkgs-stable else inputs.nixpkgs-unstable; nixpkgs = if stable then nixpkgs-stable else inputs.nixpkgs-unstable;
home-manager = inputs.home-manager-unstable; home-manager = inputs.home-manager-unstable;
in in
{ {
systemFunc = nixpkgs.lib.nixosSystem; systemFunc = nixpkgs.lib.nixosSystem;
home-manager = home-manager.nixosModules; home-manager = home-manager.nixosModules;
inherit (import nixpkgs { inherit system; }) lib; inherit (import nixpkgs { inherit system; }) lib;
} }

View File

@@ -5,10 +5,10 @@
{ ... }: { ... }:
{ {
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
time.timeZone = "Europe/Rome"; time.timeZone = "Europe/Rome";
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
} }

View File

@@ -1,17 +1,17 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./configuration.nix ./configuration.nix
./hardware.nix ./hardware.nix
./networking.nix ./networking.nix
./services.nix ./services.nix
./virtualisation.nix ./virtualisation.nix
]; ];
networking.hostName = "bomba"; networking.hostName = "bomba";
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
system.stateVersion = "25.05"; # Did you read the comment? system.stateVersion = "25.05"; # Did you read the comment?
} }

View File

@@ -1,28 +1,43 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/a1939342-f36b-4902-b659-71b468b5e64b"; device = "/dev/disk/by-uuid/a1939342-f36b-4902-b659-71b468b5e64b";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/6132-EE01"; device = "/dev/disk/by-uuid/6132-EE01";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
}; "fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ]; swapDevices = [ ];

View File

@@ -1,6 +1,6 @@
{ ... }: { ... }:
{ {
services = { services = {
openssh.enable = true; openssh.enable = true;
}; };
} }

View File

@@ -1,26 +1,27 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
boot = { boot = {
loader.systemd-boot.enable = true; loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
loader.systemd-boot.configurationLimit = 10; loader.systemd-boot.configurationLimit = 10;
initrd = { initrd = {
luks.devices."luks-563ebcd9-614b-460f-af9a-5cf1d9c8bef5".device = "/dev/disk/by-uuid/563ebcd9-614b-460f-af9a-5cf1d9c8bef5"; luks.devices."luks-563ebcd9-614b-460f-af9a-5cf1d9c8bef5".device =
verbose = false; "/dev/disk/by-uuid/563ebcd9-614b-460f-af9a-5cf1d9c8bef5";
systemd.enable = true; verbose = false;
}; systemd.enable = true;
kernelPackages = pkgs.linuxPackages_zen; # pkgs.linuxPackages_latest; };
consoleLogLevel = 3; kernelPackages = pkgs.linuxPackages_zen; # pkgs.linuxPackages_latest;
kernelParams = [ consoleLogLevel = 3;
"quiet" kernelParams = [
"splash" "quiet"
"intremap=on" "splash"
"boot.shell_on_fail" "intremap=on"
"udev.log_priority=3" "boot.shell_on_fail"
"rd.systemd.show_status=auto" "udev.log_priority=3"
]; "rd.systemd.show_status=auto"
];
plymouth.enable = true; plymouth.enable = true;
loader.timeout = 0; loader.timeout = 0;
}; };
} }

View File

@@ -1,15 +1,15 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./hardware.nix ./hardware.nix
./boot.nix ./boot.nix
./nvidia.nix ./nvidia.nix
./services.nix ./services.nix
./virtualisation.nix ./virtualisation.nix
./networking.nix ./networking.nix
]; ];
networking.hostName = "katana"; # Define your hostname. networking.hostName = "katana"; # Define your hostname.
system.stateVersion = "25.11"; # Did you read the comment? system.stateVersion = "25.11"; # Did you read the comment?
} }

View File

@@ -1,34 +1,50 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [
"vmd"
"xhci_pci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/mapper/luks-1a5ef40f-3c13-4efb-ae65-da42d4bf30ef"; device = "/dev/mapper/luks-1a5ef40f-3c13-4efb-ae65-da42d4bf30ef";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-1a5ef40f-3c13-4efb-ae65-da42d4bf30ef".device = "/dev/disk/by-uuid/1a5ef40f-3c13-4efb-ae65-da42d4bf30ef"; boot.initrd.luks.devices."luks-1a5ef40f-3c13-4efb-ae65-da42d4bf30ef".device =
"/dev/disk/by-uuid/1a5ef40f-3c13-4efb-ae65-da42d4bf30ef";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/1A33-9EC1"; device = "/dev/disk/by-uuid/1A33-9EC1";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
}; "fmask=0077"
"dmask=0077"
swapDevices =
[ { device = "/dev/mapper/luks-563ebcd9-614b-460f-af9a-5cf1d9c8bef5"; }
]; ];
};
swapDevices = [
{ device = "/dev/mapper/luks-563ebcd9-614b-460f-af9a-5cf1d9c8bef5"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View File

@@ -1,16 +1,16 @@
{ ... }: { ... }:
{ {
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
wireguard.enable = true; wireguard.enable = true;
firewall = { firewall = {
checkReversePath = false; checkReversePath = false;
allowedUDPPorts = [ 25565 ]; allowedUDPPorts = [ 25565 ];
allowedTCPPorts = [ 25565 ]; allowedTCPPorts = [ 25565 ];
}; };
}; };
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
powerOnBoot = true; powerOnBoot = true;
}; };
} }

View File

@@ -1,20 +1,20 @@
{ config, ... }: { config, ... }:
{ {
hardware = { hardware = {
graphics.enable = true; graphics.enable = true;
nvidia = { nvidia = {
modesetting.enable = true; modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.beta; package = config.boot.kernelPackages.nvidiaPackages.beta;
open = true; open = true;
prime = { prime = {
offload = { offload = {
enable = true; enable = true;
enableOffloadCmd = true; enableOffloadCmd = true;
}; };
intelBusId = "PCI:0:2:0"; intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0"; nvidiaBusId = "PCI:1:0:0";
}; };
}; };
}; };
} }

View File

@@ -1,10 +1,10 @@
{ ... }: { ... }:
{ {
services = { services = {
flatpak.enable = true; flatpak.enable = true;
printing.enable = true; printing.enable = true;
# Required for piper to work # Required for piper to work
ratbagd.enable = true; ratbagd.enable = true;
xserver.videoDrivers = ["nvidia"]; xserver.videoDrivers = [ "nvidia" ];
}; };
} }

View File

@@ -1,18 +1,18 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./hardware.nix ./hardware.nix
./services.nix ./services.nix
./virtualisation.nix ./virtualisation.nix
./networking.nix ./networking.nix
]; ];
networking.hostName = "workstation"; # Define your hostname. networking.hostName = "workstation"; # Define your hostname.
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
system.stateVersion = "24.11"; # Did you read the comment? system.stateVersion = "24.11"; # Did you read the comment?
} }

View File

@@ -1,30 +1,47 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
"rtsx_usb_sdmmc"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/b8f99588-490c-47a4-ad8b-dfbe27ced16c"; device = "/dev/disk/by-uuid/b8f99588-490c-47a4-ad8b-dfbe27ced16c";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-a4dcf57a-8925-41a8-bac6-1cfd08a90f0b".device = "/dev/disk/by-uuid/a4dcf57a-8925-41a8-bac6-1cfd08a90f0b"; boot.initrd.luks.devices."luks-a4dcf57a-8925-41a8-bac6-1cfd08a90f0b".device =
"/dev/disk/by-uuid/a4dcf57a-8925-41a8-bac6-1cfd08a90f0b";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/C0E2-037E"; device = "/dev/disk/by-uuid/C0E2-037E";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
}; "fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ]; swapDevices = [ ];

View File

@@ -1,9 +1,12 @@
{ ... }: { ... }:
{ {
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
firewall.allowedUDPPorts = [ 8000 ]; firewall.allowedUDPPorts = [ 8000 ];
firewall.allowedTCPPorts = [ 8000 ]; firewall.allowedTCPPorts = [ 8000 ];
nameservers = [ "1.1.1.1" "1.0.0.1" ]; nameservers = [
}; "1.1.1.1"
"1.0.0.1"
];
};
} }

View File

@@ -1,17 +1,17 @@
{ ... }: { ... }:
{ {
services = { services = {
flatpak.enable = true; flatpak.enable = true;
# Enable CUPS to print documents. # Enable CUPS to print documents.
printing.enable = true; printing.enable = true;
openssh = { openssh = {
enable = true; enable = true;
ports = [ 22 ]; ports = [ 22 ];
settings = { settings = {
PasswordAuthentication = true; PasswordAuthentication = true;
PermitRootLogin = "no"; PermitRootLogin = "no";
}; };
}; };
}; };
} }

View File

@@ -1,54 +1,63 @@
{ pkgs, lib, currentSystemDe, ... }:
{ {
services = { pkgs,
xserver.enable = true; lib,
xserver.excludePackages = with pkgs; [ currentSystemDe,
xterm ...
]; }:
{
services = {
xserver.enable = true;
xserver.excludePackages = with pkgs; [
xterm
];
# Display managers # Display managers
displayManager = { displayManager = {
sddm = lib.mkIf (currentSystemDe == "plasma") { sddm = lib.mkIf (currentSystemDe == "plasma") {
enable = true; enable = true;
wayland.enable = true; wayland.enable = true;
}; };
gdm.enable = lib.mkIf (currentSystemDe == "gnome") true; gdm.enable = lib.mkIf (currentSystemDe == "gnome") true;
}; };
# Desktop environments # Desktop environments
desktopManager = { desktopManager = {
plasma6.enable = lib.mkIf (currentSystemDe == "plasma") true; plasma6.enable = lib.mkIf (currentSystemDe == "plasma") true;
gnome.enable = lib.mkIf (currentSystemDe == "gnome") true; gnome.enable = lib.mkIf (currentSystemDe == "gnome") true;
}; };
}; };
environment.plasma6.excludePackages = with pkgs.kdePackages; [ environment.plasma6.excludePackages = with pkgs.kdePackages; [
elisa elisa
konsole konsole
]; ];
environment.gnome.excludePackages = with pkgs; [ environment.gnome.excludePackages = with pkgs; [
epiphany epiphany
geary geary
gedit gedit
gnome-characters gnome-characters
gnome-console gnome-console
gnome-contacts gnome-contacts
gnome-maps gnome-maps
gnome-music gnome-music
gnome-software gnome-software
gnome-tour gnome-tour
seahorse seahorse
simple-scan simple-scan
xterm xterm
yelp yelp
]; ];
xdg = { xdg = {
autostart.enable = true; autostart.enable = true;
portal.enable = true; portal.enable = true;
}; };
programs.kdeconnect = lib.mkIf (currentSystemDe != "none") { programs.kdeconnect = lib.mkIf (currentSystemDe != "none") {
enable = true; enable = true;
package = if (currentSystemDe == "gnome") then pkgs.gnomeExtensions.gsconnect else pkgs.kdePackages.kdeconnect-kde; package =
}; if (currentSystemDe == "gnome") then
pkgs.gnomeExtensions.gsconnect
else
pkgs.kdePackages.kdeconnect-kde;
};
} }

View File

@@ -1,38 +1,49 @@
{ pkgs, currentSystemUser, currentSystemDe, ... }:
{ {
imports = [ pkgs,
./keyboard.nix currentSystemUser,
./security.nix currentSystemDe,
./services.nix ...
] ++ (if (currentSystemDe != "none") then [ }:
./de.nix {
./fonts.nix imports = [
./sound.nix ./keyboard.nix
] else []); ./security.nix
./services.nix
]
++ (
if (currentSystemDe != "none") then
[
./de.nix
./fonts.nix
./sound.nix
]
else
[ ]
);
time.timeZone = "Europe/Rome"; time.timeZone = "Europe/Rome";
# Select internationalisation properties. # Select internationalisation properties.
i18n = { i18n = {
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
extraLocaleSettings = { extraLocaleSettings = {
LC_ADDRESS = "it_IT.UTF-8"; LC_ADDRESS = "it_IT.UTF-8";
LC_IDENTIFICATION = "it_IT.UTF-8"; LC_IDENTIFICATION = "it_IT.UTF-8";
LC_MEASUREMENT = "it_IT.UTF-8"; LC_MEASUREMENT = "it_IT.UTF-8";
LC_MONETARY = "it_IT.UTF-8"; LC_MONETARY = "it_IT.UTF-8";
LC_NAME = "it_IT.UTF-8"; LC_NAME = "it_IT.UTF-8";
LC_NUMERIC = "it_IT.UTF-8"; LC_NUMERIC = "it_IT.UTF-8";
LC_PAPER = "it_IT.UTF-8"; LC_PAPER = "it_IT.UTF-8";
LC_TELEPHONE = "it_IT.UTF-8"; LC_TELEPHONE = "it_IT.UTF-8";
LC_TIME = "it_IT.UTF-8"; LC_TIME = "it_IT.UTF-8";
}; };
}; };
environment.sessionVariables = { environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; # Use Wayland when possible (this does not seem to work) NIXOS_OZONE_WL = "1"; # Use Wayland when possible (this does not seem to work)
ELECTRON_OZONE_PLATFORM_HINT = "wayland"; ELECTRON_OZONE_PLATFORM_HINT = "wayland";
GOPATH = "$HOME/.go"; GOPATH = "$HOME/.go";
}; };
programs.fish.enable = true; # This must be true before initializing my user programs.fish.enable = true; # This must be true before initializing my user
users.users.${currentSystemUser} = { users.users.${currentSystemUser} = {
@@ -42,12 +53,15 @@
shell = pkgs.fish; shell = pkgs.fish;
}; };
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [
nixpkgs.config.packageOverrides = pkgs: { "nix-command"
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/main.tar.gz") { "flakes"
inherit pkgs; ];
}; nixpkgs.config.packageOverrides = pkgs: {
}; nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/main.tar.gz") {
inherit pkgs;
};
};
documentation.man.generateCaches = false; documentation.man.generateCaches = false;
} }

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
nerd-fonts.jetbrains-mono nerd-fonts.jetbrains-mono
noto-fonts noto-fonts
]; ];
} }

View File

@@ -1,8 +1,8 @@
{ ... }: { ... }:
{ {
# Configure keymap in X11 # Configure keymap in X11
services.xserver.xkb = { services.xserver.xkb = {
layout = "us"; layout = "us";
variant = ""; variant = "";
}; };
} }

View File

@@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
security.sudo.extraConfig = '' security.sudo.extraConfig = ''
Defaults pwfeedback Defaults pwfeedback
Defaults timestamp_timeout=120 Defaults timestamp_timeout=120
''; '';
} }

View File

@@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
services = { services = {
pcscd.enable = true; pcscd.enable = true;
nordvpn.enable = true; nordvpn.enable = true;
}; };
} }

View File

@@ -1,14 +1,14 @@
{ ... }: { ... }:
{ {
# Enable sound with pipewire. # Enable sound with pipewire.
services = { services = {
pipewire = { pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
}; };
pulseaudio.enable = false; pulseaudio.enable = false;
}; };
security.rtkit.enable = true; security.rtkit.enable = true;
} }

View File

@@ -1,109 +1,148 @@
{ pkgs, gamingSystem, workSystem, currentSystemDe, ... }@ inputs:
{ {
imports = [ pkgs,
./programs gamingSystem,
]; workSystem,
currentSystemDe,
...
}@inputs:
{
imports = [
./programs
];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ environment.systemPackages =
# CLI utils with pkgs;
appimage-run [
bat # CLI utils
btop appimage-run
bun bat
busybox btop
distrobox bun
docker busybox
dua distrobox
fd docker
fish dua
fzf fd
gh fish
git fzf
gitlab-ci-local gh
gnumake git
htop gitlab-ci-local
inotify-tools gnumake
jq htop
just inotify-tools
killall jq
krabby just
lazygit killall
nmap krabby
nodejs lazygit
openssl nmap
openvpn nodejs
pinentry-tty openssl
python3 openvpn
ripgrep pinentry-tty
tree python3
unzip ripgrep
wget tree
wl-clipboard unzip
xdotool wget
xorg.xwininfo wl-clipboard
yad xdotool
zip xorg.xwininfo
zoxide yad
zulu zip
zoxide
zulu
# Man pages # Man pages
man-pages man-pages
vim # The only and one great editor vim # The only and one great editor
inputs.nixvim.packages.${stdenv.hostPlatform.system}.default # The only and one great editor improved even further inputs.nixvim.packages.${stdenv.hostPlatform.system}.default # The only and one great editor improved even further
] ++ (if currentSystemDe != "none" then [ ]
# Video card ++ (
vulkan-tools if currentSystemDe != "none" then
[
# Video card
vulkan-tools
# GUI applications # GUI applications
baobab baobab
bazaar bazaar
blackbox-terminal blackbox-terminal
firefox firefox
fluffychat fluffychat
gnome-boxes gnome-boxes
mpv mpv
nextcloud-client nextcloud-client
piper piper
spotube spotube
telegram-desktop telegram-desktop
thunderbird thunderbird
] else []) ]
++ (if gamingSystem then [ else
cura-appimage [ ]
discord )
heroic ++ (
lutris if gamingSystem then
mangohud [
openrgb cura-appimage
prismlauncher discord
protonplus heroic
satisfactorymodmanager lutris
] else []) mangohud
++ (if workSystem then [ openrgb
android-studio prismlauncher
ansible protonplus
virt-manager satisfactorymodmanager
] else []) ]
++ (if currentSystemDe == "plasma" then [ else
kdePackages.wallpaper-engine-plugin [ ]
] else []) )
++ (if currentSystemDe == "hyprland" then [ ++ (
# Hyprland if workSystem then
brightnessctl [
hyprpaper android-studio
pamixer ansible
pavucontrol virt-manager
kdePackages.dolphin ]
] else []) else
++ (if currentSystemDe == "gnome" then [ [ ]
gnome-tweaks )
gnomeExtensions.appindicator ++ (
gnomeExtensions.caffeine if currentSystemDe == "plasma" then
gnomeExtensions.dash-to-dock [
gnomeExtensions.wallpaper-slideshow kdePackages.wallpaper-engine-plugin
] else []); ]
else
[ ]
)
++ (
if currentSystemDe == "hyprland" then
[
# Hyprland
brightnessctl
hyprpaper
pamixer
pavucontrol
kdePackages.dolphin
]
else
[ ]
)
++ (
if currentSystemDe == "gnome" then
[
gnome-tweaks
gnomeExtensions.appindicator
gnomeExtensions.caffeine
gnomeExtensions.dash-to-dock
gnomeExtensions.wallpaper-slideshow
]
else
[ ]
);
} }

View File

@@ -1,27 +1,36 @@
{ pkgs, gamingSystem, currentSystemDe, ... }:
{ {
imports = [ pkgs,
./nordvpn.nix gamingSystem,
]; currentSystemDe,
...
}:
{
imports = [
./nordvpn.nix
];
programs = { programs = {
gamescope = { gamescope = {
enable = true; enable = true;
capSysNice = true; capSysNice = true;
}; };
steam = if gamingSystem then { steam =
enable = true; if gamingSystem then
# package = pkgs.steam-millennium; {
remotePlay.openFirewall = true; enable = true;
} else {}; # package = pkgs.steam-millennium;
gnupg.agent = { remotePlay.openFirewall = true;
enable = true; }
pinentryPackage = pkgs.pinentry-tty; else
enableSSHSupport = true; { };
}; gnupg.agent = {
nh = { enable = true;
enable = true; pinentryPackage = pkgs.pinentry-tty;
}; enableSSHSupport = true;
hyprland.enable = if currentSystemDe == "hyprland" then true else false; };
}; nh = {
enable = true;
};
hyprland.enable = if currentSystemDe == "hyprland" then true else false;
};
} }

View File

@@ -1,13 +1,13 @@
{ pkgs, ... } @ inputs: { pkgs, ... }@inputs:
{ {
imports = [ imports = [
inputs.nur.modules.nixos.default inputs.nur.modules.nixos.default
inputs.nur.legacyPackages.x86_64-linux.repos.wingej0.modules.nordvpn inputs.nur.legacyPackages.x86_64-linux.repos.wingej0.modules.nordvpn
]; ];
nixpkgs.overlays = [ nixpkgs.overlays = [
(_final: _prev: { (_final: _prev: {
nordvpn = pkgs.nur.repos.wingej0.nordvpn; nordvpn = pkgs.nur.repos.wingej0.nordvpn;
}) })
]; ];
} }