Use nixfmt to format all .nix files

This commit is contained in:
Bart van der Braak 2025-01-22 11:14:58 +01:00
parent 454d2b9341
commit e993042ff6
48 changed files with 206 additions and 140 deletions

View file

@ -1,6 +1,6 @@
alias ll='ls -la'
alias nrs='sudo nixos-rebuild --use-remote-sudo switch'
alias nrb='sudo nixos-rebuild --use-remote-sudo boot'
alias ngc='sudo nix-collect-garbage --delete-older-than 14d'
alias nfmt="find . -type f -name '*.nix' -exec nixfmt {} \;"
alias code='codium'
alias rgf='rg --files | rg'

View file

@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }:
{
config,
pkgs,
inputs,
...
}:
{
# Bootloader and EFI settings
@ -36,7 +41,7 @@
# Optimization & Garbage Collection
# Optimize Nix-Store During Rebuilds
# NOTE: Optimizes during builds - results in slower builds
# NOTE: Optimizes during builds - results in slower builds
nix.settings.auto-optimise-store = true;
# Purge Unused Nix-Store Entries
@ -48,8 +53,11 @@
# Enable Nix Flakes and experimental features
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# System state version
system.stateVersion = "24.11";
}
}

View file

@ -5,34 +5,35 @@
zen-browser.url = "github:0xc000022070/zen-browser-flake";
};
outputs = { nixpkgs, ... } @ inputs:
{
nixosConfigurations = {
tongfang = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hardware/tongfang.nix
./configuration.nix
./users.nix
./packages.nix
./services.nix
./modules/bootloader.nix
];
};
qemu = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hardware/qemu.nix
outputs =
{ nixpkgs, ... }@inputs:
{
nixosConfigurations = {
tongfang = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hardware/tongfang.nix
./configuration.nix
./users.nix
./packages.nix
./services.nix
./modules/bootloader.nix
];
};
qemu = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hardware/qemu.nix
./modules/kde.nix
./modules/configuration.nix
./modules/display-manager.nix
./modules/greeter.nix
./modules/networking.nix
./modules/nix-settings.nix
./modules/users.nix
];
./modules/kde.nix
./modules/configuration.nix
./modules/display-manager.nix
./modules/greeter.nix
./modules/networking.nix
./modules/nix-settings.nix
./modules/users.nix
];
};
};
};
};
}

View file

@ -1,22 +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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"virtio_pci"
"sr_mod"
"virtio_blk"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d6b08f23-97da-4e41-b70c-90fcc35db534";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/d6b08f23-97da-4e41-b70c-90fcc35db534";
fsType = "ext4";
};
swapDevices = [ ];

View file

@ -1,7 +1,13 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
let
yt6801 = import ./yt6801.nix {
@ -10,25 +16,35 @@ let
};
in
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ yt6801 ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c7cf28c3-5744-45cc-8a81-456d24e44b7a";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/c7cf28c3-5744-45cc-8a81-456d24e44b7a";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/CEF6-7DAA";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/CEF6-7DAA";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];
@ -41,4 +57,4 @@ in
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
}

View file

@ -48,4 +48,4 @@ stdenv.mkDerivation {
];
platforms = platforms.linux;
};
}
}

View file

@ -13,4 +13,4 @@
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
};
};
}
}

View file

@ -9,4 +9,4 @@
environment.systemPackages = with pkgs; [
overskride
];
}
}

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }:
{
# Bootloader options
@ -29,4 +29,4 @@
];
loader.timeout = 0;
};
}
}

View file

@ -10,4 +10,4 @@
lldb
musl
];
}
}

View file

@ -6,4 +6,4 @@
{
system.stateVersion = "24.11";
}
}

View file

@ -6,4 +6,4 @@
inkscape
gimp
];
}
}

View file

@ -8,4 +8,4 @@
go-task
sops
];
}
}

View file

@ -15,4 +15,4 @@
environment.systemPackages = with pkgs; [
greetd.tuigreet
];
}
}

View file

@ -5,4 +5,4 @@
environment.variables.SPOTIFY_PATH = "${pkgs.spotify}/";
environment.variables.JDK_PATH = "${pkgs.jdk11}/";
environment.variables.NODEJS_PATH = "${pkgs.nodePackages_latest.nodejs}/";
}
}

