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 }} name: ${{ vars.CACHIX_CACHE_NAME }}
skipPush: true 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) - name: Build NixOS system (strixi-minaj)
run: | run: |
set -euxo pipefail set -euxo pipefail

View File

@@ -1,9 +1,8 @@
{ pkgs, ... }: {pkgs, ...}: {
{
options = { options = {
}; };
config = { config = {
nixpkgs.config.android_sdk.accept_license = true; nixpkgs.config.android_sdk.accept_license = true;
environment.systemPackages = [ pkgs.android-tools ]; environment.systemPackages = [pkgs.android-tools];
}; };
} }

View File

@@ -1,4 +1,10 @@
{ config, pkgs, makeEnable, realUsers, ... }: {
config,
pkgs,
makeEnable,
realUsers,
...
}:
makeEnable config "myModules.base" true { makeEnable config "myModules.base" true {
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
"electron-12.2.3" "electron-12.2.3"
@@ -30,10 +36,10 @@ makeEnable config "myModules.base" true {
''; '';
networking.firewall.enable = false; networking.firewall.enable = false;
networking.nameservers = [ "8.8.8.8" "8.8.4.4" ]; networking.nameservers = ["8.8.8.8" "8.8.4.4"];
networking.networkmanager = { networking.networkmanager = {
enable = true; enable = true;
plugins = [ pkgs.networkmanager-l2tp pkgs.networkmanager-openvpn ]; plugins = [pkgs.networkmanager-l2tp pkgs.networkmanager-openvpn];
settings.main.rc-manager = "symlink"; settings.main.rc-manager = "symlink";
}; };
networking.resolvconf.enable = false; networking.resolvconf.enable = false;
@@ -52,7 +58,6 @@ makeEnable config "myModules.base" true {
pulse.enable = true; pulse.enable = true;
}; };
# Bluetooth # Bluetooth
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
services.blueman.enable = true; services.blueman.enable = true;
@@ -96,7 +101,7 @@ makeEnable config "myModules.base" true {
hardware.keyboard.zsa.enable = true; hardware.keyboard.zsa.enable = true;
# For supporting gnome stuff # For supporting gnome stuff
services.dbus.packages = [ pkgs.gcr ]; services.dbus.packages = [pkgs.gcr];
programs.dconf.enable = true; programs.dconf.enable = true;

View File

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

View File

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

View File

@@ -1,8 +1,8 @@
{ {
inputs = { inputs = {
nixos-hardware = { url = github:NixOS/nixos-hardware; }; nixos-hardware = {url = github:NixOS/nixos-hardware;};
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;
@@ -18,13 +18,13 @@
inputs.systems.follows = "systems"; inputs.systems.follows = "systems";
}; };
systems = { url = github:nix-systems/default; }; systems = {url = github:nix-systems/default;};
git-ignore-nix = { git-ignore-nix = {
url = github:hercules-ci/gitignore.nix; url = github:hercules-ci/gitignore.nix;
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixos-wsl = { url = github:nix-community/NixOS-WSL; }; nixos-wsl = {url = github:nix-community/NixOS-WSL;};
taffybar = { taffybar = {
url = "github:taffybar/taffybar"; url = "github:taffybar/taffybar";
@@ -56,13 +56,17 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixified-ai = { url = "github:nixified-ai/flake"; }; nixified-ai = {url = "github:nixified-ai/flake";};
}; };
outputs = inputs@{ outputs = inputs @ {
self, nixpkgs, nixos-hardware, home-manager, nix, ... self,
}: nixpkgs,
let nixos-hardware,
home-manager,
nix,
...
}: let
machinesPath = ../machines; machinesPath = ../machines;
machineFilenames = builtins.attrNames (builtins.readDir machinesPath); machineFilenames = builtins.attrNames (builtins.readDir machinesPath);
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename); machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
@@ -70,7 +74,7 @@
mkConfigurationParams = filename: { mkConfigurationParams = filename: {
name = machineNameFromFilename filename; name = machineNameFromFilename filename;
value = { value = {
modules = [ (machinesPath + ("/" + filename)) ]; modules = [(machinesPath + ("/" + filename))];
}; };
}; };
defaultConfigurationParams = defaultConfigurationParams =
@@ -83,31 +87,36 @@
system = "aarch64-linux"; system = "aarch64-linux";
}; };
}; };
mkConfig = mkConfig = args @ {
args@ system ? "x86_64-linux",
{ system ? "x86_64-linux" baseModules ? [],
, baseModules ? [] modules ? [],
, modules ? [] specialArgs ? {},
, specialArgs ? {} ...
, ...
}: }:
nixpkgs.lib.nixosSystem (args // { nixpkgs.lib.nixosSystem (args
// {
inherit system; inherit system;
modules = baseModules ++ modules; modules = baseModules ++ modules;
specialArgs = rec { specialArgs =
rec {
inherit inputs machineNames; inherit inputs machineNames;
makeEnable = (import ../make-enable.nix) nixpkgs.lib; makeEnable = (import ../make-enable.nix) nixpkgs.lib;
realUsers = [ "root" "imalison" "kat" "dean" "alex" "ben"]; realUsers = ["root" "imalison" "kat" "dean" "alex" "ben"];
} // specialArgs // (import ../keys.nix); }
// specialArgs // (import ../keys.nix);
}); });
in in {
{ nixosConfigurations =
nixosConfigurations = builtins.mapAttrs (machineName: params: builtins.mapAttrs (
let machineParams = machineName: params: let
machineParams =
if builtins.hasAttr machineName customParams if builtins.hasAttr machineName customParams
then (builtins.getAttr machineName customParams) then (builtins.getAttr machineName customParams)
else {}; else {};
in mkConfig (params // machineParams) in
) defaultConfigurationParams; 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 = { options = {
myModules.cache-server = { myModules.cache-server = {
enable = mkEnableOption "nix 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; # nix.settings.substituters = map (machineName: "ssh-ng://imalison@${machineName}.local") machineNames;
} }

View File

@@ -10,11 +10,16 @@
agenix.url = "github:ryantm/agenix"; 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 # Keep this minimal: NixOS flake currently doesn't use railbird-secrets, but
# Nix will still try to fetch/resolve all inputs during evaluation. # Nix will still try to fetch/resolve all inputs during evaluation.
keys = { keys = {
kanivanKeys = [ ]; kanivanKeys = [];
}; };
}; };
} }

View File

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

View File

@@ -1,6 +1,8 @@
{ config, lib, ... }: {
config,
let lib,
...
}: let
cfg = config.myModules.cua; cfg = config.myModules.cua;
flavorDefaults = { flavorDefaults = {
xfce = { xfce = {
@@ -24,8 +26,7 @@ let
}; };
selectedFlavor = flavorDefaults.${cfg.flavor}; selectedFlavor = flavorDefaults.${cfg.flavor};
usingQemu = cfg.flavor == "qemu-linux"; usingQemu = cfg.flavor == "qemu-linux";
in in {
{
options.myModules.cua = { options.myModules.cua = {
enable = lib.mkEnableOption "Cua Linux computer-use sandbox"; enable = lib.mkEnableOption "Cua Linux computer-use sandbox";
@@ -76,13 +77,13 @@ in
extraOptions = lib.mkOption { extraOptions = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
default = [ ]; default = [];
description = "Extra options passed to the Cua Android container runtime."; description = "Extra options passed to the Cua Android container runtime.";
}; };
}; };
flavor = lib.mkOption { flavor = lib.mkOption {
type = lib.types.enum [ "xfce" "kasm" "qemu-linux" ]; type = lib.types.enum ["xfce" "kasm" "qemu-linux"];
default = "xfce"; default = "xfce";
description = "Cua Linux sandbox flavor to run."; description = "Cua Linux sandbox flavor to run.";
}; };
@@ -170,7 +171,7 @@ in
extraOptions = lib.mkOption { extraOptions = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
default = [ ]; default = [];
description = "Extra options passed to the container runtime."; description = "Extra options passed to the container runtime.";
}; };
}; };
@@ -186,7 +187,8 @@ in
cua-sandbox = { cua-sandbox = {
image = cfg.image; image = cfg.image;
autoStart = cfg.autoStart; autoStart = cfg.autoStart;
ports = [ ports =
[
"${cfg.bindAddress}:${toString cfg.noVncPort}:${toString selectedFlavor.noVncContainerPort}" "${cfg.bindAddress}:${toString cfg.noVncPort}:${toString selectedFlavor.noVncContainerPort}"
"${cfg.bindAddress}:${toString cfg.apiPort}:${toString selectedFlavor.apiContainerPort}" "${cfg.bindAddress}:${toString cfg.apiPort}:${toString selectedFlavor.apiContainerPort}"
] ]
@@ -215,7 +217,7 @@ in
VNCOPTIONS = "-disableBasicAuth"; VNCOPTIONS = "-disableBasicAuth";
}; };
extraOptions = extraOptions =
lib.optionals (!usingQemu) [ "--shm-size=${cfg.shmSize}" ] lib.optionals (!usingQemu) ["--shm-size=${cfg.shmSize}"]
++ cfg.extraOptions; ++ cfg.extraOptions;
}; };
cua-android = lib.mkIf cfg.android.enable { cua-android = lib.mkIf cfg.android.enable {
@@ -238,9 +240,9 @@ in
networking.firewall.allowedTCPPorts = networking.firewall.allowedTCPPorts =
lib.optionals cfg.openFirewall ( lib.optionals cfg.openFirewall (
[ cfg.apiPort cfg.noVncPort ] [cfg.apiPort cfg.noVncPort]
++ lib.optional (cfg.flavor == "xfce" && cfg.vncPort != null) cfg.vncPort ++ lib.optional (cfg.flavor == "xfce" && cfg.vncPort != null) cfg.vncPort
) )
++ lib.optionals cfg.android.openFirewall [ cfg.android.apiPort cfg.android.webVncPort ]; ++ lib.optionals cfg.android.openFirewall [cfg.android.apiPort cfg.android.webVncPort];
}; };
} }

View File

@@ -5,8 +5,7 @@
lib, lib,
makeEnable, makeEnable,
... ...
}: }: let
let
cfg = config.myModules.desktop; cfg = config.myModules.desktop;
desktopShellUi = pkgs.writeShellApplication { desktopShellUi = pkgs.writeShellApplication {
name = "desktop_shell_ui"; name = "desktop_shell_ui";
@@ -198,11 +197,11 @@ let
); );
}; };
in in
enabledModule enabledModule
// { // {
options = lib.recursiveUpdate enabledModule.options { options = lib.recursiveUpdate enabledModule.options {
myModules.desktop.shellUi = lib.mkOption { myModules.desktop.shellUi = lib.mkOption {
type = lib.types.enum [ "noctalia" "taffybar" ]; type = lib.types.enum ["noctalia" "taffybar"];
default = "taffybar"; default = "taffybar";
description = '' description = ''
Desktop shell UI used by Hyprland-oriented bindings. This controls Desktop shell UI used by Hyprland-oriented bindings. This controls
@@ -210,4 +209,4 @@ enabledModule
''; '';
}; };
}; };
} }

View File

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

View File

