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

View File

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

View File

@@ -37,16 +37,19 @@
",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:
let
ws = i + 1;
in
[
"$mod, code:1${toString i}, workspace, ${toString ws}" "$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}" "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
] ]
) ) 9
9) ));
);
bindm = [ bindm = [
"$mod, mouse:272, movewindow" "$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow" "$mod, mouse:273, resizewindow"

View File

@@ -46,7 +46,11 @@
phone = ""; phone = "";
portable = ""; portable = "";
car = ""; car = "";
default = ["🕨" "🕩" "🕪"]; default = [
"🕨"
"🕩"
"🕪"
];
}; };
on-click = "pavucontrol"; on-click = "pavucontrol";
}; };

View File

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

View File

@@ -61,6 +61,6 @@ nixpkgs.lib.nixosSystem {
]; ];
} }
machineConfig machineConfig
] ++ additionalModules; ]
++ additionalModules;
} }

View File

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

View File

@@ -1,27 +1,42 @@
# 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

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

View File

@@ -1,33 +1,49 @@
# 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 = swapDevices = [
[ { device = "/dev/mapper/luks-563ebcd9-614b-460f-af9a-5cf1d9c8bef5"; } { device = "/dev/mapper/luks-563ebcd9-614b-460f-af9a-5cf1d9c8bef5"; }
]; ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View File

@@ -1,29 +1,46 @@
# 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

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

View File

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

View File

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