BREAKING-CHANGE: changed nixpkgs to stable 24.11 + structure change + fmt

This commit is contained in:
2024-12-31 16:18:38 +01:00
parent 8d0f158b98
commit e0d676b63d
81 changed files with 1250 additions and 1143 deletions

View File

@@ -1,84 +1,82 @@
{ hostname, ... }:
{
{hostname, ...}: {
imports =
if hostname == "zion" then
[
./zion.nix
if hostname == "zion"
then [
./zion.nix
./modules/adb.nix
./modules/ananicy.nix
# ./modules/bluetooth.nix
./modules/boot.nix
./modules/configuration.nix
./modules/development.nix
./modules/fstrim.nix
./modules/gaming.nix
# ./modules/greetd.nix
./modules/gsettings.nix
# ./modules/kde.nix
# ./modules/lanzaboot.nix
./modules/network.nix
./modules/nh.nix
./modules/nvidia.nix
./modules/ollama.nix
./modules/packages.nix
./modules/pipewire.nix
./modules/printing.nix
./modules/remote-builder.nix
./modules/security.nix
./modules/ssh.nix
./modules/steam.nix
./modules/users.nix
./modules/vm.nix
./modules/xserver.nix
]
else if hostname == "thor" then
[
./thor.nix
./modules/adb.nix
./modules/ananicy.nix
# ./modules/bluetooth.nix
./modules/boot.nix
./modules/configuration.nix
./modules/development.nix
./modules/fstrim.nix
./modules/gaming.nix
# ./modules/greetd.nix
./modules/gsettings.nix
# ./modules/kde.nix
# ./modules/lanzaboot.nix
./modules/network.nix
./modules/nh.nix
./modules/nvidia.nix
./modules/ollama.nix
./modules/packages.nix
./modules/pipewire.nix
./modules/printing.nix
./modules/remote-builder.nix
./modules/security.nix
./modules/ssh.nix
./modules/steam.nix
./modules/users.nix
./modules/vm.nix
./modules/xserver.nix
]
else if hostname == "thor"
then [
./thor.nix
./modules/adb.nix
./modules/ananicy.nix
./modules/bluetooth.nix
./modules/boot.nix
./modules/configuration.nix
./modules/development.nix
./modules/distributed-builds.nix
./modules/fstrim.nix
./modules/gaming.nix
./modules/greetd.nix
./modules/gsettings.nix
# ./modules/kde.nix
# ./modules/lanzaboot.nix
./modules/network.nix
./modules/nh.nix
# ./modules/nvidia.nix
./modules/ollama.nix
./modules/packages.nix
./modules/pipewire.nix
./modules/printing.nix
./modules/security.nix
./modules/ssh.nix
./modules/tlp.nix
./modules/users.nix
./modules/vm.nix
]
else if hostname == "server" then
[
./server.nix
./modules/adb.nix
./modules/ananicy.nix
./modules/bluetooth.nix
./modules/boot.nix
./modules/configuration.nix
./modules/development.nix
./modules/distributed-builds.nix
./modules/fstrim.nix
./modules/gaming.nix
./modules/greetd.nix
./modules/gsettings.nix
# ./modules/kde.nix
# ./modules/lanzaboot.nix
./modules/network.nix
./modules/nh.nix
# ./modules/nvidia.nix
./modules/ollama.nix
./modules/packages.nix
./modules/pipewire.nix
./modules/printing.nix
./modules/security.nix
./modules/ssh.nix
./modules/tlp.nix
./modules/users.nix
./modules/vm.nix
]
else if hostname == "server"
then [
./server.nix
./modules/nh.nix
./modules/tlp.nix
./modules/ssh.nix
./modules/boot.nix
./modules/users.nix
./modules/nvidia.nix
./modules/ollama.nix
./modules/fstrim.nix
./modules/system.nix
./modules/network.nix
./modules/configuration.nix
#./modules/lanzaboot.nix
]
else
[ ];
./modules/nh.nix
./modules/tlp.nix
./modules/ssh.nix
./modules/boot.nix
./modules/users.nix
./modules/nvidia.nix
./modules/ollama.nix
./modules/fstrim.nix
./modules/system.nix
./modules/network.nix
./modules/configuration.nix
#./modules/lanzaboot.nix
]
else [];
}

View File

@@ -1,9 +1,8 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.adb.enable = true;
environment.systemPackages = [
pkgs.android-tools
pkgs.universal-android-debloater
];
users.users.mike.extraGroups = [ "adbusers" ];
users.users.mike.extraGroups = ["adbusers"];
}

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
services.ananicy = {
enable = true;
package = pkgs.ananicy-cpp;

View File

@@ -1,6 +1,13 @@
{ pkgs, hostname, inputs, ... }:
{
imports = if hostname == "zion" then [ inputs.chaotic.nixosModules.default ] else [ ];
pkgs,
hostname,
inputs,
...
}: {
imports =
if hostname == "zion"
then [inputs.chaotic.nixosModules.default]
else [];
boot = {
tmp.cleanOnBoot = true;
@@ -16,9 +23,12 @@
};
kernelPackages =
if hostname == "zion" then pkgs.linuxPackages_cachyos #linuxPackages_zen #linuxPackages #linuxPackages_latest #linuxPackages_xanmod_latest
else if hostname == "thor" then pkgs.linuxPackages
else if hostname == "server" then pkgs.linuxPackages
if hostname == "zion"
then pkgs.linuxPackages_zen #linuxPackages_zen #linuxPackages #linuxPackages_latest #linuxPackages_xanmod_latest
else if hostname == "thor"
then pkgs.linuxPackages
else if hostname == "server"
then pkgs.linuxPackages
else pkgs.linuxPackages_zen;
};
}