@@ -1,4 +1,9 @@
{ pkgs, config, makeEnable, ... }: {
pkgs,
config,
makeEnable,
...
}:
makeEnable config "myModules.electron" false { makeEnable config "myModules.electron" false {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
element-desktop element-desktop
@@ -9,7 +14,9 @@ makeEnable config "myModules.electron" false {
zoom-us zoom-us
]; ];
home-manager.sharedModules = [ 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 = { # systemd.user.services.bitwarden = {
# Unit = { # Unit = {
# Description = "Bitwarden"; # Description = "Bitwarden";
@@ -25,6 +32,8 @@ makeEnable config "myModules.electron" false {
# RestartSec = 3; # 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), # 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. # but provide an "auto" wrapper for interactive use that selects the right GUI backend.
emacs = prev."emacs30-pgtk".override { emacs = prev."emacs30-pgtk".override {
@@ -24,14 +23,12 @@ final: prev:
pname = "emacs-auto"; pname = "emacs-auto";
version = final.emacs.version or "unknown"; version = final.emacs.version or "unknown";
dontUnpack = true; dontUnpack = true;
nativeBuildInputs = [ final.makeWrapper ]; nativeBuildInputs = [final.makeWrapper];
installPhase = installPhase = let
let
emacsWayland = final.emacs-wayland; emacsWayland = final.emacs-wayland;
emacsX11 = final.emacs-x11; emacsX11 = final.emacs-x11;
in in ''
''
mkdir -p "$out/bin" "$out/share/applications" "$out/share/icons" "$out/share/pixmaps" 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. # Ensure desktop integrations (icons) exist even though we don't install the raw emacs packages.
@@ -50,45 +47,45 @@ final: prev:
# Main launcher. # Main launcher.
cat > "$out/bin/emacs" <<'EOF_EMACS_WRAPPER' cat > "$out/bin/emacs" <<'EOF_EMACS_WRAPPER'
#!${final.runtimeShell} #!${final.runtimeShell}
set -eu set -eu
backend="''${EMACS_AUTO_BACKEND:-}" backend="''${EMACS_AUTO_BACKEND:-}"
tty=0 tty=0
for a in "$@"; do for a in "$@"; do
case "$a" in case "$a" in
-nw|--nw|--tty|--terminal|--no-window-system) tty=1 ;; -nw|--nw|--tty|--terminal|--no-window-system) tty=1 ;;
esac esac
done done
if [ "$backend" = "wayland" ] || [ "$backend" = "pgtk" ]; then if [ "$backend" = "wayland" ] || [ "$backend" = "pgtk" ]; then
exec "@out@/bin/emacs-wayland" "$@" exec "@out@/bin/emacs-wayland" "$@"
fi fi
if [ "$backend" = "x11" ]; then if [ "$backend" = "x11" ]; then
exec "@out@/bin/emacs-x11" "$@" exec "@out@/bin/emacs-x11" "$@"
fi fi
if [ "$backend" = "tty" ]; then if [ "$backend" = "tty" ]; then
exec "@emacsX11@/bin/emacs" -nw "$@" exec "@emacsX11@/bin/emacs" -nw "$@"
fi fi
if [ "$tty" -eq 1 ]; then if [ "$tty" -eq 1 ]; then
# Respect the user's explicit -nw, but still run a consistent binary. # Respect the user's explicit -nw, but still run a consistent binary.
exec "@emacsX11@/bin/emacs" "$@" exec "@emacsX11@/bin/emacs" "$@"
fi fi
# Prefer Wayland if it looks like a Wayland session. # Prefer Wayland if it looks like a Wayland session.
if [ -n "''${WAYLAND_DISPLAY:-}" ] || [ "''${XDG_SESSION_TYPE:-}" = "wayland" ] || [ -n "''${HYPRLAND_INSTANCE_SIGNATURE:-}" ]; then if [ -n "''${WAYLAND_DISPLAY:-}" ] || [ "''${XDG_SESSION_TYPE:-}" = "wayland" ] || [ -n "''${HYPRLAND_INSTANCE_SIGNATURE:-}" ]; then
exec "@out@/bin/emacs-wayland" "$@" exec "@out@/bin/emacs-wayland" "$@"
fi fi
# Otherwise, if X is available, use the X11 build. # Otherwise, if X is available, use the X11 build.
if [ -n "''${DISPLAY:-}" ] || [ "''${XDG_SESSION_TYPE:-}" = "x11" ]; then if [ -n "''${DISPLAY:-}" ] || [ "''${XDG_SESSION_TYPE:-}" = "x11" ]; then
exec "@out@/bin/emacs-x11" "$@" exec "@out@/bin/emacs-x11" "$@"
fi fi
# Headless fallback. # Headless fallback.
exec "@emacsX11@/bin/emacs" -nw "$@" exec "@emacsX11@/bin/emacs" -nw "$@"
EOF_EMACS_WRAPPER EOF_EMACS_WRAPPER
substituteInPlace "$out/bin/emacs" \ substituteInPlace "$out/bin/emacs" \
--subst-var out \ --subst-var out \
@@ -99,34 +96,34 @@ EOF_EMACS_WRAPPER
ln -s ${emacsX11}/bin/emacsclient "$out/bin/emacsclient" ln -s ${emacsX11}/bin/emacsclient "$out/bin/emacsclient"
cat > "$out/share/applications/emacs.desktop" <<'EOF' cat > "$out/share/applications/emacs.desktop" <<'EOF'
[Desktop Entry] [Desktop Entry]
Name=Emacs Name=Emacs
GenericName=Text Editor GenericName=Text Editor
Comment=Edit text Comment=Edit text
Exec=emacs %F Exec=emacs %F
TryExec=emacs TryExec=emacs
Icon=emacs Icon=emacs
Type=Application Type=Application
Terminal=false Terminal=false
Categories=Development;TextEditor; Categories=Development;TextEditor;
MimeType=text/plain; MimeType=text/plain;
StartupWMClass=Emacs StartupWMClass=Emacs
EOF EOF
cat > "$out/share/applications/emacsclient.desktop" <<'EOF' cat > "$out/share/applications/emacsclient.desktop" <<'EOF'
[Desktop Entry] [Desktop Entry]
Name=Emacs (Client) Name=Emacs (Client)
GenericName=Text Editor GenericName=Text Editor
Comment=Edit text using a running Emacs server Comment=Edit text using a running Emacs server
Exec=emacsclient -c -a emacs %F Exec=emacsclient -c -a emacs %F
TryExec=emacsclient TryExec=emacsclient
Icon=emacs Icon=emacs
Type=Application Type=Application
Terminal=false Terminal=false
Categories=Development;TextEditor; Categories=Development;TextEditor;
MimeType=text/plain; MimeType=text/plain;
StartupWMClass=Emacs StartupWMClass=Emacs
EOF EOF
''; '';
}; };
} }

View File