View file

@ -4,7 +4,7 @@
# Open ports in the firewall.
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ ];
networking.firewall.allowedUDPPorts = [
networking.firewall.allowedUDPPorts = [
5353 # Spotify Connect
];
}
}

View file

@ -7,4 +7,4 @@
nerd-font-patcher
noto-fonts-color-emoji
];
}
}

View file

@ -3,4 +3,4 @@
{
# Enable Steam
programs.steam.enable = true;
}
}

View file

@ -13,4 +13,4 @@
dates = "weekly";
options = "--delete-older-than 14d";
};
}
}

View file

@ -7,4 +7,4 @@
desktopManager.gnome.enable = true;
displayManager.gdm.enable = true;
};
}
}

View file

@ -15,4 +15,4 @@
environment.systemPackages = with pkgs; [
greetd.tuigreet
];
}
}

View file

@ -22,4 +22,4 @@
mpv # media player
imv # image viewer
];
}
}

View file

@ -25,4 +25,4 @@
dig
speedtest-rs
];
}
}

View file

@ -5,7 +5,7 @@
"en_US.UTF-8/UTF-8"
"nl_NL.UTF-8/UTF-8"
];
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
@ -27,4 +27,4 @@
hunspellDicts.en_US
hunspellDicts.nl_NL
];
}
}

View file

@ -8,4 +8,4 @@
wayland.enable = true;
};
services.desktopManager.plasma6.enable = true;
}
}

View file

@ -11,4 +11,4 @@
gtypist # typing tutor
via # keyboard configurator
];
}
}

View file

@ -3,7 +3,7 @@
{
# Linux Kernel
boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen;
boot.kernelParams = [
boot.kernelParams = [
"splash"
"quiet"
"fbcon=nodefer"
@ -18,4 +18,4 @@
environment.systemPackages = with pkgs; [
policycoreutils
];
}
}

View file

@ -27,5 +27,5 @@
terraform-ls
ansible-language-server
hyprls
];
}
];
}

View file

@ -5,9 +5,9 @@
networking.hostName = "tongfang";
networking.networkmanager.enable = true;
users.extraGroups.networkmanager.members = [ "bart" ];
environment.systemPackages = with pkgs; [
iwgtk
impala
];
}
}

View file

@ -3,6 +3,9 @@
{
# Nix Configuration
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
experimental-features = [
"nix-command"
"flakes"
];
};
}
}

View file

@ -3,4 +3,4 @@
{
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
}
}

View file

@ -11,4 +11,4 @@
AllowUsers = [ "bart" ];
};
};
}
}

View file

@ -5,4 +5,4 @@
services.printing.enable = true;
# Disable browsed: https://discourse.nixos.org/t/newly-announced-vulnerabilities-in-cups
services.printing.browsed.enable = false;
}
}

View file

@ -3,11 +3,17 @@
{
environment.systemPackages = with pkgs; [
go
(python312Full.withPackages(ps: with ps; [ pygobject3 gobject-introspection pyqt6-sip]))
(python312Full.withPackages (
ps: with ps; [
pygobject3
gobject-introspection
pyqt6-sip
]
))
nodePackages_latest.nodejs
nodePackages_latest.pnpm
bun
lua
zig
];
}
}

View file

@ -7,4 +7,4 @@
wlsunset
brightnessctl
];
}
}

View file

@ -5,7 +5,7 @@
systemd.packages = with pkgs; [
auto-cpufreq
];
# Enable Services
programs.direnv.enable = true;
services.upower.enable = true;
@ -21,7 +21,7 @@
services.mpd.enable = true;
programs.thunar.enable = true;
programs.xfconf.enable = true;
services.tumbler.enable = true;
services.tumbler.enable = true;
services.fwupd.enable = true;
services.auto-cpufreq.enable = true;
# services.gnome.core-shell.enable = true;
@ -53,4 +53,4 @@
wlogout
gifsicle
];
}
}

View file

@ -22,4 +22,4 @@
pamixer
pavucontrol
];
}
}

View file

@ -56,4 +56,4 @@
cava
figlet
];
}
}