View File

@@ -1,5 +1,9 @@
{ hostname, inputs, pkgs, ... }:
{
hostname,
inputs,
pkgs,
...
}: {
time.timeZone = "Europe/Warsaw";
i18n.defaultLocale = "en_US.UTF-8";
@@ -37,9 +41,9 @@
};
environment = {
sessionVariables.NIXOS_OZONE_WL = "1";
# sessionVariables.NIXOS_OZONE_WL = "1";
shells = with pkgs; [ bash zsh ];
shells = with pkgs; [bash zsh];
};
system = {
@@ -48,6 +52,9 @@
enable = false;
enableNg = true;
};
autoUpgrade = {
enable = true;
};
};
nixpkgs = {
@@ -69,16 +76,16 @@
nix = {
daemonCPUSchedPolicy = "batch";
channel.enable = false;
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
optimise = {
automatic = true;
dates = [ "daily" ];
dates = ["daily"];
};
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
experimental-features = ["nix-command" "flakes"];
substituters = [
"https://cache.nixos.org"

View File

@@ -1,5 +1,9 @@
{ inputs, pkgs, rust-overlay, ... }:
{
inputs,
pkgs,
rust-overlay,
...
}: {
environment.systemPackages = with pkgs; [
# general
docker

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
nix.distributedBuilds = true;
nix.settings.builders-use-substitutes = true;
@@ -9,7 +8,7 @@
sshUser = "remotebuild";
sshKey = "/root/.ssh/remotebuild";
system = "x86_64-linux";
supportedFeatures = [ "nixos-test" "big-parallel" "kvm" ];
supportedFeatures = ["nixos-test" "big-parallel" "kvm"];
}
];
}

View File

@@ -1,19 +1,22 @@
{ pkgs, username, ... }:
{
users.users.${username}.packages = with pkgs; [ heroic ];
pkgs,
username,
...
}: {
users.users.${username}.packages = with pkgs; [heroic];
hardware.steam-hardware.enable = true;
programs = {
steam = {
enable = true;
gamescopeSession.enable = true;
extraCompatPackages = with pkgs; [ proton-ge-bin ];
extraCompatPackages = with pkgs; [proton-ge-bin];
};
gamemode = {
enable = true;
enableRenice = true;
settings = { };
settings = {};
};
gamescope = {

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
services.greetd = {
enable = true;
settings = {

View File

@@ -1,8 +1,12 @@
{ lib, pkgs, inputs, ... }:
{
imports = [ inputs.lanzaboote.nixosModules.lanzaboote ];
lib,
pkgs,
inputs,
...
}: {
imports = [inputs.lanzaboote.nixosModules.lanzaboote];
environment.systemPackages = [ pkgs.sbctl ];
environment.systemPackages = [pkgs.sbctl];
boot = {
loader.systemd-boot.enable = lib.mkForce false;

View File

@@ -1,5 +1,4 @@
{ hostname, ... }:
{
{hostname, ...}: {
boot.initrd.systemd.network.wait-online.enable = false;
systemd.services.NetworkManager-wait-online.enable = false;
@@ -9,7 +8,7 @@
stevenblack = {
enable = true;
block = [ "fakenews" "gambling" "porn" ];
block = ["fakenews" "gambling" "porn"];
};
wireless = {

View File

@@ -1,5 +1,4 @@
{ username, ... }:
{
{username, ...}: {
programs.nh = {
enable = true;
flake = "/home/${username}/.files";

View File

@@ -1,11 +1,14 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
nixpkgs.config.nvidia.acceptLicense = true;
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.videoDrivers = ["nvidia"];
boot = {
kernelModules = [ "nvidia-uvm" ];
kernelParams = [ "nvidia-drm.fbdev=1" ];
kernelModules = ["nvidia-uvm"];
kernelParams = ["nvidia-drm.fbdev=1"];
};
hardware = {
@@ -14,7 +17,7 @@
enable32Bit = true;
extraPackages = with pkgs; [
egl-wayland
vaapiVdpau
vaapiVdpau
libvdpau-va-gl
nvidia-vaapi-driver
];
@@ -25,9 +28,9 @@
open = false;
nvidiaSettings = true;
modesetting.enable = true;
powerManagement = {
enable = false;
finegrained = false;

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
vim
ntfs3g
@@ -33,74 +32,85 @@
programs.zsh.enable = true;
# fonts.packages = with pkgs; [
# nerd-fonts.zed-mono
# # nerd-fonts.victor-mono
# # nerd-fonts.ubuntu-sans
# # nerd-fonts.ubuntu-mono
# nerd-fonts.ubuntu
# # nerd-fonts.tinos
# # nerd-fonts.terminess-ttf
# nerd-fonts.symbols-only
# # nerd-fonts.space-mono
# # nerd-fonts.shure-tech-mono
# nerd-fonts.sauce-code-pro
# nerd-fonts.roboto-mono
# # nerd-fonts.recursive-mono
# # nerd-fonts.proggy-clean-tt
# # nerd-fonts.profont
# # nerd-fonts.overpass
# nerd-fonts.open-dyslexic
# nerd-fonts.noto
# # nerd-fonts.mplus
# # nerd-fonts.mononoki
# # nerd-fonts.monoid
# # nerd-fonts.monofur
# # nerd-fonts.monaspace
# # nerd-fonts.meslo-lg
# # nerd-fonts.martian-mono
# # nerd-fonts.lilex
# nerd-fonts.liberation
# # nerd-fonts.lekton
# nerd-fonts.jetbrains-mono
# # nerd-fonts.iosevka-term-slab
# # nerd-fonts.iosevka-term
# nerd-fonts.iosevka
# # nerd-fonts.intone-mono
# # nerd-fonts.inconsolata-lgc
# # nerd-fonts.inconsolata-go
# nerd-fonts.inconsolata
# # nerd-fonts.im-writing
# # nerd-fonts.hurmit
# # nerd-fonts.heavy-data
# # nerd-fonts.hasklug
# nerd-fonts.hack
# nerd-fonts.gohufont
# # nerd-fonts.go-mono
# # nerd-fonts.geist-mono
# nerd-fonts.fira-mono
# nerd-fonts.fira-code
# # nerd-fonts.fantasque-sans-mono
# # nerd-fonts.envy-code-r
# nerd-fonts.droid-sans-mono
# # nerd-fonts.departure-mono
# nerd-fonts.dejavu-sans-mono
# # nerd-fonts.daddy-time-mono
# # nerd-fonts.d2coding
# # nerd-fonts.cousine
# # nerd-fonts.commit-mono
# nerd-fonts.comic-shanns-mono
# nerd-fonts.code-new-roman
# nerd-fonts.caskaydia-cove
# # nerd-fonts.blex-mono
# # nerd-fonts.bitstream-vera-sans-mono
# # nerd-fonts.bigblue-terminal
# # nerd-fonts.aurulent-sans-mono
# # nerd-fonts.arimo
# # nerd-fonts.anonymice
# # nerd-fonts.agave
# nerd-fonts._3270
# nerd-fonts._0xproto
# noto-fonts
# noto-fonts-cjk-sans
# noto-fonts-emoji
# font-awesome
# source-han-sans
# source-han-sans-japanese
# source-han-serif-japanese
# ];
fonts.packages = with pkgs; [
nerd-fonts.zed-mono
# nerd-fonts.victor-mono
# nerd-fonts.ubuntu-sans
# nerd-fonts.ubuntu-mono
nerd-fonts.ubuntu
# nerd-fonts.tinos
# nerd-fonts.terminess-ttf
nerd-fonts.symbols-only
# nerd-fonts.space-mono
# nerd-fonts.shure-tech-mono
nerd-fonts.sauce-code-pro
nerd-fonts.roboto-mono
# nerd-fonts.recursive-mono
# nerd-fonts.proggy-clean-tt
# nerd-fonts.profont
# nerd-fonts.overpass
nerd-fonts.open-dyslexic
nerd-fonts.noto
# nerd-fonts.mplus
# nerd-fonts.mononoki
# nerd-fonts.monoid
# nerd-fonts.monofur
# nerd-fonts.monaspace
# nerd-fonts.meslo-lg
# nerd-fonts.martian-mono
# nerd-fonts.lilex
nerd-fonts.liberation
# nerd-fonts.lekton
nerd-fonts.jetbrains-mono
# nerd-fonts.iosevka-term-slab
# nerd-fonts.iosevka-term
nerd-fonts.iosevka
# nerd-fonts.intone-mono
# nerd-fonts.inconsolata-lgc
# nerd-fonts.inconsolata-go
nerd-fonts.inconsolata
# nerd-fonts.im-writing
# nerd-fonts.hurmit
# nerd-fonts.heavy-data
# nerd-fonts.hasklug
nerd-fonts.hack
nerd-fonts.gohufont
# nerd-fonts.go-mono
# nerd-fonts.geist-mono
nerd-fonts.fira-mono
nerd-fonts.fira-code
# nerd-fonts.fantasque-sans-mono
# nerd-fonts.envy-code-r
nerd-fonts.droid-sans-mono
# nerd-fonts.departure-mono
nerd-fonts.dejavu-sans-mono
# nerd-fonts.daddy-time-mono
# nerd-fonts.d2coding
# nerd-fonts.cousine
# nerd-fonts.commit-mono
nerd-fonts.comic-shanns-mono
nerd-fonts.code-new-roman
nerd-fonts.caskaydia-cove
# nerd-fonts.blex-mono
# nerd-fonts.bitstream-vera-sans-mono
# nerd-fonts.bigblue-terminal
# nerd-fonts.aurulent-sans-mono
# nerd-fonts.arimo
# nerd-fonts.anonymice
# nerd-fonts.agave
nerd-fonts._3270
nerd-fonts._0xproto
nerdfonts
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
@@ -123,5 +133,4 @@
# max-cache-ttl-ssl = 60480000;
};
};
}

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
services.printing = {
enable = true;
drivers = with pkgs; [

View File

@@ -1,13 +1,12 @@
# Enable Qtile
{ pkgs, ... }:
{
{pkgs, ...}: {
# --------------------------------------
# Enable QTILE
# --------------------------------------
services.xserver.windowManager.qtile = {
enable = true;
configFile = /home/nel/dotfiles/qtile/config.py;
extraPackages = python3Packages: with python3Packages; [ qtile-extras ];
extraPackages = python3Packages: with python3Packages; [qtile-extras];
};
# --------------------------------------

View File

@@ -4,7 +4,7 @@
createHome = false;
group = "remotebuild";
openssh.authorizedKeys.keyFiles = [ ../keys/remotebuild.pub ];
openssh.authorizedKeys.keyFiles = [../keys/remotebuild.pub];
};
users.groups.remotebuild = {};
@@ -12,7 +12,7 @@
nix = {
nrBuildUsers = 64;
settings = {
trusted-users = [ "remotebuild" ];
trusted-users = ["remotebuild"];
min-free = 10 * 1024 * 1024;
max-free = 200 * 1024 * 1024;
@@ -26,6 +26,5 @@
MemoryAccounting = true;
MemoryMax = "90%";
OOMScoreAdjust = 500;
};
};
}

View File

@@ -1,9 +1,9 @@
{
networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedTCPPorts = [22];
services.openssh = {
enable = true;
ports = [ 22 ];
ports = [22];
settings = {
PermitRootLogin = "no";

View File

@@ -1,4 +1,8 @@
{ inputs, pkgs, ... }: {
{
inputs,
pkgs,
...
}: {
programs.steam = {
enable = true;
extraCompatPackages = with pkgs; [

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [

View File

@@ -1,15 +1,17 @@
{ config, hostname, ... }:
{
config,
hostname,
...
}: {
boot = {
kernelModules = [ "acpi_call" ];
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
kernelModules = ["acpi_call"];
extraModulePackages = with config.boot.kernelPackages; [acpi_call];
};
services.tlp = {
enable = true;
settings = {
TLP_DEFAULT_MODE =
if hostname == "laptop"
then "BAT"

View File

@@ -1,6 +1,11 @@
{ inputs, username, hostname, pkgs, ... }:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
inputs,
username,
hostname,
pkgs,
...
}: {
imports = [inputs.home-manager.nixosModules.home-manager];
users.defaultUserShell = pkgs.zsh;
@@ -20,10 +25,10 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs username hostname; };
extraSpecialArgs = {inherit inputs username hostname;};
users.${username} = {
imports = [ ../../home/home.nix ];
imports = [../../home-manager/home.nix];
programs.home-manager.enable = true;
home = {
stateVersion = "24.05";

View File

@@ -1,7 +1,10 @@
{ pkgs, username, ... }:
{
users.users.${username}.extraGroups = [ "libvirtd" ];
boot.kernel.sysctl = { "vm.max_map_count" = 2147483642; };
pkgs,
username,
...
}: {
users.users.${username}.extraGroups = ["libvirtd"];
boot.kernel.sysctl = {"vm.max_map_count" = 2147483642;};
# Install necessary packages
environment.systemPackages = with pkgs; [
@@ -29,7 +32,7 @@
qemu = {
swtpm.enable = true;
ovmf.enable = true;
ovmf.packages = [ pkgs.OVMFFull.fd ];
ovmf.packages = [pkgs.OVMFFull.fd];
};
};
};

View File

@@ -40,7 +40,6 @@
dconf
];
# X Server settings
services.xserver = {
enable = true;

View File

@@ -1,30 +1,34 @@
# 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, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/efcf6f2f-7d44-441e-84a9-0a9725be0b72";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/efcf6f2f-7d44-441e-84a9-0a9725be0b72";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0656-C8A6";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0656-C8A6";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};
swapDevices = [ ];
swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -1,32 +1,36 @@
# 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, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9b9ed0c3-1236-499b-b9c3-51e6c4d02483";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/9b9ed0c3-1236-499b-b9c3-51e6c4d02483";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/17B9-AFFF";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/17B9-AFFF";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d6820248-2865-4b52-9893-174309c9e684"; }
];
swapDevices = [
{device = "/dev/disk/by-uuid/d6820248-2865-4b52-9893-174309c9e684";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's