style: utilise keep-sorted formatter

This commit is contained in:
wi11-holdsworth 2025-09-17 11:47:17 +10:00
parent fd65dc21ad
commit f04a4ca44d
31 changed files with 86 additions and 27 deletions

View file

@ -2,6 +2,7 @@
description = "NixOS configuration"; description = "NixOS configuration";
inputs = { inputs = {
# keep-sorted start block=yes
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
@ -17,6 +18,7 @@
}; };
copyparty.url = "github:9001/copyparty"; copyparty.url = "github:9001/copyparty";
vscode-server.url = "github:nix-community/nixos-vscode-server"; vscode-server.url = "github:nix-community/nixos-vscode-server";
# keep-sorted end
}; };
outputs = outputs =

View file

@ -1,7 +1,4 @@
{ {
pkgs,
hostName,
inputs,
userName, userName,
... ...
}: }:
@ -13,12 +10,14 @@
# reusable modules # reusable modules
# keep-sorted start
amd-gpu.enable = true; amd-gpu.enable = true;
desktop.enable = true; desktop.enable = true;
external-speakers.enable = true; external-speakers.enable = true;
gaming.enable = true; gaming.enable = true;
link2c.enable = true; link2c.enable = true;
plasma.enable = true; plasma.enable = true;
# keep-sorted end
# config # config
@ -33,10 +32,12 @@
users.users.${userName} = { users.users.${userName} = {
extraGroups = [ extraGroups = [
# keep-sorted start
"networkmanager" "networkmanager"
"wheel" "wheel"
"scanner" "scanner"
"lp" "lp"
# keep-sorted end
]; ];
isNormalUser = true; isNormalUser = true;
}; };

View file

@ -7,7 +7,9 @@
# reusable modules # reusable modules
# keep-sorted start
desktop.enable = true; desktop.enable = true;
# keep-sorted end
# config # config

View file

@ -1,7 +1,4 @@
{ {
pkgs,
hostName,
inputs,
userName, userName,
... ...
}: }:
@ -13,14 +10,17 @@
# reusable modules # reusable modules
# keep-sorted start
amd-gpu.enable = true; amd-gpu.enable = true;
desktop.enable = true; desktop.enable = true;
gnome.enable = true; gnome.enable = true;
tlp.enable = true; tlp.enable = true;
# keep-sorted end
# config # config
boot.initrd.luks.devices."luks-a7726a9d-535f-44bc-9c0e-adc501fad371".device = "/dev/disk/by-uuid/a7726a9d-535f-44bc-9c0e-adc501fad371"; boot.initrd.luks.devices."luks-a7726a9d-535f-44bc-9c0e-adc501fad371".device =
"/dev/disk/by-uuid/a7726a9d-535f-44bc-9c0e-adc501fad371";
system.stateVersion = "24.11"; system.stateVersion = "24.11";
@ -28,10 +28,12 @@
users.users.${userName} = { users.users.${userName} = {
extraGroups = [ extraGroups = [
# keep-sorted start
"networkmanager" "networkmanager"
"wheel" "wheel"
"scanner" "scanner"
"lp" "lp"
# keep-sorted end
]; ];
isNormalUser = true; isNormalUser = true;
}; };

View file

@ -7,7 +7,9 @@
# reusable modules # reusable modules
# keep-sorted start
desktop.enable = true; desktop.enable = true;
# keep-sorted end
# config # config

View file