View file

@ -34,9 +34,9 @@
# Override packages
nixpkgs.config.packageOverrides = pkgs: {
colloid-icon-theme = pkgs.colloid-icon-theme.override { colorVariants = ["teal"]; };
colloid-icon-theme = pkgs.colloid-icon-theme.override { colorVariants = [ "teal" ]; };
catppuccin-gtk = pkgs.catppuccin-gtk.override {
accents = [ "teal" ]; # You can specify multiple accents here to output multiple themes
accents = [ "teal" ]; # You can specify multiple accents here to output multiple themes
size = "standard";
variant = "macchiato";
};
@ -59,4 +59,4 @@
# xsettingsd
# themechanger
];
}
}

View file

@ -4,4 +4,4 @@
# Set your time zone.
time.hardwareClockInLocalTime = true;
time.timeZone = "Europe/Amsterdam";
}
}

View file

@ -22,4 +22,4 @@
environment.systemPackages = with pkgs; [
usbutils
];
}
}

View file

@ -5,7 +5,14 @@
users.users.bart = {
isNormalUser = true;
description = "Bart van der Braak";
extraGroups = [ "networkmanager" "input" "wheel" "video" "audio" "tss" ];
extraGroups = [
"networkmanager"
"input"
"wheel"
"video"
"audio"
"tss"
];
shell = pkgs.bash;
packages = with pkgs; [
spotify
@ -16,4 +23,4 @@
# Change runtime directory size
services.logind.extraConfig = "RuntimeDirectorySize=8G";
}
}

View file

@ -20,4 +20,4 @@
lazydocker
docker-credential-helpers
];
}
}

View file

@ -9,4 +9,4 @@
networkmanager-openvpn
mullvad-closest
];
}
}

View file

@ -7,4 +7,4 @@
gnumake
cmake
];
}
}

View file

@ -1,4 +1,9 @@
{ pkgs, inputs, config, ... }:
{
pkgs,
inputs,
config,
...
}:
let
customWallpaper = pkgs.fetchurl {
@ -7,26 +12,29 @@ let
};
in
{
environment.systemPackages = with pkgs; with inputs; [
inputs.zen-browser.packages."${system}".default
firefox
git
vim
wget
curl
fzf
jq
unzip
silver-searcher
ripgrep
wl-clipboard-rs
networkmanager-openvpn
(pkgs.writeTextDir "share/sddm/themes/breeze/theme.conf.user" ''
[General]
background=${customWallpaper}
'')
dig
zig
spotify
];
}
environment.systemPackages =
with pkgs;
with inputs;
[
inputs.zen-browser.packages."${system}".default
firefox
git
vim
wget
curl
fzf
jq
unzip
silver-searcher
ripgrep
wl-clipboard-rs
networkmanager-openvpn
(pkgs.writeTextDir "share/sddm/themes/breeze/theme.conf.user" ''
[General]
background=${customWallpaper}
'')
dig
zig
spotify
];
}

View file

@ -13,17 +13,17 @@
# Enable PipeWire and ALSA support
services.pipewire = {
enable = true;
alsa.enable = true; # Enable ALSA support
alsa.enable = true; # Enable ALSA support
alsa.support32Bit = true; # Support for 32-bit applications
pulse.enable = true; # Enable PulseAudio compatibility layer
pulse.enable = true; # Enable PulseAudio compatibility layer
};
# Enable libinput for input device handling
services.libinput.enable = true;
# Enable security-related service for realtime audio tasks
security.rtkit.enable = true;
# Enable to update some devices' firmware
services.fwupd.enable = true;
@ -40,4 +40,4 @@
services.printing.enable = true;
services.printing.browsed.enable = false;
hardware.bluetooth.enable = true;
}
}

View file

@ -4,7 +4,12 @@
users.users.bart = {
isNormalUser = true;
description = "Bart van der Braak";
extraGroups = [ "networkmanager" "wheel" "libvirtd" "docker" ];
extraGroups = [
"networkmanager"
"wheel"
"libvirtd"
"docker"
];
packages = with pkgs; [
vscodium
thunderbird
@ -71,4 +76,4 @@
setSocketVariable = true;
};
};
}
}