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

@@ -18,7 +18,15 @@
hyprland.url = "github:hyprwm/Hyprland";
};
outputs = { nixpkgs, home-manager, nixvim, millennium, nur, ... }@inputs:
outputs =
{
nixpkgs,
home-manager,
nixvim,
millennium,
nur,
...
}@inputs:
let
overlays = [
millennium.overlays.default
@@ -34,7 +42,8 @@
nur
inputs
nixpkgs
home-manager;
home-manager
;
};
in
{

View File

@@ -1,4 +1,9 @@
{ currentSystemUser, currentSystemDe, pkgs, ... }:
{
currentSystemUser,
currentSystemDe,
pkgs,
...
}:
{
imports = [
./fish.nix
@@ -8,9 +13,14 @@
./mangohud.nix
./tmux.nix
./zoxide.nix
] ++ (if currentSystemDe == "hyprland" then [
]
++ (
if currentSystemDe == "hyprland" then
[
./hyprland
] else []
]
else
[ ]
);
home = {

View File

@@ -37,16 +37,19 @@
",XF86AudioRaiseVolume, exec, pamixer -i 2"
"$mod, delete, exit"
] ++ (
builtins.concatLists (builtins.genList (i:
let ws = i + 1;
in [
]
++ (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)
);
) 9
));
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
@@ -76,8 +79,8 @@
services.hyprpaper = {
enable = true;
settings = {
preload = ["/home/${currentSystemUser}/Pictures/wallpaper.jpg"];
wallpaper = [",/home/${currentSystemUser}/Pictures/wallpaper.jpg"];
preload = [ "/home/${currentSystemUser}/Pictures/wallpaper.jpg" ];
wallpaper = [ ",/home/${currentSystemUser}/Pictures/wallpaper.jpg" ];
};
};
}

View File

@@ -46,7 +46,11 @@
phone = "";
portable = "";
car = "";
default = ["🕨" "🕩" "🕪"];
default = [
"🕨"
"🕩"
"🕪"
];
};
on-click = "pavucontrol";
};
@@ -111,263 +115,263 @@
};
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;
@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 {
window#waybar {
background-color: @mantle;
color: @text;
}
}
window#waybar.hidden {
window#waybar.hidden {
opacity: 0.2;
}
}
tooltip {
tooltip {
background-color: @base;
border: 1px solid @surface1;
}
}
tooltip label {
tooltip label {
color: @text;
}
}
button {
button {
box-shadow: inset 0 -3px transparent;
border: none;
border-radius: 1px;
}
}
button:hover {
button:hover {
background: inherit;
box-shadow: inset 0 -3px @text;
}
}
#workspaces button {
#workspaces button {
padding: 0 0;
background-color: @mantle;
color: @text;
}
}
#workspaces button:hover {
#workspaces button:hover {
box-shadow: inherit;
text-shadow: inherit;
background-image: linear-gradient(0deg, @surface1, @mantle);
}
}
#workspaces button.focused {
#workspaces button.focused {
background-image: linear-gradient(0deg, @mauve, @surface1);
box-shadow: inset 0 -3px @text;
}
}
#workspaces button.urgent {
#workspaces button.urgent {
background-image: linear-gradient(0deg, @red, @mantle);
}
}
#taskbar button.active {
#taskbar button.active {
background-image: linear-gradient(0deg, @surface1, @mantle);
}
}
#mode {
#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 {
#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 {
#window,
#workspaces {
margin: 0 4px;
}
}
#power-profiles-daemon {
#power-profiles-daemon {
background-color: @red;
color: @base;
}
}
#custom-weather {
#custom-weather {
background-color: @teal;
color: @mantle;
margin-right: 5px;
}
}
#custom-kernel {
#custom-kernel {
background-color: @rosewater;
color: @mantle;
}
}
#clock {
#clock {
background-color: @green;
color: @mantle;
}
}
@keyframes blink {
@keyframes blink {
to {
background-color: @mantle;
color: @text;
}
}
}
label:focus {
label:focus {
background-color: @mantle;
}
}
#cpu {
#cpu {
background-color: @mauve;
color: @mantle;
min-width: 45px;
}
}
#memory {
#memory {
background-color: @red;
color: @mantle;
}
}
#disk {
#disk {
background-color: @flamingo;
color: @mantle;
}
}
#battery {
#battery {
background-color: @mauve;
color: @base;
}
}
#backlight {
#backlight {
background-color: @sky;
color: @base;
}
}
#network {
#network {
background-color: @peach;
color: @mantle;
}
}
#network.disconnected {
#network.disconnected {
background-color: red;
color: @mantle;
}
}
#bluetooth {
#bluetooth {
background-color: @maroon;
color: @mantle;
min-width: 40px;
}
}
#pulseaudio {
#pulseaudio {
background-color: @yellow;
color: @mantle;
}
}
#pulseaudio.muted {
#pulseaudio.muted {
background-color: red;
color: @mantle;
}
}
#temperature {
#temperature {
background-color: @pink;
color: @mantle;
min-width: 37px;
}
}
#temperature.critical {
#temperature.critical {
background-color: red;
color: @mantle;
min-width: 37px;
}
}
#mpris {
#mpris {
background-color: @base;
color: @text;
}
}
#tray {
#tray {
background-color: @overlay0;
color: @text;
}
}
#tray > .passive {
#tray > .passive {
-gtk-icon-effect: dim;
}
}
#tray > .needs-attention {
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: @mantle;
}
}
#idle_inhibitor {
#idle_inhibitor {
background-color: @base;
color: @text;
font-family: Inter;
}
}
#idle_inhibitor.activated {
#idle_inhibitor.activated {
background-color: @text;
color: @base;
}
}
#scratchpad {
#scratchpad {
background-color: @base;
color: @text;
}
}
#scratchpad.empty {
#scratchpad.empty {
background-color: transparent;
}
}
'';
};
}

