[fix] *.nix: statix checks

This commit is contained in:
Jalil David Salamé Messina 2024-05-17 18:50:01 +02:00
parent 15a60141ad
commit c19ceb54b7
Signed by: jalil
GPG key ID: F016B9E770737A0B
18 changed files with 728 additions and 626 deletions

View file

@ -7,32 +7,39 @@
nixos-hardware.nixosModules.common-pc-laptop-ssd
nixos-hardware.nixosModules.common-cpu-intel
];
# Setup extra filesystem options
fileSystems."/".options = ["compress=zstd"];
fileSystems."/home".options = ["compress=zstd"];
fileSystems."/nix".options = [
"compress=zstd"
"noatime"
];
fileSystems = {
# Setup extra filesystem options
"/".options = ["compress=zstd"];
"/home".options = ["compress=zstd"];
"/nix".options = [
"compress=zstd"
"noatime"
];
};
hardware.bluetooth.enable = true;
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 10;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader = {
# Bootloader
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
# Network configuration
networking.hostName = "capricorn";
networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
networking.networkmanager.appendNameservers = [
"1.1.1.1"
"1.0.0.1"
"8.8.8.8"
"8.4.4.8"
];
networking = {
hostName = "capricorn";
networkmanager = {
enable = true;
wifi.backend = "iwd";
appendNameservers = [
"1.1.1.1"
"1.0.0.1"
"8.8.8.8"
"8.4.4.8"
];
};
};
console.useXkbConfig = true;

View file

@ -8,37 +8,41 @@
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = ["subvol=root"];
boot = {
initrd = {
availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
];
kernelModules = [];
};
kernelModules = ["kvm-intel"];
extraModulePackages = [];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = ["subvol=root"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = ["subvol=nix"];
};
"/nix" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = ["subvol=nix"];
};
fileSystems."/home" = {
device = "/dev/disk/by-label/NIXHOME";
fsType = "btrfs";
};
"/home" = {
device = "/dev/disk/by-label/NIXHOME";
fsType = "btrfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
};
swapDevices = [{device = "/dev/disk/by-label/NIXSWAP";}];

View file

@ -11,40 +11,46 @@
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-gpu-amd
];
fileSystems."/".options = ["compress=zstd"];
fileSystems."/steam".options = ["compress=zstd"];
fileSystems."/home".options = ["compress=zstd"];
fileSystems."/nix".options = [
"compress=zstd"
"noatime"
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true;
fileSystems = {
"/".options = ["compress=zstd"];
"/steam".options = ["compress=zstd"];
"/home".options = ["compress=zstd"];
"/nix".options = [
"compress=zstd"
"noatime"
];
};
boot.loader = {
systemd-boot = {
# Use the systemd-boot EFI boot loader.
enable = true;
configurationLimit = 3;
};
efi.canTouchEfiVariables = true;
};
# Enable bluetooth
hardware.bluetooth.enable = true;
networking.hostName = "gemini";
networking.networkmanager.enable = true;
networking.interfaces.enp4s0.wakeOnLan.enable = true;
networking = {
hostName = "gemini";
networkmanager.enable = true;
interfaces.enp4s0.wakeOnLan.enable = true;
};
console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
useXkbConfig = true; # use xkbOptions in tty.
};
# Configure keymap in X11
# services.xserver.xkbOptions = {
# "caps:swapescape" # map caps to escape.
# };
services.openssh.enable = true;
services.openssh.startWhenNeeded = true;
services.openssh.settings.AllowUsers = ["jalil"];
services.openssh = {
# Configure keymap in X11
# services.xserver.xkbOptions = {
# "caps:swapescape" # map caps to escape.
# };
enable = true;
startWhenNeeded = true;
settings.AllowUsers = ["jalil"];
};
# Enable CUPS to print documents.
services.printing.enable = true;

View file

