all: format .nix filex with nixfmt-rfc

This commit is contained in:
2025-01-10 18:11:42 +01:00
parent e571ae07c0
commit 77e24e385a
22 changed files with 863 additions and 547 deletions

View File

@@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
imports = [
];
@@ -14,13 +15,16 @@
gc.automatic = true;
gc.options = "--delete-older-than 7d";
package = pkgs.nixVersions.latest;
settings.experimental-features = ["nix-command" "flakes"];
settings.experimental-features = [
"nix-command"
"flakes"
];
};
boot = {
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["msr.allow_writes=on"];
supportedFilesystems = ["btrfs"];
kernelParams = [ "msr.allow_writes=on" ];
supportedFilesystems = [ "btrfs" ];
tmpOnTmpfs = true;
initrd.compressor = "zstd";
loader.systemd-boot = {
@@ -39,7 +43,7 @@
doas.enable = true;
doas.extraRules = [
{
users = ["akill"];
users = [ "akill" ];
keepEnv = true;
persist = true;
}
@@ -53,15 +57,16 @@
networking = {
firewall.enable = true;
hostName = "blue";
nameservers = ["127.0.0.1" "::1"];
nameservers = [
"127.0.0.1"
"::1"
];
dhcpcd.extraConfig = "nohook resolv.conf";
networkmanager = {
enable = true;
dns = "none";
/*
wifi.backend = "iwd";
*/
# wifi.backend = "iwd";
};
};
@@ -92,8 +97,8 @@
services = {
"caps2esc" = {
description = "Intercepts keyboard udev events";
wants = ["systemd-udevd.service"];
wantedBy = ["multi-user.target"];
wants = [ "systemd-udevd.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig.Nice = -20;
script = ''
${pkgs.interception-tools}/bin/intercept \
@@ -152,7 +157,10 @@
windowManager.i3.enable = true;
};
udev.packages = [pkgs.rtl-sdr pkgs.openhantek6022];
udev.packages = [
pkgs.rtl-sdr
pkgs.openhantek6022
];
tlp = {
enable = true;
@@ -162,32 +170,38 @@
enable = true;
bindings = [
{
keys = [113];
events = ["key"];
keys = [ 113 ];
events = [ "key" ];
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master toggle'";
}
{
keys = [114];
events = ["key" "rep"];
keys = [ 114 ];
events = [
"key"
"rep"
];
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
}
{
keys = [115];
events = ["key" "rep"];
keys = [ 115 ];
events = [
"key"
"rep"
];
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'";
}
{
keys = [224];
events = ["key"];
keys = [ 224 ];
events = [ "key" ];
command = "${pkgs.light}/bin/light -U 5";
}
{
keys = [225];
events = ["key"];
keys = [ 225 ];
events = [ "key" ];
command = "${pkgs.light}/bin/light -A 5";
}
];
@@ -237,7 +251,7 @@
allowBitmaps = true;
useEmbeddedBitmaps = true;
defaultFonts = {
monospace = ["JetBrainsMono"];
monospace = [ "JetBrainsMono" ];
};
};
@@ -306,6 +320,14 @@
users.users.akill = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = ["wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout"];
extraGroups = [
"wireshark"
"kvm"
"tty"
"audio"
"sound"
"adbusers"
"dialout"
];
};
}

View File

@@ -6,47 +6,77 @@
lib,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
fsType = "btrfs";
options = ["subvol=root" "compress=zstd" "noatime"];
options = [
"subvol=root"
"compress=zstd"
"noatime"
];
};
boot.initrd.luks.devices."enc_root".device = "/dev/disk/by-uuid/8eb8ac22-d89d-4406-bfbd-ce43e283649f";
boot.initrd.luks.devices."enc_root".device =
"/dev/disk/by-uuid/8eb8ac22-d89d-4406-bfbd-ce43e283649f";
fileSystems."/home" = {
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
fsType = "btrfs";
options = ["subvol=home" "compress=zstd" "noatime"];
options = [
"subvol=home"
"compress=zstd"
"noatime"
];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
fsType = "btrfs";
options = ["subvol=nix" "compress=zstd" "noatime"];
options = [
"subvol=nix"
"compress=zstd"
"noatime"
];
};
fileSystems."/var/log" = {
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
fsType = "btrfs";
options = ["subvol=log" "compress=zstd" "noatime"];
options = [
"subvol=log"
"compress=zstd"
"noatime"
];
neededForBoot = true;
};
fileSystems."/persist" = {
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
fsType = "btrfs";
options = ["subvol=persist" "compress=zstd" "noatime"];
options = [
"subvol=persist"
"compress=zstd"
"noatime"
];
};
fileSystems."/boot" = {
@@ -54,7 +84,7 @@
fsType = "vfat";
};
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