@@ -1,5 +1,9 @@
{ pkgs, config, specialArgs, ... }:
{ {
pkgs,
config,
specialArgs,
...
}: {
services.emacs = { services.emacs = {
enable = false; enable = false;
defaultEditor = true; 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"; libDir = "${config.dotfiles-directory}/dotfiles/lib";
machineFilenames = builtins.attrNames (builtins.readDir ./machines); machineFilenames = builtins.attrNames (builtins.readDir ./machines);
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename); machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
@@ -14,8 +20,7 @@ let
managedSshHostCasePattern = lib.concatStringsSep "|" managedSshHostPatterns; managedSshHostCasePattern = lib.concatStringsSep "|" managedSshHostPatterns;
multiplexerAliases = import ../shared/multiplexer-aliases.nix; multiplexerAliases = import ../shared/multiplexer-aliases.nix;
in in
with lib; with lib; {
{
options = { options = {
dotfiles-directory = mkOption { dotfiles-directory = mkOption {
type = types.path; type = types.path;
@@ -32,7 +37,7 @@ with lib;
}; };
ohMyZsh = { ohMyZsh = {
enable = true; enable = true;
plugins = [ "git" "sudo" "pip" ]; plugins = ["git" "sudo" "pip"];
}; };
shellInit = '' shellInit = ''
fpath=("$HOME/.lib/completions" "${libDir}/completions" $fpath) fpath=("$HOME/.lib/completions" "${libDir}/completions" $fpath)
@@ -80,11 +85,13 @@ with lib;
homeBinInPath = true; homeBinInPath = true;
localBinInPath = true; localBinInPath = true;
enableAllTerminfo = true; enableAllTerminfo = true;
shellAliases = { shellAliases =
{
df_ssh = "TERM=xterm-256color ssh -o StrictHostKeyChecking=no"; df_ssh = "TERM=xterm-256color ssh -o StrictHostKeyChecking=no";
fix_nix = "LD_LIBRARY_PATH='' nix"; fix_nix = "LD_LIBRARY_PATH='' nix";
xo = "xdg-open"; xo = "xdg-open";
} // multiplexerAliases; }
// multiplexerAliases;
variables = { variables = {
ROFI_SYSTEMD_TERM = "ghostty -e"; ROFI_SYSTEMD_TERM = "ghostty -e";
NIXPKGS_GIT_REV = "${inputs.nixpkgs.rev}"; NIXPKGS_GIT_REV = "${inputs.nixpkgs.rev}";
@@ -139,4 +146,4 @@ with lib;
''; '';
}; };
}; };
} }

View File

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

View File

@@ -531,7 +531,17 @@
hypr-workspace-history = inputs.hypr-workspace-history.packages.${system}.hypr-workspace-history; 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; hyprNStack = inputs.hyprNStack.packages.${system}.hyprNStack;
hyprexpo-lua = inputs.hyprland-plugins-lua.packages.${system}.hyprexpo; hyprexpo-lua = inputs.hyprland-plugins-lua.packages.${system}.hyprexpo;
hyprwinview = inputs.hyprwinview.packages.${system}.hyprwinview; hyprwinview = inputs.hyprwinview.packages.${system}.hyprwinview;

View File

@@ -1,4 +1,9 @@
{ pkgs, makeEnable, config, ... }: {
pkgs,
makeEnable,
config,
...
}:
makeEnable config "myModules.fonts" true { makeEnable config "myModules.fonts" true {
# Enable the gtk icon cache # Enable the gtk icon cache
gtk.iconCache.enable = true; gtk.iconCache.enable = true;
@@ -32,9 +37,9 @@ makeEnable config "myModules.fonts" true {
allowBitmaps = true; allowBitmaps = true;
useEmbeddedBitmaps = true; useEmbeddedBitmaps = true;
defaultFonts = { defaultFonts = {
monospace = [ "JetBrains Mono" ]; monospace = ["JetBrains Mono"];
sansSerif = [ "Roboto" ]; sansSerif = ["Roboto"];
serif = [ "Source Serif Pro" ]; serif = ["Source Serif Pro"];
}; };
}; };
}; };

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,8 @@
{ config, makeEnable, ... }: {
config,
makeEnable,
...
}:
makeEnable config "myModules.gnome" false { makeEnable config "myModules.gnome" false {
services.xserver = { services.xserver = {
desktopManager.gnome.enable = true; 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 { makeEnable config "myModules.home-assistant" false {
boot.kernel.sysctl = { boot.kernel.sysctl = {
# For all interfaces (e.g. if you want to accept RA on all): # For all interfaces (e.g. if you want to accept RA on all):
@@ -97,7 +104,8 @@ makeEnable config "myModules.home-assistant" false {
"yale" "yale"
"zwave_js" "zwave_js"
]; ];
extraPackages = python3Packages: with python3Packages; [ extraPackages = python3Packages:
with python3Packages; [
numpy numpy
python-matter-server python-matter-server
universal-silabs-flasher universal-silabs-flasher

View File

@@ -1,8 +1,6 @@
{ pkgs, ... }: {pkgs, ...}: let
let
session = import ./session-variables.nix; session = import ./session-variables.nix;
in in {
{
home-manager.users.imalison = { home-manager.users.imalison = {
imports = [ imports = [
./emacs.nix ./emacs.nix
@@ -145,8 +143,8 @@ in
Unit = { Unit = {
Description = "Hyprpaper (managed by home-manager)"; Description = "Hyprpaper (managed by home-manager)";
ConditionEnvironment = session.hyprland; ConditionEnvironment = session.hyprland;
PartOf = [ "hyprland-session.target" ]; PartOf = ["hyprland-session.target"];
After = [ "hyprland-session.target" ]; After = ["hyprland-session.target"];
}; };
Service = { Service = {

View File

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

View File

@@ -60,11 +60,11 @@ in {
settings = { settings = {
plugins."io.containerd.cri.v1.runtime" = { plugins."io.containerd.cri.v1.runtime" = {
enable_cdi = true; enable_cdi = true;
cdi_spec_dirs = [ "/var/run/cdi" ]; cdi_spec_dirs = ["/var/run/cdi"];
}; };
plugins."io.containerd.grpc.v1.cri" = { plugins."io.containerd.grpc.v1.cri" = {
enable_cdi = true; enable_cdi = true;
cdi_spec_dirs = [ "/var/run/cdi" ]; cdi_spec_dirs = ["/var/run/cdi"];
cni.bin_dir = "${plugins-path}/bin"; cni.bin_dir = "${plugins-path}/bin";
}; };
}; };
@@ -97,7 +97,7 @@ in {
systemd.services.mount-railbird-bucket = { systemd.services.mount-railbird-bucket = {
after = ["agenix.service"]; after = ["agenix.service"];
wantedBy = [ "multi-user.target" ]; wantedBy = ["multi-user.target"];
description = "Mount railbird bucket"; description = "Mount railbird bucket";
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";

View File

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

View File

@@ -1,5 +1,5 @@
{ ... }: { {...}: {
home-manager.sharedModules = [ home-manager.sharedModules = [
{ services.kbfs.enable = true; } {services.kbfs.enable = true;}
]; ];
} }

View File

@@ -1,4 +1,9 @@
{ config, lib, makeEnable, ... }: {
config,
lib,
makeEnable,
...
}:
makeEnable config "myModules.keyd" true { makeEnable config "myModules.keyd" true {
services.keyd = { services.keyd = {
enable = true; enable = true;
@@ -6,7 +11,7 @@ makeEnable config "myModules.keyd" true {
# Base remap applied to all keyboards. # Base remap applied to all keyboards.
keyboards.default = { keyboards.default = {
# Exclude the Glove80 (MoErgo) by vendor:product ID. # Exclude the Glove80 (MoErgo) by vendor:product ID.
ids = [ "*" "-16c0:27db" ]; ids = ["*" "-16c0:27db"];
settings = { settings = {
main = { main = {
# Caps Lock -> Control # Caps Lock -> Control
@@ -18,19 +23,19 @@ makeEnable config "myModules.keyd" true {
rightalt = "layer(hyper)"; rightalt = "layer(hyper)";
}; };
# Hyper = Ctrl+Alt+Meta while held (matches $hyper = SUPER CTRL ALT) # Hyper = Ctrl+Alt+Meta while held (matches $hyper = SUPER CTRL ALT)
"hyper:C-A-M" = { }; "hyper:C-A-M" = {};
}; };
}; };
# MoErgo Glove80: only map Right Meta/Super to Hyper. # MoErgo Glove80: only map Right Meta/Super to Hyper.
keyboards.moErgo = { keyboards.moErgo = {
ids = [ "16c0:27db" ]; ids = ["16c0:27db"];
settings = { settings = {
main = { main = {
rightmeta = "layer(hyper)"; rightmeta = "layer(hyper)";
}; };
# Hyper = Ctrl+Alt+Meta while held (matches $hyper = SUPER CTRL ALT) # Hyper = Ctrl+Alt+Meta while held (matches $hyper = SUPER CTRL ALT)
"hyper:C-A-M" = { }; "hyper:C-A-M" = {};
}; };
}; };
}; };

View File

@@ -1,4 +1,9 @@
{ config, pkgs, makeEnable, ... }: {
config,
pkgs,
makeEnable,
...
}:
makeEnable config "myModules.kubelet" false { makeEnable config "myModules.kubelet" false {
age.secrets."api_service_account_key.json.age".file = ./secrets/api_service_account_key.json.age; age.secrets."api_service_account_key.json.age".file = ./secrets/api_service_account_key.json.age;
services.kubernetes.kubelet = { services.kubernetes.kubelet = {
@@ -11,7 +16,7 @@ makeEnable config "myModules.kubelet" false {
}; };
registerNode = true; registerNode = true;
cni = { cni = {
packages = [ pkgs.cni-plugins pkgs.calico-cni-plugin ]; packages = [pkgs.cni-plugins pkgs.calico-cni-plugin];
}; };
extraOpts = '' extraOpts = ''
--fail-swap-on=false --fail-swap-on=false

View File

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

View File

@@ -1,6 +1,9 @@
{ lib, pkgs, inputs, ... }:
{ {
lib,
pkgs,
inputs,
...
}: {
imports = [ imports = [
../configuration.nix ../configuration.nix
inputs.nixos-hardware.nixosModules.dell-xps-17-9700-nvidia inputs.nixos-hardware.nixosModules.dell-xps-17-9700-nvidia
@@ -32,11 +35,11 @@
]; ];
# boot.kernelPackages = pkgs.linuxPackages_latest; # boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
services.xserver = { services.xserver = {
videoDrivers = [ "nvidia" ]; videoDrivers = ["nvidia"];
}; };
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
@@ -55,17 +58,17 @@
}; };
}; };
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/18af5b4c-69c7-41a8-865e-bc3f5269d2f9"; device = "/dev/disk/by-uuid/18af5b4c-69c7-41a8-865e-bc3f5269d2f9";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/8A9F-D7D2"; device = "/dev/disk/by-uuid/8A9F-D7D2";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [];
networking.hostName = "adell"; networking.hostName = "adell";

View File

@@ -1,5 +1,10 @@
{ lib, pkgs, config, inputs, ... }:
{ {
lib,
pkgs,
config,
inputs,
...
}: {
imports = [ imports = [
../configuration.nix ../configuration.nix
]; ];
@@ -25,7 +30,8 @@
]; ];
users.users.ben = { users.users.ben = {
extraGroups = [ extraGroups =
[
"audio" "audio"
"adbusers" "adbusers"
"disk" "disk"
@@ -36,6 +42,7 @@
"syncthing" "syncthing"
"systemd-journal" "systemd-journal"
"video" "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 = [ imports = [
../configuration.nix ../configuration.nix
../raspberry-pi.nix ../raspberry-pi.nix
@@ -151,7 +155,10 @@ in
}; };
swapDevices = [ swapDevices = [
{ device = "/swapfile"; size = 8192; } # size is in MiB {
device = "/swapfile";
size = 8192;
} # size is in MiB
]; ];
networking.hostName = "biskcomp"; networking.hostName = "biskcomp";

View File

@@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
../configuration.nix ../configuration.nix
]; ];
@@ -21,12 +24,12 @@
hardware.nvidiaOptimus.disable = true; hardware.nvidiaOptimus.disable = true;
# install nvidia drivers in addition to intel one # install nvidia drivers in addition to intel one
hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ]; hardware.opengl.extraPackages = [pkgs.linuxPackages.nvidia_x11.out];
hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ]; hardware.opengl.extraPackages32 = [pkgs.linuxPackages.nvidia_x11.lib32];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod"];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View File

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

View File

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

View File

@@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
../configuration.nix ../configuration.nix
]; ];
@@ -18,12 +21,18 @@
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = ["amdgpu"];
boot.initrd.availableKernelModules = [ 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.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
@@ -35,7 +44,7 @@
services.xserver = { services.xserver = {
enable = true; enable = true;
videoDrivers = [ "amdgpu" ]; videoDrivers = ["amdgpu"];
}; };
fileSystems."/" = { fileSystems."/" = {

View File

@@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
../configuration.nix ../configuration.nix
]; ];
@@ -84,30 +87,30 @@
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
myModules.nvidia.enable = true; myModules.nvidia.enable = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod"];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
hardware.nvidia.modesetting.enable = true; hardware.nvidia.modesetting.enable = true;
services.xserver = { services.xserver = {
videoDrivers = [ "nvidia" ]; videoDrivers = ["nvidia"];
}; };
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/30583504-9530-4095-a556-da1209ef9b63"; device = "/dev/disk/by-uuid/30583504-9530-4095-a556-da1209ef9b63";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/CE95-E46C"; device = "/dev/disk/by-uuid/CE95-E46C";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ swapDevices = [
{ device = "/dev/disk/by-uuid/598e9aa1-4940-4410-a2fa-3dfd8b7d2c0d"; } {device = "/dev/disk/by-uuid/598e9aa1-4940-4410-a2fa-3dfd8b7d2c0d";}
]; ];
home-manager.sharedModules = [ home-manager.sharedModules = [

View File

@@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
../configuration.nix ../configuration.nix
]; ];
@@ -36,8 +39,8 @@
}; };
systemd.services.otbr-agent = { systemd.services.otbr-agent = {
wants = [ "network-online.target" ]; wants = ["network-online.target"];
after = [ "network-online.target" ]; after = ["network-online.target"];
}; };
services.openthread-border-router = { services.openthread-border-router = {
@@ -60,13 +63,14 @@
services.matter-server = { services.matter-server = {
enable = true; enable = true;
logLevel = "debug"; logLevel = "debug";
extraArgs = let cert-dir = pkgs.fetchFromGitHub { extraArgs = let
cert-dir = pkgs.fetchFromGitHub {
repo = "connectedhomeip"; repo = "connectedhomeip";
owner = "project-chip"; owner = "project-chip";
rev = "6e8676be6142bb541fa68048c77f2fc56a21c7b1"; rev = "6e8676be6142bb541fa68048c77f2fc56a21c7b1";
hash = "sha256-QwPKn2R4mflTKMyr1k4xF04t0PJIlzNCOdXEiQwX5wk="; hash = "sha256-QwPKn2R4mflTKMyr1k4xF04t0PJIlzNCOdXEiQwX5wk=";
}; in };
[ in [
"--bluetooth-adapter=0" "--bluetooth-adapter=0"
"--paa-root-cert-dir=${cert-dir}/credentials/production/paa-root-certs" "--paa-root-cert-dir=${cert-dir}/credentials/production/paa-root-certs"
"--enable-test-net-dcl" "--enable-test-net-dcl"
@@ -109,7 +113,8 @@
"wyoming" "wyoming"
"yale" "yale"
]; ];
extraPackages = python3Packages: with python3Packages; [ extraPackages = python3Packages:
with python3Packages; [
numpy numpy
python-matter-server python-matter-server
universal-silabs-flasher universal-silabs-flasher
@@ -170,27 +175,27 @@
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
# Add Intel Wi-Fi firmware # Add Intel Wi-Fi firmware
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/453d28a1-26f2-4b25-ac72-c6d301fd0bb8"; device = "/dev/disk/by-uuid/453d28a1-26f2-4b25-ac72-c6d301fd0bb8";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/184E-E5E8"; device = "/dev/disk/by-uuid/184E-E5E8";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [];
networking.hostName = "justin-bieber-creek"; networking.hostName = "justin-bieber-creek";

View File

@@ -1,5 +1,10 @@
{ config, lib, pkgs, inputs, ... }:
{ {
config,
lib,
pkgs,
inputs,
...
}: {
imports = [ imports = [
../configuration.nix ../configuration.nix
]; ];
@@ -29,10 +34,10 @@
networking.hostName = "nixquick"; networking.hostName = "nixquick";
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
hardware.nvidia.modesetting.enable = true; hardware.nvidia.modesetting.enable = true;
@@ -40,21 +45,20 @@
# This also enables v4l2loopback # This also enables v4l2loopback
programs.droidcam.enable = true; programs.droidcam.enable = true;
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/64a7c1f5-727a-413c-81a2-cb108728cff6"; device = "/dev/disk/by-uuid/64a7c1f5-727a-413c-81a2-cb108728cff6";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/EE25-DC15"; device = "/dev/disk/by-uuid/EE25-DC15";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/c0dcff59-8072-48fb-b242-a7a1797e4b48"; } {device = "/dev/disk/by-uuid/c0dcff59-8072-48fb-b242-a7a1797e4b48";}
]; ];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";

View File

@@ -6,8 +6,7 @@
orgAgendaApiContainer ? null, orgAgendaApiContainer ? null,
orgAgendaApiImageName ? "localhost/org-agenda-api:colonelpanic-dbb1cb8-030a673", orgAgendaApiImageName ? "localhost/org-agenda-api:colonelpanic-dbb1cb8-030a673",
... ...
}: }: {
{
imports = [ imports = [
../configuration.nix ../configuration.nix
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
@@ -16,7 +15,7 @@
networking.hostName = "railbird-sf"; networking.hostName = "railbird-sf";
# Allow nginx to serve content synced into /var/lib/syncthing/* (owned by syncthing:syncthing, 2770 perms). # Allow nginx to serve content synced into /var/lib/syncthing/* (owned by syncthing:syncthing, 2770 perms).
users.users.nginx.extraGroups = [ "syncthing" ]; users.users.nginx.extraGroups = ["syncthing"];
# org-agenda-api hosting with nginx + Let's Encrypt # org-agenda-api hosting with nginx + Let's Encrypt
# Separate secrets for org-agenda-api: auth password (env format) and SSH key (raw file) # Separate secrets for org-agenda-api: auth password (env format) and SSH key (raw file)
@@ -38,10 +37,10 @@
}; };
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
myModules.postgres.enable = true; myModules.postgres.enable = true;
features.full.enable = true; features.full.enable = true;
@@ -100,18 +99,18 @@
# Note: you may still need router/NAT port-forwards for inbound access from the internet. # Note: you may still need router/NAT port-forwards for inbound access from the internet.
services.syncthing.openDefaultPorts = true; services.syncthing.openDefaultPorts = true;
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae"; device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/B875-39D4"; device = "/dev/disk/by-uuid/B875-39D4";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/129345f3-e1e1-4d45-9db9-643160c6d564"; } {device = "/dev/disk/by-uuid/129345f3-e1e1-4d45-9db9-643160c6d564";}
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -1,6 +1,8 @@
{ lib, pkgs, ... }:
{ {
lib,
pkgs,
...
}: {
imports = [ imports = [
../configuration.nix ../configuration.nix
]; ];
@@ -46,23 +48,23 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.luks.devices."cryptroot".device = "/dev/nvme0n1p5"; boot.initrd.luks.devices."cryptroot".device = "/dev/nvme0n1p5";
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.kernelModules = ["dm-snapshot"];
# install nvidia drivers in addition to intel one # install nvidia drivers in addition to intel one
hardware.graphics.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ]; hardware.graphics.extraPackages = [pkgs.linuxPackages.nvidia_x11.out];
hardware.graphics.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ]; hardware.graphics.extraPackages32 = [pkgs.linuxPackages.nvidia_x11.lib32];
services.xserver = { services.xserver = {
videoDrivers = [ "nvidia" ]; videoDrivers = ["nvidia"];
}; };
hardware.nvidia.modesetting.enable = true; hardware.nvidia.modesetting.enable = true;
hardware.graphics.enable32Bit = true; hardware.graphics.enable32Bit = true;
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/356173ab-d076-43e0-aeb6-6a6829c4402b"; device = "/dev/disk/by-uuid/356173ab-d076-43e0-aeb6-6a6829c4402b";
@@ -77,11 +79,11 @@
fileSystems."/shared" = { fileSystems."/shared" = {
device = "/dev/disk/by-uuid/D4009CE8009CD33A"; device = "/dev/disk/by-uuid/D4009CE8009CD33A";
fsType = "ntfs"; fsType = "ntfs";
options = [ "nofail" "uid=0" "gid=users" "umask=002" ]; options = ["nofail" "uid=0" "gid=users" "umask=002"];
}; };
swapDevices = [ swapDevices = [
{ device = "/dev/disk/by-uuid/f719b44e-295a-4909-9a60-84f87acb7f77"; } {device = "/dev/disk/by-uuid/f719b44e-295a-4909-9a60-84f87acb7f77";}
]; ];
# nix.settings.maxJobs = lib.mkDefault 16; # nix.settings.maxJobs = lib.mkDefault 16;

View File

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

View File

@@ -1,6 +1,8 @@
{ lib, pkgs, ... }:
{ {
lib,
pkgs,
...
}: {
imports = [ imports = [
../configuration.nix ../configuration.nix
../nixified.ai.nix ../nixified.ai.nix
@@ -64,14 +66,14 @@
networking.interfaces.enp5s0.useDHCP = true; networking.interfaces.enp5s0.useDHCP = true;
networking.interfaces.wlp4s0.useDHCP = true; networking.interfaces.wlp4s0.useDHCP = true;
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
hardware.nvidia.modesetting.enable = true; hardware.nvidia.modesetting.enable = true;
hardware.graphics.enable32Bit = true; hardware.graphics.enable32Bit = true;
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/9bd06145-8151-4f7b-bcfe-f1809e0db1ea"; device = "/dev/disk/by-uuid/9bd06145-8151-4f7b-bcfe-f1809e0db1ea";
@@ -86,11 +88,14 @@
fileSystems."/shared" = { fileSystems."/shared" = {
device = "/dev/disk/by-uuid/D4009CE8009CD33A"; device = "/dev/disk/by-uuid/D4009CE8009CD33A";
fsType = "ntfs"; fsType = "ntfs";
options = [ "nofail" "uid=0" "gid=users" "umask=002" ]; options = ["nofail" "uid=0" "gid=users" "umask=002"];
}; };
swapDevices = [ swapDevices = [
{ device = "/swapfile"; size = 49152; } {
device = "/swapfile";
size = 49152;
}
]; ];
# nix.settings.maxJobs = lib.mkDefault 16; # nix.settings.maxJobs = lib.mkDefault 16;

View File

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

View File

@@ -1,6 +1,10 @@
{ config, lib, pkgs, inputs, ... }:
{ {
config,
lib,
pkgs,
inputs,
...
}: {
imports = [ imports = [
../configuration.nix ../configuration.nix
inputs.nixos-hardware.nixosModules.asus-rog-strix-g834jzr inputs.nixos-hardware.nixosModules.asus-rog-strix-g834jzr
@@ -61,10 +65,10 @@
boot.kernelPackages = pkgs.linuxPackages; boot.kernelPackages = pkgs.linuxPackages;
# See https://github.com/NixOS/nixpkgs/issues/467814 for why this was needed # See https://github.com/NixOS/nixpkgs/issues/467814 for why this was needed
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = ["vmd" "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" "nvidia_modeset" ]; boot.initrd.kernelModules = ["nvidia" "nvidia_drm" "nvidia_uvm" "nvidia_modeset"];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
hardware.nvidia.powerManagement.enable = true; hardware.nvidia.powerManagement.enable = true;
# This laptop has a hardware MUX, so prefer dGPU-only mode instead of # This laptop has a hardware MUX, so prefer dGPU-only mode instead of
# PRIME sync hybrid mode to keep the compositor and displays on NVIDIA. # PRIME sync hybrid mode to keep the compositor and displays on NVIDIA.
@@ -91,8 +95,11 @@
}; };
swapDevices = [ swapDevices = [
{ device = "/dev/disk/by-uuid/27f277a0-b552-43a0-904d-625e48922bb9"; } {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"; networking.hostName = "strixi-minaj";

View File

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

View File

@@ -1,9 +1,13 @@
{ inputs, config, pkgs, specialArgs, ... }: {
let inputs,
config,
pkgs,
specialArgs,
...
}: let
system = pkgs.stdenv.hostPlatform.system; system = pkgs.stdenv.hostPlatform.system;
nixifiedAiComfyuiModule = nixifiedAiComfyuiModule = import (inputs.nixified-ai + "/flake-modules/projects/comfyui/module.nix") {
import (inputs.nixified-ai + "/flake-modules/projects/comfyui/module.nix") {
overlays = patchedNixifiedAiOverlays; overlays = patchedNixifiedAiOverlays;
}; };
@@ -13,14 +17,13 @@ let
inputs.nixified-ai.overlays.fetchers inputs.nixified-ai.overlays.fetchers
]; ];
patchedNixifiedAiComfyuiOverlay = final: prev: patchedNixifiedAiComfyuiOverlay = final: prev: let
let
upstream = inputs.nixified-ai.overlays.comfyui final prev; upstream = inputs.nixified-ai.overlays.comfyui final prev;
in in
(builtins.removeAttrs upstream [ "python3Packages" ]) // { (builtins.removeAttrs upstream ["python3Packages"])
// {
python3Packages = prev.python3Packages.overrideScope ( python3Packages = prev.python3Packages.overrideScope (
python-final: python-prev: python-final: python-prev: let
let
extraPackages = final.lib.packagesFromDirectoryRecursive { extraPackages = final.lib.packagesFromDirectoryRecursive {
inherit (python-final) callPackage; inherit (python-final) callPackage;
directory = inputs.nixified-ai + "/flake-modules/packages"; directory = inputs.nixified-ai + "/flake-modules/packages";
@@ -37,7 +40,7 @@ let
url = "https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/v23/Qwen-Rapid-AIO-NSFW-v23.safetensors"; url = "https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/v23/Qwen-Rapid-AIO-NSFW-v23.safetensors";
hash = "sha256-/bkZ/IG+pj8TdZln/JLJEYFC5ccNTmeVGZIzo17vojM="; hash = "sha256-/bkZ/IG+pj8TdZln/JLJEYFC5ccNTmeVGZIzo17vojM=";
passthru = { passthru = {
comfyui.installPaths = [ "checkpoints" ]; comfyui.installPaths = ["checkpoints"];
}; };
}; };
@@ -47,8 +50,9 @@ let
hash = "sha256-nfliiPRmygP31/qFh61TyAIbeE9C2qvcH1mmG3HEAjg="; hash = "sha256-nfliiPRmygP31/qFh61TyAIbeE9C2qvcH1mmG3HEAjg=";
}; };
qwenRapidAioWorkflow = pkgs.runCommand "qwen-rapid-aio-v23-nsfw-workflow.json" { qwenRapidAioWorkflow =
nativeBuildInputs = [ pkgs.jq ]; pkgs.runCommand "qwen-rapid-aio-v23-nsfw-workflow.json" {
nativeBuildInputs = [pkgs.jq];
src = pkgs.fetchurl { src = pkgs.fetchurl {
name = "Qwen-Rapid-AIO.json"; name = "Qwen-Rapid-AIO.json";
url = "https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/Qwen-Rapid-AIO.json"; url = "https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/Qwen-Rapid-AIO.json";
@@ -107,9 +111,13 @@ let
nixifiedComfyuiPackages = nixifiedComfyuiPkgs.comfyuiPackages; nixifiedComfyuiPackages = nixifiedComfyuiPkgs.comfyuiPackages;
patchedComfyuiPackages = nixifiedComfyuiPackages // { patchedComfyuiPackages =
nixifiedComfyuiPackages
// {
comfyui-unwrapped = nixifiedComfyuiPackages.comfyui-unwrapped.overrideAttrs (old: { comfyui-unwrapped = nixifiedComfyuiPackages.comfyui-unwrapped.overrideAttrs (old: {
postPatch = (old.postPatch or "") + '' postPatch =
(old.postPatch or "")
+ ''
cp ${qwenImageEditPlusV2Node} comfy_extras/nodes_qwen.py cp ${qwenImageEditPlusV2Node} comfy_extras/nodes_qwen.py
''; '';
}); });
@@ -119,7 +127,7 @@ let
comfyuiPackages = patchedComfyuiPackages; comfyuiPackages = patchedComfyuiPackages;
}; };
in in
specialArgs.makeEnable config "myModules.nixified-ai" false { specialArgs.makeEnable config "myModules.nixified-ai" false {
imports = [ imports = [
nixifiedAiComfyuiModule nixifiedAiComfyuiModule
]; ];
@@ -149,7 +157,7 @@ specialArgs.makeEnable config "myModules.nixified-ai" false {
url = "https://huggingface.co/andro-flock/LUSTIFY-SDXL-NSFW-checkpoint-v2-0-INPAINTING/resolve/main/lustifySDXLNSFW_v20-inpainting.safetensors"; url = "https://huggingface.co/andro-flock/LUSTIFY-SDXL-NSFW-checkpoint-v2-0-INPAINTING/resolve/main/lustifySDXLNSFW_v20-inpainting.safetensors";
hash = "sha256-YV8hBx9c6PkWQNIlJTGQTOuL+HNmGVIavuSdlKX434Q="; hash = "sha256-YV8hBx9c6PkWQNIlJTGQTOuL+HNmGVIavuSdlKX434Q=";
passthru = { passthru = {
comfyui.installPaths = [ "checkpoints" ]; comfyui.installPaths = ["checkpoints"];
}; };
}) })
]; ];
@@ -163,4 +171,4 @@ specialArgs.makeEnable config "myModules.nixified-ai" false {
install -D -m 0644 ${qwenRapidAioWorkflow} /var/lib/comfyui/.local/share/comfyui/user/default/workflows/Qwen-Rapid-AIO-v23-NSFW.json install -D -m 0644 ${qwenRapidAioWorkflow} /var/lib/comfyui/.local/share/comfyui/user/default/workflows/Qwen-Rapid-AIO-v23-NSFW.json
''}" ''}"
]; ];
} }

View File

@@ -5,8 +5,7 @@
makeEnable, makeEnable,
pkgs, pkgs,
... ...
}: }: let
let
system = pkgs.stdenv.hostPlatform.system; system = pkgs.stdenv.hostPlatform.system;
noctaliaPackage = inputs.noctalia.packages.${system}.default; noctaliaPackage = inputs.noctalia.packages.${system}.default;
waitForWayland = pkgs.writeShellScript "noctalia-wait-for-wayland" '' waitForWayland = pkgs.writeShellScript "noctalia-wait-for-wayland" ''
@@ -23,7 +22,7 @@ let
exit 1 exit 1
''; '';
in in
makeEnable config "myModules.noctalia" false { makeEnable config "myModules.noctalia" false {
environment.systemPackages = [ environment.systemPackages = [
noctaliaPackage noctaliaPackage
]; ];
@@ -34,15 +33,14 @@ makeEnable config "myModules.noctalia" false {
home-manager.sharedModules = [ home-manager.sharedModules = [
inputs.noctalia.homeModules.default inputs.noctalia.homeModules.default
({ lib, ... }: { ({lib, ...}: {
programs.noctalia-shell = { programs.noctalia-shell = {
enable = true; enable = true;
# This module provides the Hyprland-scoped service below. # This module provides the Hyprland-scoped service below.
systemd.enable = false; systemd.enable = false;
}; };
home.activation.noctaliaLauncherOverviewLayer = home.activation.noctaliaLauncherOverviewLayer = lib.hm.dag.entryAfter ["writeBoundary"] ''
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
settings_file="$HOME/.config/noctalia/settings.json" settings_file="$HOME/.config/noctalia/settings.json"
settings_tmp="$(${pkgs.coreutils}/bin/mktemp)" settings_tmp="$(${pkgs.coreutils}/bin/mktemp)"
@@ -68,8 +66,8 @@ makeEnable config "myModules.noctalia" false {
Unit = { Unit = {
Description = "Noctalia Shell"; Description = "Noctalia Shell";
Documentation = "https://docs.noctalia.dev"; Documentation = "https://docs.noctalia.dev";
PartOf = [ "hyprland-session.target" ]; PartOf = ["hyprland-session.target"];
After = [ "hyprland-session.target" ]; After = ["hyprland-session.target"];
}; };
Service = { Service = {
@@ -80,8 +78,8 @@ makeEnable config "myModules.noctalia" false {
RestartSec = 1; RestartSec = 1;
}; };
Install.WantedBy = [ "hyprland-session.target" ]; Install.WantedBy = ["hyprland-session.target"];
}; };
}) })
]; ];
} }

View File

@@ -1,15 +1,26 @@
{ config, pkgs, inputs, lib, makeEnable, ... }: {
config,
pkgs,
inputs,
lib,
makeEnable,
...
}:
makeEnable config "myModules.notifications-tray-icon" true { makeEnable config "myModules.notifications-tray-icon" true {
nixpkgs.overlays = [ nixpkgs.overlays = [
inputs.notifications-tray-icon.overlays.default inputs.notifications-tray-icon.overlays.default
(final: prev: { (final: prev: {
haskellPackages = prev.haskellPackages.override (old: { haskellPackages = prev.haskellPackages.override (old: {
overrides = final.lib.composeExtensions (old.overrides or (_: _: {})) overrides =
final.lib.composeExtensions (old.overrides or (_: _: {}))
(hself: hsuper: { (hself: hsuper: {
notifications-tray-icon = final.haskell.lib.overrideCabal notifications-tray-icon =
final.haskell.lib.overrideCabal
hsuper.notifications-tray-icon hsuper.notifications-tray-icon
(oldAttrs: { (oldAttrs: {
patches = (oldAttrs.patches or []) ++ [ patches =
(oldAttrs.patches or [])
++ [
./patches/notifications-tray-icon-gmail-oauth-detached-browser.patch ./patches/notifications-tray-icon-gmail-oauth-detached-browser.patch
]; ];
}); });
@@ -18,7 +29,7 @@ makeEnable config "myModules.notifications-tray-icon" true {
}) })
]; ];
home-manager.users.imalison = { config, ... }: let home-manager.users.imalison = {config, ...}: let
notificationsTrayIcon = pkgs.haskellPackages.notifications-tray-icon; notificationsTrayIcon = pkgs.haskellPackages.notifications-tray-icon;
gmailExecStart = pkgs.writeShellScript "notifications-tray-icon-gmail" '' gmailExecStart = pkgs.writeShellScript "notifications-tray-icon-gmail" ''
creds_file="${config.xdg.configHome}/gws/client_secret.json" creds_file="${config.xdg.configHome}/gws/client_secret.json"
@@ -37,9 +48,9 @@ makeEnable config "myModules.notifications-tray-icon" true {
mkService = description: execStart: { mkService = description: execStart: {
Unit = { Unit = {
Description = description; Description = description;
After = [ "graphical-session.target" "tray.target" ]; After = ["graphical-session.target" "tray.target"];
PartOf = [ "graphical-session.target" ]; PartOf = ["graphical-session.target"];
Requires = [ "tray.target" ]; Requires = ["tray.target"];
}; };
Service = { Service = {
ExecStart = execStart; ExecStart = execStart;
@@ -47,20 +58,23 @@ makeEnable config "myModules.notifications-tray-icon" true {
RestartSec = 3; RestartSec = 3;
}; };
Install = { Install = {
WantedBy = [ "graphical-session.target" ]; WantedBy = ["graphical-session.target"];
}; };
}; };
in { in {
systemd.user.services = { systemd.user.services = {
notifications-tray-icon-github = mkService notifications-tray-icon-github =
mkService
"GitHub notifications tray icon" "GitHub notifications tray icon"
"${notificationsTrayIcon}/bin/notifications-tray-icon github --token-pass github-token"; "${notificationsTrayIcon}/bin/notifications-tray-icon github --token-pass github-token";
notifications-tray-icon-gitea = mkService notifications-tray-icon-gitea =
mkService
"Gitea notifications tray icon" "Gitea notifications tray icon"
"${notificationsTrayIcon}/bin/notifications-tray-icon gitea --url https://dev.railbird.ai --token-pass gitea-omni-token"; "${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" "Gmail notifications tray icon"
"${gmailExecStart}"; "${gmailExecStart}";
}; };

View File

@@ -6,13 +6,13 @@ final: prev: {
# This is key: multiple outputs, so you can reference them later as: # This is key: multiple outputs, so you can reference them later as:
# $out -> for main # $out -> for main
# $tools -> for the 'tools' output in your new derivation # $tools -> for the 'tools' output in your new derivation
outputs = [ "out" "tools" ]; outputs = ["out" "tools"];
# No source required for a pure wrap # No source required for a pure wrap
src = null; src = null;
dontUnpack = true; dontUnpack = true;
dontPatchShell = true; dontPatchShell = true;
nativeBuildInputs = [ final.installShellFiles ] ++ final.lib.optionals final.stdenv.hostPlatform.isLinux [ final.makeWrapper ]; nativeBuildInputs = [final.installShellFiles] ++ final.lib.optionals final.stdenv.hostPlatform.isLinux [final.makeWrapper];
buildInputs = [ buildInputs = [
prev.nvidia-container-toolkit prev.nvidia-container-toolkit

View File

@@ -1,5 +1,10 @@
{ config, pkgs, makeEnable, lib, ... }: {
config,
pkgs,
makeEnable,
lib,
...
}:
makeEnable config "myModules.nvidia" false { makeEnable config "myModules.nvidia" false {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nvidia-container-toolkit nvidia-container-toolkit
@@ -16,10 +21,10 @@ makeEnable config "myModules.nvidia" false {
}; };
hardware.nvidia.open = true; hardware.nvidia.open = true;
hardware.graphics.enable32Bit = true; hardware.graphics.enable32Bit = true;
hardware.graphics.extraPackages = [ config.hardware.nvidia.package.out ]; hardware.graphics.extraPackages = [config.hardware.nvidia.package.out];
hardware.graphics.extraPackages32 = [ config.hardware.nvidia.package.lib32 ]; hardware.graphics.extraPackages32 = [config.hardware.nvidia.package.lib32];
services.xserver = { services.xserver = {
videoDrivers = [ "nvidia" ]; videoDrivers = ["nvidia"];
}; };
# nixpkgs.config.cudaSupport = true; # nixpkgs.config.cudaSupport = true;
} }

View File

@@ -1,4 +1,4 @@
{ lib, ... }: { {lib, ...}: {
options = { options = {
myModules.xmonad.picom.vSync.enable = lib.mkOption { myModules.xmonad.picom.vSync.enable = lib.mkOption {
default = true; default = true;

View File

@@ -1,14 +1,15 @@
# org-agenda-api-host.nix - Host org-agenda-api container with nginx + Let's Encrypt # org-agenda-api-host.nix - Host org-agenda-api container with nginx + Let's Encrypt
{ config, lib, pkgs, ... }: {
config,
with lib; lib,
pkgs,
let ...
}:
with lib; let
cfg = config.services.org-agenda-api-host; cfg = config.services.org-agenda-api-host;
# Random high port to avoid conflicts # Random high port to avoid conflicts
containerPort = 51847; containerPort = 51847;
in in {
{
options.services.org-agenda-api-host = { options.services.org-agenda-api-host = {
enable = mkEnableOption "org-agenda-api container hosting"; enable = mkEnableOption "org-agenda-api container hosting";
@@ -22,7 +23,7 @@ in
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];
description = "Additional full domain names to serve (each gets its own ACME cert)"; description = "Additional full domain names to serve (each gets its own ACME cert)";
example = [ "org-agenda-api.example.com" ]; example = ["org-agenda-api.example.com"];
}; };
acmeEmail = mkOption { acmeEmail = mkOption {
@@ -119,12 +120,13 @@ in
}; };
}; };
}; };
allDomains = [ "org-agenda-api.${cfg.domain}" ] ++ cfg.extraDomains; 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 # Open firewall for HTTP/HTTPS
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [80 443];
# Container service using podman # Container service using podman
virtualisation.oci-containers = { virtualisation.oci-containers = {
@@ -133,7 +135,7 @@ in
image = cfg.containerImage; image = cfg.containerImage;
imageFile = cfg.containerImageFile; imageFile = cfg.containerImageFile;
autoStart = true; autoStart = true;
ports = [ "127.0.0.1:${toString containerPort}:80" ]; ports = ["127.0.0.1:${toString containerPort}:80"];
environment = { environment = {
TZ = cfg.timezone; TZ = cfg.timezone;
GIT_SYNC_REPOSITORY = cfg.gitSyncRepository; GIT_SYNC_REPOSITORY = cfg.gitSyncRepository;
@@ -141,7 +143,7 @@ in
GIT_USER_NAME = cfg.gitUserName; GIT_USER_NAME = cfg.gitUserName;
AUTH_USER = cfg.authUser; AUTH_USER = cfg.authUser;
}; };
environmentFiles = [ cfg.secretsFile ]; environmentFiles = [cfg.secretsFile];
volumes = lib.optionals (cfg.sshKeyFile != null) [ volumes = lib.optionals (cfg.sshKeyFile != null) [
"${cfg.sshKeyFile}:/secrets/ssh_key:ro" "${cfg.sshKeyFile}:/secrets/ssh_key:ro"
]; ];

View File

@@ -1,12 +1,16 @@
# org-agenda-api.nix - Tangled org-config for org-agenda-api container # 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 # Path to org-config.org in the dotfiles
orgConfigOrg = ../dotfiles/emacs.d/org-config.org; orgConfigOrg = ../dotfiles/emacs.d/org-config.org;
# Tangle org-config.org to produce elisp files # Tangle org-config.org to produce elisp files
orgAgendaCustomConfig = pkgs.runCommand "org-agenda-custom-config" { orgAgendaCustomConfig =
buildInputs = [ pkgs.emacs-nox ]; pkgs.runCommand "org-agenda-custom-config" {
buildInputs = [pkgs.emacs-nox];
} '' } ''
mkdir -p $out mkdir -p $out
mkdir -p work mkdir -p work
@@ -28,7 +32,6 @@ let
fi fi
done done
''; '';
in { in {
org-agenda-custom-config = orgAgendaCustomConfig; org-agenda-custom-config = orgAgendaCustomConfig;
} }

View File

@@ -7,29 +7,25 @@
nodejs, nodejs,
makeWrapper, makeWrapper,
}: }:
stdenv.mkDerivation ( stdenv.mkDerivation (
finalAttrs: finalAttrs: let
let
toolArchiveSuffix = toolArchiveSuffix =
if stdenv.hostPlatform.isLinux then if stdenv.hostPlatform.isLinux
if stdenv.hostPlatform.isAarch64 then then
"arm64-linux" if stdenv.hostPlatform.isAarch64
else if stdenv.hostPlatform.isx86_64 then then "arm64-linux"
"x64-linux" else if stdenv.hostPlatform.isx86_64
else then "x64-linux"
throw "Unsupported Linux architecture for happy-coder: ${stdenv.hostPlatform.system}" else throw "Unsupported Linux architecture for happy-coder: ${stdenv.hostPlatform.system}"
else if stdenv.hostPlatform.isDarwin then else if stdenv.hostPlatform.isDarwin
if stdenv.hostPlatform.isAarch64 then then
"arm64-darwin" if stdenv.hostPlatform.isAarch64
else if stdenv.hostPlatform.isx86_64 then then "arm64-darwin"
"x64-darwin" else if stdenv.hostPlatform.isx86_64
else then "x64-darwin"
throw "Unsupported Darwin architecture for happy-coder: ${stdenv.hostPlatform.system}" else throw "Unsupported Darwin architecture for happy-coder: ${stdenv.hostPlatform.system}"
else else throw "Unsupported platform for happy-coder: ${stdenv.hostPlatform.system}";
throw "Unsupported platform for happy-coder: ${stdenv.hostPlatform.system}"; in {
in
{
pname = "happy-coder"; pname = "happy-coder";
version = "0.11.2-unstable-2026-03-26"; version = "0.11.2-unstable-2026-03-26";
@@ -112,7 +108,7 @@ stdenv.mkDerivation (
description = "Mobile and web client wrapper for Claude Code and Codex with end-to-end encryption"; description = "Mobile and web client wrapper for Claude Code and Codex with end-to-end encryption";
homepage = "https://github.com/slopus/happy"; homepage = "https://github.com/slopus/happy";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ onsails ]; maintainers = with lib.maintainers; [onsails];
mainProgram = "happy"; mainProgram = "happy";
}; };
} }

View File

@@ -3,19 +3,17 @@
python3, python3,
python3Packages, python3Packages,
writeShellApplication, writeShellApplication,
}: }: let
let
pykefcontrol = python3Packages.callPackage ../pykefcontrol {}; pykefcontrol = python3Packages.callPackage ../pykefcontrol {};
python = python3.withPackages (ps: [ python = python3.withPackages (ps: [
pykefcontrol pykefcontrol
ps.zeroconf ps.zeroconf
]); ]);
in in
writeShellApplication { writeShellApplication {
name = "kef"; name = "kef";
runtimeInputs = [ python ]; runtimeInputs = [python];
text = '' text = ''
exec python ${./kef.py} "$@" exec python ${./kef.py} "$@"
@@ -24,7 +22,7 @@ writeShellApplication {
meta = { meta = {
description = "Command-line controller for KEF W2 speakers"; description = "Command-line controller for KEF W2 speakers";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ imalison ]; maintainers = with lib.maintainers; [imalison];
mainProgram = "kef"; mainProgram = "kef";
}; };
} }

View File

@@ -7,7 +7,6 @@
versionCheckHook, versionCheckHook,
writeShellScript, writeShellScript,
}: }:
buildNpmPackage (finalAttrs: { buildNpmPackage (finalAttrs: {
pname = "playwright-cli"; pname = "playwright-cli";
version = "0.1.1"; version = "0.1.1";
@@ -26,7 +25,7 @@ buildNpmPackage (finalAttrs: {
# playwright-cli imports playwright/lib/cli/client/program, which current # playwright-cli imports playwright/lib/cli/client/program, which current
# nixpkgs playwright-test does not export, so keep the vendored Playwright # nixpkgs playwright-test does not export, so keep the vendored Playwright
# until nixpkgs Playwright is updated to a compatible version. # until nixpkgs Playwright is updated to a compatible version.
nativeBuildInputs = [ makeBinaryWrapper ]; nativeBuildInputs = [makeBinaryWrapper];
postFixup = '' postFixup = ''
wrapProgram $out/bin/playwright-cli \ wrapProgram $out/bin/playwright-cli \
@@ -34,7 +33,7 @@ buildNpmPackage (finalAttrs: {
''; '';
doInstallCheck = true; doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ]; nativeInstallCheckInputs = [versionCheckHook];
versionCheckProgram = writeShellScript "version-check" '' versionCheckProgram = writeShellScript "version-check" ''
"$1" --version >/dev/null "$1" --version >/dev/null
echo "${finalAttrs.version}" echo "${finalAttrs.version}"
@@ -46,7 +45,7 @@ buildNpmPackage (finalAttrs: {
homepage = "https://github.com/microsoft/playwright-cli"; homepage = "https://github.com/microsoft/playwright-cli";
changelog = "https://github.com/microsoft/playwright-cli/releases/tag/v${finalAttrs.version}"; changelog = "https://github.com/microsoft/playwright-cli/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20; license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ imalison ]; maintainers = with lib.maintainers; [imalison];
mainProgram = "playwright-cli"; mainProgram = "playwright-cli";
}; };
}) })

View File

@@ -6,7 +6,6 @@
aiohttp, aiohttp,
requests, requests,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pykefcontrol"; pname = "pykefcontrol";
version = "0.9.2"; version = "0.9.2";
@@ -26,12 +25,12 @@ buildPythonPackage rec {
requests requests
]; ];
pythonImportsCheck = [ "pykefcontrol" ]; pythonImportsCheck = ["pykefcontrol"];
meta = { meta = {
description = "Python library for controlling KEF LS50WII, LSX II, and LS60 speakers"; description = "Python library for controlling KEF LS50WII, LSX II, and LS60 speakers";
homepage = "https://github.com/N0ciple/pykefcontrol"; homepage = "https://github.com/N0ciple/pykefcontrol";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ imalison ]; maintainers = with lib.maintainers; [imalison];
}; };
} }

View File

@@ -2,19 +2,17 @@
lib, lib,
python3, python3,
writeShellApplication, writeShellApplication,
}: }: let
let
python = python3.withPackages (ps: [ python = python3.withPackages (ps: [
ps.python-roborock ps.python-roborock
ps.pyshark ps.pyshark
ps.pyyaml ps.pyyaml
]); ]);
in in
writeShellApplication { writeShellApplication {
name = "roborock-control"; name = "roborock-control";
runtimeInputs = [ python ]; runtimeInputs = [python];
text = '' text = ''
export ROBOROCK_CONTROL_RUNNER=direct export ROBOROCK_CONTROL_RUNNER=direct
@@ -24,7 +22,7 @@ writeShellApplication {
meta = { meta = {
description = "Command-line controller for Roborock vacuums"; description = "Command-line controller for Roborock vacuums";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ imalison ]; maintainers = with lib.maintainers; [imalison];
mainProgram = "roborock-control"; mainProgram = "roborock-control";
}; };
} }

View File

@@ -9,10 +9,8 @@
electron_40, electron_40,
nodejs, nodejs,
}: }:
stdenv.mkDerivation ( stdenv.mkDerivation (
finalAttrs: finalAttrs: let
let
electron = electron_40; electron = electron_40;
nodeModules = stdenvNoCC.mkDerivation { nodeModules = stdenvNoCC.mkDerivation {
pname = "${finalAttrs.pname}-node_modules"; pname = "${finalAttrs.pname}-node_modules";
@@ -81,8 +79,7 @@ stdenv.mkDerivation (
outputHash = "sha256-yrzdhw+NPYZku10piHoxMy+TUJ8MYySZorMOMOztJY4="; outputHash = "sha256-yrzdhw+NPYZku10piHoxMy+TUJ8MYySZorMOMOztJY4=";
outputHashMode = "recursive"; outputHashMode = "recursive";
}; };
in in {
{
pname = "t3code"; pname = "t3code";
version = "0.0.15"; version = "0.0.15";
strictDeps = true; strictDeps = true;
@@ -129,7 +126,8 @@ stdenv.mkDerivation (
--replace-fail 'host: "localhost"' 'host: "127.0.0.1"' --replace-fail 'host: "localhost"' 'host: "127.0.0.1"'
''; '';
nativeBuildInputs = [ nativeBuildInputs =
[
buildPackages.bun buildPackages.bun
buildPackages.copyDesktopItems buildPackages.copyDesktopItems
buildPackages.installShellFiles buildPackages.installShellFiles
@@ -138,12 +136,13 @@ stdenv.mkDerivation (
buildPackages.nodejs buildPackages.nodejs
buildPackages.python3 buildPackages.python3
buildPackages.writableTmpDirAsHomeHook buildPackages.writableTmpDirAsHomeHook
] ++ lib.optionals stdenv.buildPlatform.isDarwin [ ]
++ lib.optionals stdenv.buildPlatform.isDarwin [
buildPackages.cctools.libtool buildPackages.cctools.libtool
buildPackages.xcbuild buildPackages.xcbuild
]; ];
nativeInstallCheckInputs = [ buildPackages.versionCheckHook ]; nativeInstallCheckInputs = [buildPackages.versionCheckHook];
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
configurePhase = '' configurePhase = ''
@@ -221,7 +220,7 @@ stdenv.mkDerivation (
terminal = false; terminal = false;
icon = "t3code"; icon = "t3code";
startupWMClass = "T3 Code"; startupWMClass = "T3 Code";
categories = [ "Development" ]; categories = ["Development"];
}) })
]; ];

View File

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

View File

@@ -1,23 +1,31 @@
{ pkgs, config, makeEnable, realUsers, ... }: {
pkgs,
config,
makeEnable,
realUsers,
...
}:
makeEnable config "myModules.postgres" true { makeEnable config "myModules.postgres" true {
services.postgresql = { services.postgresql = {
enable = true; enable = true;
package = pkgs.postgresql_15; package = pkgs.postgresql_15;
ensureDatabases = [ "railbird" "public" ]; ensureDatabases = ["railbird" "public"];
authentication = pkgs.lib.mkOverride 10 '' authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser CIDR-ADDRESS auth-method #type database DBuser CIDR-ADDRESS auth-method
local all all trust local all all trust
host all all 0.0.0.0/0 trust host all all 0.0.0.0/0 trust
host all all ::1/128 trust host all all ::1/128 trust
''; '';
ensureUsers = map (username: { ensureUsers =
map (username: {
name = username; name = username;
ensureClauses = { ensureClauses = {
superuser = true; superuser = true;
createrole = true; createrole = true;
createdb = true; createdb = true;
}; };
}) realUsers; })
realUsers;
# initialScript = pkgs.writeText "init-sql-script" '' # initialScript = pkgs.writeText "init-sql-script" ''
# CREATE DATABASE IF NOT EXISTS railbird; # CREATE DATABASE IF NOT EXISTS railbird;
# \c railbird # \c railbird
@@ -27,6 +35,6 @@ makeEnable config "myModules.postgres" true {
services.pgadmin = { services.pgadmin = {
enable = false; enable = false;
initialEmail = "IvanMalison@gmail.com"; 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 { makeEnable config "myModules.quickshell" false {
home-manager.sharedModules = [ home-manager.sharedModules = [
inputs.caelestia-shell.homeManagerModules.default inputs.caelestia-shell.homeManagerModules.default
({ lib, nixos, pkgs, ... }: ({
let lib,
nixos,
pkgs,
...
}: let
hyprlandEnabled = lib.attrByPath ["myModules" "hyprland" "enable"] false nixos.config; hyprlandEnabled = lib.attrByPath ["myModules" "hyprland" "enable"] false nixos.config;
system = pkgs.stdenv.hostPlatform.system; system = pkgs.stdenv.hostPlatform.system;
quickshellBase = inputs.caelestia-shell.inputs.quickshell.packages.${system}.default.override { quickshellBase = inputs.caelestia-shell.inputs.quickshell.packages.${system}.default.override {
@@ -16,12 +26,12 @@ makeEnable config "myModules.quickshell" false {
quickshellUnwrapped = quickshellBase.unwrapped.overrideAttrs (old: { quickshellUnwrapped = quickshellBase.unwrapped.overrideAttrs (old: {
# Clang then needs PCH disabled because quickshell's PipeWire target # Clang then needs PCH disabled because quickshell's PipeWire target
# adds compile flags that do not match the shared PCH target. # adds compile flags that do not match the shared PCH target.
cmakeFlags = (old.cmakeFlags or []) ++ [ (lib.cmakeBool "NO_PCH" true) ]; cmakeFlags = (old.cmakeFlags or []) ++ [(lib.cmakeBool "NO_PCH" true)];
}); });
quickshellPackage = quickshellUnwrapped.stdenv.mkDerivation { quickshellPackage = quickshellUnwrapped.stdenv.mkDerivation {
inherit (quickshellUnwrapped) version meta buildInputs; inherit (quickshellUnwrapped) version meta buildInputs;
pname = "${quickshellUnwrapped.pname}-wrapped"; pname = "${quickshellUnwrapped.pname}-wrapped";
nativeBuildInputs = quickshellUnwrapped.nativeBuildInputs ++ [ pkgs.qt6.wrapQtAppsHook ]; nativeBuildInputs = quickshellUnwrapped.nativeBuildInputs ++ [pkgs.qt6.wrapQtAppsHook];
dontUnpack = true; dontUnpack = true;
dontConfigure = true; dontConfigure = true;
dontBuild = true; dontBuild = true;
@@ -36,8 +46,7 @@ makeEnable config "myModules.quickshell" false {
app2unit = pkgs.app2unit; app2unit = pkgs.app2unit;
quickshell = quickshellPackage; quickshell = quickshellPackage;
}; };
in in {
{
programs.caelestia = { programs.caelestia = {
enable = true; enable = true;
package = caelestiaPackage; package = caelestiaPackage;

View File

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

View File

@@ -1,12 +1,17 @@
{ config, pkgs, inputs, makeEnable, ... }: {
config,
pkgs,
inputs,
makeEnable,
...
}:
makeEnable config "myModules.raspberry-pi" false { makeEnable config "myModules.raspberry-pi" false {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-4 inputs.nixos-hardware.nixosModules.raspberry-pi-4
]; ];
# These are needed to allow hardware acceleration again # These are needed to allow hardware acceleration again
# https://github.com/NixOS/nixos-hardware/issues/631 # https://github.com/NixOS/nixos-hardware/issues/631
boot.kernelParams = [ "kunit.enable=0" ]; boot.kernelParams = ["kunit.enable=0"];
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb"; hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
hardware.raspberry-pi."4".fkms-3d.enable = true; hardware.raspberry-pi."4".fkms-3d.enable = true;
# hardware.raspberry-pi."4".audio.enable = true; # hardware.raspberry-pi."4".audio.enable = true;
@@ -29,7 +34,7 @@ makeEnable config "myModules.raspberry-pi" false {
}; };
}; };
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;

View File

@@ -1,5 +1,10 @@
{ config, lib, pkgs, makeEnable, ... }: {
let config,
lib,
pkgs,
makeEnable,
...
}: let
cfg = config.myModules.remote-hyprland; cfg = config.myModules.remote-hyprland;
hyprlandPackage = config.programs.hyprland.package; hyprlandPackage = config.programs.hyprland.package;
geometry = "${toString cfg.width}x${toString cfg.height}@${toString cfg.refreshRate}"; geometry = "${toString cfg.width}x${toString cfg.height}@${toString cfg.refreshRate}";
@@ -33,8 +38,8 @@ let
if [ -n "$instance" ]; then if [ -n "$instance" ]; then
read -r _ HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY <<EOF read -r _ HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY <<EOF
$instance $instance
EOF EOF
export HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY export HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY
break break
fi fi
@@ -144,7 +149,7 @@ EOF
]; ];
autostartInstall = lib.optionalAttrs cfg.autoStart { autostartInstall = lib.optionalAttrs cfg.autoStart {
Install = { Install = {
WantedBy = [ "default.target" ]; WantedBy = ["default.target"];
}; };
}; };
enabledModule = makeEnable config "myModules.remote-hyprland" false { enabledModule = makeEnable config "myModules.remote-hyprland" false {
@@ -158,14 +163,15 @@ EOF
users.manageLingering = true; users.manageLingering = true;
users.users.${cfg.user}.linger = true; users.users.${cfg.user}.linger = true;
environment.systemPackages = [ pkgs.wayvnc ]; environment.systemPackages = [pkgs.wayvnc];
home-manager.users.${cfg.user} = { home-manager.users.${cfg.user} = {
systemd.user.services = { systemd.user.services = {
remote-hyprland = { remote-hyprland =
{
Unit = { Unit = {
Description = "Headless Hyprland session for remote VNC access"; Description = "Headless Hyprland session for remote VNC access";
After = [ "default.target" ]; After = ["default.target"];
}; };
Service = { Service = {
ExecStart = "${hyprlandPackage}/bin/start-hyprland --path ${hyprlandPackage}/bin/Hyprland -- --config ${remoteHyprlandConfig}"; ExecStart = "${hyprlandPackage}/bin/start-hyprland --path ${hyprlandPackage}/bin/Hyprland -- --config ${remoteHyprlandConfig}";
@@ -179,14 +185,16 @@ EOF
"PATH=${servicePath}" "PATH=${servicePath}"
]; ];
}; };
} // autostartInstall; }
// autostartInstall;
remote-hyprland-wayvnc = { remote-hyprland-wayvnc =
{
Unit = { Unit = {
Description = "VNC server for the headless Hyprland session"; Description = "VNC server for the headless Hyprland session";
After = [ "remote-hyprland.service" ]; After = ["remote-hyprland.service"];
Requires = [ "remote-hyprland.service" ]; Requires = ["remote-hyprland.service"];
PartOf = [ "remote-hyprland.service" ]; PartOf = ["remote-hyprland.service"];
}; };
Service = { Service = {
ExecStart = "${remoteHyprlandStartVnc}"; ExecStart = "${remoteHyprlandStartVnc}";
@@ -200,12 +208,14 @@ EOF
"PATH=${servicePath}" "PATH=${servicePath}"
]; ];
}; };
} // autostartInstall; }
// autostartInstall;
}; };
}; };
}; };
in in
enabledModule // { enabledModule
// {
options = lib.recursiveUpdate enabledModule.options { options = lib.recursiveUpdate enabledModule.options {
myModules.remote-hyprland = { myModules.remote-hyprland = {
user = lib.mkOption { user = lib.mkOption {
@@ -273,4 +283,4 @@ enabledModule // {
}; };
}; };
}; };
} }

View File

@@ -1,29 +1,36 @@
{ config, inputs, lib, pkgs, makeEnable, ... }: {
let config,
inputs,
lib,
pkgs,
makeEnable,
...
}: let
system = pkgs.stdenv.hostPlatform.system; system = pkgs.stdenv.hostPlatform.system;
kanshiSniPackage = kanshiSniPackage = inputs.kanshi-sni.packages.${system}.default.overrideAttrs (old: {
inputs.kanshi-sni.packages.${system}.default.overrideAttrs (old: { patches =
patches = (old.patches or [ ]) ++ [ (old.patches or [])
++ [
./patches/kanshi-sni-refresh-and-reconnect.patch ./patches/kanshi-sni-refresh-and-reconnect.patch
./patches/kanshi-sni-keep-menu-root-alive.patch ./patches/kanshi-sni-keep-menu-root-alive.patch
]; ];
}); });
in in
makeEnable config "myModules.sni" true { makeEnable config "myModules.sni" true {
systemd.user.services.blueman-applet.serviceConfig.ExecStart = lib.mkForce [ systemd.user.services.blueman-applet.serviceConfig.ExecStart = lib.mkForce [
"" ""
"${pkgs.blueman}/bin/blueman-applet" "${pkgs.blueman}/bin/blueman-applet"
]; ];
home-manager.sharedModules = [ home-manager.sharedModules = [
({ lib, ... }: { ({lib, ...}: {
systemd.user.services.kanshi-sni = { systemd.user.services.kanshi-sni = {
Unit = { Unit = {
Description = "kanshi-sni tray app"; Description = "kanshi-sni tray app";
After = [ "graphical-session.target" "tray.target" "kanshi.service" ]; After = ["graphical-session.target" "tray.target" "kanshi.service"];
PartOf = [ "graphical-session.target" "kanshi.service" ]; PartOf = ["graphical-session.target" "kanshi.service"];
Requires = [ "tray.target" ]; Requires = ["tray.target"];
Wants = [ "kanshi.service" ]; Wants = ["kanshi.service"];
}; };
Service = { Service = {
ExecStart = "${kanshiSniPackage}/bin/kanshi-sni"; ExecStart = "${kanshiSniPackage}/bin/kanshi-sni";
@@ -31,7 +38,7 @@ makeEnable config "myModules.sni" true {
RestartSec = 3; RestartSec = 3;
}; };
Install = { Install = {
WantedBy = [ "graphical-session.target" ]; WantedBy = ["graphical-session.target"];
}; };
}; };
@@ -40,8 +47,7 @@ makeEnable config "myModules.sni" true {
indicator = true; indicator = true;
}; };
home.activation.disableKdeConnectBluetooth = home.activation.disableKdeConnectBluetooth = lib.hm.dag.entryAfter ["writeBoundary"] ''
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 \ ${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 \
--file kdeconnect/config \ --file kdeconnect/config \
--group General \ --group General \
@@ -68,4 +74,4 @@ makeEnable config "myModules.sni" true {
services.flameshot.enable = true; services.flameshot.enable = true;
}) })
]; ];
} }

View File

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

View File

@@ -2,12 +2,11 @@
makeEnable, makeEnable,
config, config,
... ...
}: }: let
let
shared = import ../nix-shared/syncthing.nix; shared = import ../nix-shared/syncthing.nix;
inherit (shared) devices allDevices; inherit (shared) devices allDevices;
in in
makeEnable config "myModules.syncthing" true { makeEnable config "myModules.syncthing" true {
system.activationScripts.syncthingPermissions = { system.activationScripts.syncthingPermissions = {
text = '' text = ''
mkdir -p /var/lib/syncthing/sync mkdir -p /var/lib/syncthing/sync
@@ -47,4 +46,4 @@ makeEnable config "myModules.syncthing" true {
}; };
}; };
}; };
} }

View File

@@ -250,4 +250,4 @@ in
}; };
}) })
]; ];
} }

View File

@@ -1,11 +1,17 @@
{ config, lib, pkgs, makeEnable, ... }: {
config,
lib,
pkgs,
makeEnable,
...
}:
makeEnable config "myModules.tailscale" true { makeEnable config "myModules.tailscale" true {
# Provide stable SSH connectivity between your machines without needing port # Provide stable SSH connectivity between your machines without needing port
# forwarding (works behind NAT/CGNAT). # forwarding (works behind NAT/CGNAT).
services.tailscale.enable = true; services.tailscale.enable = true;
# Handy even if you only enable the service and run `tailscale up` manually. # Handy even if you only enable the service and run `tailscale up` manually.
environment.systemPackages = [ pkgs.tailscale ]; environment.systemPackages = [pkgs.tailscale];
# Optional: unattended enrollment using a pre-auth key stored in agenix. # Optional: unattended enrollment using a pre-auth key stored in agenix.
# #
@@ -27,9 +33,9 @@ makeEnable config "myModules.tailscale" true {
systemd.services.tailscale-autoconnect = { systemd.services.tailscale-autoconnect = {
description = "Auto-connect Tailscale (optional, via agenix auth key)"; description = "Auto-connect Tailscale (optional, via agenix auth key)";
wantedBy = [ "multi-user.target" ]; wantedBy = ["multi-user.target"];
after = [ "network-online.target" "tailscaled.service" ]; after = ["network-online.target" "tailscaled.service"];
wants = [ "network-online.target" "tailscaled.service" ]; wants = ["network-online.target" "tailscaled.service"];
unitConfig = { unitConfig = {
ConditionPathExists = config.age.secrets.tailscale-authkey.path; ConditionPathExists = config.age.secrets.tailscale-authkey.path;

View File

@@ -1,12 +1,16 @@
{ config, makeEnable, ... }: {
config,
makeEnable,
...
}:
makeEnable config "myModules.tts" false { makeEnable config "myModules.tts" false {
services.tts.servers.coqui = { services.tts.servers.coqui = {
enable = true; enable = true;
useCuda = false; useCuda = false;
port = 11115; port = 11115;
model = "tts_models/en/vctk/vits"; model = "tts_models/en/vctk/vits";
extraArgs = [ "--speaker_idx" "p376" ]; extraArgs = ["--speaker_idx" "p376"];
}; };
systemd.services.tts-coqui.wants = [ "network-online.target" ]; systemd.services.tts-coqui.wants = ["network-online.target"];
} }

View File

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

View File

@@ -1,7 +1,12 @@
{ inputs, config, makeEnable, ... }: {
inputs,
config,
makeEnable,
...
}:
makeEnable config "myModules.vscode" true { makeEnable config "myModules.vscode" true {
home-manager.sharedModules = [ home-manager.sharedModules = [
inputs.vscode-server.homeModules.default inputs.vscode-server.homeModules.default
{ services.vscode-server.enable = true; } {services.vscode-server.enable = true;}
]; ];
} }

View File

@@ -1,4 +1,9 @@
{ config, pkgs, makeEnable, ... }: {
config,
pkgs,
makeEnable,
...
}:
makeEnable config "myModules.waybar" false { makeEnable config "myModules.waybar" false {
home-manager.sharedModules = [ home-manager.sharedModules = [
{ {
@@ -7,9 +12,9 @@ makeEnable config "myModules.waybar" false {
systemd.user.services.waybar = { systemd.user.services.waybar = {
Unit = { Unit = {
Description = "Waybar"; Description = "Waybar";
PartOf = [ "wayland-session@Hyprland.target" "tray.target" ]; PartOf = ["wayland-session@Hyprland.target" "tray.target"];
After = [ "wayland-session@Hyprland.target" "tray.target" ]; After = ["wayland-session@Hyprland.target" "tray.target"];
Wants = [ "tray.target" ]; Wants = ["tray.target"];
}; };
Service = { Service = {
ExecStartPre = "${pkgs.bash}/bin/bash -lc 'uid=$(id -u); runtime_dir=\"$XDG_RUNTIME_DIR\"; if [ -z \"$runtime_dir\" ]; then runtime_dir=\"/run/user/$uid\"; fi; for i in $(seq 1 50); do if [ -n \"$WAYLAND_DISPLAY\" ] && [ -S \"$runtime_dir/$WAYLAND_DISPLAY\" ]; then found=1; break; fi; sleep 0.1; done; if [ -z \"$found\" ]; then exit 1; fi; \"$HOME/.config/waybar/scripts/render-config\"'"; ExecStartPre = "${pkgs.bash}/bin/bash -lc 'uid=$(id -u); runtime_dir=\"$XDG_RUNTIME_DIR\"; if [ -z \"$runtime_dir\" ]; then runtime_dir=\"/run/user/$uid\"; fi; for i in $(seq 1 50); do if [ -n \"$WAYLAND_DISPLAY\" ] && [ -S \"$runtime_dir/$WAYLAND_DISPLAY\" ]; then found=1; break; fi; sleep 0.1; done; if [ -z \"$found\" ]; then exit 1; fi; \"$HOME/.config/waybar/scripts/render-config\"'";
@@ -18,7 +23,7 @@ makeEnable config "myModules.waybar" false {
RestartSec = 1; RestartSec = 1;
}; };
Install = { Install = {
WantedBy = [ "wayland-session@Hyprland.target" ]; WantedBy = ["wayland-session@Hyprland.target"];
}; };
}; };
} }

View File

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

View File

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

View File

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

View File

@@ -1,8 +1,14 @@
{ config, pkgs, inputs, lib, makeEnable, ... }: {
let config,
pkgs,
inputs,
lib,
makeEnable,
...
}: let
session = import ./session-variables.nix; session = import ./session-variables.nix;
in in
makeEnable config "myModules.xmonad" true { makeEnable config "myModules.xmonad" true {
myModules.taffybar.enable = lib.mkDefault (config.myModules.desktop.shellUi == "taffybar"); myModules.taffybar.enable = lib.mkDefault (config.myModules.desktop.shellUi == "taffybar");
nixpkgs.overlays = with inputs; [ nixpkgs.overlays = with inputs; [
@@ -67,8 +73,8 @@ makeEnable config "myModules.xmonad" true {
Unit = { Unit = {
Description = "Picom X11 compositor"; Description = "Picom X11 compositor";
ConditionEnvironment = session.x11; ConditionEnvironment = session.x11;
After = [ "graphical-session.target" ]; After = ["graphical-session.target"];
PartOf = [ "graphical-session.target" ]; PartOf = ["graphical-session.target"];
}; };
Service = { Service = {
# Debug logging to file for monitoring # Debug logging to file for monitoring
@@ -77,7 +83,7 @@ makeEnable config "myModules.xmonad" true {
RestartSec = 3; RestartSec = 3;
}; };
Install = { Install = {
WantedBy = [ "graphical-session.target" ]; WantedBy = ["graphical-session.target"];
}; };
}; };
@@ -91,7 +97,11 @@ makeEnable config "myModules.xmonad" true {
text = '' text = ''
# Backend and basic settings # Backend and basic settings
backend = "glx"; 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) # Spring physics animations (mainline picom with spring-physics branch)
# Syntax: spring(stiffness, dampening, mass) or spring(stiffness, dampening, mass, clamping) # Syntax: spring(stiffness, dampening, mass) or spring(stiffness, dampening, mass, clamping)
@@ -211,7 +221,6 @@ makeEnable config "myModules.xmonad" true {
transparent-clipping = false; transparent-clipping = false;
''; '';
}; };
} }
]; ];
} }