@ -8,46 +8,50 @@
...
}: {
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 = [];
fileSystems."/" = {
# device = "/dev/disk/by-label/NIXOSROOT";
device = "/dev/disk/by-label/NIXOSHOME";
fsType = "btrfs";
options = ["subvol=root"];
boot = {
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = [];
};
kernelModules = ["kvm-amd"];
extraModulePackages = [];
};
fileSystems = {
"/" = {
# device = "/dev/disk/by-label/NIXOSROOT";
device = "/dev/disk/by-label/NIXOSHOME";
fsType = "btrfs";
options = ["subvol=root"];
};
fileSystems."/steam" = {
device = "/dev/disk/by-label/STEAM";
fsType = "btrfs";
};
"/steam" = {
device = "/dev/disk/by-label/STEAM";
fsType = "btrfs";
};
fileSystems."/home" = {
device = "/dev/disk/by-label/NIXOSHOME";
fsType = "btrfs";
options = ["subvol=home"];
};
"/home" = {
device = "/dev/disk/by-label/NIXOSHOME";
fsType = "btrfs";
options = ["subvol=home"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-label/NIXOSROOT";
fsType = "btrfs";
options = ["subvol=nix"];
};
"/nix" = {
device = "/dev/disk/by-label/NIXOSROOT";
fsType = "btrfs";
options = ["subvol=nix"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
"/boot" = {
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
};
swapDevices = [{device = "/dev/disk/by-label/SWAP";}];

View file

@ -20,39 +20,49 @@
"noatime"
];
};
boot = {
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["amdgpu.dcdebugmask=0x10"];
loader = {
# Use the systemd-boot EFI boot loader.
timeout = 0; # Press Space to show the menu
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
systemd-boot.configurationLimit = 10;
};
};
# Fixes graphical issues
hardware = {
opengl.enable = true;
bluetooth.enable = true;
tuxedo-rs = {
enable = true;
tailor-gui.enable = true;
};
};
networking = {
hostName = "libra";
networkmanager = {
enable = true; # Easiest to use and most distros use this by default.
# networking.networkmanager.wifi.backend = "iwd"; # Seems to cause problems
appendNameservers = [
"1.1.1.1"
"1.0.0.1"
"8.8.8.8"
"8.4.4.8"
];
};
};
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = ["amdgpu.dcdebugmask=0x10"]; # Fixes graphical issues
# use xkb.options in tty.
console.useXkbConfig = true;
services = {
# Enable CUPS to print documents.
printing.enable = true;
hardware.opengl.enable = true;
hardware.bluetooth.enable = true;
hardware.tuxedo-rs.enable = true;
hardware.tuxedo-rs.tailor-gui.enable = true;
# Use the systemd-boot EFI boot loader.
boot.loader.timeout = 0; # Press Space to show the menu
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 10;
networking.hostName = "libra";
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# networking.networkmanager.wifi.backend = "iwd"; # Seems to cause problems
networking.networkmanager.appendNameservers = [
"1.1.1.1"
"1.0.0.1"
"8.8.8.8"
"8.4.4.8"
];
# Select internationalisation properties.
console.useXkbConfig = true; # use xkb.options in tty.
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Enable the OpenSSH daemon.
openssh.enable = true;
};
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.

View file

@ -9,38 +9,42 @@
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/efbda7f0-c286-4fb1-b780-d3128e4d1a3e";
fsType = "btrfs";
options = ["subvol=root"];
boot = {
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"usb_storage"
"sd_mod"
];
kernelModules = [];
};
kernelModules = ["kvm-amd"];
extraModulePackages = [];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/efbda7f0-c286-4fb1-b780-d3128e4d1a3e";
fsType = "btrfs";
options = ["subvol=root"];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/efbda7f0-c286-4fb1-b780-d3128e4d1a3e";
fsType = "btrfs";
options = ["subvol=home"];
};
"/home" = {
device = "/dev/disk/by-uuid/efbda7f0-c286-4fb1-b780-d3128e4d1a3e";
fsType = "btrfs";
options = ["subvol=home"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/efbda7f0-c286-4fb1-b780-d3128e4d1a3e";
fsType = "btrfs";
options = ["subvol=nix"];
};
"/nix" = {
device = "/dev/disk/by-uuid/efbda7f0-c286-4fb1-b780-d3128e4d1a3e";
fsType = "btrfs";
options = ["subvol=nix"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/4E80-8B60";
fsType = "vfat";
"/boot" = {
device = "/dev/disk/by-uuid/4E80-8B60";
fsType = "vfat";
};
};
swapDevices = [];

View file

@ -1,4 +1,4 @@
{...}: {
_: {
services.qemuGuest.enable = true;
boot.initrd.availableKernelModules = [