mirror of
https://github.com/Superredstone/nixos.git
synced 2026-03-07 20:28:08 +01:00
Refactor with nixfmt
This commit is contained in:
13
flake.nix
13
flake.nix
@@ -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
|
||||
{
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -46,7 +46,11 @@
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = ["🕨" "🕩" "🕪"];
|
||||
default = [
|
||||
"🕨"
|
||||
"🕩"
|
||||
"🕪"
|
||||
];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
size = 16;
|
||||
};
|
||||
themeFile = "Catppuccin-Mocha";
|
||||
extraConfig = ''
|
||||
'';
|
||||
extraConfig = " ";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -61,6 +61,6 @@ nixpkgs.lib.nixosSystem {
|
||||
];
|
||||
}
|
||||
machineConfig
|
||||
] ++ additionalModules;
|
||||
]
|
||||
++ additionalModules;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,4 +13,3 @@ in
|
||||
home-manager = home-manager.nixosModules;
|
||||
inherit (import nixpkgs { inherit system; }) lib;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 = [ ];
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 = [ ];
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
[ ]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user