Format NixOS flake with alejandra

This commit is contained in:
2026-05-07 15:48:26 -07:00
parent e1fd076982
commit dce81586ac
83 changed files with 2153 additions and 1838 deletions

View File

@@ -85,6 +85,15 @@ jobs:
name: ${{ vars.CACHIX_CACHE_NAME }}
skipPush: true
- name: Check Nix formatting
run: |
set -euxo pipefail
nix build \
--no-link \
--print-build-logs \
./nixos#checks.x86_64-linux.formatting \
--override-input railbird-secrets ./nixos/ci/railbird-secrets-stub
- name: Build NixOS system (strixi-minaj)
run: |
set -euxo pipefail

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
options = {
};
config = {

View File

@@ -1,4 +1,10 @@
{ config, pkgs, makeEnable, realUsers, ... }:
{
config,
pkgs,
makeEnable,
realUsers,
...
}:
makeEnable config "myModules.base" true {
nixpkgs.config.permittedInsecurePackages = [
"electron-12.2.3"
@@ -52,7 +58,6 @@ makeEnable config "myModules.base" true {
pulse.enable = true;
};
# Bluetooth
hardware.bluetooth.enable = true;
services.blueman.enable = true;

View File

@@ -1,4 +1,10 @@
{ pkgs, inputs, config, makeEnable, ... }:
{
pkgs,
inputs,
config,
makeEnable,
...
}:
makeEnable config "myModules.ben" true {
home-manager.users.ben = {
programs.zsh = {

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
../nix-shared/system/essential.nix
];

View File

@@ -60,9 +60,13 @@
};
outputs = inputs @ {
self, nixpkgs, nixos-hardware, home-manager, nix, ...
}:
let
self,
nixpkgs,
nixos-hardware,
home-manager,
nix,
...
}: let
machinesPath = ../machines;
machineFilenames = builtins.attrNames (builtins.readDir machinesPath);
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
@@ -83,31 +87,36 @@
system = "aarch64-linux";
};
};
mkConfig =
args@
{ system ? "x86_64-linux"
, baseModules ? []
, modules ? []
, specialArgs ? {}
, ...
mkConfig = args @ {
system ? "x86_64-linux",
baseModules ? [],
modules ? [],
specialArgs ? {},
...
}:
nixpkgs.lib.nixosSystem (args // {
nixpkgs.lib.nixosSystem (args
// {
inherit system;
modules = baseModules ++ modules;
specialArgs = rec {
specialArgs =
rec {
inherit inputs machineNames;
makeEnable = (import ../make-enable.nix) nixpkgs.lib;
realUsers = ["root" "imalison" "kat" "dean" "alex" "ben"];
} // specialArgs // (import ../keys.nix);
}
// specialArgs // (import ../keys.nix);
});
in
{
nixosConfigurations = builtins.mapAttrs (machineName: params:
let machineParams =
in {
nixosConfigurations =
builtins.mapAttrs (
machineName: params: let
machineParams =
if builtins.hasAttr machineName customParams
then (builtins.getAttr machineName customParams)
else {};
in mkConfig (params // machineParams)
) defaultConfigurationParams;
in
mkConfig (params // machineParams)
)
defaultConfigurationParams;
};
}

View File

@@ -1,8 +1,11 @@
{ config, lib, ... }:
with lib;
let cfg = config.myModules.cache-server;
in
{
config,
lib,
...
}:
with lib; let
cfg = config.myModules.cache-server;
in {
options = {
myModules.cache-server = {
enable = mkEnableOption "nix cache server";
@@ -31,4 +34,3 @@ in
};
};
}

View File

@@ -1,5 +1,3 @@
{ machineNames, ... }:
{
{machineNames, ...}: {
# nix.settings.substituters = map (machineName: "ssh-ng://imalison@${machineName}.local") machineNames;
}

View File

@@ -10,7 +10,12 @@
agenix.url = "github:ryantm/agenix";
};
outputs = { self, nixpkgs, flake-utils, agenix }: {
outputs = {
self,
nixpkgs,
flake-utils,
agenix,
}: {
# Keep this minimal: NixOS flake currently doesn't use railbird-secrets, but
# Nix will still try to fetch/resolve all inputs during evaluation.
keys = {

View File

@@ -1,5 +1,8 @@
{ config, lib, ... }:
{
config,
lib,
...
}: {
imports = [
./android.nix
./base.nix

View File

@@ -1,6 +1,8 @@
{ config, lib, ... }:
let
{
config,
lib,
...
}: let
cfg = config.myModules.cua;
flavorDefaults = {
xfce = {
@@ -24,8 +26,7 @@ let
};
selectedFlavor = flavorDefaults.${cfg.flavor};
usingQemu = cfg.flavor == "qemu-linux";
in
{
in {
options.myModules.cua = {
enable = lib.mkEnableOption "Cua Linux computer-use sandbox";
@@ -186,7 +187,8 @@ in
cua-sandbox = {
image = cfg.image;
autoStart = cfg.autoStart;
ports = [
ports =
[
"${cfg.bindAddress}:${toString cfg.noVncPort}:${toString selectedFlavor.noVncContainerPort}"
"${cfg.bindAddress}:${toString cfg.apiPort}:${toString selectedFlavor.apiContainerPort}"
]

View File

@@ -5,8 +5,7 @@
lib,
makeEnable,
...
}:
let
}: let
cfg = config.myModules.desktop;
desktopShellUi = pkgs.writeShellApplication {
name = "desktop_shell_ui";

View File

@@ -2,8 +2,7 @@
services.dunst = {
enable = true;
settings = {
global =
{
global = {
monitor = 0;
follow = "mouse";
indicate_hidden = "yes";

View File

@@ -1,4 +1,9 @@
{ pkgs, config, makeEnable, ... }:
{
pkgs,
config,
makeEnable,
...
}:
makeEnable config "myModules.electron" false {
environment.systemPackages = with pkgs; [
element-desktop
@@ -9,7 +14,9 @@ makeEnable config "myModules.electron" false {
zoom-us
];
home-manager.sharedModules = [
(if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then {
(
if pkgs.stdenv.hostPlatform.system == "x86_64-linux"
then {
# systemd.user.services.bitwarden = {
# Unit = {
# Description = "Bitwarden";
@@ -25,6 +32,8 @@ makeEnable config "myModules.electron" false {
# RestartSec = 3;
# };
# };
} else {})
}
else {}
)
];
}

View File

@@ -1,5 +1,4 @@
final: prev:
{
final: prev: {
# Keep pkgs.emacs as a real Emacs package (used by other derivations / emacsPackages),
# but provide an "auto" wrapper for interactive use that selects the right GUI backend.
emacs = prev."emacs30-pgtk".override {
@@ -26,12 +25,10 @@ final: prev:
dontUnpack = true;
nativeBuildInputs = [final.makeWrapper];
installPhase =
let
installPhase = let
emacsWayland = final.emacs-wayland;
emacsX11 = final.emacs-x11;
in
''
in ''
mkdir -p "$out/bin" "$out/share/applications" "$out/share/icons" "$out/share/pixmaps"
# Ensure desktop integrations (icons) exist even though we don't install the raw emacs packages.

View File

@@ -1,5 +1,9 @@
{ pkgs, config, specialArgs, ... }:
{
pkgs,
config,
specialArgs,
...
}: {
services.emacs = {
enable = false;
defaultEditor = true;

View File

@@ -1,5 +1,11 @@
{ config, pkgs, options, lib, inputs, ... }:
let
{
config,
pkgs,
options,
lib,
inputs,
...
}: let
libDir = "${config.dotfiles-directory}/dotfiles/lib";
machineFilenames = builtins.attrNames (builtins.readDir ./machines);
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
@@ -14,8 +20,7 @@ let
managedSshHostCasePattern = lib.concatStringsSep "|" managedSshHostPatterns;
multiplexerAliases = import ../shared/multiplexer-aliases.nix;
in
with lib;
{
with lib; {
options = {
dotfiles-directory = mkOption {
type = types.path;
@@ -80,11 +85,13 @@ with lib;
homeBinInPath = true;
localBinInPath = true;
enableAllTerminfo = true;
shellAliases = {
shellAliases =
{
df_ssh = "TERM=xterm-256color ssh -o StrictHostKeyChecking=no";
fix_nix = "LD_LIBRARY_PATH='' nix";
xo = "xdg-open";
} // multiplexerAliases;
}
// multiplexerAliases;
variables = {
ROFI_SYSTEMD_TERM = "ghostty -e";
NIXPKGS_GIT_REV = "${inputs.nixpkgs.rev}";

View File

@@ -1,4 +1,9 @@
{ config, pkgs, makeEnable, ... }:
{
config,
pkgs,
makeEnable,
...
}:
makeEnable config "myModules.extra" false {
environment.systemPackages = with pkgs; [
android-studio

View File

@@ -531,7 +531,17 @@
hypr-workspace-history = inputs.hypr-workspace-history.packages.${system}.hypr-workspace-history;
};
checks = lib.optionalAttrs pkgs.stdenv.isLinux {
checks =
{
formatting =
pkgs.runCommand "alejandra-formatting-check" {
nativeBuildInputs = [pkgs.alejandra];
} ''
alejandra --check ${./.}
touch "$out"
'';
}
// lib.optionalAttrs pkgs.stdenv.isLinux {
hyprNStack = inputs.hyprNStack.packages.${system}.hyprNStack;
hyprexpo-lua = inputs.hyprland-plugins-lua.packages.${system}.hyprexpo;
hyprwinview = inputs.hyprwinview.packages.${system}.hyprwinview;

View File

@@ -1,4 +1,9 @@
{ pkgs, makeEnable, config, ... }:
{
pkgs,
makeEnable,
config,
...
}:
makeEnable config "myModules.fonts" true {
# Enable the gtk icon cache
gtk.iconCache.enable = true;

View File

@@ -1,4 +1,9 @@
{ config, pkgs, makeEnable, ... }:
{
config,
pkgs,
makeEnable,
...
}:
makeEnable config "myModules.games" false {
environment.systemPackages = with pkgs; [
steam

View File

@@ -1,12 +1,17 @@
{ pkgs, config, makeEnable, ... }:
{
pkgs,
config,
makeEnable,
...
}:
makeEnable config "myModules.gitea-runner" false {
age.secrets.gitea-runner-token = {
file = ./secrets/gitea-runner-token.age;
group = "docker";
};
services.gitea-actions-runner.instances.nix =
let gitea-runner-directory = "/var/lib/gitea-runner";
services.gitea-actions-runner.instances.nix = let
gitea-runner-directory = "/var/lib/gitea-runner";
in {
settings = {
cache = {
@@ -48,7 +53,9 @@ makeEnable config "myModules.gitea-runner" false {
};
systemd.services.gitea-runner-nix = {
environment = let gitea-runner-directory = "/var/lib/gitea-runner"; in {
environment = let
gitea-runner-directory = "/var/lib/gitea-runner";
in {
XDG_CONFIG_HOME = gitea-runner-directory;
XDG_CACHE_HOME = "${gitea-runner-directory}/.cache";
};

View File

@@ -1,6 +1,9 @@
{ config, makeEnable, ... }:
{
config,
makeEnable,
...
}:
makeEnable config "myModules.gitea" false {
services.gitea = {
enable = true;
lfs.enable = true;

View File

@@ -1,4 +1,8 @@
{ config, makeEnable, ... }:
{
config,
makeEnable,
...
}:
makeEnable config "myModules.gnome" false {
services.xserver = {
desktopManager.gnome.enable = true;

View File

@@ -1,4 +1,11 @@
{ pkgs, config, lib, makeEnable, realUsers, ... }:
{
pkgs,
config,
lib,
makeEnable,
realUsers,
...
}:
makeEnable config "myModules.home-assistant" false {
boot.kernel.sysctl = {
# For all interfaces (e.g. if you want to accept RA on all):
@@ -97,7 +104,8 @@ makeEnable config "myModules.home-assistant" false {
"yale"
"zwave_js"
];
extraPackages = python3Packages: with python3Packages; [
extraPackages = python3Packages:
with python3Packages; [
numpy
python-matter-server
universal-silabs-flasher

View File

@@ -1,8 +1,6 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
session = import ./session-variables.nix;
in
{
in {
home-manager.users.imalison = {
imports = [
./emacs.nix

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
quillIcSrc = pkgs.fetchFromGitHub {
owner = "dfinity";
repo = "ic";
@@ -8,7 +7,9 @@ let
};
quillFixed = pkgs.quill.overrideAttrs (old: {
preBuild = (old.preBuild or "") + ''
preBuild =
(old.preBuild or "")
+ ''
# The vendored git dependency resolves ../ledger.did from source-git-*,
# not from the vendor root where nixpkgs currently copies it.
for dir in /build/quill-*-vendor/source-git-*; do
@@ -18,8 +19,7 @@ let
done
'';
});
in
{
in {
environment.systemPackages = with pkgs; [
ic-keysmith
quillFixed

View File

@@ -1,4 +1,9 @@
{ pkgs, config, makeEnable, ... }:
{
pkgs,
config,
makeEnable,
...
}:
makeEnable config "myModules.kat" false {
environment.systemPackages = with pkgs; [
obsidian

View File

@@ -1,4 +1,9 @@
{ config, lib, makeEnable, ... }:
{
config,
lib,
makeEnable,
...
}:
makeEnable config "myModules.keyd" true {
services.keyd = {
enable = true;

View File

@@ -1,4 +1,9 @@
{ config, pkgs, makeEnable, ... }:
{
config,
pkgs,
makeEnable,
...
}:
makeEnable config "myModules.kubelet" false {
age.secrets."api_service_account_key.json.age".file = ./secrets/api_service_account_key.json.age;
services.kubernetes.kubelet = {

View File

@@ -1,4 +1,8 @@
{ makeEnable, config, ... }:
{
makeEnable,
config,
...
}:
makeEnable config "myModules.laptop" true {
services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore";
}

View File

@@ -1,6 +1,9 @@
{ lib, pkgs, inputs, ... }:
{
lib,
pkgs,
inputs,
...
}: {
imports = [
../configuration.nix
inputs.nixos-hardware.nixosModules.dell-xps-17-9700-nvidia
@@ -55,13 +58,13 @@
};
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/18af5b4c-69c7-41a8-865e-bc3f5269d2f9";
fileSystems."/" = {
device = "/dev/disk/by-uuid/18af5b4c-69c7-41a8-865e-bc3f5269d2f9";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8A9F-D7D2";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/8A9F-D7D2";
fsType = "vfat";
};

View File

@@ -1,5 +1,10 @@
{ lib, pkgs, config, inputs, ... }:
{
lib,
pkgs,
config,
inputs,
...
}: {
imports = [
../configuration.nix
];
@@ -25,7 +30,8 @@
];
users.users.ben = {
extraGroups = [
extraGroups =
[
"audio"
"adbusers"
"disk"
@@ -36,6 +42,7 @@
"syncthing"
"systemd-journal"
"video"
] ++ ["wheel"];
]
++ ["wheel"];
};
}

View File

@@ -1,7 +1,11 @@
{ pkgs, lib, config, ... }:
let biskcomp-nginx-hostnames = "192.168.1.44 railbird.ai 1896Folsom.duckdns.org biskcomp.local 0.0.0.0 67.162.131.71";
in
{
pkgs,
lib,
config,
...
}: let
biskcomp-nginx-hostnames = "192.168.1.44 railbird.ai 1896Folsom.duckdns.org biskcomp.local 0.0.0.0 67.162.131.71";
in {
imports = [
../configuration.nix
../raspberry-pi.nix
@@ -151,7 +155,10 @@ in
};
swapDevices = [
{ device = "/swapfile"; size = 8192; } # size is in MiB
{
device = "/swapfile";
size = 8192;
} # size is in MiB
];
networking.hostName = "biskcomp";

View File

@@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}: {
imports = [
../configuration.nix
];

View File

@@ -1,5 +1,10 @@
{ lib, pkgs, config, inputs, ... }:
{
lib,
pkgs,
config,
inputs,
...
}: {
imports = [
../configuration.nix
];

View File

@@ -1,5 +1,10 @@
{ lib, pkgs, config, inputs, ... }:
{
lib,
pkgs,
config,
inputs,
...
}: {
imports = [
../configuration.nix
];

View File

@@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}: {
imports = [
../configuration.nix
];
@@ -20,7 +23,13 @@
boot.initrd.kernelModules = ["amdgpu"];
boot.initrd.availableKernelModules = [
"nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" "amdgpu"
"nvme"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
"amdgpu"
];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];

View File

@@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}: {
imports = [
../configuration.nix
];
@@ -96,13 +99,13 @@
videoDrivers = ["nvidia"];
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/30583504-9530-4095-a556-da1209ef9b63";
fileSystems."/" = {
device = "/dev/disk/by-uuid/30583504-9530-4095-a556-da1209ef9b63";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/CE95-E46C";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/CE95-E46C";
fsType = "vfat";
};

View File

@@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}: {
imports = [
../configuration.nix
];
@@ -60,13 +63,14 @@
services.matter-server = {
enable = true;
logLevel = "debug";
extraArgs = let cert-dir = pkgs.fetchFromGitHub {
extraArgs = let
cert-dir = pkgs.fetchFromGitHub {
repo = "connectedhomeip";
owner = "project-chip";
rev = "6e8676be6142bb541fa68048c77f2fc56a21c7b1";
hash = "sha256-QwPKn2R4mflTKMyr1k4xF04t0PJIlzNCOdXEiQwX5wk=";
}; in
[
};
in [
"--bluetooth-adapter=0"
"--paa-root-cert-dir=${cert-dir}/credentials/production/paa-root-certs"
"--enable-test-net-dcl"
@@ -109,7 +113,8 @@
"wyoming"
"yale"
];
extraPackages = python3Packages: with python3Packages; [
extraPackages = python3Packages:
with python3Packages; [
numpy
python-matter-server
universal-silabs-flasher
@@ -180,13 +185,13 @@
hardware.enableRedistributableFirmware = true;
hardware.enableAllFirmware = true;
fileSystems."/" =
{ device = "/dev/disk/by-uuid/453d28a1-26f2-4b25-ac72-c6d301fd0bb8";
fileSystems."/" = {
device = "/dev/disk/by-uuid/453d28a1-26f2-4b25-ac72-c6d301fd0bb8";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/184E-E5E8";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/184E-E5E8";
fsType = "vfat";
};

View File

@@ -1,5 +1,10 @@
{ config, lib, pkgs, inputs, ... }:
{
config,
lib,
pkgs,
inputs,
...
}: {
imports = [
../configuration.nix
];
@@ -40,21 +45,20 @@
# This also enables v4l2loopback
programs.droidcam.enable = true;
fileSystems."/" =
{ device = "/dev/disk/by-uuid/64a7c1f5-727a-413c-81a2-cb108728cff6";
fileSystems."/" = {
device = "/dev/disk/by-uuid/64a7c1f5-727a-413c-81a2-cb108728cff6";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/EE25-DC15";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/EE25-DC15";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/c0dcff59-8072-48fb-b242-a7a1797e4b48"; }
swapDevices = [
{device = "/dev/disk/by-uuid/c0dcff59-8072-48fb-b242-a7a1797e4b48";}
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";

View File

@@ -6,8 +6,7 @@
orgAgendaApiContainer ? null,
orgAgendaApiImageName ? "localhost/org-agenda-api:colonelpanic-dbb1cb8-030a673",
...
}:
{
}: {
imports = [
../configuration.nix
inputs.agenix.nixosModules.default
@@ -100,18 +99,18 @@
# Note: you may still need router/NAT port-forwards for inbound access from the internet.
services.syncthing.openDefaultPorts = true;
fileSystems."/" =
{ device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae";
fileSystems."/" = {
device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/B875-39D4";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/B875-39D4";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/129345f3-e1e1-4d45-9db9-643160c6d564"; }
swapDevices = [
{device = "/dev/disk/by-uuid/129345f3-e1e1-4d45-9db9-643160c6d564";}
];
environment.systemPackages = with pkgs; [

View File

@@ -1,6 +1,8 @@
{ lib, pkgs, ... }:
{
lib,
pkgs,
...
}: {
imports = [
../configuration.nix
];

View File

@@ -1,5 +1,10 @@
{ lib, pkgs, config, inputs, ... }:
{
lib,
pkgs,
config,
inputs,
...
}: {
imports = [
../configuration.nix
];

View File

@@ -1,6 +1,8 @@
{ lib, pkgs, ... }:
{
lib,
pkgs,
...
}: {
imports = [
../configuration.nix
../nixified.ai.nix
@@ -90,7 +92,10 @@
};
swapDevices = [
{ device = "/swapfile"; size = 49152; }
{
device = "/swapfile";
size = 49152;
}
];
# nix.settings.maxJobs = lib.mkDefault 16;

View File

@@ -1,5 +1,10 @@
{ lib, pkgs, config, inputs, ... }:
{
lib,
pkgs,
config,
inputs,
...
}: {
imports = [
../configuration.nix
];

View File

@@ -1,6 +1,10 @@
{ config, lib, pkgs, inputs, ... }:
{
config,
lib,
pkgs,
inputs,
...
}: {
imports = [
../configuration.nix
inputs.nixos-hardware.nixosModules.asus-rog-strix-g834jzr
@@ -92,7 +96,10 @@
swapDevices = [
{device = "/dev/disk/by-uuid/27f277a0-b552-43a0-904d-625e48922bb9";}
{ device = "/swapfile"; size = 16384; } # size is in MiB (adds 16 GiB)
{
device = "/swapfile";
size = 16384;
} # size is in MiB (adds 16 GiB)
];
networking.hostName = "strixi-minaj";

View File

@@ -1,14 +1,10 @@
lib: config: pathStr: default: configAttrs:
let
pathToAttrSet = str: value:
let
lib: config: pathStr: default: configAttrs: let
pathToAttrSet = str: value: let
parts = lib.splitString "." str;
in
if lib.length parts == 1 then
{ ${lib.head parts} = value; }
else
{ ${lib.head parts} = pathToAttrSet (lib.concatStringsSep "." (lib.tail parts)) value; };
if lib.length parts == 1
then {${lib.head parts} = value;}
else {${lib.head parts} = pathToAttrSet (lib.concatStringsSep "." (lib.tail parts)) value;};
optionsSet = pathToAttrSet pathStr {
enable = lib.mkOption {
@@ -20,12 +16,13 @@ let
cfg = lib.attrByPath (lib.splitString "." pathStr) {enable = false;} config;
# Extract 'imports' from configAttrs, if it exists
importsAttr = if configAttrs ? imports then configAttrs.imports else [];
importsAttr =
if configAttrs ? imports
then configAttrs.imports
else [];
# Remove 'imports' from configAttrs
configAttrsWithoutImports = lib.attrsets.removeAttrs configAttrs ["imports"];
in
{
in {
options = optionsSet;
config = lib.mkIf cfg.enable configAttrsWithoutImports;
imports = importsAttr;

View File

@@ -1,9 +1,13 @@
{ inputs, config, pkgs, specialArgs, ... }:
let
{
inputs,
config,
pkgs,
specialArgs,
...
}: let
system = pkgs.stdenv.hostPlatform.system;
nixifiedAiComfyuiModule =
import (inputs.nixified-ai + "/flake-modules/projects/comfyui/module.nix") {
nixifiedAiComfyuiModule = import (inputs.nixified-ai + "/flake-modules/projects/comfyui/module.nix") {
overlays = patchedNixifiedAiOverlays;
};
@@ -13,14 +17,13 @@ let
inputs.nixified-ai.overlays.fetchers
];
patchedNixifiedAiComfyuiOverlay = final: prev:
let
patchedNixifiedAiComfyuiOverlay = final: prev: let
upstream = inputs.nixified-ai.overlays.comfyui final prev;
in
(builtins.removeAttrs upstream [ "python3Packages" ]) // {
(builtins.removeAttrs upstream ["python3Packages"])
// {
python3Packages = prev.python3Packages.overrideScope (
python-final: python-prev:
let
python-final: python-prev: let
extraPackages = final.lib.packagesFromDirectoryRecursive {
inherit (python-final) callPackage;
directory = inputs.nixified-ai + "/flake-modules/packages";
@@ -47,7 +50,8 @@ let
hash = "sha256-nfliiPRmygP31/qFh61TyAIbeE9C2qvcH1mmG3HEAjg=";
};
qwenRapidAioWorkflow = pkgs.runCommand "qwen-rapid-aio-v23-nsfw-workflow.json" {
qwenRapidAioWorkflow =
pkgs.runCommand "qwen-rapid-aio-v23-nsfw-workflow.json" {
nativeBuildInputs = [pkgs.jq];
src = pkgs.fetchurl {
name = "Qwen-Rapid-AIO.json";
@@ -107,9 +111,13 @@ let
nixifiedComfyuiPackages = nixifiedComfyuiPkgs.comfyuiPackages;
patchedComfyuiPackages = nixifiedComfyuiPackages // {
patchedComfyuiPackages =
nixifiedComfyuiPackages
// {
comfyui-unwrapped = nixifiedComfyuiPackages.comfyui-unwrapped.overrideAttrs (old: {
postPatch = (old.postPatch or "") + ''
postPatch =
(old.postPatch or "")
+ ''
cp ${qwenImageEditPlusV2Node} comfy_extras/nodes_qwen.py
'';
});

View File

@@ -5,8 +5,7 @@
makeEnable,
pkgs,
...
}:
let
}: let
system = pkgs.stdenv.hostPlatform.system;
noctaliaPackage = inputs.noctalia.packages.${system}.default;
waitForWayland = pkgs.writeShellScript "noctalia-wait-for-wayland" ''
@@ -41,8 +40,7 @@ makeEnable config "myModules.noctalia" false {
systemd.enable = false;
};
home.activation.noctaliaLauncherOverviewLayer =
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
home.activation.noctaliaLauncherOverviewLayer = lib.hm.dag.entryAfter ["writeBoundary"] ''
settings_file="$HOME/.config/noctalia/settings.json"
settings_tmp="$(${pkgs.coreutils}/bin/mktemp)"

View File

@@ -1,15 +1,26 @@
{ config, pkgs, inputs, lib, makeEnable, ... }:
{
config,
pkgs,
inputs,
lib,
makeEnable,
...
}:
makeEnable config "myModules.notifications-tray-icon" true {
nixpkgs.overlays = [
inputs.notifications-tray-icon.overlays.default
(final: prev: {
haskellPackages = prev.haskellPackages.override (old: {
overrides = final.lib.composeExtensions (old.overrides or (_: _: {}))
overrides =
final.lib.composeExtensions (old.overrides or (_: _: {}))
(hself: hsuper: {
notifications-tray-icon = final.haskell.lib.overrideCabal
notifications-tray-icon =
final.haskell.lib.overrideCabal
hsuper.notifications-tray-icon
(oldAttrs: {
patches = (oldAttrs.patches or []) ++ [
patches =
(oldAttrs.patches or [])
++ [
./patches/notifications-tray-icon-gmail-oauth-detached-browser.patch
];
});
@@ -52,15 +63,18 @@ makeEnable config "myModules.notifications-tray-icon" true {
};
in {
systemd.user.services = {
notifications-tray-icon-github = mkService
notifications-tray-icon-github =
mkService
"GitHub notifications tray icon"
"${notificationsTrayIcon}/bin/notifications-tray-icon github --token-pass github-token";
notifications-tray-icon-gitea = mkService
notifications-tray-icon-gitea =
mkService
"Gitea notifications tray icon"
"${notificationsTrayIcon}/bin/notifications-tray-icon gitea --url https://dev.railbird.ai --token-pass gitea-omni-token";
notifications-tray-icon-gmail = mkService
notifications-tray-icon-gmail =
mkService
"Gmail notifications tray icon"
"${gmailExecStart}";
};

View File

@@ -1,5 +1,10 @@
{ config, pkgs, makeEnable, lib, ... }:
{
config,
pkgs,
makeEnable,
lib,
...
}:
makeEnable config "myModules.nvidia" false {
environment.systemPackages = with pkgs; [
nvidia-container-toolkit

View File

@@ -1,14 +1,15 @@
# org-agenda-api-host.nix - Host org-agenda-api container with nginx + Let's Encrypt
{ config, lib, pkgs, ... }:
with lib;
let
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.services.org-agenda-api-host;
# Random high port to avoid conflicts
containerPort = 51847;
in
{
in {
options.services.org-agenda-api-host = {
enable = mkEnableOption "org-agenda-api container hosting";
@@ -120,7 +121,8 @@ in
};
};
allDomains = ["org-agenda-api.${cfg.domain}"] ++ cfg.extraDomains;
in builtins.listToAttrs (map mkVirtualHost allDomains);
in
builtins.listToAttrs (map mkVirtualHost allDomains);
};
# Open firewall for HTTP/HTTPS

View File

@@ -1,11 +1,15 @@
# org-agenda-api.nix - Tangled org-config for org-agenda-api container
{ pkgs, inputs, system }:
let
{
pkgs,
inputs,
system,
}: let
# Path to org-config.org in the dotfiles
orgConfigOrg = ../dotfiles/emacs.d/org-config.org;
# Tangle org-config.org to produce elisp files
orgAgendaCustomConfig = pkgs.runCommand "org-agenda-custom-config" {
orgAgendaCustomConfig =
pkgs.runCommand "org-agenda-custom-config" {
buildInputs = [pkgs.emacs-nox];
} ''
mkdir -p $out
@@ -28,7 +32,6 @@ let
fi
done
'';
in {
org-agenda-custom-config = orgAgendaCustomConfig;
}

View File

@@ -7,29 +7,25 @@
nodejs,
makeWrapper,
}:
stdenv.mkDerivation (
finalAttrs:
let
finalAttrs: let
toolArchiveSuffix =
if stdenv.hostPlatform.isLinux then
if stdenv.hostPlatform.isAarch64 then
"arm64-linux"
else if stdenv.hostPlatform.isx86_64 then
"x64-linux"
else
throw "Unsupported Linux architecture for happy-coder: ${stdenv.hostPlatform.system}"
else if stdenv.hostPlatform.isDarwin then
if stdenv.hostPlatform.isAarch64 then
"arm64-darwin"
else if stdenv.hostPlatform.isx86_64 then
"x64-darwin"
else
throw "Unsupported Darwin architecture for happy-coder: ${stdenv.hostPlatform.system}"
else
throw "Unsupported platform for happy-coder: ${stdenv.hostPlatform.system}";
in
{
if stdenv.hostPlatform.isLinux
then
if stdenv.hostPlatform.isAarch64
then "arm64-linux"
else if stdenv.hostPlatform.isx86_64
then "x64-linux"
else throw "Unsupported Linux architecture for happy-coder: ${stdenv.hostPlatform.system}"
else if stdenv.hostPlatform.isDarwin
then
if stdenv.hostPlatform.isAarch64
then "arm64-darwin"
else if stdenv.hostPlatform.isx86_64
then "x64-darwin"
else throw "Unsupported Darwin architecture for happy-coder: ${stdenv.hostPlatform.system}"
else throw "Unsupported platform for happy-coder: ${stdenv.hostPlatform.system}";
in {
pname = "happy-coder";
version = "0.11.2-unstable-2026-03-26";

View File

@@ -3,9 +3,7 @@
python3,
python3Packages,
writeShellApplication,
}:
let
}: let
pykefcontrol = python3Packages.callPackage ../pykefcontrol {};
python = python3.withPackages (ps: [
pykefcontrol

View File

@@ -7,7 +7,6 @@
versionCheckHook,
writeShellScript,
}:
buildNpmPackage (finalAttrs: {
pname = "playwright-cli";
version = "0.1.1";

View File

@@ -6,7 +6,6 @@
aiohttp,
requests,
}:
buildPythonPackage rec {
pname = "pykefcontrol";
version = "0.9.2";

View File

@@ -2,9 +2,7 @@
lib,
python3,
writeShellApplication,
}:
let
}: let
python = python3.withPackages (ps: [
ps.python-roborock
ps.pyshark

View File

@@ -9,10 +9,8 @@
electron_40,
nodejs,
}:
stdenv.mkDerivation (
finalAttrs:
let
finalAttrs: let
electron = electron_40;
nodeModules = stdenvNoCC.mkDerivation {
pname = "${finalAttrs.pname}-node_modules";
@@ -81,8 +79,7 @@ stdenv.mkDerivation (
outputHash = "sha256-yrzdhw+NPYZku10piHoxMy+TUJ8MYySZorMOMOztJY4=";
outputHashMode = "recursive";
};
in
{
in {
pname = "t3code";
version = "0.0.15";
strictDeps = true;
@@ -129,7 +126,8 @@ stdenv.mkDerivation (
--replace-fail 'host: "localhost"' 'host: "127.0.0.1"'
'';
nativeBuildInputs = [
nativeBuildInputs =
[
buildPackages.bun
buildPackages.copyDesktopItems
buildPackages.installShellFiles
@@ -138,7 +136,8 @@ stdenv.mkDerivation (
buildPackages.nodejs
buildPackages.python3
buildPackages.writableTmpDirAsHomeHook
] ++ lib.optionals stdenv.buildPlatform.isDarwin [
]
++ lib.optionals stdenv.buildPlatform.isDarwin [
buildPackages.cctools.libtool
buildPackages.xcbuild
];

View File

@@ -1,4 +1,10 @@
{ pkgs, config, makeEnable, realUsers, ... }:
{
pkgs,
config,
makeEnable,
realUsers,
...
}:
makeEnable config "myModules.plasma" true {
services.accounts-daemon.enable = true;
services.displayManager.sddm = {

View File

@@ -1,4 +1,10 @@
{ pkgs, config, makeEnable, realUsers, ... }:
{
pkgs,
config,
makeEnable,
realUsers,
...
}:
makeEnable config "myModules.postgres" true {
services.postgresql = {
enable = true;
@@ -10,14 +16,16 @@ makeEnable config "myModules.postgres" true {
host all all 0.0.0.0/0 trust
host all all ::1/128 trust
'';
ensureUsers = map (username: {
ensureUsers =
map (username: {
name = username;
ensureClauses = {
superuser = true;
createrole = true;
createdb = true;
};
}) realUsers;
})
realUsers;
# initialScript = pkgs.writeText "init-sql-script" ''
# CREATE DATABASE IF NOT EXISTS railbird;
# \c railbird
@@ -27,6 +35,6 @@ makeEnable config "myModules.postgres" true {
services.pgadmin = {
enable = false;
initialEmail = "IvanMalison@gmail.com";
initialPasswordFile = (builtins.toFile "password" "This is the content of the file.");
initialPasswordFile = builtins.toFile "password" "This is the content of the file.";
};
}

View File

@@ -1,9 +1,19 @@
{ config, lib, makeEnable, inputs, ... }:
{
config,
lib,
makeEnable,
inputs,
...
}:
makeEnable config "myModules.quickshell" false {
home-manager.sharedModules = [
inputs.caelestia-shell.homeManagerModules.default
({ lib, nixos, pkgs, ... }:
let
({
lib,
nixos,
pkgs,
...
}: let
hyprlandEnabled = lib.attrByPath ["myModules" "hyprland" "enable"] false nixos.config;
system = pkgs.stdenv.hostPlatform.system;
quickshellBase = inputs.caelestia-shell.inputs.quickshell.packages.${system}.default.override {
@@ -36,8 +46,7 @@ makeEnable config "myModules.quickshell" false {
app2unit = pkgs.app2unit;
quickshell = quickshellPackage;
};
in
{
in {
programs.caelestia = {
enable = true;
package = caelestiaPackage;

View File

@@ -1,4 +1,10 @@
{ pkgs, config, makeEnable, realUsers, ... }:
{
pkgs,
config,
makeEnable,
realUsers,
...
}:
makeEnable config "myModules.rabbitmq" false {
services.rabbitmq = {
enable = true;

View File

@@ -1,5 +1,10 @@
{ config, pkgs, inputs, makeEnable, ... }:
{
config,
pkgs,
inputs,
makeEnable,
...
}:
makeEnable config "myModules.raspberry-pi" false {
imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-4

View File

@@ -1,5 +1,10 @@
{ config, lib, pkgs, makeEnable, ... }:
let
{
config,
lib,
pkgs,
makeEnable,
...
}: let
cfg = config.myModules.remote-hyprland;
hyprlandPackage = config.programs.hyprland.package;
geometry = "${toString cfg.width}x${toString cfg.height}@${toString cfg.refreshRate}";
@@ -162,7 +167,8 @@ EOF
home-manager.users.${cfg.user} = {
systemd.user.services = {
remote-hyprland = {
remote-hyprland =
{
Unit = {
Description = "Headless Hyprland session for remote VNC access";
After = ["default.target"];
@@ -179,9 +185,11 @@ EOF
"PATH=${servicePath}"
];
};
} // autostartInstall;
}
// autostartInstall;
remote-hyprland-wayvnc = {
remote-hyprland-wayvnc =
{
Unit = {
Description = "VNC server for the headless Hyprland session";
After = ["remote-hyprland.service"];
@@ -200,12 +208,14 @@ EOF
"PATH=${servicePath}"
];
};
} // autostartInstall;
}
// autostartInstall;
};
};
};
in
enabledModule // {
enabledModule
// {
options = lib.recursiveUpdate enabledModule.options {
myModules.remote-hyprland = {
user = lib.mkOption {

View File

@@ -1,9 +1,16 @@
{ config, inputs, lib, pkgs, makeEnable, ... }:
let
{
config,
inputs,
lib,
pkgs,
makeEnable,
...
}: let
system = pkgs.stdenv.hostPlatform.system;
kanshiSniPackage =
inputs.kanshi-sni.packages.${system}.default.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
kanshiSniPackage = inputs.kanshi-sni.packages.${system}.default.overrideAttrs (old: {
patches =
(old.patches or [])
++ [
./patches/kanshi-sni-refresh-and-reconnect.patch
./patches/kanshi-sni-keep-menu-root-alive.patch
];
@@ -40,8 +47,7 @@ makeEnable config "myModules.sni" true {
indicator = true;
};
home.activation.disableKdeConnectBluetooth =
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
home.activation.disableKdeConnectBluetooth = lib.hm.dag.entryAfter ["writeBoundary"] ''
${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 \
--file kdeconnect/config \
--group General \

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
# TODO: reenable
# security.pam.sshAgentAuth.enable = true;
services.avahi = {

View File

@@ -2,8 +2,7 @@
makeEnable,
config,
...
}:
let
}: let
shared = import ../nix-shared/syncthing.nix;
inherit (shared) devices allDevices;
in

View File

@@ -1,4 +1,10 @@
{ config, lib, pkgs, makeEnable, ... }:
{
config,
lib,
pkgs,
makeEnable,
...
}:
makeEnable config "myModules.tailscale" true {
# Provide stable SSH connectivity between your machines without needing port
# forwarding (works behind NAT/CGNAT).

View File

@@ -1,4 +1,8 @@
{ config, makeEnable, ... }:
{
config,
makeEnable,
...
}:
makeEnable config "myModules.tts" false {
services.tts.servers.coqui = {
enable = true;

View File

@@ -1,5 +1,9 @@
{ pkgs, keys, inputs, ... }:
let
{
pkgs,
keys,
inputs,
...
}: let
extraGroups = [
"adbusers"
"audio"
@@ -24,36 +28,47 @@ let
createHome = true;
shell = pkgs.zsh;
};
in
{
in {
security.sudo.wheelNeedsPassword = false;
users.users = with keys; {
imalison = userDefaults // {
imalison =
userDefaults
// {
extraGroups = extraGroupsWithWheel;
name = "imalison";
openssh.authorizedKeys.keys = kanivanKeys;
};
kat = userDefaults // {
kat =
userDefaults
// {
extraGroups = extraGroupsWithWheel;
name = "kat";
openssh.authorizedKeys.keys = kanivanKeys;
};
dean = userDefaults // {
dean =
userDefaults
// {
extraGroups = extraGroupsWithWheel;
name = "dean";
openssh.authorizedKeys.keys = kanivanKeys ++ deanKeys;
};
alex = userDefaults // {
alex =
userDefaults
// {
extraGroups = extraGroupsWithWheel;
name = "alex";
openssh.authorizedKeys.keys = kanivanKeys ++ alexKeys;
};
loewy = userDefaults // {
loewy =
userDefaults
// {
inherit extraGroups;
name = "loewy";
openssh.authorizedKeys.keys = kanivanKeys ++ loewyKeys;
};
ben = userDefaults // {
ben =
userDefaults
// {
inherit extraGroups;
name = "ben";
openssh.authorizedKeys.keys = benKeys ++ kanivanKeys;

View File

@@ -1,4 +1,9 @@
{ inputs, config, makeEnable, ... }:
{
inputs,
config,
makeEnable,
...
}:
makeEnable config "myModules.vscode" true {
home-manager.sharedModules = [
inputs.vscode-server.homeModules.default

View File

@@ -1,4 +1,9 @@
{ config, pkgs, makeEnable, ... }:
{
config,
pkgs,
makeEnable,
...
}:
makeEnable config "myModules.waybar" false {
home-manager.sharedModules = [
{

View File

@@ -1,4 +1,10 @@
{ config, pkgs, lib, makeEnable, ... }:
{
config,
pkgs,
lib,
makeEnable,
...
}:
makeEnable config "myModules.wlsunset" true {
home-manager.sharedModules = [
{

View File

@@ -1,4 +1,10 @@
{ config, inputs, pkgs, makeEnable, ... }:
{
config,
inputs,
pkgs,
makeEnable,
...
}:
makeEnable config "myModules.wsl" false {
imports = [
inputs.nixos-wsl.nixosModules.wsl

View File

@@ -1,4 +1,9 @@
{ pkgs, config, makeEnable, ... }:
{
pkgs,
config,
makeEnable,
...
}:
makeEnable config "myModules.wyoming" false {
environment.systemPackages = with pkgs; [
alsa-utils

View File

@@ -1,5 +1,11 @@
{ config, pkgs, inputs, lib, makeEnable, ... }:
let
{
config,
pkgs,
inputs,
lib,
makeEnable,
...
}: let
session = import ./session-variables.nix;
in
makeEnable config "myModules.xmonad" true {
@@ -91,7 +97,11 @@ makeEnable config "myModules.xmonad" true {
text = ''
# Backend and basic settings
backend = "glx";
vsync = ${if config.myModules.xmonad.picom.vSync.enable then "true" else "false"};
vsync = ${
if config.myModules.xmonad.picom.vSync.enable
then "true"
else "false"
};
# Spring physics animations (mainline picom with spring-physics branch)
# Syntax: spring(stiffness, dampening, mass) or spring(stiffness, dampening, mass, clamping)
@@ -211,7 +221,6 @@ makeEnable config "myModules.xmonad" true {
transparent-clipping = false;
'';
};
}
];
}