Nix configurations for my personal machines (Linux & macOS)

Compare changes

Choose any two refs to compare.

-105
darwin/shimmer/configuration.nix
···
-
{
-
config,
-
lib,
-
inputs,
-
pkgs,
-
...
-
}: {
-
imports = [./homebrew.nix ./wm.nix ../../modules/nixpkgs.nix];
-
-
nixpkgs.hostPlatform = "aarch64-darwin";
-
-
# Nix setup
-
nix.distributedBuilds = true;
-
-
nix.gc = {
-
automatic = true;
-
options = "--delete-older-than 7d";
-
interval.Weekday = 6;
-
};
-
-
nix.optimise.automatic = true;
-
-
nix.settings = {
-
builders-use-substitutes = true;
-
experimental-features = "nix-command flakes";
-
trusted-users = ["root" "ovy"];
-
};
-
-
environment.systemPackages = with pkgs; [
-
ffmpeg-full
-
git
-
imagemagick
-
nil
-
obsidian
-
openssh
-
wget
-
# TODO: the Xcode packages makes us manually download and put it into the Nix store
-
# but it seems to contain no reference to our actual result so I don't think `systemPackages`
-
# picks it up properly. Need to see how `requireFile` works and how `systemPackages`
-
# works under the hood.
-
# darwin.xcode_14_1
-
];
-
-
programs.bash.enable = true;
-
programs.zsh.enable = true;
-
programs.fish.enable = true;
-
-
# Fix problem in nix-darwin relating to $PATH order in fish.
-
# https://github.com/LnL7/nix-darwin/issues/122#issuecomment-1659465635
-
programs.fish.loginShellInit = let
-
dquote = str: "\"${str}\"";
-
makeBinPathList = map (path: path + "/bin");
-
in ''
-
fish_add_path --move --prepend --path ${lib.concatMapStringsSep " " dquote (makeBinPathList config.environment.profiles)}
-
set fish_user_paths $fish_user_paths
-
fish_add_path /opt/homebrew/bin
-
alias tailscale /Applications/Tailscale.app/Contents/MacOS/Tailscale
-
'';
-
-
nix.buildMachines = [
-
{
-
hostName = "rushing.axolotl-map.ts.net";
-
sshUser = "colmena-deploy";
-
system = "x86_64-linux";
-
speedFactor = 2;
-
maxJobs = 6;
-
protocol = "ssh-ng";
-
}
-
{
-
hostName = "skyline.axolotl-map.ts.net";
-
sshUser = "colmena-deploy";
-
system = "aarch64-linux";
-
speedFactor = 1;
-
maxJobs = 2;
-
protocol = "ssh-ng";
-
}
-
];
-
-
# nix-darwin
-
system.configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null;
-
# Used for backwards compatibility, please read the changelog before changing.
-
# $ darwin-rebuild changelog
-
system.stateVersion = 4;
-
-
system.defaults.NSGlobalDomain.AppleShowAllExtensions = true;
-
system.defaults.finder.ShowPathbar = true;
-
system.defaults.menuExtraClock.Show24Hour = true;
-
system.defaults.trackpad.Dragging = true;
-
-
# Dock settings
-
system.defaults.dock = {
-
autohide = false;
-
magnification = false;
-
minimize-to-application = false;
-
mru-spaces = false;
-
orientation = "bottom";
-
show-recents = false;
-
tilesize = 48;
-
};
-
-
fonts.packages = with pkgs; [
-
inter
-
inputs.iosevka-solai.packages.aarch64-darwin.bin
-
];
-
}
-49
darwin/shimmer/homebrew.nix
···
-
{...}: {
-
homebrew = {
-
enable = true;
-
# Update and cleanup homebrew packages when rebuilding.
-
global.autoUpdate = false;
-
onActivation.autoUpdate = true;
-
onActivation.upgrade = true;
-
onActivation.cleanup = "zap";
-
-
taps = [
-
"homebrew/cask-versions"
-
"ovyerus/klog"
-
"ovyerus/tap"
-
];
-
-
brews = [
-
"bitwarden-cli"
-
"klog"
-
"mas"
-
"swiftformat"
-
"xcbeautify"
-
"xcodegen"
-
];
-
-
casks = [
-
"1password"
-
"discord"
-
"figma"
-
"httpie"
-
"insomnia"
-
"iterm2"
-
"karabiner-elements"
-
"maccy"
-
"orbstack"
-
# Actually searches symlinks for apps, compared to Alfred.
-
"raycast"
-
"swiftformat-for-xcode"
-
"visual-studio-code"
-
# "vorta"
-
];
-
-
masApps = {
-
Keka = 470158793;
-
"Yubico Authenticator" = 1497506650;
-
"System Color Picker" = 1545870783;
-
Tailsacle = 1475387142;
-
};
-
};
-
}
-89
darwin/shimmer/wm.nix
···
-
{lib, ...}: {
-
services.yabai = {
-
enable = true;
-
config = let
-
gap = 10;
-
gapKeys = [
-
"window_gap"
-
"top_padding"
-
"bottom_padding"
-
"left_padding"
-
"right_padding"
-
];
-
-
gaps = builtins.listToAttrs (
-
builtins.map (k: lib.attrsets.nameValuePair k gap) gapKeys
-
);
-
in
-
{
-
layout = "bsp";
-
window_placement = "second_child";
-
}
-
// gaps;
-
extraConfig = ''
-
yabai -m rule --add app="Bitwarden" manage=off
-
yabai -m rule --add app="Discord" manage=off
-
yabai -m rule --add app="^Finder$" manage=off
-
yabai -m rule --add app="Keka" manage=off
-
yabai -m rule --add app="^System Information$" manage=off
-
yabai -m rule --add app="^System Preferences$" manage=off
-
yabai -m rule --add app="^System Settings$" manage=off
-
yabai -m rule --add title="Preferences$" manage=off
-
yabai -m rule --add title="^Archive Utility$" manage=off
-
yabai -m rule --add title="Settings$" manage=off
-
yabai -m rule --add title="Karabiner" manage=off
-
yabai -m rule --add title="^Weather$" manage=off
-
yabai -m rule --add title="Yubico Authenticator" manage=off
-
yabai -m rule --add app="Rewind" manage=off
-
yabai -m rule --add app="eqMac" manage=off
-
yabai -m rule --add app="^Arc$" manage=off
-
yabai -m rule --add app="OBS" manage=off
-
yabai -m rule --add app="Raycast" manage=off
-
'';
-
};
-
-
services.skhd = {
-
enable = true;
-
skhdConfig = ''
-
# Move/swap windows
-
meh - w : yabai -m window --swap north
-
meh - a : yabai -m window --swap west
-
meh - r : yabai -m window --swap south
-
meh - s : yabai -m window --swap east
-
-
hyper - w : yabai -m window --warp north
-
hyper - a : yabai -m window --warp west
-
hyper - r : yabai -m window --warp south
-
hyper - s : yabai -m window --warp east
-
-
# Focus windows
-
ralt + rcmd - w : yabai -m window --focus north
-
ralt + rcmd - a : yabai -m window --focus west
-
ralt + rcmd - r : yabai -m window --focus south
-
ralt + rcmd - s : yabai -m window --focus east
-
-
# Increase window size
-
meh - n : yabai -m window --resize left:-100:0
-
meh - e : yabai -m window --resize bottom:0:100
-
meh - i : yabai -m window --resize top:0:-100
-
meh - o : yabai -m window --resize right:100:0
-
-
# Decrease window size
-
hyper - n : yabai -m window --resize right:-100:0
-
hyper - e : yabai -m window --resize top:0:100
-
hyper - i : yabai -m window --resize bottom:0:-100
-
hyper - o : yabai -m window --resize left:100:0
-
-
# Expand floating window to fill screen
-
# (full stop)
-
meh - 0x2F : yabai -m window --grid 1:1:0:0:1:1
-
-
meh - p : yabai -m window --toggle float; \
-
yabai -m window --grid 4:4:1:1:2:2
-
-
# Rebalance grid
-
# (backtick)
-
hyper - 0x32 : yabai -m space --balance
-
'';
-
};
-
}
+4 -2
files/karabiner/keybind-helpers.json
···
"description": "MacBook internal keyboard",
"vendor_id": 1452,
"product_id": 641
-
}
+
},
+
{ "is_built_in_keyboard": true }
]
}
],
···
"description": "MacBook internal keyboard",
"vendor_id": 1452,
"product_id": 641
-
}
+
},
+
{ "is_built_in_keyboard": true }
]
}
],
+3
files/nixpkgs-config.nix
···
+
{
+
allowUnfree = true;
+
}
+115 -114
flake.lock
···
"home-manager": [
"home-manager"
],
-
"nix-darwin": "nix-darwin",
+
"nix-darwin": [
+
"nix-darwin"
+
],
"nixpkgs": [
"nixpkgs"
],
+
"nixpkgs-lib": "nixpkgs-lib",
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
-
"lastModified": 1749374482,
-
"narHash": "sha256-IAyAgmxZ+8YUPkyxn6gvCUZiV93dX6oLmcOOCSU9We4=",
+
"lastModified": 1758123851,
+
"narHash": "sha256-sbKwqBOLI423TvXvzlX2UGZR4pE1M8C7KXi0699ImmQ=",
"owner": "yunfachi",
"repo": "denix",
-
"rev": "5a27d210ee6ff79375731a515810a02c6bb8b0d4",
+
"rev": "d90f816b7b93304e5d5e69d429de0052f64d5149",
"type": "github"
},
"original": {
···
"flake-compat": {
"flake": false,
"locked": {
-
"lastModified": 1696426674,
-
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+
"lastModified": 1747046372,
+
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
-
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
···
"type": "github"
}
},
-
"flake-utils_3": {
-
"inputs": {
-
"systems": "systems_3"
-
},
-
"locked": {
-
"lastModified": 1731533236,
-
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
-
"owner": "numtide",
-
"repo": "flake-utils",
-
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
-
"type": "github"
-
},
-
"original": {
-
"owner": "numtide",
-
"repo": "flake-utils",
-
"type": "github"
-
}
-
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
···
]
},
"locked": {
-
"lastModified": 1749526396,
-
"narHash": "sha256-UL9F76abAk87llXOrcQRjhd5OaOclUd6MIltsqcUZmo=",
+
"lastModified": 1765480374,
+
"narHash": "sha256-HlbvQAqLx7WqZFFQZ8nu5UUJAVlXiV/kqKbyueA8srw=",
"owner": "nix-community",
"repo": "home-manager",
-
"rev": "427c96044f11a5da50faf6adaf38c9fa47e6d044",
+
"rev": "39cb677ed9e908e90478aa9fe5f3383dfc1a63f3",
"type": "github"
},
"original": {
···
"narHash": "sha256-DN5/166jhiiAW0Uw6nueXaGTueVxhfZISAkoxasmz/g=",
"rev": "f19bd752910bbe3a861c9cad269bd078689d50fe",
"type": "tarball",
-
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/f19bd752910bbe3a861c9cad269bd078689d50fe.tar.gz?rev=f19bd752910bbe3a861c9cad269bd078689d50fe"
+
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/f19bd752910bbe3a861c9cad269bd078689d50fe.tar.gz"
},
"original": {
"type": "tarball",
···
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
-
"lastModified": 1749533158,
-
"narHash": "sha256-wIw3Q/Ls1nsLjBN4VsAiTMHZiyf5RGRVy2MWfyYPgMI=",
+
"lastModified": 1765528203,
+
"narHash": "sha256-DTs3VkvRjW/Quu7y9hzNUrddysBXbcqv5Rpo4rtQYQI=",
"owner": "sodiboo",
"repo": "niri-flake",
-
"rev": "e5c4564ec3704f5e358f50d883b5200c4e8dfd7e",
+
"rev": "8f74fd85c7b42f2d06347a9c9eaff6d4904854f3",
"type": "github"
},
"original": {
···
"niri-stable": {
"flake": false,
"locked": {
-
"lastModified": 1740117926,
-
"narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=",
+
"lastModified": 1756556321,
+
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
"owner": "YaLTeR",
"repo": "niri",
-
"rev": "b94a5db8790339cf9134873d8b490be69e02ac71",
+
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
"type": "github"
},
"original": {
"owner": "YaLTeR",
-
"ref": "v25.02",
+
"ref": "v25.08",
"repo": "niri",
"type": "github"
}
···
"niri-unstable": {
"flake": false,
"locked": {
-
"lastModified": 1749474820,
-
"narHash": "sha256-hf5eCZ0bbqwOKPvPKn8Rutwj+xs3GhAfB0AjGa8tIEM=",
+
"lastModified": 1765524373,
+
"narHash": "sha256-gi38XWhkb+H8iHhlXgv7MgUaQCuhmaTzKmq3yzYOg9g=",
"owner": "YaLTeR",
"repo": "niri",
-
"rev": "a18d24fc24d8b17242e336ccf39fcbe91e8161fd",
+
"rev": "c22d8358c293f5e66748d8ac20600e6b114f9743",
"type": "github"
},
"original": {
···
"nix-darwin": {
"inputs": {
"nixpkgs": [
-
"denix",
"nixpkgs"
]
},
"locked": {
-
"lastModified": 1746254942,
-
"narHash": "sha256-Y062AuRx6l+TJNX8wxZcT59SSLsqD9EedAY0mqgTtQE=",
-
"owner": "nix-darwin",
+
"lastModified": 1765065051,
+
"narHash": "sha256-b7W9WsvyMOkUScNxbzS45KEJp0iiqRPyJ1I3JBE+oEE=",
+
"owner": "LnL7",
"repo": "nix-darwin",
-
"rev": "760a11c87009155afa0140d55c40e7c336d62d7a",
+
"rev": "7e22bf538aa3e0937effcb1cee73d5f1bcc26f79",
"type": "github"
},
"original": {
···
"type": "github"
}
},
-
"nix-darwin_2": {
-
"inputs": {
-
"nixpkgs": [
-
"nixpkgs"
-
]
-
},
-
"locked": {
-
"lastModified": 1749194393,
-
"narHash": "sha256-vt6hM9DNywnXXuW1qPDLzECmbDcmxhh58wpb0EEQjAo=",
-
"owner": "LnL7",
-
"repo": "nix-darwin",
-
"rev": "19346808c445f23b08652971be198b9df6c33edc",
-
"type": "github"
-
},
-
"original": {
-
"owner": "LnL7",
-
"repo": "nix-darwin",
-
"type": "github"
-
}
-
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
···
]
},
"locked": {
-
"lastModified": 1749355504,
-
"narHash": "sha256-L17CdJMD+/FCBOHjREQLXbe2VUnc3rjffenBbu2Kwpc=",
+
"lastModified": 1765267181,
+
"narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=",
"owner": "nix-community",
"repo": "nix-index-database",
-
"rev": "40a6e15e44b11fbf8f2b1df9d64dbfc117625e94",
+
"rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f",
"type": "github"
},
"original": {
···
},
"nix-vscode-extensions": {
"inputs": {
-
"flake-utils": "flake-utils_3",
-
"nixpkgs": "nixpkgs"
+
"nixpkgs": "nixpkgs_2"
},
"locked": {
-
"lastModified": 1749521131,
-
"narHash": "sha256-ezZ15tLA2L+rmtn39dKLFW/UM2xlksC61V12blulpjE=",
+
"lastModified": 1765505053,
+
"narHash": "sha256-nDMsy5cVXs4iShqoLt8gCz/s1LdVxsaUFsTuSY/22rg=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
-
"rev": "299b2aa650d32310153746135b6a84a6c4de9c21",
+
"rev": "1778f178603ed65b4e4033c64f04ea51142ad6f6",
"type": "github"
},
"original": {
···
},
"nixpkgs": {
"locked": {
-
"lastModified": 1744868846,
-
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
+
"lastModified": 1754340878,
+
"narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=",
"owner": "NixOS",
"repo": "nixpkgs",
-
"rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c",
+
"rev": "cab778239e705082fe97bb4990e0d24c50924c04",
"type": "github"
},
"original": {
"owner": "NixOS",
+
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
-
"rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c",
+
"type": "github"
+
}
+
},
+
"nixpkgs-lib": {
+
"locked": {
+
"lastModified": 1754184128,
+
"narHash": "sha256-AjhoyBL4eSyXf01Bmc6DiuaMrJRNdWopmdnMY0Pa/M0=",
+
"owner": "nix-community",
+
"repo": "nixpkgs.lib",
+
"rev": "02e72200e6d56494f4a7c0da8118760736e41b60",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-community",
+
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
-
"lastModified": 1749237914,
-
"narHash": "sha256-N5waoqWt8aMr/MykZjSErOokYH6rOsMMXu3UOVH5kiw=",
+
"lastModified": 1765311797,
+
"narHash": "sha256-mSD5Ob7a+T2RNjvPvOA1dkJHGVrNVl8ZOrAwBjKBDQo=",
"owner": "NixOS",
"repo": "nixpkgs",
-
"rev": "70c74b02eac46f4e4aa071e45a6189ce0f6d9265",
+
"rev": "09eb77e94fa25202af8f3e81ddc7353d9970ac1b",
"type": "github"
},
"original": {
"owner": "NixOS",
-
"ref": "nixos-25.05",
+
"ref": "nixos-25.11",
+
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
-
"lastModified": 1749285348,
-
"narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
+
"lastModified": 1759770925,
+
"narHash": "sha256-CZwkCtzTNclqlhuwDsVtGoRumTpqCUK0xSnFIMgd8ls=",
+
"owner": "nixos",
+
"repo": "nixpkgs",
+
"rev": "674c2b09c59a220204350ced584cadaacee30038",
+
"type": "github"
+
},
+
"original": {
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
+
"rev": "674c2b09c59a220204350ced584cadaacee30038",
+
"type": "github"
+
}
+
},
+
"nixpkgs_3": {
+
"locked": {
+
"lastModified": 1765186076,
+
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
+
"owner": "nixos",
+
"repo": "nixpkgs",
+
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
"type": "github"
},
"original": {
···
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
-
"nixpkgs": [
-
"denix",
-
"nixpkgs"
-
]
+
"nixpkgs": "nixpkgs"
},
"locked": {
-
"lastModified": 1746537231,
-
"narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=",
+
"lastModified": 1754416808,
+
"narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=",
"owner": "cachix",
"repo": "git-hooks.nix",
-
"rev": "fa466640195d38ec97cf0493d6d6882bc4d14969",
+
"rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864",
"type": "github"
},
"original": {
···
"iosevka-solai": "iosevka-solai",
"lix-module": "lix-module",
"niri-flake": "niri-flake",
-
"nix-darwin": "nix-darwin_2",
+
"nix-darwin": "nix-darwin",
"nix-index-database": "nix-index-database",
"nix-vscode-extensions": "nix-vscode-extensions",
-
"nixpkgs": "nixpkgs_2"
+
"nixpkgs": "nixpkgs_3",
+
"zen-browser": "zen-browser"
}
},
"systems": {
···
"type": "github"
}
},
-
"systems_3": {
+
"xwayland-satellite-stable": {
+
"flake": false,
"locked": {
-
"lastModified": 1681028828,
-
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
-
"owner": "nix-systems",
-
"repo": "default",
-
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+
"lastModified": 1755491097,
+
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
+
"owner": "Supreeeme",
+
"repo": "xwayland-satellite",
+
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
"type": "github"
},
"original": {
-
"owner": "nix-systems",
-
"repo": "default",
+
"owner": "Supreeeme",
+
"ref": "v0.7",
+
"repo": "xwayland-satellite",
"type": "github"
}
},
-
"xwayland-satellite-stable": {
+
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
-
"lastModified": 1739246919,
-
"narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
+
"lastModified": 1765343581,
+
"narHash": "sha256-HtTPbV6z6AJPg2d0bHaJKFrnNha+SEbHvbJafKAQ614=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
-
"rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
+
"rev": "f0ad674b7009a6afd80cea59d4fbf975dd68ee95",
"type": "github"
},
"original": {
"owner": "Supreeeme",
-
"ref": "v0.5.1",
"repo": "xwayland-satellite",
"type": "github"
}
},
-
"xwayland-satellite-unstable": {
-
"flake": false,
+
"zen-browser": {
+
"inputs": {
+
"nixpkgs": [
+
"nixpkgs"
+
]
+
},
"locked": {
-
"lastModified": 1749315541,
-
"narHash": "sha256-bEik1BfVOFnWvtOrcOHluos/edJ8f+G2y1QySbt/0Ak=",
-
"owner": "Supreeeme",
-
"repo": "xwayland-satellite",
-
"rev": "da2ecb5be816de35e2efe23a408a1c49fe8b11ba",
+
"lastModified": 1764648680,
+
"narHash": "sha256-B/nmawJ75/951Xs9ludSxDVd/txFY+odmcbinySqMQo=",
+
"lastModified": 1764648680,
+
"narHash": "sha256-B/nmawJ75/951Xs9ludSxDVd/txFY+odmcbinySqMQo=",
+
"owner": "youwen5",
+
"repo": "zen-browser-flake",
+
"rev": "897df2f2ad4880563ce801fa29f348a4e98f0a20",
+
"rev": "897df2f2ad4880563ce801fa29f348a4e98f0a20",
"type": "github"
},
"original": {
-
"owner": "Supreeeme",
-
"repo": "xwayland-satellite",
+
"owner": "youwen5",
+
"repo": "zen-browser-flake",
"type": "github"
}
}
+24 -28
flake.nix
···
# nur.url = "github:nix-community/NUR";
nix-darwin = {
-
url = "github:LnL7/nix-darwin";
+
url = "github:nix-darwin/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
···
denix = {
url = "github:yunfachi/denix";
inputs.nixpkgs.follows = "nixpkgs";
+
inputs.nix-darwin.follows = "nix-darwin";
inputs.home-manager.follows = "home-manager";
};
-
# ags = {
-
# url = "github:Aylur/ags";
-
# inputs.nixpkgs.follows = "nixpkgs";
-
# };
+
zen-browser = {
+
url = "github:youwen5/zen-browser-flake";
+
inputs.nixpkgs.follows = "nixpkgs";
+
};
};
outputs = {
-
# ags,
denix,
home-manager,
lix-module,
···
self,
...
} @ inputs: let
-
system = "x86_64-linux";
-
pkgs = nixpkgs.legacyPackages.${system};
-
# agsPkgs = ags.packages.${system};
+
forSystems = fn:
+
nixpkgs.lib.genAttrs [
+
"aarch64-linux"
+
"aarch64-darwin"
+
"x86_64-darwin"
+
"x86_64-linux"
+
] (system: fn nixpkgs.legacyPackages.${system});
+
defaultForSystems = fn: forSystems (pkgs: {default = fn pkgs;});
+
mkConfigurations = moduleSystem:
denix.lib.configurations (let
homeManagerUser = "ovy";
in {
inherit moduleSystem homeManagerUser;
-
paths = [./denix/hosts ./denix/modules]; #./denix/rices];
+
paths = [./hosts ./modules]; #./rices];
specialArgs = {inherit inputs moduleSystem homeManagerUser;};
});
in {
-
packages.${system} = {
+
packages = forSystems (pkgs: {
iconifydl = pkgs.callPackage ./pkgs/iconifydl.nix {};
+
});
-
# default = ags.lib.bundle {
-
# inherit pkgs;
-
# src = ./files/astal;
-
# name = "ovy-shell";
-
# entry = "app.ts";
-
# };
-
};
-
-
# devShells.x86_64-linux.default = pkgs.mkShell {
-
# buildInputs = [agsPkgs.agsFull agsPkgs.io agsPkgs.apps agsPkgs.tray self.packages.${system}.iconifydl];
-
# };
+
devShells = defaultForSystems (pkgs:
+
pkgs.mkShell {
+
buildInputs = [pkgs.just];
+
});
nixosConfigurations = mkConfigurations "nixos";
+
darwinConfigurations = mkConfigurations "darwin";
# nixosModules.serverHomeManager = {...}: {
# imports = [home-manager.nixosModules.home-manager];
···
# };
# };
-
formatter = {
-
aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
-
aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra;
-
x86_64-darwin = nixpkgs.legacyPackages.x86_64-darwin.alejandra;
-
x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
-
};
+
formatter = forSystems (pkgs: pkgs.alejandra);
};
}
+15
hosts/setsuna/default.nix
···
+
{delib, ...}:
+
delib.host {
+
name = "setsuna";
+
+
myconfig._1password.enable = false;
+
myconfig.gaming.enable = false;
+
myconfig.tray.enable = false;
+
myconfig.virtualisation.enable = false;
+
+
myconfig.programs.chromium.enable = false;
+
myconfig.programs.desktop-apps.enable = false;
+
myconfig.programs.espanso.enable = false;
+
myconfig.programs.kitty.enable = false;
+
myconfig.programs.syncthing.enable = false;
+
}
+19
hosts/setsuna/hardware.nix
···
+
{
+
delib,
+
inputs,
+
...
+
}:
+
delib.host {
+
name = "setsuna";
+
+
homeManagerSystem = "aarch64-darwin";
+
home.home.stateVersion = "26.05";
+
+
darwin = {
+
nixpkgs.hostPlatform = "aarch64-darwin";
+
# TODO: `darwin-rebuild changelog` to see what changed, latest is 6
+
system.stateVersion = 6;
+
# TODO: see what this does, i forgor
+
system.configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null;
+
};
+
}
+15
hosts/shimmer/default.nix
···
+
{delib, ...}:
+
delib.host {
+
name = "shimmer";
+
+
myconfig._1password.enable = false;
+
myconfig.gaming.enable = false;
+
myconfig.tray.enable = false;
+
myconfig.virtualisation.enable = false;
+
+
myconfig.programs.chromium.enable = false;
+
myconfig.programs.desktop-apps.enable = false;
+
myconfig.programs.espanso.enable = false;
+
myconfig.programs.kitty.enable = false;
+
myconfig.programs.syncthing.enable = false;
+
}
+19
hosts/shimmer/hardware.nix
···
+
{
+
delib,
+
inputs,
+
...
+
}:
+
delib.host {
+
name = "shimmer";
+
+
homeManagerSystem = "aarch64-darwin";
+
home.home.stateVersion = "24.05";
+
+
darwin = {
+
nixpkgs.hostPlatform = "aarch64-darwin";
+
# TODO: `darwin-rebuild changelog` to see what changed, latest is 6
+
system.stateVersion = 4;
+
# TODO: see what this does, i forgor
+
system.configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null;
+
};
+
}
+4 -1
hosts/wallsocket/hardware.nix
···
{
delib,
lib,
+
pkgs,
...
}: let
platform = "x86_64-linux";
···
nixpkgs.hostPlatform = platform;
system.stateVersion = stateVersion;
-
hardware.enableRedistributableFirmware = true;
+
hardware.enableAllFirmware = true;
hardware.cpu.amd.updateMicrocode = true;
# Kernel
···
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
+
boot.kernelPackages = pkgs.linuxPackages_latest;
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 10;
+
boot.loader.systemd-boot.consoleMode = "max";
boot.loader.efi.canTouchEfiVariables = true;
# Disks
+15
justfile
···
+
[private]
+
default:
+
just --list
+
+
[linux]
+
boot:
+
sudo nixos-rebuild boot -L
+
+
[linux]
+
switch:
+
sudo nixos-rebuild switch -L
+
+
[macos]
+
switch:
+
sudo darwin-rebuild switch --flake . -L
+5 -1
modules/1password.nix
···
};
environment.etc."1password/custom_allowed_browsers" = {
-
text = "vivaldi-bin";
+
text = ''
+
vivaldi-bin
+
zen
+
zen-bin
+
'';
mode = "0755";
};
};
+10 -10
modules/bluetooth.nix
···
nixos.ifEnabled = {
hardware.bluetooth.enable = true;
# TODO: determine if this actually affected me. Maybe should yeet.
-
hardware.bluetooth.settings = {
-
# Try and reduce latency from Xbox Series controllers
-
# https://atar-axis.github.io/xpadneo#high-latency-or-lost-button-events-with-bluetooth-le
-
LE = {
-
MinConnectionInterval = 7;
-
MaxConnectionInterval = 9;
-
ConnectionLatency = 0;
-
};
-
};
-
hardware.xpadneo.enable = true;
+
# hardware.bluetooth.settings = {
+
# # Try and reduce latency from Xbox Series controllers
+
# # https://atar-axis.github.io/xpadneo#high-latency-or-lost-button-events-with-bluetooth-le
+
# LE = {
+
# MinConnectionInterval = 7;
+
# MaxConnectionInterval = 9;
+
# ConnectionLatency = 0;
+
# };
+
# };
+
# hardware.xpadneo.enable = true;
environment.systemPackages = [pkgs.kdePackages.bluedevil];
};
}
+4 -1
modules/config/home.nix
···
in {
home = {
inherit username;
-
homeDirectory = "/home/${username}";
+
homeDirectory =
+
if moduleSystem == "darwin"
+
then "/Users/${username}"
+
else "/home/${username}";
};
news.display = "silent";
programs.home-manager.enable = false;
+15 -7
modules/config/user.nix
···
nixos.always = {myconfig, ...}: let
inherit (myconfig.constants) username userfullname;
in {
-
users = {
-
users.${username} = {
-
isNormalUser = true;
-
description = userfullname;
-
extraGroups = ["wheel" "cdrom" "adbusers"];
-
shell = pkgs.fish;
-
};
+
users.users.${username} = {
+
isNormalUser = true;
+
description = userfullname;
+
extraGroups = ["wheel" "cdrom" "adbusers"];
+
shell = pkgs.fish;
+
};
+
};
+
+
darwin.always = {myconfig, ...}: let
+
inherit (myconfig.constants) username userfullname;
+
in {
+
users.users.${username} = {
+
description = userfullname;
+
home = "/Users/${username}";
+
shell = pkgs.fish;
};
};
}
+24
modules/darwin/defaults.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "darwin.defaults";
+
+
options = delib.singleEnableOption true;
+
+
darwin.ifEnabled.system.defaults = {
+
NSGlobalDomain.AppleShowAllExtensions = true;
+
finder.ShowPathbar = true;
+
menuExtraClock.Show24Hour = true;
+
trackpad.Dragging = true;
+
+
# Dock settings
+
dock = {
+
autohide = false;
+
magnification = false;
+
minimize-to-application = false;
+
mru-spaces = false;
+
orientation = "bottom";
+
show-recents = false;
+
tilesize = 48;
+
};
+
};
+
}
+53
modules/darwin/homebrew.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "darwin.homebrew";
+
+
options = delib.singleEnableOption true;
+
+
darwin.ifEnabled.homebrew = {
+
enable = true;
+
# Update and cleanup homebrew packages when rebuilding.
+
global.autoUpdate = false;
+
onActivation.autoUpdate = true;
+
onActivation.upgrade = true;
+
onActivation.cleanup = "zap";
+
+
taps = [
+
"ovyerus/klog"
+
"ovyerus/tap"
+
];
+
+
brews = [
+
"klog"
+
"mas"
+
"swiftformat"
+
"xcbeautify"
+
"xcodegen"
+
];
+
+
casks = [
+
"1password"
+
"discord"
+
"figma"
+
"httpie"
+
"insomnia"
+
"iterm2"
+
"karabiner-elements"
+
"maccy"
+
"orbstack"
+
# Actually searches symlinks for apps, compared to Alfred.
+
"raycast"
+
"swiftformat-for-xcode"
+
"tailscale-app"
+
# "vorta"
+
"vesktop"
+
"zen"
+
];
+
+
masApps = {
+
Keka = 470158793;
+
"Yubico Authenticator" = 1497506650;
+
"System Color Picker" = 1545870783;
+
};
+
};
+
}
+8
modules/darwin/system.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "darwin.system";
+
+
darwin.always = {
+
system.primaryUser = "ovy";
+
};
+
}
+100
modules/darwin/wm.nix
···
+
{
+
delib,
+
lib,
+
...
+
}:
+
delib.module {
+
name = "darwin.wm";
+
+
options = delib.singleEnableOption true;
+
+
darwin.ifEnabled = {
+
services.yabai = {
+
enable = true;
+
config = let
+
gap = 10;
+
gapKeys = [
+
"window_gap"
+
"top_padding"
+
"bottom_padding"
+
"left_padding"
+
"right_padding"
+
];
+
+
gaps = builtins.listToAttrs (
+
builtins.map (k: lib.attrsets.nameValuePair k gap) gapKeys
+
);
+
in
+
{
+
layout = "bsp";
+
window_placement = "second_child";
+
}
+
// gaps;
+
extraConfig = ''
+
yabai -m rule --add app="Bitwarden" manage=off
+
yabai -m rule --add app="Discord" manage=off
+
yabai -m rule --add app="^Finder$" manage=off
+
yabai -m rule --add app="Keka" manage=off
+
yabai -m rule --add app="^System Information$" manage=off
+
yabai -m rule --add app="^System Preferences$" manage=off
+
yabai -m rule --add app="^System Settings$" manage=off
+
yabai -m rule --add title="Preferences$" manage=off
+
yabai -m rule --add title="^Archive Utility$" manage=off
+
yabai -m rule --add title="Settings$" manage=off
+
yabai -m rule --add title="Karabiner" manage=off
+
yabai -m rule --add title="^Weather$" manage=off
+
yabai -m rule --add title="Yubico Authenticator" manage=off
+
yabai -m rule --add app="Rewind" manage=off
+
yabai -m rule --add app="eqMac" manage=off
+
yabai -m rule --add app="^Arc$" manage=off
+
yabai -m rule --add app="OBS" manage=off
+
yabai -m rule --add app="Raycast" manage=off
+
'';
+
};
+
+
services.skhd = {
+
enable = true;
+
skhdConfig = ''
+
# Move/swap windows
+
meh - w : yabai -m window --swap north
+
meh - a : yabai -m window --swap west
+
meh - r : yabai -m window --swap south
+
meh - s : yabai -m window --swap east
+
+
hyper - w : yabai -m window --warp north
+
hyper - a : yabai -m window --warp west
+
hyper - r : yabai -m window --warp south
+
hyper - s : yabai -m window --warp east
+
+
# Focus windows
+
ralt + rcmd - w : yabai -m window --focus north
+
ralt + rcmd - a : yabai -m window --focus west
+
ralt + rcmd - r : yabai -m window --focus south
+
ralt + rcmd - s : yabai -m window --focus east
+
+
# Increase window size
+
meh - n : yabai -m window --resize left:-100:0
+
meh - e : yabai -m window --resize bottom:0:100
+
meh - i : yabai -m window --resize top:0:-100
+
meh - o : yabai -m window --resize right:100:0
+
+
# Decrease window size
+
hyper - n : yabai -m window --resize right:-100:0
+
hyper - e : yabai -m window --resize top:0:100
+
hyper - i : yabai -m window --resize bottom:0:-100
+
hyper - o : yabai -m window --resize left:100:0
+
+
# Expand floating window to fill screen
+
# (full stop)
+
meh - 0x2F : yabai -m window --grid 1:1:0:0:1:1
+
+
meh - p : yabai -m window --toggle float; \
+
yabai -m window --grid 4:4:1:1:2:2
+
+
# Rebalance grid
+
# (backtick)
+
hyper - 0x32 : yabai -m space --balance
+
'';
+
};
+
};
+
}
+12 -1
modules/fonts.nix
···
nixos.always = {
fonts = {
packages = [
-
pkgs.ubuntu_font_family
+
pkgs.ubuntu-classic
+
pkgs.ubuntu-sans
pkgs.inter
+
# Only needed for one specific thing and now can't download from sourceforge for some reason
+
# pkgs.corefonts
+
# pkgs.vista-fonts
inputs.iosevka-solai.packages.x86_64-linux.bin
];
···
# }
# ];
# };
+
};
+
+
darwin.always = {
+
fonts.packages = with pkgs; [
+
inter
+
inputs.iosevka-solai.packages.aarch64-darwin.bin
+
];
};
}
+4 -2
modules/gaming.nix
···
delib.module {
name = "gaming";
-
nixos.always = {
+
options = delib.singleEnableOption true;
+
+
nixos.ifEnabled = {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
···
programs.gamemode.enable = true;
};
-
home.always = {
+
home.ifEnabled = {
programs.mangohud = {
enable = true;
settings = {
+5 -1
modules/graphics.nix
···
enable = true;
enable32Bit = true;
};
+
hardware.amdgpu = {
+
initrd.enable = true;
+
opencl.enable = true;
+
};
-
environment.systemPackages = with pkgs; [amdgpu_top lact nvtopPackages.full];
+
environment.systemPackages = with pkgs; [amdgpu_top lact];
systemd.services.lactd = {
description = "AMDGPU Control Daemon";
-11
modules/logitech.nix
···
-
{delib, ...}:
-
delib.module {
-
name = "logitech";
-
-
options = delib.singleEnableOption true;
-
-
nixos.ifEnabled = {
-
hardware.logitech.wireless.enable = true;
-
hardware.new-lg4ff.enable = true;
-
};
-
}
-6
modules/networking.nix
···
# dnsovertls = "trues";
};
-
services.tailscale = {
-
enable = true;
-
openFirewall = true;
-
useRoutingFeatures = "client";
-
};
-
# services.mullvad-vpn.enable = true;
# services.mullvad-vpn.package = pkgs.mullvad-vpn;
+76 -29
modules/nix.nix
···
delib,
inputs,
...
-
}: let
-
shared.nix.settings = {
-
auto-optimise-store = true;
-
experimental-features = ["nix-command" "flakes"];
-
trusted-users = ["root" "@wheel"];
+
}:
+
delib.module {
+
name = "nix";
+
+
# TODO: double check home-manager options
+
home.always = {
+
nixpkgs.config = import ../files/nixpkgs-config.nix;
+
xdg.configFile."nixpkgs/config.nix".source = ../files/nixpkgs-config.nix;
+
};
+
+
nixos.always = {
+
nixpkgs.config = import ../files/nixpkgs-config.nix;
+
+
nix = {
+
gc = {
+
automatic = true;
+
options = "--delete-older-than 10d";
+
dates = "weekly";
+
};
+
+
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
+
+
registry.nixpkgs.to = {
+
type = "path";
+
path = inputs.nixpkgs;
+
narHash = inputs.nixpkgs.narHash;
+
};
+
+
settings = {
+
auto-optimise-store = true;
+
experimental-features = ["nix-command" "flakes"];
+
trusted-users = ["root" "@wheel" "ovy"];
+
warn-dirty = false;
+
};
+
};
+
+
system.tools.nixos-option.enable = false;
};
-
in
-
delib.module {
-
name = "nix";
+
+
darwin.always = {
+
nixpkgs.config = import ../files/nixpkgs-config.nix;
+
+
nix = {
+
buildMachines = [
+
{
+
hostName = "rushing.axolotl-map.ts.net";
+
sshUser = "colmena-deploy";
+
system = "x86_64-linux";
+
speedFactor = 2;
+
maxJobs = 6;
+
protocol = "ssh-ng";
+
}
+
{
+
hostName = "skyline.axolotl-map.ts.net";
+
sshUser = "colmena-deploy";
+
system = "aarch64-linux";
+
speedFactor = 1;
+
maxJobs = 2;
+
protocol = "ssh-ng";
+
}
+
];
-
# TODO: double check home-manager options
-
home.always = shared;
-
nixos.always =
-
shared
-
// {
-
nix = {
-
gc = {
-
automatic = true;
-
options = "--delete-older-than 10d";
-
dates = "weekly";
-
};
+
distributedBuilds = true;
-
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
+
gc = {
+
automatic = true;
+
options = "--delete-older-than 7d";
+
interval.Weekday = 6;
+
};
-
registry.nixpkgs.to = {
-
type = "path";
-
path = inputs.nixpkgs;
-
narHash = inputs.nixpkgs.narHash;
-
};
-
};
+
optimise.automatic = true;
-
nixpkgs.config.allowUnfree = true;
-
system.tools.nixos-option.enable = false;
+
settings = {
+
builders-use-substitutes = true;
+
experimental-features = "nix-command flakes";
+
trusted-users = ["root" "ovy"];
+
sandbox = true;
+
warn-dirty = false;
};
-
}
+
};
+
};
+
}
-10
modules/ollama.nix
···
-
{delib, ...}:
-
delib.module {
-
name = "ollama";
-
-
nixos.always.services.ollama = {
-
enable = true;
-
acceleration = "rocm";
-
rocmOverrideGfx = "11.0.0";
-
};
-
}
+15 -1
modules/plasma.nix
···
environment.plasma6.excludePackages = with pkgs.kdePackages; [
elisa
gwenview
+
kate
konsole
+
krunner
];
qt = {
···
# environment.sessionVariables."NIXOS_OZONE_WL" = 1;
environment.sessionVariables."MOZ_ENABLE_WAYLAND" = 0;
-
environment.systemPackages = with pkgs; [adwaita-icon-theme kdePackages.kcalc kdePackages.partitionmanager kdePackages.kcolorchooser];
+
environment.systemPackages = with pkgs; [
+
adwaita-icon-theme
+
kdePackages.kcalc
+
kdePackages.partitionmanager
+
kdePackages.kcolorchooser
+
kdePackages.kdenlive
+
];
+
+
# TODO: move
+
boot.plymouth = {
+
enable = true;
+
theme = "breeze";
+
};
};
}
+3 -1
modules/programs/bat.nix
···
delib.module {
name = "programs.bat";
-
home.always.programs.bat = {
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled.programs.bat = {
enable = true;
config = {
theme = "DarkNeon";
+38 -3
modules/programs/core-cli.nix
···
delib.module {
name = "programs.core-cli";
+
options = delib.singleEnableOption true;
+
nixos.always = {
environment.systemPackages = with pkgs; [
ffmpeg-full
···
openssh
p7zip
pciutils
-
solaar
sysstat
unar
-
wcurl
wget
wineWowPackages.full
];
···
programs.fish.enable = true;
};
+
darwin.always = {
+
environment.systemPackages = with pkgs; [
+
ffmpeg-full
+
git
+
imagemagick
+
nil
+
openssh
+
wget
+
# TODO: the Xcode packages makes us manually download and put it into the Nix store
+
# but it seems to contain no reference to our actual result so I don't think `systemPackages`
+
# picks it up properly. Need to see how `requireFile` works and how `systemPackages`
+
# works under the hood.
+
# darwin.xcode_14_1
+
];
+
+
programs.bash.enable = true;
+
programs.zsh.enable = true;
+
programs.fish.enable = true;
+
+
# Fix problem in nix-darwin relating to $PATH order in fish.
+
# https://github.com/LnL7/nix-darwin/issues/122#issuecomment-1659465635
+
# programs.fish.loginShellInit = let
+
# dquote = str: "\"${str}\"";
+
# makeBinPathList = map (path: path + "/bin");
+
# in ''
+
# fish_add_path --move --prepend --path ${lib.concatMapStringsSep " " dquote (makeBinPathList config.environment.profiles)}
+
# set fish_user_paths $fish_user_paths
+
# fish_add_path /opt/homebrew/bin
+
# '';
+
+
programs.fish.loginShellInit = ''
+
alias tailscale /Applications/Tailscale.app/Contents/MacOS/Tailscale
+
'';
+
};
+
home.always = {
home.packages = with pkgs; [
curlie
-
du-dust
+
dust
duf
fd
jq
+35 -7
modules/programs/desktop-apps.nix
···
{
delib,
pkgs,
+
homeConfig,
...
}:
delib.module {
name = "programs.desktop-apps";
-
home.always = {
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled = {
home.packages = with pkgs; [
alejandra
audacity
blender
btop # TODO: module & options
bruno
-
# davinci-resolve
-
# distrobox
+
davinci-resolve
+
(discord.override {
+
withOpenASAR = true;
+
withVencord = true;
+
})
gajim
glaxnimate
# godot_4
···
lunacy
lutris
# mixxx
-
obs-studio
obsidian
+
opencloud-desktop
oversteer
p7zip
picard
···
piper
podman-tui
# plasticity
-
prismlauncher
+
(prismlauncher.override {
+
jdks = [
+
temurin-bin-21
+
temurin-bin-8
+
temurin-bin-17
+
];
+
})
+
protonup-qt
qbittorrent
qimgv
slack
-
vesktop
+
# vesktop
vlc
vorta
winetricks
···
yubioath-flutter
];
-
services.owncloud-client.enable = true;
+
systemd.user.services.opencloud-client = {
+
Unit = {
+
Description = "OpenCloud Client";
+
After = ["graphical-session.target"];
+
PartOf = ["graphical-session.target"];
+
};
+
+
Service = {
+
Environment = ["PATH=${homeConfig.home.profileDirectory}/bin"];
+
ExecStart = "${pkgs.opencloud-desktop}/bin/opencloud";
+
};
+
+
Install = {
+
WantedBy = ["graphical-session.target"];
+
};
+
};
};
}
+43 -18
modules/programs/desktop-cli.nix
···
{
delib,
+
lib,
pkgs,
...
}:
delib.module {
name = "programs.desktop-cli";
-
home.always.home.packages = with pkgs; [
-
age-plugin-yubikey
-
alejandra
-
cachix
-
colmena
-
fastfetch
-
hexyl
-
lazydocker
-
macchina
-
minio-client
-
mix2nix
-
minisign
-
mtr
-
nix-output-monitor
-
pgcli
-
rage
-
systemctl-tui
-
];
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled.home.packages = with pkgs;
+
[
+
age-plugin-yubikey
+
alejandra
+
cachix
+
fastfetch
+
hexyl
+
lazydocker
+
macchina
+
minio-client
+
mix2nix
+
minisign
+
mtr
+
nix-output-monitor
+
pgcli
+
rage
+
systemctl-tui
+
]
+
++ (lib.optional pkgs.stdenv.isLinux [pkgs.claude-code pkgs.claude-code-router]);
+
+
nixos.ifEnabled = {myconfig, ...}: {
+
programs.nh = {
+
enable = true;
+
flake = "/etc/nixos";
+
};
+
+
environment.systemPackages = with pkgs.gst_all_1; [
+
gstreamer
+
gst-vaapi
+
gst-libav
+
gst-plugins-good
+
gst-plugins-ugly
+
gst-plugins-bad
+
];
+
};
+
+
darwin.ifEnabled = {myconfig, ...}: {
+
environment.systemPackages = with pkgs; [nh];
+
environment.variables.NH_FLAKE = "/Users/${myconfig.constants.username}/.config/nix-darwin";
+
};
}
+1 -1
modules/programs/direnv.nix
···
...
}:
delib.module {
-
name = "programs.bat";
+
name = "programs.direnv";
home.always.programs.direnv = {
enable = true;
+7 -1
modules/programs/espanso.nix
···
delib.module {
name = "programs.espanso";
-
home.always.services.espanso = {
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled.services.espanso = {
enable = true;
package = pkgs.espanso-wayland;
matches.base.matches = [
{
trigger = ":degrees";
replace = "ยฐ";
+
}
+
{
+
trigger = ":--";
+
replace = "โ€”";
}
];
};
+7 -3
modules/programs/fish.nix
···
nix-your-shell fish | source
+
if test -d /opt/homebrew/bin;
+
fish_add_path /opt/homebrew/bin
+
end;
+
# Docker compose alias that switches to if the standalone binary is present.
if which docker-compose &> /dev/null;
alias dc docker-compose;
···
'';
shellAbbrs = {
-
code = "codium";
+
# code = "codium";
ga = "git add";
gaa = "git add -A";
gc = {
···
owner = "PatrickF1";
repo = "fzf.fish";
rev = "8920367cf85eee5218cc25a11e209d46e2591e7a";
-
hash = "sha256-lxQZo6APemNjt2c21IL7+uY3YVs81nuaRUL7NDMcB6s=";
+
hash = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
};
}
{
···
owner = "gazorby";
repo = "fifc";
rev = "a01650cd432becdc6e36feeff5e8d657bd7ee84a";
-
hash = "sha256-Nrart7WAh2VQhsDDe0EFI59TqvBO56US2MraqencxgE";
+
hash = "sha256-Ynb0Yd5EMoz7tXwqF8NNKqCGbzTZn/CwLsZRQXIAVp4=";
};
}
{
+79 -6
modules/programs/git.nix
···
-
{delib, ...}:
+
{
+
delib,
+
pkgs,
+
...
+
}:
delib.module {
name = "programs.git";
home.always = {myconfig, ...}: let
inherit (myconfig.constants) userfullname useremail;
in {
-
xdg.configFile."git/allowed_signers".source = ../../../files/git/allowed_signers;
+
xdg.configFile."git/allowed_signers".source = ../../files/git/allowed_signers;
+
+
home.packages = [pkgs.jjui];
programs.git = {
enable = true;
-
userName = userfullname;
-
userEmail = useremail;
-
delta.enable = true;
signing = {
signByDefault = true;
···
key = "~/.ssh/id_ed25519_sk_rk";
};
-
extraConfig = {
+
settings = {
+
user = {
+
name = userfullname;
+
email = useremail;
+
};
+
# TODO: custom pretty stuff?
blame.showEmail = true;
init.defaultBranch = "main";
···
ff = "only";
# Really only useful on a well-managed team. Maybe eventually.
# verifySignatures = true;
+
conflictStyle = "diff3";
};
push = {
···
};
};
};
+
+
programs.jujutsu = {
+
enable = true;
+
settings = {
+
user = {
+
name = userfullname;
+
email = useremail;
+
};
+
+
ui = {
+
default-command = "log";
+
show-cryptographic-signatures = true;
+
conflict-marker-style = "git";
+
# diff-formatter = "delta";
+
editor = "codium -w";
+
merge-editor = "vscodium";
+
};
+
+
revset-aliases = {
+
"closest_bookmark(to)" = "heads(::to & bookmarks())";
+
"p(n)" = "p(@, n)";
+
"p(r, n)" = "roots(r | ancestors(r-, n))";
+
"tail()" = "tail(@)";
+
"tail(h)" = "roots(trunk()..h)";
+
};
+
+
aliases = {
+
e = ["edit"];
+
n = ["new"];
+
tug = ["bookmark" "move" "--from" "closest_bookmark(@-)" "--to" "@-"];
+
tug-here = ["bookmark" "move" "--from" "closest_bookmark(@)" "--to" "@"];
+
solve = ["resolve" "--tool" "mergiraf"];
+
};
+
+
merge-tools.mergiraf = {
+
program = "mergiraf";
+
merge-args = ["merge" "$base" "$left" "$right" "-o" "$output"];
+
merge-conflict-exit-codes = [1];
+
conflict-marker-style = "git";
+
};
+
+
git = {
+
sign-on-push = true;
+
write-change-id-header = true;
+
};
+
+
signing = {
+
behavior = "drop";
+
backend = "ssh";
+
key = "~/.ssh/id_ed25519_sk_rk.pub";
+
backends.ssh.allowed-signers = "~/.config/git/allowed_signers";
+
};
+
+
remotes.origin.auto-track-bookmarks = "glob:*";
+
};
+
};
+
+
programs.delta = {
+
enable = true;
+
enableGitIntegration = true;
+
enableJujutsuIntegration = true;
+
};
+
+
programs.mergiraf.enable = true;
};
}
+1 -1
modules/programs/kitty.nix
···
cursor_shape = "block";
cursor_shape_unfocused = "hollow";
scrollback_lines = 10000;
-
scrollback_pager = "moar +INPUT_LINE_NUMBER";
+
scrollback_pager = "moor +INPUT_LINE_NUMBER";
scrollback_pager_history_size = 5;
window_padding_width = 8;
hide_window_decorations = true;
+20
modules/programs/obs-studio.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "programs.obs-studio";
+
+
options = delib.singleEnableOption true;
+
+
nixos.ifEnabled.programs.obs-studio = {
+
enable = true;
+
plugins = with pkgs.obs-studio-plugins; [
+
obs-vaapi
+
obs-gstreamer
+
obs-vkcapture
+
obs-pipewire-audio-capture
+
];
+
};
+
}
+3 -3
modules/programs/pager.nix
···
# TODO: read docs and experiment
home.always = {
-
home.packages = [pkgs.moar];
+
home.packages = [pkgs.moor];
home.sessionVariables = {
-
PAGER = "moar";
-
MOAR = "--no-linenumbers";
+
PAGER = "moor";
+
MOOR = "--no-linenumbers";
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
MANROFFOPT = "-c";
};
+3 -1
modules/programs/ssh.nix
···
home.always.programs.ssh = {
enable = true;
+
enableDefaultConfig = false;
+
matchBlocks = {
"*" = {
identitiesOnly = true;
···
};
# TODO: if darwin
-
# programs.ssh.includes = ["~/.orbstack/ssh/config"];
+
includes = ["~/.orbstack/ssh/config"];
};
}
+5 -1
modules/programs/vscode.nix
···
ms-azuretools.vscode-docker
editorconfig.editorconfig
irongeek.vscode-env
+
jjk.jjk
pgourlain.erlang
usernamehw.errorlens
dbaeumer.vscode-eslint
···
bmalehorn.vscode-fish
github.vscode-github-actions
eamodio.gitlens
-
# TODO: terraform (use opentofu instead)
ms-vscode.hexeditor
lokalise.i18n-ally
kisstkondoros.vscode-gutter-preview
···
vunguyentuan.vscode-postcss
esbenp.prettier-vscode
prisma.prisma
+
gleam.gleam
# TODO: use jedi instead of pylance
ms-python.python
ms-python.debugpy
···
wakatime.vscode-wakatime
redhat.vscode-yaml
arcanis.vscode-zipfs
+
golang.go
vscode-marketplace.wraith13.background-phi-colors
vscode-marketplace.be5invis.theme-dolch
vscode-marketplace.fabiospampinato.vscode-diff
···
"[prisma]"."editor.defaultFormatter" = "Prisma.prisma";
"[python]"."editor.defaultFormatter" = "ms-python.python";
"[rust]"."editor.defaultFormatter" = "rust-lang.rust-analyzer";
+
"[go]"."editor.defaultFormatter" = "golang.go";
# Sane defaults
"editor.tabSize" = 2;
···
];
# "prettier.prettierPath" = "prettierd";
"prettier.proseWrap" = "always";
+
"chat.disableAIFeatures" = true;
# Pretties
"workbench.colorTheme" = "Dolch";
+9 -3
modules/systemd.nix
···
nixos.always = {
systemd = {
-
extraConfig = ''
-
DefaultTimeoutStopSec=30s
-
'';
+
settings.Manager.DefaultTimeoutStopSec = "30s";
user.extraConfig = ''
DefaultTimeoutStopSec=30s
'';
};
+
+
services.udev.extraRules = ''
+
# USB device rules for both dongle and mouse (Lamzu Maya)
+
SUBSYSTEM=="usb", ATTRS{idVendor}=="3554", ATTRS{idProduct}=="f50d", MODE="0666", GROUP="input", TAG+="uaccess"
+
SUBSYSTEM=="usb", ATTRS{idVendor}=="3554", ATTRS{idProduct}=="f50f", MODE="0666", GROUP="input", TAG+="uaccess"
+
KERNEL=="hidraw*", ATTRS{idVendor}=="3554", ATTRS{idProduct}=="f50d", MODE="0666", GROUP="input", TAG+="uaccess"
+
KERNEL=="hidraw*", ATTRS{idVendor}=="3554", ATTRS{idProduct}=="f50f", MODE="0666", GROUP="input", TAG+="uaccess"
+
'';
};
}
+14
modules/tailscale.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "tailscale";
+
+
options = delib.singleEnableOption true;
+
+
nixos.ifEnabled.services.tailscale = {
+
enable = true;
+
openFirewall = true;
+
useRoutingFeatures = "client";
+
};
+
+
# home.ifEnabled.services.tailscale-systray.enable = true;
+
}
+4 -6
modules/tray.nix
···
-
{
-
delib,
-
pkgs,
-
...
-
}:
+
{delib, ...}:
delib.module {
name = "tray";
+
+
options = delib.singleEnableOption true;
# TODO: i don't think this is needed anymore???
-
home.always.systemd.user.targets.tray = {
+
home.ifEnabled.systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
+4 -2
modules/virtualisation.nix
···
delib.module {
name = "virtualisation";
-
nixos.always = {myconfig, ...}: let
+
options = delib.singleEnableOption true;
+
+
nixos.ifEnabled = {myconfig, ...}: let
inherit (myconfig.constants) username;
in {
environment.systemPackages = [pkgs.docker-compose];
···
users.users.${username}.extraGroups = ["libvirtd"];
};
-
home.always.home.sessionVariables.DOCKER_HOST = "unix:///run/user/1000/podman/podman.sock";
+
home.ifEnabled.home.sessionVariables.DOCKER_HOST = "unix:///run/user/1000/podman/podman.sock";
}
+18 -19
modules/xdg.nix
···
{
delib,
+
moduleSystem,
pkgs,
+
lib,
...
}:
delib.module {
-
name = "programs.espanso";
+
name = "xdg";
home.always = let
vivalarc = pkgs.fetchFromGitHub {
···
rev = "7ee09e9efb46c1524a43f0cb6763b9750db6e81c";
hash = "sha256-xYSxB8KjcbeUDEdbA2AJ9FeQC1TkqyXdB9rTMMSm+FA=";
};
-
in {
-
xdg.desktopEntries.davinci-resolve = {
-
name = "Davinci Resolve";
-
exec = "davinci-resolve";
-
categories = ["AudioVideo" "AudioVideoEditing" "Video" "Graphics"];
-
comment = "Professional video editing, color, effects and audio post-processing";
-
genericName = "Video Editor";
-
type = "Application";
-
settings.Version = "1.4";
-
};
-
-
xdg.dataFile."vivalarc".source = vivalarc;
-
};
-
-
# if darwin: xdg.configFile = {
-
# TODO: replace with the full karabiner config instead of needing to manually set complex mods
-
# "karabiner/assets/complex_modifications/keybind-helpers.json".source = ../../../files/karabiner/keybind-helpers.json;
-
# };
+
in ({
+
xdg.dataFile."vivalarc".source = vivalarc;
+
xdg.configFile."karabiner/assets/complex_modifications/keybind-helpers.json".source = ../files/karabiner/keybind-helpers.json;
+
}
+
// lib.optionalAttrs (moduleSystem == "nixos") {
+
xdg.desktopEntries.davinci-resolve = {
+
name = "Davinci Resolve";
+
exec = "davinci-resolve";
+
categories = ["AudioVideo" "AudioVideoEditing" "Video" "Graphics"];
+
comment = "Professional video editing, color, effects and audio post-processing";
+
genericName = "Video Editor";
+
type = "Application";
+
settings.Version = "1.4";
+
};
+
});
}