@ -1,7 +1,5 @@
{ {
pkgs,
hostName, hostName,
inputs,
userName, userName,
... ...
}: }:
@ -13,9 +11,11 @@
# reusable modules # reusable modules
# keep-sorted start
borgbackup-srv.enable = true; borgbackup-srv.enable = true;
intel-gpu.enable = true; intel-gpu.enable = true;
server.enable = true; server.enable = true;
# keep-sorted end
# config # config
@ -29,8 +29,10 @@
groups.${userName} = { }; groups.${userName} = { };
users.${userName} = { users.${userName} = {
extraGroups = [ extraGroups = [
# keep-sorted start
"wheel" "wheel"
"docker" "docker"
# keep-sorted end
]; ];
home = "/home/srv"; home = "/home/srv";
isNormalUser = true; isNormalUser = true;

View file

@ -1,12 +1,18 @@
{ config, lib, ... }: {
config,
lib,
...
}:
let let
feature = "desktop"; feature = "desktop";
in in
{ {
config = lib.mkIf config.${feature}.enable { config = lib.mkIf config.${feature}.enable {
# keep-sorted start
kitty.enable = true; kitty.enable = true;
obsidian.enable = true; obsidian.enable = true;
zellij.enable = true; zellij.enable = true;
# keep-sorted end
}; };
imports = [ ]; imports = [ ];

View file

@ -7,6 +7,7 @@ in
{ {
imports = (featureBundler ./bundles) ++ (featureBundler ./features); imports = (featureBundler ./bundles) ++ (featureBundler ./features);
# keep-sorted start
bat.enable = lib.mkDefault true; bat.enable = lib.mkDefault true;
direnv.enable = lib.mkDefault true; direnv.enable = lib.mkDefault true;
eza.enable = lib.mkDefault true; eza.enable = lib.mkDefault true;
@ -16,4 +17,5 @@ in
starship.enable = lib.mkDefault true; starship.enable = lib.mkDefault true;
yazi.enable = lib.mkDefault true; yazi.enable = lib.mkDefault true;
zoxide.enable = lib.mkDefault true; zoxide.enable = lib.mkDefault true;
# keep-sorted end
} }

View file

@ -1,6 +1,5 @@
{ {
config, config,
pkgs,
lib, lib,
... ...
}: }:

View file

@ -1,4 +1,8 @@
{ config, lib, ... }: {
config,
lib,
...
}:
let let
feature = "eza"; feature = "eza";
in in

View file

@ -16,6 +16,7 @@ in
set fish_greeting set fish_greeting
''; '';
shellAliases = { shellAliases = {
# keep-sorted start
cat = "bat"; cat = "bat";
cd = "j"; cd = "j";
g = "lazygit"; g = "lazygit";
@ -25,6 +26,7 @@ in
ns = "nh os switch"; ns = "nh os switch";
vi = "nvim"; vi = "nvim";
vim = "nvim"; vim = "nvim";
# keep-sorted end
}; };
}; };

View file

@ -20,6 +20,7 @@ in
userEmail = "83637728+wi11-holdsworth@users.noreply.github.com"; userEmail = "83637728+wi11-holdsworth@users.noreply.github.com";
aliases = { aliases = {
# keep-sorted start
a = "add"; a = "add";
aa = "add ."; aa = "add .";
ap = "add -p"; ap = "add -p";
@ -36,6 +37,7 @@ in
cob = "checkout -b"; cob = "checkout -b";
ps = "push"; ps = "push";
pl = "pull"; pl = "pull";
# keep-sorted end
}; };
extraConfig = { extraConfig = {

View file

@ -25,6 +25,7 @@ in
showRibbon = false; showRibbon = false;
}; };
communityPlugins = [ communityPlugins = [
# keep-sorted start
"obsidian-livesync" "obsidian-livesync"
"oz-clear-unused-images" "oz-clear-unused-images"
"obsidian-editor-shortcuts" "obsidian-editor-shortcuts"
@ -33,8 +34,10 @@ in
"pdf-plus" "pdf-plus"
"obsidian-excalidraw-plugin" "obsidian-excalidraw-plugin"
"obsidian-relative-line-numbers" "obsidian-relative-line-numbers"
# keep-sorted end
]; ];
corePlugins = [ corePlugins = [
# keep-sorted start
"backlink" "backlink"
"bases" "bases"
"bookmarks" "bookmarks"
@ -61,6 +64,7 @@ in
"word-count" "word-count"
"workspaces" "workspaces"
"zk-prefixer" "zk-prefixer"
# keep-sorted end
]; ];
hotkeys = { hotkeys = {
"editor:swap-line-down" = [ "editor:swap-line-down" = [

View file

@ -12,6 +12,7 @@ in
programs.yazi = { programs.yazi = {
enable = true; enable = true;
plugins = { plugins = {
# keep-sorted start
diff = pkgs.yaziPlugins.diff; diff = pkgs.yaziPlugins.diff;
git = pkgs.yaziPlugins.git; git = pkgs.yaziPlugins.git;
mediainfo = pkgs.yaziPlugins.mediainfo; mediainfo = pkgs.yaziPlugins.mediainfo;
@ -23,9 +24,8 @@ in
starship = pkgs.yaziPlugins.starship; starship = pkgs.yaziPlugins.starship;
vcs-files = pkgs.yaziPlugins.vcs-files; vcs-files = pkgs.yaziPlugins.vcs-files;
yatline-githead = pkgs.yaziPlugins.yatline-githead; yatline-githead = pkgs.yaziPlugins.yatline-githead;
# keep-sorted end
}; };
# flavors = {};
# themes = {};
}; };
}; };

View file

@ -14,14 +14,15 @@ in
print-and-scan.enable = true; print-and-scan.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# keep-sorted start
beeper beeper
brave brave
calibre calibre
cameractrls-gtk3 cameractrls-gtk3
jellyfin-media-player jellyfin-media-player
# TODO: break out into separate configuration module
onlyoffice-desktopeditors onlyoffice-desktopeditors
sleek-todo sleek-todo
# keep-sorted end
]; ];
}; };

