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;
+
}
+169 -103
flake.lock
···
{
"nodes": {
-
"ags": {
+
"denix": {
"inputs": {
-
"astal": "astal",
+
"home-manager": [
+
"home-manager"
+
],
+
"nix-darwin": [
+
"nix-darwin"
+
],
"nixpkgs": [
"nixpkgs"
-
]
+
],
+
"nixpkgs-lib": "nixpkgs-lib",
+
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
-
"lastModified": 1744557573,
-
"narHash": "sha256-XAyj0iDuI51BytJ1PwN53uLpzTDdznPDQFG4RwihlTQ=",
-
"owner": "Aylur",
-
"repo": "ags",
-
"rev": "3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6",
+
"lastModified": 1758123851,
+
"narHash": "sha256-sbKwqBOLI423TvXvzlX2UGZR4pE1M8C7KXi0699ImmQ=",
+
"owner": "yunfachi",
+
"repo": "denix",
+
"rev": "d90f816b7b93304e5d5e69d429de0052f64d5149",
"type": "github"
},
"original": {
-
"owner": "Aylur",
-
"repo": "ags",
+
"owner": "yunfachi",
+
"repo": "denix",
"type": "github"
}
},
-
"astal": {
-
"inputs": {
-
"nixpkgs": [
-
"ags",
-
"nixpkgs"
-
]
-
},
+
"flake-compat": {
+
"flake": false,
"locked": {
-
"lastModified": 1742571008,
-
"narHash": "sha256-5WgfJAeBpxiKbTR/gJvxrGYfqQRge5aUDcGKmU1YZ1Q=",
-
"owner": "aylur",
-
"repo": "astal",
-
"rev": "dc0e5d37abe9424c53dcbd2506a4886ffee6296e",
+
"lastModified": 1747046372,
+
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
+
"owner": "edolstra",
+
"repo": "flake-compat",
+
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
-
"owner": "aylur",
-
"repo": "astal",
+
"owner": "edolstra",
+
"repo": "flake-compat",
"type": "github"
}
},
···
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
-
"type": "github"
-
},
-
"original": {
-
"owner": "numtide",
-
"repo": "flake-utils",
-
"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": {
···
"type": "github"
}
},
+
"gitignore": {
+
"inputs": {
+
"nixpkgs": [
+
"denix",
+
"pre-commit-hooks",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1709087332,
+
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
+
"owner": "hercules-ci",
+
"repo": "gitignore.nix",
+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hercules-ci",
+
"repo": "gitignore.nix",
+
"type": "github"
+
}
+
},
"home-manager": {
"inputs": {
"nixpkgs": [
···
]
},
"locked": {
-
"lastModified": 1744663884,
-
"narHash": "sha256-a6QGaZMDM1miK8VWzAITsEPOdmLk+xTPyJSTjVs3WhI=",
+
"lastModified": 1765480374,
+
"narHash": "sha256-HlbvQAqLx7WqZFFQZ8nu5UUJAVlXiV/kqKbyueA8srw=",
"owner": "nix-community",
"repo": "home-manager",
-
"rev": "d5cdf55bd9f19a3debd55b6cb5d38f7831426265",
+
"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": 1744480072,
-
"narHash": "sha256-h9MGdfc1ddQLaZ5eXdxUOY4SGvRe0IzIuX/03yVRras=",
+
"lastModified": 1765528203,
+
"narHash": "sha256-DTs3VkvRjW/Quu7y9hzNUrddysBXbcqv5Rpo4rtQYQI=",
"owner": "sodiboo",
"repo": "niri-flake",
-
"rev": "c845f42f0bf9a02350a1e561cb702911c61428a9",
+
"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": 1744475937,
-
"narHash": "sha256-vJXhE2BCJO3AxGUGqL7GW7ReeAL+OKy80ErMYDuILjM=",
+
"lastModified": 1765524373,
+
"narHash": "sha256-gi38XWhkb+H8iHhlXgv7MgUaQCuhmaTzKmq3yzYOg9g=",
"owner": "YaLTeR",
"repo": "niri",
-
"rev": "95eafba346a17104a9af71021011fcdc9e13776b",
+
"rev": "c22d8358c293f5e66748d8ac20600e6b114f9743",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1744478979,
-
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
+
"lastModified": 1765065051,
+
"narHash": "sha256-b7W9WsvyMOkUScNxbzS45KEJp0iiqRPyJ1I3JBE+oEE=",
"owner": "LnL7",
"repo": "nix-darwin",
-
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
+
"rev": "7e22bf538aa3e0937effcb1cee73d5f1bcc26f79",
"type": "github"
},
"original": {
-
"owner": "LnL7",
+
"owner": "nix-darwin",
"repo": "nix-darwin",
"type": "github"
}
···
]
},
"locked": {
-
"lastModified": 1744518957,
-
"narHash": "sha256-RLBSWQfTL0v+7uyskC5kP6slLK1jvIuhaAh8QvB75m4=",
+
"lastModified": 1765267181,
+
"narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=",
"owner": "nix-community",
"repo": "nix-index-database",
-
"rev": "4fc9ea78c962904f4ea11046f3db37c62e8a02fd",
+
"rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f",
"type": "github"
},
"original": {
···
},
"nix-vscode-extensions": {
"inputs": {
-
"flake-utils": "flake-utils_3",
-
"nixpkgs": "nixpkgs"
+
"nixpkgs": "nixpkgs_2"
},
"locked": {
-
"lastModified": 1744682419,
-
"narHash": "sha256-mS501Cff7cxofR5YwV5e8lyKuZz07uF/U7EKFy9IIv4=",
+
"lastModified": 1765505053,
+
"narHash": "sha256-nDMsy5cVXs4iShqoLt8gCz/s1LdVxsaUFsTuSY/22rg=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
-
"rev": "317477b679d95ad2f40c960272324987e81786a4",
+
"rev": "1778f178603ed65b4e4033c64f04ea51142ad6f6",
"type": "github"
},
"original": {
···
},
"nixpkgs": {
"locked": {
-
"lastModified": 1740547748,
-
"narHash": "sha256-Ly2fBL1LscV+KyCqPRufUBuiw+zmWrlJzpWOWbahplg=",
+
"lastModified": 1754340878,
+
"narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=",
"owner": "NixOS",
"repo": "nixpkgs",
-
"rev": "3a05eebede89661660945da1f151959900903b6a",
+
"rev": "cab778239e705082fe97bb4990e0d24c50924c04",
"type": "github"
},
"original": {
"owner": "NixOS",
+
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
-
"rev": "3a05eebede89661660945da1f151959900903b6a",
+
"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": 1744309437,
-
"narHash": "sha256-QZnNHM823am8apCqKSPdtnzPGTy2ZB4zIXOVoBp5+W0=",
+
"lastModified": 1765311797,
+
"narHash": "sha256-mSD5Ob7a+T2RNjvPvOA1dkJHGVrNVl8ZOrAwBjKBDQo=",
"owner": "NixOS",
"repo": "nixpkgs",
-
"rev": "f9ebe33a928b5d529c895202263a5ce46bdf12f7",
+
"rev": "09eb77e94fa25202af8f3e81ddc7353d9970ac1b",
"type": "github"
},
"original": {
"owner": "NixOS",
-
"ref": "nixos-24.11",
+
"ref": "nixos-25.11",
+
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
-
"lastModified": 1744463964,
-
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
+
"lastModified": 1759770925,
+
"narHash": "sha256-CZwkCtzTNclqlhuwDsVtGoRumTpqCUK0xSnFIMgd8ls=",
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
+
"rev": "674c2b09c59a220204350ced584cadaacee30038",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nixos",
+
"repo": "nixpkgs",
+
"rev": "674c2b09c59a220204350ced584cadaacee30038",
+
"type": "github"
+
}
+
},
+
"nixpkgs_3": {
+
"locked": {
+
"lastModified": 1765186076,
+
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
+
"owner": "nixos",
+
"repo": "nixpkgs",
+
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
"type": "github"
},
"original": {
···
"type": "github"
}
},
+
"pre-commit-hooks": {
+
"inputs": {
+
"flake-compat": "flake-compat",
+
"gitignore": "gitignore",
+
"nixpkgs": "nixpkgs"
+
},
+
"locked": {
+
"lastModified": 1754416808,
+
"narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=",
+
"owner": "cachix",
+
"repo": "git-hooks.nix",
+
"rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864",
+
"type": "github"
+
},
+
"original": {
+
"owner": "cachix",
+
"repo": "git-hooks.nix",
+
"type": "github"
+
}
+
},
"root": {
"inputs": {
-
"ags": "ags",
+
"denix": "denix",
"home-manager": "home-manager",
"iosevka-solai": "iosevka-solai",
"lix-module": "lix-module",
···
"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": {
-
"locked": {
-
"lastModified": 1681028828,
-
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
-
"owner": "nix-systems",
-
"repo": "default",
-
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
-
"type": "github"
-
},
-
"original": {
-
"owner": "nix-systems",
-
"repo": "default",
-
"type": "github"
-
}
-
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {
-
"lastModified": 1739246919,
-
"narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
+
"lastModified": 1755491097,
+
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
-
"rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
+
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
"type": "github"
},
"original": {
"owner": "Supreeeme",
-
"ref": "v0.5.1",
+
"ref": "v0.7",
"repo": "xwayland-satellite",
"type": "github"
}
···
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
-
"lastModified": 1743346993,
-
"narHash": "sha256-i7rWd/5BcqLgQEtB5L/6gKN5R5GUJcmm34F+iBivH60=",
+
"lastModified": 1765343581,
+
"narHash": "sha256-HtTPbV6z6AJPg2d0bHaJKFrnNha+SEbHvbJafKAQ614=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
-
"rev": "45c055696437a08e3989d9b91d9c617b84cc2bc3",
+
"rev": "f0ad674b7009a6afd80cea59d4fbf975dd68ee95",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
+
"type": "github"
+
}
+
},
+
"zen-browser": {
+
"inputs": {
+
"nixpkgs": [
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"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": "youwen5",
+
"repo": "zen-browser-flake",
"type": "github"
}
}
+48 -73
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";
};
···
inputs.nixpkgs.follows = "nixpkgs";
};
-
ags = {
-
url = "github:Aylur/ags";
+
denix = {
+
url = "github:yunfachi/denix";
+
inputs.nixpkgs.follows = "nixpkgs";
+
inputs.nix-darwin.follows = "nix-darwin";
+
inputs.home-manager.follows = "home-manager";
+
};
+
+
zen-browser = {
+
url = "github:youwen5/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
-
ags,
+
denix,
home-manager,
lix-module,
niri-flake,
···
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 = [./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 = defaultForSystems (pkgs:
+
pkgs.mkShell {
+
buildInputs = [pkgs.just];
+
});
-
devShells.x86_64-linux.default = pkgs.mkShell {
-
buildInputs = [agsPkgs.agsFull agsPkgs.io agsPkgs.apps agsPkgs.tray self.packages.${system}.iconifydl];
-
};
+
nixosConfigurations = mkConfigurations "nixos";
+
darwinConfigurations = mkConfigurations "darwin";
-
nixosConfigurations.wallsocket = nixpkgs.lib.nixosSystem {
-
system = "x86_64-linux";
-
specialArgs = {inherit inputs;};
-
modules = [
-
./nixos/wallsocket/configuration.nix
-
niri-flake.nixosModules.niri
-
nix-index-database.nixosModules.nix-index
-
lix-module.nixosModules.default
-
home-manager.nixosModules.home-manager
-
{
-
programs.command-not-found.enable = false;
-
home-manager = {
-
useGlobalPkgs = true;
-
useUserPackages = true;
-
backupFileExtension = "backup";
-
users.ovy = import ./home/wallsocket.nix;
-
extraSpecialArgs = {inherit inputs;};
-
};
-
}
-
];
-
};
+
# nixosModules.serverHomeManager = {...}: {
+
# imports = [home-manager.nixosModules.home-manager];
-
darwinConfigurations.shimmer = nix-darwin.lib.darwinSystem {
-
specialArgs = {inherit inputs;};
-
modules = [
-
./darwin/shimmer/configuration.nix
-
home-manager.darwinModules.home-manager
-
{
-
home-manager = {
-
useGlobalPkgs = true;
-
useUserPackages = true;
-
backupFileExtension = "backup";
-
users.ovy = import ./home/shimmer.nix;
-
extraSpecialArgs = {inherit inputs;};
-
};
-
}
-
];
-
};
-
-
nixosModules.serverHomeManager = {...}: {
-
imports = [home-manager.nixosModules.home-manager];
-
-
home-manager = {
-
useGlobalPkgs = true;
-
useUserPackages = true;
-
backupFileExtension = "backup";
-
users.ovy = import ./home/server.nix;
-
extraSpecialArgs = {inherit inputs;};
-
};
-
};
+
# home-manager = {
+
# useGlobalPkgs = true;
+
# useUserPackages = true;
+
# backupFileExtension = "backup";
+
# users.ovy = import ./home/server.nix;
+
# extraSpecialArgs = {inherit inputs;};
+
# };
+
# };
-
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);
};
}
-6
home/darwin/configs.nix
···
-
{...}: {
-
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;
-
};
-
}
-78
home/desktop/apps.nix
···
-
{
-
config,
-
pkgs,
-
...
-
}: {
-
home.packages = with pkgs; [
-
alejandra
-
audacity
-
blender
-
btop
-
# bottles
-
bruno
-
# davinci-resolve
-
distrobox
-
# feishin
-
gajim
-
glaxnimate
-
# godot_4
-
handbrake
-
heynote
-
klog-time-tracker
-
libreoffice
-
losslesscut-bin
-
lunacy
-
lutris
-
# mixxx
-
obs-studio
-
obsidian
-
oversteer
-
p7zip
-
picard
-
pinta
-
piper
-
podman-tui
-
# plasticity
-
prismlauncher
-
qbittorrent
-
qimgv
-
slack
-
syncthingtray
-
vesktop
-
vlc
-
vorta
-
winetricks
-
# wineWowPackages.full
-
# (wineWowPackages.full.overrideAttrs (finalAttrs: previousAttrs: {
-
# src = pkgs.fetchFromGitLab {
-
# owner = "ElementalWarrior";
-
# repo = "wine";
-
# rev = "d0fe9b9ab64d7e310b2b7afd135369e49758b24b";
-
# domain = "gitlab.winehq.org";
-
# hash = "sha256-xa5xZQxlY5MH2jcdKIOs7zd3y/1UoxQhe/L4NoMyCqw=";
-
# };
-
# }))
-
yt-dlp
-
yubioath-flutter
-
];
-
-
services.owncloud-client.enable = true;
-
-
programs.mangohud = {
-
enable = true;
-
settings = {
-
cpu_temp = true;
-
cpu_mhz = true;
-
cpu_power = true;
-
core_load = true;
-
gpu_core_clock = true;
-
gpu_temp = true;
-
gpu_power = true;
-
gpu_fan = true;
-
gpu_voltage = true;
-
vram = true;
-
ram = true;
-
};
-
};
-
home.sessionVariables.MANGOHUD_CONFIGFILE = "${config.xdg.configHome}/MangoHud/MangoHud.conf";
-
}
-12
home/modules/espanso.nix
···
-
{pkgs, ...}: {
-
services.espanso = {
-
enable = true;
-
package = pkgs.espanso-wayland;
-
matches.base.matches = [
-
{
-
trigger = ":degrees";
-
replace = "ยฐ";
-
}
-
];
-
};
-
}
-238
home/modules/niri.nix
···
-
{
-
config,
-
pkgs,
-
...
-
}: {
-
# programs.niri.enable = true;
-
programs.niri.package = pkgs.niri;
-
-
programs.niri.settings = {
-
# input.keyboard.xkb = {
-
# layout = "us";
-
# variant = "colemak";
-
# };
-
-
# TODO: maybe explicitly define outputs
-
-
input.mouse = {
-
natural-scroll = false;
-
accel-profile = "flat";
-
};
-
-
input.touchpad = {
-
enable = true;
-
tap = true;
-
natural-scroll = true;
-
scroll-factor = 0.3;
-
accel-profile = "adaptive";
-
tap-button-map = "left-right-middle";
-
scroll-method = "two-finger";
-
};
-
-
input.focus-follows-mouse = {
-
enable = true;
-
max-scroll-amount = "0%";
-
};
-
-
cursor.size = 32;
-
-
prefer-no-csd = true;
-
-
spawn-at-startup = [
-
{command = ["xwayland-satellite"];}
-
# {command = ["hyprpaper"];}
-
{command = ["kitty"];}
-
];
-
-
environment = {
-
DISPLAY = ":0";
-
GDK_BACKEND = "wayland";
-
};
-
-
layout = {
-
struts = let
-
x = 16;
-
y = 16;
-
in {
-
top = y;
-
bottom = y;
-
left = x;
-
right = x;
-
};
-
-
focus-ring = {
-
enable = true;
-
width = 2;
-
active.gradient = {
-
angle = 45;
-
from = "rgb(255 0 255)";
-
to = "rgb(0 255 255)";
-
relative-to = "workspace-view";
-
};
-
};
-
-
shadow.enable = true;
-
};
-
-
window-rules = [
-
{
-
geometry-corner-radius = let
-
r = 8.0;
-
in {
-
top-left = r;
-
top-right = r;
-
bottom-left = r;
-
bottom-right = r;
-
};
-
clip-to-geometry = true;
-
draw-border-with-background = false;
-
}
-
{
-
matches = [{app-id = "^1Password$";}];
-
open-floating = true;
-
}
-
];
-
-
# TODO: create custom keybinds on layer 1 so I don't need to use a fuckton of fingers
-
binds = with config.lib.niri.actions; {
-
# Misc/meta
-
"Mod+Shift+Slash".action = show-hotkey-overlay;
-
"Mod+Shift+E".action = quit;
-
"Mod+Q".action = close-window;
-
-
# Quick access
-
"Mod+Grave".action = spawn "kitty";
-
"Mod+B".action = spawn "vivaldi"; # TODO: spawn on startup instead
-
"Mod+R".action = spawn "fuzzel";
-
-
"Print".action = screenshot;
-
# "Ctrl+Print".action = screenshot-screen;
-
"Alt+Print".action = screenshot-window;
-
-
# Resizing
-
"Mod+F".action = maximize-column;
-
"Mod+Shift+F".action = fullscreen-window;
-
"Mod+Minus".action = set-column-width "-10%";
-
"Mod+Equal".action = set-column-width "+10%";
-
"Mod+Shift+Minus".action = set-window-height "-10%";
-
"Mod+Shift+Equal".action = set-window-height "+10%";
-
# "Mod+R".action = switch-preset-column-width;
-
"Mod+Shift+R".action = reset-window-height;
-
"Mod+C".action = center-column;
-
-
# Focus windows
-
"Mod+Left".action = focus-column-left;
-
"Mod+Right".action = focus-column-right;
-
"Mod+Up".action = focus-window-or-workspace-up;
-
"Mod+Down".action = focus-window-or-workspace-down;
-
"Mod+Home".action = focus-column-first;
-
"Mod+End".action = focus-column-last;
-
-
# Move windows
-
"Mod+Shift+Left".action = move-column-left;
-
"Mod+Shift+Right".action = move-column-right;
-
"Mod+Shift+Up".action = move-window-up-or-to-workspace-up;
-
"Mod+Shift+Down".action = move-window-down-or-to-workspace-down;
-
"Mod+Shift+Home".action = move-column-to-first;
-
"Mod+Shift+End".action = move-column-to-last;
-
-
"Mod+Comma".action = consume-window-into-column;
-
"Mod+Period".action = expel-window-from-column;
-
-
# Workspaces
-
"Mod+Page_Down".action = focus-workspace-down;
-
"Mod+Page_Up".action = focus-workspace-up;
-
"Mod+Ctrl+Page_Down".action = move-column-to-workspace-down;
-
"Mod+Ctrl+Page_Up".action = move-column-to-workspace-up;
-
"Mod+Shift+Page_Down".action = move-workspace-down;
-
"Mod+Shift+Page_Up".action = move-workspace-up;
-
"Mod+Tab".action = focus-workspace-previous;
-
-
# TODO: Screens
-
# "Mod+Shift+Left".action = focus-monitor-left;
-
# "Mod+Shift+Down".action = focus-monitor-down;
-
# "Mod+Shift+Up".action = focus-monitor-up;
-
# "Mod+Shift+Right".action = focus-monitor-right;
-
# "Mod+Shift+Ctrl+Left".action = move-column-to-monitor-left;
-
# "Mod+Shift+Ctrl+Down".action = move-column-to-monitor-down;
-
# "Mod+Shift+Ctrl+Up".action = move-column-to-monitor-up;
-
# "Mod+Shift+Ctrl+Right".action = move-column-to-monitor-right;
-
-
# Scrolling through workspaces
-
# `cooldown-ms` used to not go through workspaces really fast
-
"Mod+WheelScrollDown" = {
-
cooldown-ms = 150;
-
action = focus-workspace-down;
-
};
-
"Mod+WheelScrollUp" = {
-
cooldown-ms = 150;
-
action = focus-workspace-up;
-
};
-
"Mod+Ctrl+WheelScrollDown" = {
-
cooldown-ms = 150;
-
action = move-column-to-workspace-down;
-
};
-
"Mod+Ctrl+WheelScrollUp" = {
-
cooldown-ms = 150;
-
action = move-column-to-workspace-up;
-
};
-
-
# Scrolling through windows
-
"Mod+WheelScrollRight".action = focus-column-right;
-
"Mod+WheelScrollLeft".action = focus-column-left;
-
"Mod+Ctrl+WheelScrollRight".action = move-column-right;
-
"Mod+Ctrl+WheelScrollLeft".action = move-column-left;
-
# Holding shift while scrolling usually does horizontal, so do the same here.
-
"Mod+Shift+WheelScrollDown".action = focus-column-right;
-
"Mod+Shift+WheelScrollUp".action = focus-column-left;
-
"Mod+Ctrl+Shift+WheelScrollDown".action = move-column-right;
-
"Mod+Ctrl+Shift+WheelScrollUp".action = move-column-left;
-
};
-
};
-
-
programs.wlogout = {
-
enable = true;
-
layout = [
-
{
-
"label" = "lock";
-
"action" = "loginctl lock-session";
-
"text" = "Lock";
-
"keybind" = "l";
-
}
-
{
-
"label" = "hibernate";
-
"action" = "systemctl hibernate";
-
"text" = "Hibernate";
-
"keybind" = "h";
-
}
-
{
-
"label" = "logout";
-
"action" = "loginctl terminate-user $USER";
-
"text" = "Logout";
-
"keybind" = "e";
-
}
-
{
-
"label" = "shutdown";
-
"action" = "systemctl poweroff";
-
"text" = "Shutdown";
-
"keybind" = "s";
-
}
-
{
-
"label" = "suspend";
-
"action" = "systemctl suspend";
-
"text" = "Suspend";
-
"keybind" = "u";
-
}
-
{
-
"label" = "reboot";
-
"action" = "systemctl reboot";
-
"text" = "Reboot";
-
"keybind" = "r";
-
}
-
];
-
# https://github.com/ArtsyMacaw/wlogout/blob/master/style.css
-
# style = ''''
-
};
-
-
programs.fuzzel = {};
-
}
-22
home/modules/ssh.nix
···
-
{lib, ...}: let
-
_1passwordAgent = options:
-
lib.hm.dag.entryBefore ["*"] ({
-
extraOptions.IdentityAgent = "~/.1password/agent.sock";
-
extraOptions.IdentitiesOnly = "no";
-
}
-
// options);
-
in {
-
programs.ssh = {
-
enable = true;
-
matchBlocks = {
-
"*" = {
-
identitiesOnly = true;
-
identityFile = "~/.ssh/id_ed25519_sk_rk";
-
user = "ovy";
-
};
-
# OpenWrt
-
"192.168.1.1" = _1passwordAgent {user = "root";};
-
"*.repo.borgbase.com" = _1passwordAgent {};
-
};
-
};
-
}
-24
home/modules/xdg.nix
···
-
{
-
config,
-
pkgs,
-
...
-
}: let
-
vivalarc = pkgs.fetchFromGitHub {
-
owner = "tovifun";
-
repo = "VivalArc";
-
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;
-
}
-23
home/programs/browser.nix
···
-
{pkgs, ...}: {
-
programs.chromium = {
-
enable = true;
-
package = pkgs.vivaldi.overrideAttrs (finalAttrs: previousAttrs: {
-
dontWrapQtApps = false;
-
dontPatchELF = true;
-
nativeBuildInputs = previousAttrs.nativeBuildInputs ++ [pkgs.kdePackages.wrapQtAppsHook];
-
});
-
commandLineArgs = ["--enable-blink-features=MiddleClickAutoscroll" "--enable-features=VaapiVideoDecoder"];
-
extensions = [
-
{id = "aeblfdkhhhdcdjpifhhbdiojplfjncoa";} # 1Password
-
{id = "hhinaapppaileiechjoiifaancjggfjm";} # Web Scrobbler
-
{id = "jinjaccalgkegednnccohejagnlnfdag";} # Violentmonkey
-
{id = "fkagelmloambgokoeokbpihmgpkbgbfm";} # Indie Wiki Buddy
-
{id = "paponcgjfojgemddooebbgniglhkajkj";} # Ambient light for YouTube
-
{id = "immpkjjlgappgfkkfieppnmlhakdmaab";} # Imagus (TODO: find alternative?)
-
{id = "nhdogjmejiglipccpnnnanhbledajbpd";} # Vue devtools
-
{id = "nkgllhigpcljnhoakjkgaieabnkmgdkb";} # Don't Fuck With Paste
-
{id = "kgcjekpmcjjogibpjebkhaanilehneje";} # hoarder.app
-
# {id = "kfidecgcdjjfpeckbblhmfkhmlgecoff";} # Svelte DevTools
-
];
-
};
-
}
-113
home/programs/common-cli.nix
···
-
{
-
pkgs,
-
lib,
-
config,
-
...
-
}: {
-
# Core CLI tools
-
home.packages = with pkgs; [
-
curlie
-
du-dust
-
duf
-
fd
-
jq
-
moar
-
nix-your-shell
-
ripgrep
-
];
-
-
programs.aria2.enable = true;
-
-
programs.bat = {
-
enable = true;
-
config = {
-
theme = "DarkNeon";
-
italic-text = "always";
-
};
-
};
-
-
# Pager & manpages options
-
home.sessionVariables = {
-
PAGER = "moar";
-
MOAR = "--no-linenumbers";
-
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
-
MANROFFOPT = "-c";
-
};
-
-
programs.direnv = {
-
enable = true;
-
nix-direnv.enable = true;
-
config.whitelist.prefix = [
-
"${config.home.homeDirectory}/Projects/bots-gg"
-
"${config.home.homeDirectory}/Projects/dijit"
-
"${config.home.homeDirectory}/Projects/personal"
-
"${config.home.homeDirectory}/Projects/work"
-
];
-
};
-
-
# TODO: decide on this vs lsd?
-
programs.eza.enable = true;
-
-
# TODO
-
# Investigate preview stuff as default command
-
# https://github.com/kidonng/preview.fish
-
# Explore fzf search modes
-
programs.fzf = {
-
enable = true;
-
enableFishIntegration = false;
-
defaultOptions = [
-
"--ansi"
-
"--cycle"
-
"--layout=reverse"
-
"--border"
-
"--height=90%"
-
"--marker=\"*\""
-
"--preview 'bat --color=always --style=header,numbers --line-range :300 {}'"
-
# I usually use a vertical term so this is more practical.
-
# TODO: possible to dynamically change based on terminal dimensinns?
-
"--preview-window='bottom:50%:wrap'"
-
];
-
defaultCommand = "fd --color=always --type file --follow --hidden --exclude .git --exclude node_modules";
-
};
-
home.sessionVariables.FZF_CTRL_T_COMMAND = "fd --color=always --follow";
-
-
programs.micro = {
-
enable = true;
-
settings = {
-
clipboard = "external";
-
hlsearch = true;
-
parsecursor = true;
-
scrollbar = true;
-
tabmovement = true;
-
tabsize = 2;
-
tabstospaces = true;
-
};
-
};
-
-
programs.nix-index.enable = true;
-
-
programs.tealdeer = {
-
enable = true;
-
settings = {
-
updates = {
-
auto_update = true;
-
};
-
};
-
};
-
-
programs.zellij = {
-
enable = true;
-
enableFishIntegration = false;
-
settings = {
-
mouse_mode = true;
-
theme = "catppuccin-mocha";
-
ui.pane_frames.rounded_corners = true;
-
ui.pane_frames.hide_session_name = true;
-
};
-
};
-
-
programs.zoxide = {
-
enable = true;
-
enableFishIntegration = true;
-
};
-
}
-21
home/programs/desktop-cli.nix
···
-
{pkgs, ...}: {
-
# Misc packages
-
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
-
];
-
}
-117
home/programs/fish.nix
···
-
{pkgs, ...}: {
-
# TODO: custom fifc rules (nix shell, nix run, ...)
-
# TODO: how to customise fifc pane
-
programs.fish = {
-
enable = true;
-
interactiveShellInit = ''
-
set fish_greeting
-
set fzf_diff_highlighter delta --paging=never --width=20
-
set fzf_preview_dir_cmd eza --all --color=always
-
set fzf_fd_opts --hidden --exclude=.git --exclude=node_modules
-
-
# Because I use the Colemak input source on MacOS, using Alt/Option in
-
# keybinds is a no-go, due to problems in Alacritty/iTerm's
-
# (and probably others) input handler, which uses key position codes
-
# instead of the actual value of the key. For some reason this doesn't
-
# cause problems in keybinds using only Ctrl.
-
-
fzf_configure_bindings --directory=\cf --git_log=\cl --git_status=\cs --processes=\cp
-
-
nix-your-shell fish | source
-
-
# Docker compose alias that switches to if the standalone binary is present.
-
if which docker-compose &> /dev/null;
-
alias dc docker-compose;
-
else;
-
alias dc "docker compose";
-
end;
-
'';
-
-
shellAbbrs = {
-
code = "codium";
-
ga = "git add";
-
gaa = "git add -A";
-
gc = {
-
setCursor = "%";
-
expansion = "git commit -m \"%\"";
-
};
-
gca = "git commit --amend";
-
gco = "git checkout";
-
gd = "git diff HEAD";
-
gl = "git log";
-
gp = "git pull";
-
gr = "git rebase";
-
gs = "git status";
-
jctl = {
-
position = "anywhere";
-
expansion = "journalctl";
-
};
-
mctl = {
-
position = "anywhere";
-
expansion = "machinectl";
-
};
-
sctl = {
-
position = "anywhere";
-
expansion = "systemctl";
-
};
-
};
-
-
shellAliases = {
-
cat = "bat";
-
ls = "eza";
-
hm = "home-manager";
-
ncg = "nix-collect-garbage";
-
yws = "yarn workspace";
-
ywss = "yarn workspaces";
-
ze = "zellij";
-
};
-
-
plugins = [
-
{
-
name = "fzf.fish";
-
src = pkgs.fetchFromGitHub {
-
owner = "PatrickF1";
-
repo = "fzf.fish";
-
rev = "8920367cf85eee5218cc25a11e209d46e2591e7a";
-
hash = "sha256-lxQZo6APemNjt2c21IL7+uY3YVs81nuaRUL7NDMcB6s=";
-
};
-
}
-
{
-
name = "fifc";
-
src = pkgs.fetchFromGitHub {
-
owner = "gazorby";
-
repo = "fifc";
-
rev = "a01650cd432becdc6e36feeff5e8d657bd7ee84a";
-
hash = "sha256-Nrart7WAh2VQhsDDe0EFI59TqvBO56US2MraqencxgE";
-
};
-
}
-
{
-
name = "lumin";
-
src = pkgs.fetchFromGitHub {
-
owner = "ovyerus";
-
repo = "lumin";
-
rev = "dc0b8f57f5b2a58a289ea6088843bd56f8633aa6";
-
hash = "sha256-wzL6+RnzfSpuJAISQdTZx2XIBDD2bXh1ejwtpgNzUYE=";
-
};
-
}
-
{
-
name = "nix.fish";
-
src = pkgs.fetchFromGitHub {
-
owner = "kidonng";
-
repo = "nix.fish";
-
rev = "ad57d970841ae4a24521b5b1a68121cf385ba71e";
-
hash = "sha256-GMV0GyORJ8Tt2S9wTCo2lkkLtetYv0rc19aA5KJbo48=";
-
};
-
}
-
{
-
name = "autopair.fish";
-
src = pkgs.fetchFromGitHub {
-
owner = "jorgebucaran";
-
repo = "autopair.fish";
-
rev = "4d1752ff5b39819ab58d7337c69220342e9de0e2";
-
hash = "sha256-qt3t1iKRRNuiLWiVoiAYOu+9E7jsyECyIqZJ/oRIT1A=";
-
};
-
}
-
];
-
};
-
}
-70
home/programs/git.nix
···
-
{
-
pkgs,
-
lib,
-
...
-
}: {
-
xdg.configFile."git/allowed_signers".source = ../../files/git/allowed_signers;
-
-
programs.git = {
-
enable = true;
-
userName = "Ashlynne Mitchell";
-
userEmail = "ovy@ovyerus.com";
-
delta.enable = true;
-
-
signing = {
-
signByDefault = true;
-
format = "ssh";
-
key = "~/.ssh/id_ed25519_sk_rk";
-
};
-
-
extraConfig = {
-
# TODO: custom pretty stuff?
-
blame.showEmail = true;
-
init.defaultBranch = "main";
-
pull.rebase = true;
-
-
log = {
-
abbrevCommit = true;
-
# TODO: `git log --oneline` looks silly with this. Need custom format.
-
showSignature = true;
-
# TODO: trial for a while and see if I like this.
-
date = "human";
-
};
-
-
merge = {
-
# Try to avoid merge commits
-
ff = "only";
-
# Really only useful on a well-managed team. Maybe eventually.
-
# verifySignatures = true;
-
};
-
-
push = {
-
autoSetupRemote = true;
-
followTags = true;
-
};
-
-
# Require explicit `drop` in interactive rebase
-
rebase.missingCommitsCheck = "error";
-
rerere.enabled = true;
-
-
status = {
-
relativePaths = false;
-
showStash = true;
-
};
-
-
gpg.ssh.allowedSignersFile = "~/.config/git/allowed_signers";
-
# "gpg.ssh.program = "gfh-keygen";
-
# "gpg.ssh.defaultKeyCommand = "gfh";
-
};
-
};
-
-
programs.gh = {
-
enable = true;
-
settings = {
-
git_protocol = "ssh";
-
aliases = {
-
clone = "repo clone";
-
};
-
};
-
};
-
}
-33
home/programs/kitty.nix
···
-
{
-
programs.kitty = {
-
enable = true;
-
font.name = "Iosevka Solai";
-
font.size = 12;
-
shellIntegration.enableFishIntegration = true;
-
themeFile = "rose-pine";
-
settings = {
-
cursor_shape = "block";
-
cursor_shape_unfocused = "hollow";
-
scrollback_lines = 10000;
-
scrollback_pager = "moar +INPUT_LINE_NUMBER";
-
scrollback_pager_history_size = 5;
-
window_padding_width = 8;
-
hide_window_decorations = true;
-
tab_bar_style = "powerline"; # custom?
-
# tab_bar_margin_width = "8.0";
-
# tab_bar_margin_height = "8.0 0.0";
-
tab_powerline_style = "slanted";
-
tab_activity_symbol = "๐Ÿž›";
-
tab_title_template = "{fmt.fg.magenta}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}";
-
# window logo?
-
paste_actions = "quote-urls-at-prompt,confirm-if-large";
-
-
background_opacity = "0.5";
-
background_blur = 64;
-
-
notify_on_cmd_finish = "unfocused 10.0 bell";
-
macos_option_as_alt = "left";
-
wayland_enable_ime = false;
-
};
-
};
-
}
-15
home/programs/syncthing.nix
···
-
{
-
config,
-
lib,
-
pkgs,
-
...
-
}: {
-
services.syncthing = {
-
enable = true;
-
tray.enable = true;
-
tray.package = pkgs.syncthingtray;
-
};
-
-
# Fix syncthingtray complaining about the tray not existing, because of the custom tray service above.
-
systemd.user.services.syncthingtray.Service.ExecStart = lib.mkForce "${config.services.syncthing.tray.package}/bin/${config.services.syncthing.tray.command} --wait";
-
}
-234
home/programs/vscode.nix
···
-
{
-
inputs,
-
pkgs,
-
...
-
}: {
-
home.sessionVariables.EDITOR = "codium --wait";
-
-
programs.vscode = {
-
enable = true;
-
mutableExtensionsDir = false;
-
package = pkgs.vscodium;
-
-
profiles.default = {
-
enableUpdateCheck = false;
-
enableExtensionUpdateCheck = false;
-
-
extensions = let
-
vscode-extensions = inputs.nix-vscode-extensions.extensions.${pkgs.system};
-
inherit (vscode-extensions) open-vsx vscode-marketplace;
-
in
-
with open-vsx; [
-
kamadorueda.alejandra
-
astro-build.astro-vscode
-
matthewpi.caddyfile-support
-
raidou.calc
-
artlaman.chalice-icon-theme # TODO: i should fork this to add support for some newer files (tbd)
-
adpyke.codesnap
-
clinyong.vscode-css-modules
-
mkhl.direnv
-
leonardssh.vscord
-
ms-azuretools.vscode-docker
-
editorconfig.editorconfig
-
irongeek.vscode-env
-
pgourlain.erlang
-
usernamehw.errorlens
-
dbaeumer.vscode-eslint
-
tamasfe.even-better-toml
-
sleistner.vscode-fileutils
-
bmalehorn.vscode-fish
-
github.vscode-github-actions
-
eamodio.gitlens
-
# TODO: terraform (use opentofu instead)
-
ms-vscode.hexeditor
-
lokalise.i18n-ally
-
kisstkondoros.vscode-gutter-preview
-
ms-python.isort
-
bierner.markdown-preview-github-styles
-
unifiedjs.vscode-mdx
-
jnoortheen.nix-ide
-
nuxtr.nuxtr-vscode
-
vunguyentuan.vscode-postcss
-
esbenp.prettier-vscode
-
prisma.prisma
-
# TODO: use jedi instead of pylance
-
ms-python.python
-
ms-python.debugpy
-
mechatroner.rainbow-csv
-
medo64.render-crlf
-
stkb.rewrap
-
rust-lang.rust-analyzer
-
mrmlnc.vscode-scss
-
svelte.svelte-vscode
-
jock.svg
-
coolbear.systemd-unit-file
-
bradlc.vscode-tailwindcss
-
myriad-dreamin.tinymist
-
gruntfuggly.todo-tree
-
tomoki1207.pdf
-
zxh404.vscode-proto3
-
styled-components.vscode-styled-components # TODO: don't really need this
-
vue.volar
-
wakatime.vscode-wakatime
-
redhat.vscode-yaml
-
arcanis.vscode-zipfs
-
vscode-marketplace.wraith13.background-phi-colors
-
vscode-marketplace.be5invis.theme-dolch
-
vscode-marketplace.fabiospampinato.vscode-diff
-
vscode-marketplace.jakebecker.elixir-ls
-
vscode-marketplace.zh9528.file-size
-
vscode-marketplace.vladdesv.vscode-klog
-
vscode-marketplace.dt.ghlink
-
vscode-marketplace.tyriar.lorem-ipsum
-
vscode-marketplace.phoenixframework.phoenix
-
vscode-marketplace.frigus02.vscode-sql-tagged-template-literals-syntax-only # TODO: alternative?
-
];
-
-
userSettings = {
-
# Formatters
-
"editor.defaultFormatter" = "esbenp.prettier-vscode";
-
"[elixir]"."editor.defaultFormatter" = "JakeBecker.elixir-ls";
-
"[nix]"."editor.defaultFormatter" = "kamadorueda.alejandra";
-
"[prisma]"."editor.defaultFormatter" = "Prisma.prisma";
-
"[python]"."editor.defaultFormatter" = "ms-python.python";
-
"[rust]"."editor.defaultFormatter" = "rust-lang.rust-analyzer";
-
-
# Sane defaults
-
"editor.tabSize" = 2;
-
"editor.insertSpaces" = true;
-
"breadcrumbs.enabled" = true;
-
"editor.wordWrap" = "off";
-
"security.workspace.trust.enabled" = false;
-
"security.workspace.trust.untrustedFiles" = "open";
-
"files.eol" = "\n";
-
"workbench.editor.empty.hint" = "hidden";
-
"comments.openView" = "never";
-
"editor.minimap.enabled" = false;
-
"editor.stickyScroll.enabled" = true;
-
"workbench.layoutControl.enabled" = false;
-
"diffEditor.ignoreTrimWhitespace" = true;
-
"editor.acceptSuggestionOnEnter" = "off";
-
"editor.formatOnSave" = true;
-
"editor.inlineSuggest.enabled" = true;
-
"editor.renderWhitespace" = "none";
-
"editor.suggestSelection" = "first";
-
"editor.tabCompletion" = "on";
-
"emmet.triggerExpansionOnTab" = true;
-
"explorer.confirmDelete" = false;
-
"explorer.confirmDragAndDrop" = false;
-
"redhat.telemetry.enabled" = false;
-
"workbench.tips.enabled" = false;
-
"workbench.tree.indent" = 16;
-
"workbench.tree.renderIndentGuides" = "always";
-
"editor.unicodeHighlight.ambiguousCharacters" = true;
-
"errorLens.enabledDiagnosticLevels" = ["error" "warning"];
-
"editor.acceptSuggestionOnCommitCharacter" = false;
-
"files.watcherExclude" = {
-
"**/.git/**" = true;
-
"**/node_modules/*/**" = true;
-
};
-
"search.exclude" = {
-
"**/node_modules" = true;
-
"**/bower_components" = true;
-
"**/*.code-search" = true;
-
"**/.yarn" = true;
-
};
-
"terminal.integrated.commandsToSkipShell" = [
-
"-workbench.action.quickOpenView"
-
"-workbench.action.quickOpen"
-
"-editor.action.clipboardCutAction"
-
];
-
# "prettier.prettierPath" = "prettierd";
-
"prettier.proseWrap" = "always";
-
-
# Pretties
-
"workbench.colorTheme" = "Dolch";
-
"workbench.iconTheme" = "chalice-icon-theme";
-
"editor.fontFamily" = "'Iosevka Solai', Menlo, Monaco, 'Courier New', monospace";
-
"editor.fontSize" = 16;
-
"terminal.integrated.fontFamily" = "'Iosevka Solai Term', Consolas, 'Courier New', monospace";
-
"terminal.integrated.fontSize" = 14;
-
"terminal.integrated.scrollback" = 9999999999;
-
"editor.fontLigatures" = true;
-
"editor.cursorSmoothCaretAnimation" = "on";
-
"editor.smoothScrolling" = true;
-
"zenMode.fullScreen" = false;
-
"zenMode.centerLayout" = false;
-
"zenMode.hideLineNumbers" = true;
-
-
# No barfing rainbows over my UI pls
-
"backgroundPhiColors.baseColor" = "#FFFFFF";
-
"backgroundPhiColors.bodySpacesEnabled" = false;
-
"backgroundPhiColors.indentErrorEnabled" = false;
-
"backgroundPhiColors.lineEnabled" = false;
-
"backgroundPhiColors.spacesAlpha" = 10;
-
"backgroundPhiColors.tokenActiveAlpha" = 30;
-
"editor.bracketPairColorization.enabled" = false;
-
-
# Codesnap
-
"codesnap.containerPadding" = "2em";
-
"codesnap.target" = "window";
-
"codesnap.transparentBackground" = true;
-
"codesnap.boxShadow" = "none";
-
"codesnap.showLineNumbers" = false;
-
"codesnap.showWindowControls" = false;
-
"codesnap.shutterAction" = "copy";
-
"codesnap.roundedCorners" = true;
-
-
# Git
-
"git.autorefresh" = true;
-
"git.autofetch" = false;
-
"git.autoStash" = true;
-
"git.mergeEditor" = false;
-
"git.confirmSync" = false;
-
"git.enableSmartCommit" = true;
-
"gitlens.advanced.messages" = {
-
"suppressLineUncommittedWarning" = true;
-
};
-
"gitlens.hovers.currentLine.over" = "annotation";
-
-
# Nix
-
"nix.enableLanguageServer" = true;
-
"nix.serverPath" = "nil";
-
"alejandra.program" = "alejandra";
-
-
# Elixir/erlang
-
"elixirLS.suggestSpecs" = false;
-
"elixirLS.fetchDeps" = false;
-
"elixirLS.mixEnv" = "dev";
-
"elixir.credo.ignoreWarningMessages" = true;
-
-
# Python
-
"python.analysis.typeCheckingMode" = "basic";
-
-
# JS
-
"debug.javascript.autoAttachFilter" = "onlyWithFlag";
-
-
# CSS
-
"files.associations"."*.css" = "tailwindcss";
-
-
# Misc
-
"yaml.format.proseWrap" = "always";
-
"workbench.startupEditor" = "none";
-
"remote.SSH.connectTimeout" = 30;
-
"remote.SSH.useLocalServer" = true;
-
"remote.SSH.path" = "/run/current-system/sw/bin/ssh";
-
"extensions.ignoreRecommendations" = true;
-
"svg.preview.mode" = "svg";
-
"vscord.status.problems.enabled" = false;
-
"vscord.status.state.text.editing" = "Working on {file_name}{file_extension}";
-
"vscord.ignore.workspaces" = ["~/Work"];
-
"typescript.updateImportsOnFileMove.enabled" = "never";
-
"git.openRepositoryInParentFolders" = "never";
-
"diffEditor.useInlineViewWhenSpaceIsLimited" = false;
-
"svelte.enable-ts-plugin" = true;
-
"gitlens.launchpad.indicator.enabled" = false;
-
"window.titleBarStyle" = "custom";
-
"files.simpleDialog.enable" = true;
-
"window.dialogStyle" = "custom";
-
-
# Fuck off
-
};
-
};
-
};
-
}
-10
home/server.nix
···
-
{...}: {
-
imports = [./programs/common-cli.nix ./programs/fish.nix];
-
home.sessionVariables.EDITOR = "micro";
-
-
news.display = "silent";
-
programs.home-manager.enable = true;
-
home.homeDirectory = "/home/ovy";
-
home.username = "ovy";
-
home.stateVersion = "23.05";
-
}
-18
home/shimmer.nix
···
-
{lib, ...}: {
-
imports = [
-
./darwin/configs.nix
-
./modules/ssh.nix
-
./programs/common-cli.nix
-
./programs/desktop-cli.nix
-
./programs/fish.nix
-
./programs/git.nix
-
];
-
-
programs.ssh.includes = ["~/.orbstack/ssh/config"];
-
-
news.display = "silent";
-
programs.home-manager.enable = true;
-
home.homeDirectory = lib.mkForce "/Users/ovy";
-
home.username = "ovy";
-
home.stateVersion = "23.05";
-
}
-39
home/wallsocket.nix
···
-
{
-
pkgs,
-
inputs,
-
...
-
}: {
-
imports = [
-
./desktop/apps.nix
-
./modules/espanso.nix
-
./modules/niri.nix
-
./modules/ssh.nix
-
./modules/xdg.nix
-
./programs/browser.nix
-
./programs/common-cli.nix
-
./programs/desktop-cli.nix
-
./programs/fish.nix
-
./programs/git.nix
-
./programs/kitty.nix
-
./programs/syncthing.nix
-
./programs/vscode.nix
-
];
-
-
systemd.user.targets.tray = {
-
Unit = {
-
Description = "Home Manager System Tray";
-
Requires = ["graphical-session-pre.target"];
-
};
-
};
-
-
# Temporary location for these
-
home.packages = [pkgs.inotify-tools inputs.ags.packages.${pkgs.system}.default];
-
-
home.sessionVariables.DOCKER_HOST = "unix:///run/user/1000/podman/podman.sock";
-
-
news.display = "silent";
-
programs.home-manager.enable = false;
-
home.homeDirectory = "/home/ovy";
-
home.username = "ovy";
-
home.stateVersion = "24.05";
-
}
+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
hosts/wallsocket/default.nix
···
+
{delib, ...}:
+
delib.host {
+
name = "wallsocket";
+
}
+71
hosts/wallsocket/hardware.nix
···
+
{
+
delib,
+
lib,
+
pkgs,
+
...
+
}: let
+
platform = "x86_64-linux";
+
stateVersion = "24.05";
+
in
+
delib.host {
+
name = "wallsocket";
+
+
homeManagerSystem = platform;
+
home.home.stateVersion = stateVersion;
+
+
nixos = {
+
nixpkgs.hostPlatform = platform;
+
system.stateVersion = stateVersion;
+
+
hardware.enableAllFirmware = true;
+
hardware.cpu.amd.updateMicrocode = true;
+
+
# Kernel
+
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
+
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
+
fileSystems."/" = {
+
device = "/dev/disk/by-uuid/1b08f109-17e9-40f4-a7fd-6e5943ce7d5e";
+
fsType = "ext4";
+
};
+
+
fileSystems."/boot" = {
+
device = "/dev/disk/by-uuid/CF5D-B9DB";
+
fsType = "vfat";
+
options = ["fmask=0022" "dmask=0022"];
+
};
+
+
fileSystems."/home" = {
+
device = "/dev/disk/by-uuid/31974b72-eca5-4758-bd66-63ae57c1b4b0";
+
fsType = "ext4";
+
};
+
+
fileSystems."/mnt/misc" = {
+
device = "/dev/disk/by-uuid/bbc7adf8-475a-4bec-843f-77d4b904c42e";
+
fsType = "ext4";
+
};
+
+
fileSystems."/mnt/games" = {
+
device = "/dev/disk/by-uuid/e61763de-753c-42f0-ba9b-5ac6b6ffdf08";
+
fsType = "ext4";
+
};
+
+
swapDevices = [];
+
+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+
# (the default) this is the recommended approach. When using systemd-networkd it's
+
# still possible to use this option, but it's recommended to use it in conjunction
+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+
networking.useDHCP = lib.mkDefault true;
+
};
+
}
+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
+41
modules/1password.nix
···
+
{
+
delib,
+
homeConfig,
+
...
+
}:
+
delib.module {
+
name = "_1password";
+
+
options = delib.singleEnableOption true;
+
+
nixos.ifEnabled = {
+
services.systembus-notify.enable = true;
+
programs._1password.enable = true;
+
programs._1password-gui = {
+
enable = true;
+
polkitPolicyOwners = ["ovy"]; # TODO: replace
+
};
+
+
environment.etc."1password/custom_allowed_browsers" = {
+
text = ''
+
vivaldi-bin
+
zen
+
zen-bin
+
'';
+
mode = "0755";
+
};
+
};
+
+
home.ifEnabled.programs.ssh.matchBlocks = let
+
_1passwordAgent = options:
+
homeConfig.lib.dag.entryBefore ["*"] ({
+
extraOptions.IdentityAgent = "~/.1password/agent.sock";
+
extraOptions.IdentitiesOnly = "no";
+
}
+
// options);
+
in {
+
# OpenWrt
+
"192.168.1.1" = _1passwordAgent {user = "root";};
+
"*.repo.borgbase.com" = _1passwordAgent {};
+
};
+
}
+20
modules/audio.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "audio";
+
+
options = delib.singleEnableOption true;
+
+
nixos.ifEnabled = {
+
services.pulseaudio.enable = false;
+
security.rtkit.enable = true;
+
+
services.pipewire = {
+
enable = true;
+
alsa.enable = true;
+
alsa.support32Bit = true;
+
pulse.enable = true;
+
# If you want to use JACK applications, uncomment this
+
#jack.enable = true;
+
};
+
};
+
}
+26
modules/bluetooth.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "bluetooth";
+
+
options = delib.singleEnableOption true;
+
+
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;
+
environment.systemPackages = [pkgs.kdePackages.bluedevil];
+
};
+
}
+30
modules/config/args.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "args";
+
+
options.args = with delib; {
+
shared = attrsLegacyOption {};
+
nixos = attrsLegacyOption {};
+
home = attrsLegacyOption {};
+
darwin = attrsLegacyOption {};
+
};
+
+
nixos.always = {cfg, ...}: {
+
imports = [
+
{_module.args = cfg.shared;}
+
{_module.args = cfg.nixos;}
+
];
+
};
+
home.always = {cfg, ...}: {
+
imports = [
+
{_module.args = cfg.shared;}
+
{_module.args = cfg.home;}
+
];
+
};
+
darwin.always = {cfg, ...}: {
+
imports = [
+
{_module.args = cfg.shared;}
+
{_module.args = cfg.darwin;}
+
];
+
};
+
}
+10
modules/config/constants.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "constants";
+
+
options.constants = with delib; {
+
username = readOnly (strOption "ovy");
+
userfullname = readOnly (strOption "Ashlynne Mitchell");
+
useremail = readOnly (strOption "ovy@ovyerus.com");
+
};
+
}
+29
modules/config/home.nix
···
+
{
+
delib,
+
moduleSystem,
+
homeManagerUser,
+
config,
+
...
+
}:
+
delib.module {
+
name = "home";
+
+
myconfig.always.args.shared.homeConfig =
+
if moduleSystem == "home"
+
then config
+
else config.home-manager.users.${homeManagerUser};
+
+
home.always = {myconfig, ...}: let
+
inherit (myconfig.constants) username;
+
in {
+
home = {
+
inherit username;
+
homeDirectory =
+
if moduleSystem == "darwin"
+
then "/Users/${username}"
+
else "/home/${username}";
+
};
+
news.display = "silent";
+
programs.home-manager.enable = false;
+
};
+
}
+21
modules/config/hosts.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "hosts";
+
+
options = with delib; let
+
host = {
+
options = hostSubmoduleOptions;
+
};
+
in {
+
host = hostOption host;
+
hosts = hostsOption host;
+
};
+
+
myconfig.always = {myconfig, ...}: {
+
args.shared = {inherit (myconfig) host hosts;};
+
};
+
+
home.always = {myconfig, ...}: {
+
assertions = delib.hostNamesAssertions myconfig.hosts;
+
};
+
}
+29
modules/config/user.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "user";
+
+
nixos.always = {myconfig, ...}: let
+
inherit (myconfig.constants) username userfullname;
+
in {
+
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
+
'';
+
};
+
};
+
}
+20
modules/devices.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "devices";
+
+
nixos.always = {
+
programs.adb.enable = true;
+
+
services = {
+
avahi = {
+
enable = true;
+
nssmdns4 = true;
+
openFirewall = true;
+
};
+
fwupd.enable = true;
+
usbmuxd.enable = true;
+
pcscd.enable = true;
+
printing.enable = true;
+
};
+
};
+
}
+61
modules/fonts.nix
···
+
{
+
delib,
+
inputs,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "fonts";
+
+
nixos.always = {
+
fonts = {
+
packages = [
+
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
+
];
+
+
# TODO: i get a lot of weird error logs. See why
+
fontDir.enable = true;
+
enableDefaultPackages = true;
+
+
fontconfig = {
+
defaultFonts = {
+
serif = ["Noto Serif"];
+
sansSerif = ["Inter"];
+
monospace = ["Iosevka Solai"];
+
emoji = ["Noto Color Emoji"];
+
};
+
};
+
};
+
+
environment.sessionVariables = {
+
FONTCONFIG_PATH = "${pkgs.fontconfig}/etc/fonts";
+
FONTCONFIG_FILE = "${pkgs.fontconfig}/etc/fonts/fonts.conf";
+
};
+
+
# Wait for Aetf/kmscon#75 to merge, and then look into manually updating the package to test.
+
# Potentially open a nixpkgs PR to do so?
+
+
# services.kmscon = {
+
# enable = true;
+
# fonts = [
+
# {
+
# name = "Iosevka Solai Term";
+
# package = inputs.iosevka-solai.packages.x86_64-linux.bin-term;
+
# }
+
# ];
+
# };
+
};
+
+
darwin.always = {
+
fonts.packages = with pkgs; [
+
inter
+
inputs.iosevka-solai.packages.aarch64-darwin.bin
+
];
+
};
+
}
+43
modules/gaming.nix
···
+
{
+
delib,
+
pkgs,
+
homeConfig,
+
...
+
}:
+
delib.module {
+
name = "gaming";
+
+
options = delib.singleEnableOption true;
+
+
nixos.ifEnabled = {
+
programs.steam = {
+
enable = true;
+
remotePlay.openFirewall = true;
+
localNetworkGameTransfers.openFirewall = true;
+
extraCompatPackages = [pkgs.proton-ge-bin];
+
};
+
+
programs.gamescope.enable = true;
+
programs.gamemode.enable = true;
+
};
+
+
home.ifEnabled = {
+
programs.mangohud = {
+
enable = true;
+
settings = {
+
cpu_temp = true;
+
cpu_mhz = true;
+
cpu_power = true;
+
core_load = true;
+
gpu_core_clock = true;
+
gpu_temp = true;
+
gpu_power = true;
+
gpu_fan = true;
+
gpu_voltage = true;
+
vram = true;
+
ram = true;
+
};
+
};
+
home.sessionVariables.MANGOHUD_CONFIGFILE = "${homeConfig.xdg.configHome}/MangoHud/MangoHud.conf";
+
};
+
}
+32
modules/graphics.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "graphics";
+
+
options.graphics = with delib; {
+
enable = boolOption true;
+
};
+
+
nixos.ifEnabled = {cfg, ...}: {
+
hardware.graphics = {
+
enable = true;
+
enable32Bit = true;
+
};
+
hardware.amdgpu = {
+
initrd.enable = true;
+
opencl.enable = true;
+
};
+
+
environment.systemPackages = with pkgs; [amdgpu_top lact];
+
+
systemd.services.lactd = {
+
description = "AMDGPU Control Daemon";
+
enable = true;
+
serviceConfig.ExecStart = "${pkgs.lact}/bin/lact daemon";
+
wantedBy = ["multi-user.target"];
+
};
+
};
+
}
+21
modules/i18n.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "i18n";
+
+
nixos.always = {
+
time.timeZone = "Australia/Melbourne";
+
i18n.defaultLocale = "en_GB.UTF-8";
+
+
i18n.extraLocaleSettings = {
+
LC_ADDRESS = "en_AU.UTF-8";
+
LC_IDENTIFICATION = "en_AU.UTF-8";
+
LC_MEASUREMENT = "en_AU.UTF-8";
+
LC_MONETARY = "en_AU.UTF-8";
+
LC_NAME = "en_AU.UTF-8";
+
LC_NUMERIC = "en_AU.UTF-8";
+
LC_PAPER = "en_AU.UTF-8";
+
LC_TELEPHONE = "en_AU.UTF-8";
+
LC_TIME = "en_AU.UTF-8";
+
};
+
};
+
}
+11
modules/memory.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "memory";
+
+
nixos.always = {
+
services.earlyoom.enable = true;
+
services.earlyoom.enableNotifications = true;
+
zramSwap.enable = true;
+
zramSwap.algorithm = "zstd";
+
};
+
}
+47
modules/networking.nix
···
+
{
+
delib,
+
host,
+
...
+
}:
+
delib.module {
+
name = "networking";
+
+
options.networking = with delib; {
+
nameservers = listOfOption str ["1.1.1.1" "1.0.0.1"];
+
hosts = attrsOfOption (listOf str) {};
+
};
+
+
nixos.always = {
+
myconfig,
+
cfg,
+
...
+
}: let
+
inherit (myconfig.constants) username;
+
in {
+
networking = {
+
hostName = host.name;
+
+
firewall.enable = true;
+
networkmanager.enable = true;
+
+
# dhcpcd.extraConfig = "nohook resolv.conf";
+
# networkmanager.dns = "none";
+
+
inherit (cfg) hosts nameservers;
+
};
+
+
# TODO: necessary?
+
services.resolved = {
+
enable = true;
+
# dnssec = "true";
+
domains = ["~."];
+
fallbackDns = cfg.nameservers;
+
# dnsovertls = "trues";
+
};
+
+
# services.mullvad-vpn.enable = true;
+
# services.mullvad-vpn.package = pkgs.mullvad-vpn;
+
+
users.users.${username}.extraGroups = ["networkmanager"];
+
};
+
}
+86
modules/nix.nix
···
+
{
+
delib,
+
inputs,
+
...
+
}:
+
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;
+
};
+
+
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";
+
}
+
];
+
+
distributedBuilds = true;
+
+
gc = {
+
automatic = true;
+
options = "--delete-older-than 7d";
+
interval.Weekday = 6;
+
};
+
+
optimise.automatic = true;
+
+
settings = {
+
builders-use-substitutes = true;
+
experimental-features = "nix-command flakes";
+
trusted-users = ["root" "ovy"];
+
sandbox = true;
+
warn-dirty = false;
+
};
+
};
+
};
+
}
-13
modules/nixpkgs.nix
···
-
{inputs, ...}: {
-
# Make sure that the `nixpkgs` reference on the CLI refers to the system
-
# nixpkgs so that it does not keep re-downloading the latest version every
-
# time I want to run a single package
-
nix.registry.nixpkgs.to = {
-
type = "path";
-
path = inputs.nixpkgs;
-
narHash = inputs.nixpkgs.narHash;
-
};
-
-
nixpkgs.config.allowUnfree = true;
-
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
-
}
+13
modules/packaging.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "packaging";
+
+
nixos.always = {
+
services.flatpak.enable = true;
+
+
programs.appimage = {
+
enable = true;
+
binfmt = true;
+
};
+
};
+
}
+57
modules/plasma.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "plasma";
+
+
options = delib.singleEnableOption true;
+
+
nixos.ifEnabled = {
+
services.displayManager = {
+
enable = true;
+
defaultSession = "plasma";
+
+
sddm.enable = true;
+
sddm.wayland.enable = true;
+
+
autoLogin = {
+
enable = true;
+
user = "ovy";
+
};
+
};
+
+
services.desktopManager.plasma6.enable = true;
+
+
environment.plasma6.excludePackages = with pkgs.kdePackages; [
+
elisa
+
gwenview
+
kate
+
konsole
+
krunner
+
];
+
+
qt = {
+
enable = true;
+
style = "kvantum";
+
platformTheme = "kde";
+
};
+
+
# 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
+
kdePackages.kdenlive
+
];
+
+
# TODO: move
+
boot.plymouth = {
+
enable = true;
+
theme = "breeze";
+
};
+
};
+
}
+14
modules/programs/bat.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "programs.bat";
+
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled.programs.bat = {
+
enable = true;
+
config = {
+
theme = "DarkNeon";
+
italic-text = "always";
+
};
+
};
+
}
+32
modules/programs/chromium.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "programs.chromium";
+
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled.programs.chromium = {
+
enable = true;
+
package = pkgs.vivaldi.overrideAttrs (finalAttrs: previousAttrs: {
+
dontWrapQtApps = false;
+
dontPatchELF = true;
+
nativeBuildInputs = previousAttrs.nativeBuildInputs ++ [pkgs.kdePackages.wrapQtAppsHook];
+
});
+
commandLineArgs = ["--enable-blink-features=MiddleClickAutoscroll" "--enable-features=VaapiVideoDecoder"];
+
extensions = [
+
{id = "aeblfdkhhhdcdjpifhhbdiojplfjncoa";} # 1Password
+
{id = "hhinaapppaileiechjoiifaancjggfjm";} # Web Scrobbler
+
{id = "jinjaccalgkegednnccohejagnlnfdag";} # Violentmonkey
+
{id = "fkagelmloambgokoeokbpihmgpkbgbfm";} # Indie Wiki Buddy
+
{id = "paponcgjfojgemddooebbgniglhkajkj";} # Ambient light for YouTube
+
{id = "immpkjjlgappgfkkfieppnmlhakdmaab";} # Imagus (TODO: find alternative?)
+
{id = "nhdogjmejiglipccpnnnanhbledajbpd";} # Vue devtools
+
{id = "nkgllhigpcljnhoakjkgaieabnkmgdkb";} # Don't Fuck With Paste
+
{id = "kgcjekpmcjjogibpjebkhaanilehneje";} # hoarder.app
+
# {id = "kfidecgcdjjfpeckbblhmfkhmlgecoff";} # Svelte DevTools
+
];
+
};
+
}
+80
modules/programs/core-cli.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "programs.core-cli";
+
+
options = delib.singleEnableOption true;
+
+
nixos.always = {
+
environment.systemPackages = with pkgs; [
+
ffmpeg-full
+
fuzzel
+
git
+
nil
+
niri
+
openssh
+
p7zip
+
pciutils
+
sysstat
+
unar
+
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
+
dust
+
duf
+
fd
+
jq
+
nix-your-shell
+
ripgrep
+
];
+
+
programs.aria2.enable = true;
+
programs.eza.enable = true;
+
programs.nix-index.enable = true;
+
};
+
}
+80
modules/programs/desktop-apps.nix
···
+
{
+
delib,
+
pkgs,
+
homeConfig,
+
...
+
}:
+
delib.module {
+
name = "programs.desktop-apps";
+
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled = {
+
home.packages = with pkgs; [
+
alejandra
+
audacity
+
blender
+
btop # TODO: module & options
+
bruno
+
davinci-resolve
+
(discord.override {
+
withOpenASAR = true;
+
withVencord = true;
+
})
+
gajim
+
glaxnimate
+
# godot_4
+
handbrake
+
heynote
+
klog-time-tracker
+
libreoffice
+
losslesscut-bin
+
lunacy
+
lutris
+
# mixxx
+
obsidian
+
opencloud-desktop
+
oversteer
+
p7zip
+
picard
+
pinta
+
piper
+
podman-tui
+
# plasticity
+
(prismlauncher.override {
+
jdks = [
+
temurin-bin-21
+
temurin-bin-8
+
temurin-bin-17
+
];
+
})
+
protonup-qt
+
qbittorrent
+
qimgv
+
slack
+
# vesktop
+
vlc
+
vorta
+
winetricks
+
yt-dlp
+
yubioath-flutter
+
];
+
+
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"];
+
};
+
};
+
};
+
}
+52
modules/programs/desktop-cli.nix
···
+
{
+
delib,
+
lib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "programs.desktop-cli";
+
+
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";
+
};
+
}
+19
modules/programs/direnv.nix
···
+
{
+
delib,
+
homeConfig,
+
...
+
}:
+
delib.module {
+
name = "programs.direnv";
+
+
home.always.programs.direnv = {
+
enable = true;
+
nix-direnv.enable = true;
+
config.whitelist.prefix = [
+
"${homeConfig.home.homeDirectory}/Projects/bots-gg"
+
"${homeConfig.home.homeDirectory}/Projects/dijit"
+
"${homeConfig.home.homeDirectory}/Projects/personal"
+
"${homeConfig.home.homeDirectory}/Projects/work"
+
];
+
};
+
}
+25
modules/programs/espanso.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "programs.espanso";
+
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled.services.espanso = {
+
enable = true;
+
package = pkgs.espanso-wayland;
+
matches.base.matches = [
+
{
+
trigger = ":degrees";
+
replace = "ยฐ";
+
}
+
{
+
trigger = ":--";
+
replace = "โ€”";
+
}
+
];
+
};
+
}
+128
modules/programs/fish.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "programs.fish";
+
+
# TODO: custom fifc rules (nix shell, nix run, ...)
+
# TODO: how to customise fifc pane
+
home.always.programs.fish = {
+
enable = true;
+
interactiveShellInit = ''
+
set fish_greeting
+
set fzf_diff_highlighter delta --paging=never --width=20
+
set fzf_preview_dir_cmd eza --all --color=always
+
set fzf_fd_opts --hidden --exclude=.git --exclude=node_modules
+
+
# Because I use the Colemak input source on MacOS, using Alt/Option in
+
# keybinds is a no-go, due to problems in Alacritty/iTerm's
+
# (and probably others) input handler, which uses key position codes
+
# instead of the actual value of the key. For some reason this doesn't
+
# cause problems in keybinds using only Ctrl.
+
+
fzf_configure_bindings --directory=\cf --git_log=\cl --git_status=\cs --processes=\cp
+
+
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;
+
else;
+
alias dc "docker compose";
+
end;
+
'';
+
+
shellAbbrs = {
+
# code = "codium";
+
ga = "git add";
+
gaa = "git add -A";
+
gc = {
+
setCursor = "%";
+
expansion = "git commit -m \"%\"";
+
};
+
gca = "git commit --amend";
+
gco = "git checkout";
+
gd = "git diff HEAD";
+
gl = "git log";
+
gp = "git pull";
+
gr = "git rebase";
+
gs = "git status";
+
jctl = {
+
position = "anywhere";
+
expansion = "journalctl";
+
};
+
mctl = {
+
position = "anywhere";
+
expansion = "machinectl";
+
};
+
sctl = {
+
position = "anywhere";
+
expansion = "systemctl";
+
};
+
};
+
+
shellAliases = {
+
cat = "bat";
+
ls = "eza";
+
hm = "home-manager";
+
ncg = "nix-collect-garbage";
+
yws = "yarn workspace";
+
ywss = "yarn workspaces";
+
ze = "zellij";
+
};
+
+
plugins = [
+
{
+
name = "fzf.fish";
+
src = pkgs.fetchFromGitHub {
+
owner = "PatrickF1";
+
repo = "fzf.fish";
+
rev = "8920367cf85eee5218cc25a11e209d46e2591e7a";
+
hash = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
+
};
+
}
+
{
+
name = "fifc";
+
src = pkgs.fetchFromGitHub {
+
owner = "gazorby";
+
repo = "fifc";
+
rev = "a01650cd432becdc6e36feeff5e8d657bd7ee84a";
+
hash = "sha256-Ynb0Yd5EMoz7tXwqF8NNKqCGbzTZn/CwLsZRQXIAVp4=";
+
};
+
}
+
{
+
name = "lumin";
+
src = pkgs.fetchFromGitHub {
+
owner = "ovyerus";
+
repo = "lumin";
+
rev = "dc0b8f57f5b2a58a289ea6088843bd56f8633aa6";
+
hash = "sha256-wzL6+RnzfSpuJAISQdTZx2XIBDD2bXh1ejwtpgNzUYE=";
+
};
+
}
+
{
+
name = "nix.fish";
+
src = pkgs.fetchFromGitHub {
+
owner = "kidonng";
+
repo = "nix.fish";
+
rev = "ad57d970841ae4a24521b5b1a68121cf385ba71e";
+
hash = "sha256-GMV0GyORJ8Tt2S9wTCo2lkkLtetYv0rc19aA5KJbo48=";
+
};
+
}
+
{
+
name = "autopair.fish";
+
src = pkgs.fetchFromGitHub {
+
owner = "jorgebucaran";
+
repo = "autopair.fish";
+
rev = "4d1752ff5b39819ab58d7337c69220342e9de0e2";
+
hash = "sha256-qt3t1iKRRNuiLWiVoiAYOu+9E7jsyECyIqZJ/oRIT1A=";
+
};
+
}
+
];
+
};
+
}
+31
modules/programs/fzf.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "programs.fzf";
+
+
home.always = {
+
# TODO
+
# Investigate preview stuff as default command
+
# https://github.com/kidonng/preview.fish
+
# Explore fzf search modes
+
programs.fzf = {
+
enable = true;
+
enableFishIntegration = false;
+
defaultOptions = [
+
"--ansi"
+
"--cycle"
+
"--layout=reverse"
+
"--border"
+
"--height=90%"
+
"--marker=\"*\""
+
"--preview 'bat --color=always --style=header,numbers --line-range :300 {}'"
+
# I usually use a vertical term so this is more practical.
+
# TODO: possible to dynamically change based on terminal dimensinns?
+
"--preview-window='bottom:50%:wrap'"
+
];
+
# TODO: only if fd config is enabled
+
defaultCommand = "fd --color=always --type file --follow --hidden --exclude .git --exclude node_modules";
+
};
+
+
home.sessionVariables.FZF_CTRL_T_COMMAND = "fd --color=always --follow";
+
};
+
}
+146
modules/programs/git.nix
···
+
{
+
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;
+
+
home.packages = [pkgs.jjui];
+
+
programs.git = {
+
enable = true;
+
+
signing = {
+
signByDefault = true;
+
format = "ssh";
+
key = "~/.ssh/id_ed25519_sk_rk";
+
};
+
+
settings = {
+
user = {
+
name = userfullname;
+
email = useremail;
+
};
+
+
# TODO: custom pretty stuff?
+
blame.showEmail = true;
+
init.defaultBranch = "main";
+
pull.rebase = true;
+
+
log = {
+
abbrevCommit = true;
+
# TODO: `git log --oneline` looks silly with this. Need custom format.
+
showSignature = true;
+
# TODO: trial for a while and see if I like this.
+
date = "human";
+
};
+
+
merge = {
+
# Try to avoid merge commits
+
ff = "only";
+
# Really only useful on a well-managed team. Maybe eventually.
+
# verifySignatures = true;
+
conflictStyle = "diff3";
+
};
+
+
push = {
+
autoSetupRemote = true;
+
followTags = true;
+
};
+
+
# Require explicit `drop` in interactive rebase
+
rebase.missingCommitsCheck = "error";
+
rerere.enabled = true;
+
+
status = {
+
relativePaths = false;
+
showStash = true;
+
};
+
+
gpg.ssh.allowedSignersFile = "~/.config/git/allowed_signers";
+
# "gpg.ssh.program = "gfh-keygen";
+
# "gpg.ssh.defaultKeyCommand = "gfh";
+
};
+
};
+
+
programs.gh = {
+
enable = true;
+
settings = {
+
git_protocol = "ssh";
+
aliases = {
+
clone = "repo clone";
+
};
+
};
+
};
+
+
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;
+
};
+
}
+38
modules/programs/kitty.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "programs.kitty";
+
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled.programs.kitty = {
+
enable = true;
+
font.name = "Iosevka Solai";
+
font.size = 12;
+
shellIntegration.enableFishIntegration = true;
+
themeFile = "rose-pine";
+
settings = {
+
cursor_shape = "block";
+
cursor_shape_unfocused = "hollow";
+
scrollback_lines = 10000;
+
scrollback_pager = "moor +INPUT_LINE_NUMBER";
+
scrollback_pager_history_size = 5;
+
window_padding_width = 8;
+
hide_window_decorations = true;
+
tab_bar_style = "powerline"; # custom?
+
# tab_bar_margin_width = "8.0";
+
# tab_bar_margin_height = "8.0 0.0";
+
tab_powerline_style = "slanted";
+
tab_activity_symbol = "๐Ÿž›";
+
tab_title_template = "{fmt.fg.magenta}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}";
+
# window logo?
+
paste_actions = "quote-urls-at-prompt,confirm-if-large";
+
+
background_opacity = "0.5";
+
background_blur = 64;
+
+
notify_on_cmd_finish = "unfocused 10.0 bell";
+
macos_option_as_alt = "left";
+
wayland_enable_ime = false;
+
};
+
};
+
}
+17
modules/programs/micro.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "programs.micro";
+
+
home.always.programs.micro = {
+
enable = true;
+
settings = {
+
clipboard = "external";
+
hlsearch = true;
+
parsecursor = true;
+
scrollbar = true;
+
tabmovement = true;
+
tabsize = 2;
+
tabstospaces = 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
+
];
+
};
+
}
+19
modules/programs/pager.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "programs.pager";
+
+
# TODO: read docs and experiment
+
home.always = {
+
home.packages = [pkgs.moor];
+
home.sessionVariables = {
+
PAGER = "moor";
+
MOOR = "--no-linenumbers";
+
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
+
MANROFFOPT = "-c";
+
};
+
};
+
}
+20
modules/programs/ssh.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "programs.ssh";
+
+
home.always.programs.ssh = {
+
enable = true;
+
enableDefaultConfig = false;
+
+
matchBlocks = {
+
"*" = {
+
identitiesOnly = true;
+
identityFile = "~/.ssh/id_ed25519_sk_rk";
+
user = "ovy";
+
};
+
};
+
+
# TODO: if darwin
+
includes = ["~/.orbstack/ssh/config"];
+
};
+
}
+24
modules/programs/syncthing.nix
···
+
{
+
delib,
+
lib,
+
homeConfig,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "programs.syncthing";
+
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled = {
+
services.syncthing = {
+
enable = true;
+
tray.enable = true;
+
tray.package = pkgs.syncthingtray;
+
};
+
+
# Fix syncthingtray complaining about the tray not existing, because of the custom tray service above.
+
systemd.user.services.syncthingtray.Service.ExecStart =
+
lib.mkForce "${homeConfig.services.syncthing.tray.package}/bin/${homeConfig.services.syncthing.tray.command} --wait";
+
};
+
}
+13
modules/programs/tldr.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "programs.tldr";
+
+
home.always.programs.tealdeer = {
+
enable = true;
+
settings = {
+
updates = {
+
auto_update = true;
+
};
+
};
+
};
+
}
+244
modules/programs/vscode.nix
···
+
{
+
delib,
+
inputs,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "programs.vscode";
+
+
options = delib.singleEnableOption true;
+
+
home.ifEnabled = {
+
home.sessionVariables.EDITOR = "codium --wait";
+
+
programs.vscode = {
+
enable = true;
+
mutableExtensionsDir = false;
+
package = pkgs.vscodium;
+
+
profiles.default = {
+
enableUpdateCheck = false;
+
enableExtensionUpdateCheck = false;
+
+
extensions = let
+
vscode-extensions = inputs.nix-vscode-extensions.extensions.${pkgs.system};
+
inherit (vscode-extensions) open-vsx vscode-marketplace;
+
in
+
with open-vsx; [
+
kamadorueda.alejandra
+
astro-build.astro-vscode
+
matthewpi.caddyfile-support
+
raidou.calc
+
artlaman.chalice-icon-theme # TODO: i should fork this to add support for some newer files (tbd)
+
adpyke.codesnap
+
clinyong.vscode-css-modules
+
mkhl.direnv
+
leonardssh.vscord
+
ms-azuretools.vscode-docker
+
editorconfig.editorconfig
+
irongeek.vscode-env
+
jjk.jjk
+
pgourlain.erlang
+
usernamehw.errorlens
+
dbaeumer.vscode-eslint
+
tamasfe.even-better-toml
+
sleistner.vscode-fileutils
+
bmalehorn.vscode-fish
+
github.vscode-github-actions
+
eamodio.gitlens
+
ms-vscode.hexeditor
+
lokalise.i18n-ally
+
kisstkondoros.vscode-gutter-preview
+
ms-python.isort
+
bierner.markdown-preview-github-styles
+
unifiedjs.vscode-mdx
+
jnoortheen.nix-ide
+
nuxtr.nuxtr-vscode
+
vunguyentuan.vscode-postcss
+
esbenp.prettier-vscode
+
prisma.prisma
+
gleam.gleam
+
# TODO: use jedi instead of pylance
+
ms-python.python
+
ms-python.debugpy
+
mechatroner.rainbow-csv
+
medo64.render-crlf
+
stkb.rewrap
+
rust-lang.rust-analyzer
+
mrmlnc.vscode-scss
+
svelte.svelte-vscode
+
jock.svg
+
coolbear.systemd-unit-file
+
bradlc.vscode-tailwindcss
+
myriad-dreamin.tinymist
+
gruntfuggly.todo-tree
+
tomoki1207.pdf
+
zxh404.vscode-proto3
+
styled-components.vscode-styled-components # TODO: don't really need this
+
vue.volar
+
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
+
vscode-marketplace.jakebecker.elixir-ls
+
vscode-marketplace.zh9528.file-size
+
vscode-marketplace.vladdesv.vscode-klog
+
vscode-marketplace.dt.ghlink
+
vscode-marketplace.tyriar.lorem-ipsum
+
vscode-marketplace.phoenixframework.phoenix
+
vscode-marketplace.frigus02.vscode-sql-tagged-template-literals-syntax-only # TODO: alternative?
+
];
+
+
userSettings = {
+
# Formatters
+
"editor.defaultFormatter" = "esbenp.prettier-vscode";
+
"[elixir]"."editor.defaultFormatter" = "JakeBecker.elixir-ls";
+
"[nix]"."editor.defaultFormatter" = "kamadorueda.alejandra";
+
"[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;
+
"editor.insertSpaces" = true;
+
"breadcrumbs.enabled" = true;
+
"editor.wordWrap" = "off";
+
"security.workspace.trust.enabled" = false;
+
"security.workspace.trust.untrustedFiles" = "open";
+
"files.eol" = "\n";
+
"workbench.editor.empty.hint" = "hidden";
+
"comments.openView" = "never";
+
"editor.minimap.enabled" = false;
+
"editor.stickyScroll.enabled" = true;
+
"workbench.layoutControl.enabled" = false;
+
"diffEditor.ignoreTrimWhitespace" = true;
+
"editor.acceptSuggestionOnEnter" = "off";
+
"editor.formatOnSave" = true;
+
"editor.inlineSuggest.enabled" = true;
+
"editor.renderWhitespace" = "none";
+
"editor.suggestSelection" = "first";
+
"editor.tabCompletion" = "on";
+
"emmet.triggerExpansionOnTab" = true;
+
"explorer.confirmDelete" = false;
+
"explorer.confirmDragAndDrop" = false;
+
"redhat.telemetry.enabled" = false;
+
"workbench.tips.enabled" = false;
+
"workbench.tree.indent" = 16;
+
"workbench.tree.renderIndentGuides" = "always";
+
"editor.unicodeHighlight.ambiguousCharacters" = true;
+
"errorLens.enabledDiagnosticLevels" = ["error" "warning"];
+
"editor.acceptSuggestionOnCommitCharacter" = false;
+
"files.watcherExclude" = {
+
"**/.git/**" = true;
+
"**/node_modules/*/**" = true;
+
};
+
"search.exclude" = {
+
"**/node_modules" = true;
+
"**/bower_components" = true;
+
"**/*.code-search" = true;
+
"**/.yarn" = true;
+
};
+
"terminal.integrated.commandsToSkipShell" = [
+
"-workbench.action.quickOpenView"
+
"-workbench.action.quickOpen"
+
"-editor.action.clipboardCutAction"
+
];
+
# "prettier.prettierPath" = "prettierd";
+
"prettier.proseWrap" = "always";
+
"chat.disableAIFeatures" = true;
+
+
# Pretties
+
"workbench.colorTheme" = "Dolch";
+
"workbench.iconTheme" = "chalice-icon-theme";
+
"editor.fontFamily" = "'Iosevka Solai', Menlo, Monaco, 'Courier New', monospace";
+
"editor.fontSize" = 16;
+
"terminal.integrated.fontFamily" = "'Iosevka Solai Term', Consolas, 'Courier New', monospace";
+
"terminal.integrated.fontSize" = 14;
+
"terminal.integrated.scrollback" = 9999999999;
+
"editor.fontLigatures" = true;
+
"editor.cursorSmoothCaretAnimation" = "on";
+
"editor.smoothScrolling" = true;
+
"zenMode.fullScreen" = false;
+
"zenMode.centerLayout" = false;
+
"zenMode.hideLineNumbers" = true;
+
+
# No barfing rainbows over my UI pls
+
"backgroundPhiColors.baseColor" = "#FFFFFF";
+
"backgroundPhiColors.bodySpacesEnabled" = false;
+
"backgroundPhiColors.indentErrorEnabled" = false;
+
"backgroundPhiColors.lineEnabled" = false;
+
"backgroundPhiColors.spacesAlpha" = 10;
+
"backgroundPhiColors.tokenActiveAlpha" = 30;
+
"editor.bracketPairColorization.enabled" = false;
+
+
# Codesnap
+
"codesnap.containerPadding" = "2em";
+
"codesnap.target" = "window";
+
"codesnap.transparentBackground" = true;
+
"codesnap.boxShadow" = "none";
+
"codesnap.showLineNumbers" = false;
+
"codesnap.showWindowControls" = false;
+
"codesnap.shutterAction" = "copy";
+
"codesnap.roundedCorners" = true;
+
+
# Git
+
"git.autorefresh" = true;
+
"git.autofetch" = false;
+
"git.autoStash" = true;
+
"git.mergeEditor" = false;
+
"git.confirmSync" = false;
+
"git.enableSmartCommit" = true;
+
"gitlens.advanced.messages" = {
+
"suppressLineUncommittedWarning" = true;
+
};
+
"gitlens.hovers.currentLine.over" = "annotation";
+
+
# Nix
+
"nix.enableLanguageServer" = true;
+
"nix.serverPath" = "nil";
+
"alejandra.program" = "alejandra";
+
+
# Elixir/erlang
+
"elixirLS.suggestSpecs" = false;
+
"elixirLS.fetchDeps" = false;
+
"elixirLS.mixEnv" = "dev";
+
"elixir.credo.ignoreWarningMessages" = true;
+
+
# Python
+
"python.analysis.typeCheckingMode" = "basic";
+
+
# JS
+
"debug.javascript.autoAttachFilter" = "onlyWithFlag";
+
+
# CSS
+
"files.associations"."*.css" = "tailwindcss";
+
+
# Misc
+
"yaml.format.proseWrap" = "always";
+
"workbench.startupEditor" = "none";
+
"remote.SSH.connectTimeout" = 30;
+
"remote.SSH.useLocalServer" = true;
+
"remote.SSH.path" = "/run/current-system/sw/bin/ssh";
+
"extensions.ignoreRecommendations" = true;
+
"svg.preview.mode" = "svg";
+
"vscord.status.problems.enabled" = false;
+
"vscord.status.state.text.editing" = "Working on {file_name}{file_extension}";
+
"vscord.ignore.workspaces" = ["~/Work"];
+
"typescript.updateImportsOnFileMove.enabled" = "never";
+
"git.openRepositoryInParentFolders" = "never";
+
"diffEditor.useInlineViewWhenSpaceIsLimited" = false;
+
"svelte.enable-ts-plugin" = true;
+
"gitlens.launchpad.indicator.enabled" = false;
+
"window.titleBarStyle" = "custom";
+
"files.simpleDialog.enable" = true;
+
"window.dialogStyle" = "custom";
+
};
+
};
+
};
+
};
+
}
+15
modules/programs/zellij.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "programs.zellij";
+
+
home.always.programs.zellij = {
+
enable = true;
+
enableFishIntegration = false;
+
settings = {
+
mouse_mode = true;
+
theme = "catppuccin-mocha";
+
ui.pane_frames.rounded_corners = true;
+
ui.pane_frames.hide_session_name = true;
+
};
+
};
+
}
+9
modules/programs/zoxide.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "programs.zoxide";
+
+
home.always.programs.zoxide = {
+
enable = true;
+
enableFishIntegration = true;
+
};
+
}
+11
modules/sysctl.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "sysctl";
+
+
nixos.always = {
+
boot.kernel.sysctl = {
+
"vm.max_map_count" = 2147483642;
+
"fs.file-max" = 2147483642;
+
};
+
};
+
}
+21
modules/systemd.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "systemd";
+
+
nixos.always = {
+
systemd = {
+
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;
+
}
+14
modules/tray.nix
···
+
{delib, ...}:
+
delib.module {
+
name = "tray";
+
+
options = delib.singleEnableOption true;
+
+
# TODO: i don't think this is needed anymore???
+
home.ifEnabled.systemd.user.targets.tray = {
+
Unit = {
+
Description = "Home Manager System Tray";
+
Requires = ["graphical-session-pre.target"];
+
};
+
};
+
}
+28
modules/virtualisation.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "virtualisation";
+
+
options = delib.singleEnableOption true;
+
+
nixos.ifEnabled = {myconfig, ...}: let
+
inherit (myconfig.constants) username;
+
in {
+
environment.systemPackages = [pkgs.docker-compose];
+
# programs.virt-manager.enable = true;
+
# virtualisation.libvirtd.enable = true;
+
# virtualisation.oci-containers.backend = "podman";
+
+
virtualisation.podman = {
+
enable = true;
+
defaultNetwork.settings.dns_enabled = true;
+
};
+
+
users.users.${username}.extraGroups = ["libvirtd"];
+
};
+
+
home.ifEnabled.home.sessionVariables.DOCKER_HOST = "unix:///run/user/1000/podman/podman.sock";
+
}
+33
modules/xdg.nix
···
+
{
+
delib,
+
moduleSystem,
+
pkgs,
+
lib,
+
...
+
}:
+
delib.module {
+
name = "xdg";
+
+
home.always = let
+
vivalarc = pkgs.fetchFromGitHub {
+
owner = "tovifun";
+
repo = "VivalArc";
+
rev = "7ee09e9efb46c1524a43f0cb6763b9750db6e81c";
+
hash = "sha256-xYSxB8KjcbeUDEdbA2AJ9FeQC1TkqyXdB9rTMMSm+FA=";
+
};
+
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";
+
};
+
});
+
}
+15
modules/zsa.nix
···
+
{
+
delib,
+
pkgs,
+
...
+
}:
+
delib.module {
+
name = "zsa";
+
+
options = delib.singleEnableOption true;
+
+
nixos.ifEnabled = {
+
environment.systemPackages = [pkgs.keymapp];
+
hardware.keyboard.zsa.enable = true;
+
};
+
}
-14
nixos/wallsocket/bluetooth.nix
···
-
{pkgs, ...}: {
-
hardware.bluetooth.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];
-
}
-316
nixos/wallsocket/configuration.nix
···
-
{
-
lib,
-
inputs,
-
pkgs,
-
...
-
}: {
-
imports = [
-
./bluetooth.nix
-
./graphics.nix
-
./hardware-configuration.nix
-
../../modules/nixpkgs.nix
-
];
-
-
specialisation.niri.configuration = {
-
system.nixos.tags = ["niri"];
-
imports = [./niri.nix];
-
-
services.displayManager.enable = false;
-
services.displayManager.sddm.enable = false;
-
services.displayManager.sddm.wayland.enable = false;
-
# services.displayManager.defaultSession = lib.mkDefault "plasma";
-
services.desktopManager.plasma6.enable = false;
-
};
-
-
# Bootloader.
-
boot.loader.systemd-boot.enable = true;
-
boot.loader.systemd-boot.configurationLimit = 10;
-
boot.loader.efi.canTouchEfiVariables = true;
-
boot.kernel.sysctl."vm.max_map_count" = 2147483642;
-
boot.kernel.sysctl."fs.file-max" = 2147483642;
-
-
networking.hostName = "wallsocket";
-
networking.networkmanager.enable = true;
-
-
# i18n & time
-
time.timeZone = "Australia/Melbourne";
-
i18n.defaultLocale = "en_GB.UTF-8";
-
-
i18n.extraLocaleSettings = {
-
LC_ADDRESS = "en_AU.UTF-8";
-
LC_IDENTIFICATION = "en_AU.UTF-8";
-
LC_MEASUREMENT = "en_AU.UTF-8";
-
LC_MONETARY = "en_AU.UTF-8";
-
LC_NAME = "en_AU.UTF-8";
-
LC_NUMERIC = "en_AU.UTF-8";
-
LC_PAPER = "en_AU.UTF-8";
-
LC_TELEPHONE = "en_AU.UTF-8";
-
LC_TIME = "en_AU.UTF-8";
-
};
-
-
# Enable the KDE Plasma Desktop Environment.
-
services.displayManager.enable = lib.mkDefault true;
-
services.displayManager.sddm.enable = lib.mkDefault true;
-
services.displayManager.sddm.wayland.enable = lib.mkDefault true;
-
services.displayManager.autoLogin = {
-
enable = true;
-
user = "ovy";
-
};
-
services.displayManager.defaultSession = lib.mkDefault "plasma"; # Set to `plasma` for Wayland.
-
services.desktopManager.plasma6.enable = lib.mkDefault true;
-
-
environment.plasma6.excludePackages = with pkgs.kdePackages; [
-
elisa
-
gwenview
-
konsole
-
];
-
-
security.pam.services.ovy.kwallet = {
-
enable = true;
-
package = pkgs.kdePackages.kwallet-pam;
-
};
-
-
# Enable CUPS to print documents.
-
services.printing.enable = true;
-
-
services.usbmuxd.enable = true;
-
-
# Enable sound with pipewire.
-
services.pulseaudio.enable = false;
-
security.rtkit.enable = true;
-
services.pipewire = {
-
enable = true;
-
alsa.enable = true;
-
alsa.support32Bit = true;
-
pulse.enable = true;
-
# If you want to use JACK applications, uncomment this
-
#jack.enable = true;
-
};
-
-
users.users.ovy = {
-
isNormalUser = true;
-
description = "Ashlynne Mitchell";
-
extraGroups = ["networkmanager" "wheel" "libvirtd" "cdrom" "adbusers"];
-
shell = pkgs.fish;
-
};
-
-
programs.adb.enable = true;
-
-
system.tools.nixos-option.enable = false;
-
-
nix.settings = {
-
auto-optimise-store = true;
-
experimental-features = ["nix-command" "flakes"];
-
trusted-users = ["root" "@wheel"];
-
};
-
-
nix.gc = {
-
automatic = true;
-
options = "--delete-older-than 10d";
-
dates = "weekly";
-
};
-
-
# environment.sessionVariables."NIXOS_OZONE_WL" = 1;
-
environment.sessionVariables."MOZ_ENABLE_WAYLAND" = 0;
-
environment.systemPackages = with pkgs; [
-
adwaita-icon-theme
-
amdgpu_top
-
docker-compose
-
ffmpeg-full
-
git
-
keymapp
-
nil
-
niri
-
openssh
-
solaar
-
unar
-
wget
-
wcurl
-
sysstat
-
p7zip
-
kdePackages.kcalc
-
kdePackages.partitionmanager
-
kdePackages.kcolorchooser
-
pciutils
-
nvtopPackages.full
-
wineWowPackages.full
-
-
fuzzel
-
# tailscale-systray
-
# wl-clipboard
-
# kitty
-
# swaylock
-
# libsecret
-
# wayland-utils
-
];
-
-
# Allow `keymapp` to control my ZSA Moonlander
-
# https://github.com/zsa/wally/wiki/Linux-install#2-create-a-udev-rule-file
-
services.udev.extraRules = let
-
# nubia 5g
-
nubia = {
-
vendor = "1782";
-
product = "4021";
-
};
-
in ''
-
# Rules for Oryx web flashing and live training
-
KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev"
-
KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev"
-
-
# Legacy rules for live training over webusb (Not needed for firmware v21+)
-
# Rule for all ZSA keyboards
-
SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev"
-
# Rule for the Moonlander
-
SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev"
-
# Rule for the Ergodox EZ
-
SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev"
-
# Rule for the Planck EZ
-
SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev"
-
-
# Wally Flashing rules for the Ergodox EZ
-
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
-
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
-
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
-
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"
-
-
# Keymapp / Wally Flashing rules for the Moonlander and Planck EZ
-
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu"
-
# Keymapp Flashing rules for the Voyager
-
SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu"
-
-
# ADB support for Nubia 5G
-
SUBSYSTEM=="usb", ATTR{idVendor}=="${nubia.vendor}", MODE="[]", GROUP="adbusers", TAG+="uaccess"
-
SUBSYSTEM=="usb", ATTR{idVendor}=="${nubia.vendor}", ATTR{idProduct}=="${nubia.product}", SYMLINK+="android_adb"
-
SUBSYSTEM=="usb", ATTR{idVendor}=="${nubia.vendor}", ATTR{idProduct}=="${nubia.product}", SYMLINK+="android_fastboot"
-
'';
-
-
programs.fish.enable = true;
-
services.mullvad-vpn.enable = true;
-
services.mullvad-vpn.package = pkgs.mullvad-vpn;
-
-
networking.nameservers = ["1.1.1.1" "1.0.0.1"];
-
services.resolved = {
-
enable = true;
-
# dnssec = "true";
-
domains = ["~."];
-
fallbackDns = ["1.1.1.1" "1.0.0.1"];
-
# dnsovertls = "trues";
-
};
-
-
fonts = {
-
packages = [
-
pkgs.ubuntu_font_family
-
pkgs.inter
-
inputs.iosevka-solai.packages.x86_64-linux.bin
-
];
-
-
fontDir.enable = true;
-
enableDefaultPackages = true;
-
-
fontconfig = {
-
defaultFonts = {
-
serif = ["Noto Serif"];
-
sansSerif = ["Inter"];
-
monospace = ["Iosevka Solai"];
-
emoji = ["Noto Color Emoji"];
-
};
-
};
-
};
-
-
environment.sessionVariables = {
-
FONTCONFIG_PATH = "${pkgs.fontconfig}/etc/fonts";
-
FONTCONFIG_FILE = "${pkgs.fontconfig}/etc/fonts/fonts.conf";
-
};
-
-
# Wait for Aetf/kmscon#75 to merge, and then look into manually updating the package to test.
-
# Potentially open a nixpkgs PR to do so?
-
-
# services.kmscon = {
-
# enable = true;
-
# fonts = [
-
# {
-
# name = "Iosevka Solai Term";
-
# package = inputs.iosevka-solai.packages.x86_64-linux.bin-term;
-
# }
-
# ];
-
# };
-
-
services.pcscd.enable = true;
-
services.fwupd.enable = true;
-
-
services.flatpak.enable = true;
-
-
programs.appimage = {
-
enable = true;
-
binfmt = true;
-
};
-
-
services.tailscale = {
-
enable = true;
-
openFirewall = true;
-
useRoutingFeatures = "client";
-
};
-
-
programs.steam = {
-
enable = true;
-
remotePlay.openFirewall = true;
-
localNetworkGameTransfers.openFirewall = true;
-
extraCompatPackages = [pkgs.proton-ge-bin];
-
};
-
-
programs.gamescope.enable = true;
-
programs.gamemode.enable = true;
-
-
# virtualisation.oci-containers.backend = "podman";
-
virtualisation.podman = {
-
enable = true;
-
defaultNetwork.settings.dns_enabled = true;
-
};
-
-
virtualisation.libvirtd.enable = true;
-
programs.virt-manager.enable = true;
-
-
qt = {
-
enable = true;
-
style = "kvantum";
-
platformTheme = "kde";
-
};
-
-
systemd.extraConfig = ''
-
DefaultTimeoutStopSec=30s
-
'';
-
systemd.user.extraConfig = ''
-
DefaultTimeoutStopSec=30s
-
'';
-
-
services.systembus-notify.enable = true;
-
programs._1password.enable = true;
-
programs._1password-gui = {
-
enable = true;
-
polkitPolicyOwners = ["ovy"];
-
};
-
-
environment.etc."1password/custom_allowed_browsers" = {
-
text = "vivaldi-bin";
-
mode = "0755";
-
};
-
-
services.avahi = {
-
enable = true;
-
nssmdns4 = true;
-
openFirewall = true;
-
};
-
-
services.ollama = {
-
enable = true;
-
acceleration = "rocm";
-
rocmOverrideGfx = "11.0.0";
-
};
-
-
services.earlyoom.enable = true;
-
services.earlyoom.enableNotifications = true;
-
zramSwap.enable = true;
-
zramSwap.algorithm = "zstd";
-
-
system.stateVersion = "24.05"; # Did you read the comment?
-
}
-16
nixos/wallsocket/graphics.nix
···
-
{pkgs, ...}: {
-
hardware.graphics = {
-
enable = true;
-
enable32Bit = true;
-
# extraPackages = [pkgs.amdvlk];
-
};
-
-
environment.systemPackages = [pkgs.lact];
-
-
systemd.services.lactd = {
-
description = "AMDGPU Control Daemon";
-
enable = true;
-
serviceConfig.ExecStart = "${pkgs.lact}/bin/lact daemon";
-
wantedBy = ["multi-user.target"];
-
};
-
}
-60
nixos/wallsocket/hardware-configuration.nix
···
-
{
-
config,
-
lib,
-
pkgs,
-
modulesPath,
-
...
-
}: {
-
imports = [
-
(modulesPath + "/installer/scan/not-detected.nix")
-
];
-
-
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
-
boot.initrd.kernelModules = [];
-
boot.kernelModules = ["kvm-amd"];
-
boot.extraModulePackages = [];
-
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_11;
-
-
hardware.logitech.wireless.enable = true;
-
hardware.new-lg4ff.enable = true;
-
-
# Storage
-
fileSystems."/" = {
-
device = "/dev/disk/by-uuid/1b08f109-17e9-40f4-a7fd-6e5943ce7d5e";
-
fsType = "ext4";
-
};
-
-
fileSystems."/boot" = {
-
device = "/dev/disk/by-uuid/CF5D-B9DB";
-
fsType = "vfat";
-
options = ["fmask=0022" "dmask=0022"];
-
};
-
-
fileSystems."/home" = {
-
device = "/dev/disk/by-uuid/31974b72-eca5-4758-bd66-63ae57c1b4b0";
-
fsType = "ext4";
-
};
-
-
fileSystems."/mnt/misc" = {
-
device = "/dev/disk/by-uuid/bbc7adf8-475a-4bec-843f-77d4b904c42e";
-
fsType = "ext4";
-
};
-
-
fileSystems."/mnt/games" = {
-
device = "/dev/disk/by-uuid/e61763de-753c-42f0-ba9b-5ac6b6ffdf08";
-
fsType = "ext4";
-
};
-
-
swapDevices = [];
-
-
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
-
# (the default) this is the recommended approach. When using systemd-networkd it's
-
# still possible to use this option, but it's recommended to use it in conjunction
-
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
-
networking.useDHCP = lib.mkDefault true;
-
# networking.interfaces.enp6s0.useDHCP = lib.mkDefault true;
-
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
-
-
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
-
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-
}
-27
nixos/wallsocket/niri.nix
···
-
{pkgs, ...}: {
-
programs.niri = {
-
enable = true;
-
package = pkgs.niri;
-
};
-
-
# TODO: qtgreet? https://gitlab.com/marcusbritanicus/QtGreet
-
services.greetd = {
-
enable = true;
-
settings = {
-
default_session = {
-
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd niri-session -r --window-padding 4";
-
user = "greeter";
-
};
-
};
-
};
-
-
environment.systemPackages = with pkgs; [
-
wl-clipboard
-
wofi
-
swaylock
-
# swaynotificationcenter
-
xwayland-satellite
-
kdePackages.kwallet
-
kdePackages.kwalletmanager
-
];
-
}