View File

@@ -12,7 +12,6 @@
size = 16;
};
themeFile = "Catppuccin-Mocha";
extraConfig = ''
'';
extraConfig = " ";
};
}

View File

@@ -2,7 +2,7 @@
{
programs.zoxide = {
enable = true;
enableFishIntegration= true;
enableFishIntegration = true;
options = [
"--cmd cd"
];

View File

@@ -16,7 +16,7 @@ name:
gamingSystem ? false,
workSystem ? false,
desktopEnvironment ? "",
additionalModules ? [],
additionalModules ? [ ],
}:
let
nixConfig = ../modules/nix-config/default.nix;
@@ -61,6 +61,6 @@ nixpkgs.lib.nixosSystem {
];
}
machineConfig
] ++ additionalModules;
]
++ additionalModules;
}

View File

@@ -13,4 +13,3 @@ in
home-manager = home-manager.nixosModules;
inherit (import nixpkgs { inherit system; }) lib;
}

View File

@@ -1,27 +1,42 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }:
{
config,
lib,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
imports = [
(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.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/a1939342-f36b-4902-b659-71b468b5e64b";
fileSystems."/" = {
device = "/dev/disk/by-uuid/a1939342-f36b-4902-b659-71b468b5e64b";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6132-EE01";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/6132-EE01";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];

View File

@@ -5,7 +5,8 @@
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot.configurationLimit = 10;
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 =
"/dev/disk/by-uuid/563ebcd9-614b-460f-af9a-5cf1d9c8bef5";
verbose = false;
systemd.enable = true;
};

View File

@@ -1,33 +1,49 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }:
{
config,
lib,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
imports = [
(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.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/mapper/luks-1a5ef40f-3c13-4efb-ae65-da42d4bf30ef";
fileSystems."/" = {
device = "/dev/mapper/luks-1a5ef40f-3c13-4efb-ae65-da42d4bf30ef";
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" =
{ device = "/dev/disk/by-uuid/1A33-9EC1";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/1A33-9EC1";
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";

View File

@@ -5,6 +5,6 @@
printing.enable = true;
# Required for piper to work
ratbagd.enable = true;
xserver.videoDrivers = ["nvidia"];
xserver.videoDrivers = [ "nvidia" ];
};
}

View File

@@ -1,29 +1,46 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }:
{
config,
lib,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
imports = [
(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.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/b8f99588-490c-47a4-ad8b-dfbe27ced16c";
fileSystems."/" = {
device = "/dev/disk/by-uuid/b8f99588-490c-47a4-ad8b-dfbe27ced16c";
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" =
{ device = "/dev/disk/by-uuid/C0E2-037E";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/C0E2-037E";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];

View File

@@ -4,6 +4,9 @@
networkmanager.enable = true;
firewall.allowedUDPPorts = [ 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,4 +1,9 @@
{ pkgs, lib, currentSystemDe, ... }:
{
pkgs,
lib,
currentSystemDe,
...
}:
{
services = {
xserver.enable = true;
@@ -49,6 +54,10 @@
programs.kdeconnect = lib.mkIf (currentSystemDe != "none") {
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,14 +1,25 @@
{ pkgs, currentSystemUser, currentSystemDe, ... }:
{
pkgs,
currentSystemUser,
currentSystemDe,
...
}:
{
imports = [
./keyboard.nix
./security.nix
./services.nix
] ++ (if (currentSystemDe != "none") then [
]
++ (
if (currentSystemDe != "none") then
[
./de.nix
./fonts.nix
./sound.nix
] else []);
]
else
[ ]
);
time.timeZone = "Europe/Rome";
@@ -42,7 +53,10 @@
shell = pkgs.fish;
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.packageOverrides = pkgs: {
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/main.tar.gz") {
inherit pkgs;

View File

@@ -1,4 +1,10 @@
{ pkgs, gamingSystem, workSystem, currentSystemDe, ... }@ inputs:
{
pkgs,
gamingSystem,
workSystem,
currentSystemDe,
...
}@inputs:
{
imports = [
./programs
@@ -6,7 +12,9 @@
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
environment.systemPackages =
with pkgs;
[
# CLI utils
appimage-run
bat
@@ -53,7 +61,10 @@
vim # The only and one great editor
inputs.nixvim.packages.${stdenv.hostPlatform.system}.default # The only and one great editor improved even further
] ++ (if currentSystemDe != "none" then [
]
++ (
if currentSystemDe != "none" then
[
# Video card
vulkan-tools
@@ -70,8 +81,13 @@
spotube
telegram-desktop
thunderbird
] else [])
++ (if gamingSystem then [
]
else
[ ]
)
++ (
if gamingSystem then
[
cura-appimage
discord
heroic
@@ -81,29 +97,52 @@
prismlauncher
protonplus
satisfactorymodmanager
] else [])
++ (if workSystem then [
]
else
[ ]
)
++ (
if workSystem then
[
android-studio
ansible
virt-manager
] else [])
++ (if currentSystemDe == "plasma" then [
]
else
[ ]
)
++ (
if currentSystemDe == "plasma" then
[
kdePackages.wallpaper-engine-plugin
] else [])
++ (if currentSystemDe == "hyprland" then [
]
else
[ ]
)
++ (
if currentSystemDe == "hyprland" then
[
# Hyprland
brightnessctl
hyprpaper
pamixer
pavucontrol
kdePackages.dolphin
] else [])
++ (if currentSystemDe == "gnome" then [
]
else
[ ]
)
++ (
if currentSystemDe == "gnome" then
[
gnome-tweaks
gnomeExtensions.appindicator
gnomeExtensions.caffeine
gnomeExtensions.dash-to-dock
gnomeExtensions.wallpaper-slideshow
] else []);
]
else
[ ]
);
}

View File

@@ -1,4 +1,9 @@
{ pkgs, gamingSystem, currentSystemDe, ... }:
{
pkgs,
gamingSystem,
currentSystemDe,
...
}:
{
imports = [
./nordvpn.nix
@@ -9,11 +14,15 @@
enable = true;
capSysNice = true;
};
steam = if gamingSystem then {
steam =
if gamingSystem then
{
enable = true;
# package = pkgs.steam-millennium;
remotePlay.openFirewall = true;
} else {};
}
else
{ };
gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-tty;

View File

@@ -1,4 +1,4 @@
{ pkgs, ... } @ inputs:
{ pkgs, ... }@inputs:
{
imports = [
inputs.nur.modules.nixos.default