View file

@ -13,16 +13,15 @@ in
with pkgs; with pkgs;
( (
[ [
# general # keep-sorted start
devenv devenv
just just
mask mask
vscode vscode
# rust
bacon bacon
cargo-info cargo-info
rusty-man rusty-man
# keep-sorted end
] ]
++ (with jetbrains; [ ++ (with jetbrains; [
rider rider

View file

@ -4,6 +4,7 @@ let
in in
{ {
config = lib.mkIf config.${feature}.enable { config = lib.mkIf config.${feature}.enable {
# keep-sorted start
couchdb.enable = true; couchdb.enable = true;
copyparty.enable = true; copyparty.enable = true;
flaresolverr.enable = true; flaresolverr.enable = true;
@ -22,6 +23,7 @@ in
qbittorrent.enable = true; qbittorrent.enable = true;
vaultwarden.enable = true; vaultwarden.enable = true;
vscode-server.enable = true; vscode-server.enable = true;
# keep-sorted end
users.groups.media = { }; users.groups.media = { };
}; };

View file

@ -24,8 +24,8 @@ in
systemd-boot.enable = lib.mkDefault true; systemd-boot.enable = lib.mkDefault true;
tailscale.enable = lib.mkDefault true; tailscale.enable = lib.mkDefault true;
# cli utils
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# keep-sorted start
dua # disk use analyser dua # disk use analyser
fd # find fd # find
hyperfine # benchmarking tool hyperfine # benchmarking tool
@ -38,5 +38,6 @@ in
ripunzip ripunzip
wiki-tui # wikipedia tui wiki-tui # wikipedia tui
xh # curl xh # curl
# keep-sorted end
]; ];
} }

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
inputs, inputs,
pkgs,
... ...
}: }:
let let

View file

@ -10,8 +10,8 @@ in
{ {
config = lib.mkIf config.${feature}.enable { config = lib.mkIf config.${feature}.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# keep-sorted start
heroic heroic
# TODO: break out into separate module
lutris lutris
mangohud mangohud
nexusmods-app nexusmods-app
@ -20,6 +20,7 @@ in
wine64 wine64
winetricks winetricks
prismlauncher prismlauncher
# keep-sorted end
]; ];
programs = { programs = {

View file

@ -17,6 +17,7 @@ in
environment = { environment = {
# https://discourse.nixos.org/t/howto-disable-most-gnome-default-applications-and-what-they-are/13505 # https://discourse.nixos.org/t/howto-disable-most-gnome-default-applications-and-what-they-are/13505
gnome.excludePackages = with pkgs; [ gnome.excludePackages = with pkgs; [
# keep-sorted start
# baobab # disk usage analyzer # baobab # disk usage analyzer
# cheese # photo booth # cheese # photo booth
# eog # image viewer # eog # image viewer
@ -29,8 +30,6 @@ in
# file-roller # archive manager # file-roller # archive manager
geary # email client geary # email client
seahorse # password manager seahorse # password manager
# these should be self explanatory
gnome-calculator gnome-calculator
gnome-calendar gnome-calendar
gnome-characters gnome-characters
@ -47,6 +46,7 @@ in
gnome-weather gnome-weather
# gnome-disk-utility # gnome-disk-utility
gnome-connections gnome-connections
# keep-sorted end
]; ];
}; };
}; };

View file

@ -21,6 +21,7 @@ let
''); '');
secrets = [ secrets = [
# keep-sorted start
"immich" "immich"
"jellyfin" "jellyfin"
"lidarr" "lidarr"
@ -29,6 +30,7 @@ let
"prowlarr" "prowlarr"
"radarr" "radarr"
"sonarr" "sonarr"
# keep-sorted end
]; ];
in in
{ {
@ -40,6 +42,7 @@ in
listenPort = lib.toInt port; listenPort = lib.toInt port;
allowedHosts = "homepage-dashboard.fi33.buzz"; allowedHosts = "homepage-dashboard.fi33.buzz";
services = [ services = [
# keep-sorted start block=yes
{ {
"Media Management" = [ "Media Management" = [
{ {
@ -217,6 +220,7 @@ in
} }
]; ];
} }
# keep-sorted end
]; ];
settings = { settings = {
title = "Mission Control"; title = "Mission Control";

View file

@ -14,11 +14,13 @@ in
graphics = { graphics = {
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
# keep-sorted start
intel-media-driver intel-media-driver
libva-vdpau-driver libva-vdpau-driver
intel-compute-runtime intel-compute-runtime
vpl-gpu-rt vpl-gpu-rt
intel-ocl intel-ocl
# keep-sorted end
]; ];
}; };
}; };

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
userName,
... ...
}: }:
let let

View file

@ -20,14 +20,18 @@ in
environment.systemPackages = environment.systemPackages =
with pkgs.kdePackages; with pkgs.kdePackages;
[ [
# keep-sorted start
kontact kontact
ktorrent ktorrent
kget kget
kzones kzones
# keep-sorted end
] ]
++ (with pkgs; [ ++ (with pkgs; [
# keep-sorted start
kile kile
haruna haruna
# keep-sorted end
]); ]);
}; };

View file

@ -10,6 +10,7 @@ let
port = "5008"; port = "5008";
devicesList = [ devicesList = [
# keep-sorted start block=yes
{ {
device = "desktop"; device = "desktop";
id = "SKDADYB-DQVC2EG-BZ67OJR-DO25ZUR-URP2G5U-FXRNC65-OWPEKHN-STTRRQG"; id = "SKDADYB-DQVC2EG-BZ67OJR-DO25ZUR-URP2G5U-FXRNC65-OWPEKHN-STTRRQG";
@ -26,6 +27,7 @@ let
device = "server"; device = "server";
id = "OP7EU3A-7A4CCMY-D4T3ND7-YWMRBNJ-KVE34FG-ZJQFSLS-WMLRWB4-FL2O7AZ"; id = "OP7EU3A-7A4CCMY-D4T3ND7-YWMRBNJ-KVE34FG-ZJQFSLS-WMLRWB4-FL2O7AZ";
} }
# keep-sorted end
]; ];
devices = builtins.listToAttrs ( devices = builtins.listToAttrs (

View file

@ -11,11 +11,13 @@ in
tlp = { tlp = {
enable = true; enable = true;
settings = { settings = {
# keep-sorted start
CPU_BOOST_ON_AC = 1; CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0; CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_AC = "performance"; CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
STOP_CHARGE_THRESH_BAT0 = 95; STOP_CHARGE_THRESH_BAT0 = 95;
# keep-sorted end
}; };
}; };
}; };

View file

@ -1,6 +1,5 @@
{ {
config, config,
inputs,
lib, lib,
... ...
}: }:

View file

@ -1,4 +1,8 @@
{ config, lib, ... }: {
config,
lib,
...
}:
let let
feature = "replace"; feature = "replace";
in in

View file

@ -1,4 +1,8 @@
{ config, lib, ... }: {
config,
lib,
...
}:
let let
feature = "replace"; feature = "replace";
port = "port"; port = "port";

View file

@ -1,13 +1,18 @@
let let
# keep-sorted start
srv = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOeV0NxqIGIXXgLYE6ntkHE4PARceZBp1FTI7kKLBbk8"; srv = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOeV0NxqIGIXXgLYE6ntkHE4PARceZBp1FTI7kKLBbk8";
will = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPHAnTQP77HQ/8nbf1oX7xftfKYtbH6MSh83wic0qdBy"; will = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPHAnTQP77HQ/8nbf1oX7xftfKYtbH6MSh83wic0qdBy";
# keep-sorted end
users = [ users = [
# keep-sorted start
srv srv
will will
# keep-sorted end
]; ];
in in
{ {
# keep-sorted start
"api-miniflux.age".publicKeys = users; "api-miniflux.age".publicKeys = users;
"borgbackup-server-offsite.age".publicKeys = users; "borgbackup-server-offsite.age".publicKeys = users;
"borgbackup-server-onsite.age".publicKeys = users; "borgbackup-server-onsite.age".publicKeys = users;
@ -24,4 +29,5 @@ in
"radicale.age".publicKeys = users; "radicale.age".publicKeys = users;
"sonarr.age".publicKeys = users; "sonarr.age".publicKeys = users;
"vaultwarden-admin.age".publicKeys = users; "vaultwarden-admin.age".publicKeys = users;
# keep-sorted end
} }