❄️ Dotfiles for our NixOS system configuration.

refactor: update dotfiles, modularize, add macOS support

Chloe 2e1a225e f94bf103

Changed files
+976 -840
home
hosts
lib
modules
packages
+77 -66
flake.lock
···
]
},
"locked": {
-
"lastModified": 1756365413,
-
"narHash": "sha256-rWJqnFNh+xAoXLPMOUWvb2jMUUgGs4PKI/p2lgUczBA=",
"owner": "catppuccin",
"repo": "nix",
-
"rev": "842da43be0d00d7cf4c26faf279bc71a614c259b",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "nix",
"type": "github"
}
},
···
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
···
]
},
"locked": {
-
"lastModified": 1756496801,
-
"narHash": "sha256-IYIsnPy+cJxe8RbDHBrCtfJY0ry2bG2H7WvMcewiGS8=",
"owner": "nix-community",
"repo": "home-manager",
-
"rev": "77a71380c38fb2a440b4b5881bbc839f6230e1cb",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1754679101,
-
"narHash": "sha256-nFK2XhrDS5igmkDQWmyTcgiJsEr3KOcR31DaSy+Fy9s=",
"owner": "oxalica",
"repo": "nil",
-
"rev": "f80fe365cb441624d1608235e6e793e5dce47fb0",
"type": "github"
},
"original": {
···
"type": "github"
}
},
-
"nix-ld": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
-
"lastModified": 1756133168,
-
"narHash": "sha256-yvehjJD0TqfixoAJLb2SHWGMULQ312h7MsIM47iKgSg=",
-
"owner": "nix-community",
-
"repo": "nix-ld",
-
"rev": "ba0e76d84d88cc4fc65d589fb4c3c7a609990433",
"type": "github"
},
"original": {
-
"owner": "nix-community",
-
"repo": "nix-ld",
-
"type": "github"
-
}
-
},
-
"nixos-06cb-009a-fingerprint-sensor": {
-
"inputs": {
-
"nixpkgs": [
-
"nixpkgs"
-
]
-
},
-
"locked": {
-
"lastModified": 1734692513,
-
"narHash": "sha256-3QEzFFrkXLj/JgZGoLaxq/pPkflSXfBOP10bXL8/Niw=",
-
"owner": "ahbnr",
-
"repo": "nixos-06cb-009a-fingerprint-sensor",
-
"rev": "3678b193efa1e06aab86058aecee18ddaa8878d2",
-
"type": "github"
-
},
-
"original": {
-
"owner": "ahbnr",
-
"ref": "24.11",
-
"repo": "nixos-06cb-009a-fingerprint-sensor",
-
"type": "github"
-
}
-
},
-
"nixos-hardware": {
-
"locked": {
-
"lastModified": 1756245047,
-
"narHash": "sha256-9bHzrVbjAudbO8q4vYFBWlEkDam31fsz0J7GB8k4AsI=",
-
"owner": "NixOS",
-
"repo": "nixos-hardware",
-
"rev": "a65b650d6981e23edd1afa1f01eb942f19cdcbb7",
-
"type": "github"
-
},
-
"original": {
-
"owner": "NixOS",
-
"ref": "master",
-
"repo": "nixos-hardware",
"type": "github"
}
},
···
]
},
"locked": {
-
"lastModified": 1755261305,
-
"narHash": "sha256-EOqCupB5X5WoGVHVcfOZcqy0SbKWNuY3kq+lj1wHdu8=",
"owner": "nix-community",
"repo": "NixOS-WSL",
-
"rev": "203a7b463f307c60026136dd1191d9001c43457f",
"type": "github"
},
"original": {
···
},
"nixpkgs": {
"locked": {
-
"lastModified": 1756542300,
-
"narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=",
"owner": "NixOS",
"repo": "nixpkgs",
-
"rev": "d7600c775f877cd87b4f5a831c28aa94137377aa",
"type": "github"
},
"original": {
···
"type": "indirect"
}
},
"root": {
"inputs": {
"catppuccin": "catppuccin",
"home-manager": "home-manager",
"nil": "nil",
-
"nix-ld": "nix-ld",
-
"nixos-06cb-009a-fingerprint-sensor": "nixos-06cb-009a-fingerprint-sensor",
-
"nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs",
"solaar": "solaar"
···
"snowfall-lib": "snowfall-lib"
},
"locked": {
-
"lastModified": 1751535505,
-
"narHash": "sha256-MOFgDU5wtIe96/dBfjWHDuV372+jGq5IBB/3km0yBr0=",
"owner": "Svenum",
"repo": "Solaar-Flake",
-
"rev": "b6668450e18e3f788855fc5f54a84861ec3ffee9",
"type": "github"
},
"original": {
···
]
},
"locked": {
+
"lastModified": 1760084311,
+
"narHash": "sha256-YpNNtvA8v28Gd3/PHXCABuBWOzR0K8CyQPga13LxBH0=",
"owner": "catppuccin",
"repo": "nix",
+
"rev": "fa3a9d5f80ebfe7f4974bc1939f558690cc56359",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "nix",
+
"type": "github"
+
}
+
},
+
"easy-hosts": {
+
"locked": {
+
"lastModified": 1755470564,
+
"narHash": "sha256-KB1ZryVDoQcbIsItOf4WtxkHhh3ppj+XwMpSnt/2QHc=",
+
"owner": "tgirlcloud",
+
"repo": "easy-hosts",
+
"rev": "d0422bc7b3db26268982aa15d07e60370e76ee1d",
+
"type": "github"
+
},
+
"original": {
+
"owner": "tgirlcloud",
+
"repo": "easy-hosts",
"type": "github"
}
},
···
"type": "github"
}
},
+
"flake-parts": {
+
"inputs": {
+
"nixpkgs-lib": "nixpkgs-lib"
+
},
+
"locked": {
+
"lastModified": 1759362264,
+
"narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=",
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"rev": "758cf7296bee11f1706a574c77d072b8a7baa881",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"type": "github"
+
}
+
},
"flake-utils": {
"inputs": {
"systems": "systems"
···
]
},
"locked": {
+
"lastModified": 1760130406,
+
"narHash": "sha256-GKMwBaFRw/C1p1VtjDz4DyhyzjKUWyi1K50bh8lgA2E=",
"owner": "nix-community",
"repo": "home-manager",
+
"rev": "d305eece827a3fe317a2d70138f53feccaf890a1",
"type": "github"
},
"original": {
···
]
},
"locked": {
+
"lastModified": 1757219451,
+
"narHash": "sha256-ImGN436GYd50HjoKTeRK+kWYIU/7PkDv15UmoUCPDUk=",
"owner": "oxalica",
"repo": "nil",
+
"rev": "01e573c9e31ba3be7eaa848ba7dfcbd04260163e",
"type": "github"
},
"original": {
···
"type": "github"
}
},
+
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
+
"lastModified": 1758805352,
+
"narHash": "sha256-BHdc43Lkayd+72W/NXRKHzX5AZ+28F3xaUs3a88/Uew=",
+
"owner": "nix-darwin",
+
"repo": "nix-darwin",
+
"rev": "c48e963a5558eb1c3827d59d21c5193622a1477c",
"type": "github"
},
"original": {
+
"owner": "nix-darwin",
+
"repo": "nix-darwin",
"type": "github"
}
},
···
]
},
"locked": {
+
"lastModified": 1759833546,
+
"narHash": "sha256-rOfkgIiiZNPUbf61OqEym60wXEODeDG8XH+gV/SUoUc=",
"owner": "nix-community",
"repo": "NixOS-WSL",
+
"rev": "7c0c0f4c3a51761434f18209fa9499b8579ff730",
"type": "github"
},
"original": {
···
},
"nixpkgs": {
"locked": {
+
"lastModified": 1760038930,
+
"narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=",
"owner": "NixOS",
"repo": "nixpkgs",
+
"rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3",
"type": "github"
},
"original": {
···
"type": "indirect"
}
},
+
"nixpkgs-lib": {
+
"locked": {
+
"lastModified": 1754788789,
+
"narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
+
"owner": "nix-community",
+
"repo": "nixpkgs.lib",
+
"rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-community",
+
"repo": "nixpkgs.lib",
+
"type": "github"
+
}
+
},
"root": {
"inputs": {
"catppuccin": "catppuccin",
+
"easy-hosts": "easy-hosts",
+
"flake-parts": "flake-parts",
"home-manager": "home-manager",
"nil": "nil",
+
"nix-darwin": "nix-darwin",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs",
"solaar": "solaar"
···
"snowfall-lib": "snowfall-lib"
},
"locked": {
+
"lastModified": 1760109596,
+
"narHash": "sha256-kZ7DKnhg5w2coWHaJWrMjBNlbC94ZmxA5Jpvw9thZhQ=",
"owner": "Svenum",
"repo": "Solaar-Flake",
+
"rev": "04a3de5d7b98342e6212d5426250439eee82471b",
"type": "github"
},
"original": {
+62 -56
flake.nix
···
description = "NixOS configuration for the Sapphic Angels system.";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
-
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
-
# Catppuccin theme
catppuccin = {
url = "github:catppuccin/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
-
# Nix Language Server
nil = {
url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs";
};
-
# nix-ld
-
nix-ld = {
-
url = "github:nix-community/nix-ld";
-
inputs.nixpkgs.follows = "nixpkgs";
-
};
-
-
# NixOS on WSL
-
nixos-wsl = {
-
url = "github:nix-community/NixOS-WSL";
-
inputs.nixpkgs.follows = "nixpkgs";
-
};
-
-
# Fingerprint sensor for ThinkPad
-
nixos-06cb-009a-fingerprint-sensor = {
-
url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor/24.11";
-
inputs.nixpkgs.follows = "nixpkgs";
-
};
-
-
# Logitech config tool
solaar = {
-
url = "github:Svenum/Solaar-Flake/main"; # For latest stable version
-
#url = "https://flakehub.com/f/Svenum/Solaar-Flake/0.1.1.tar.gz"; # uncomment line for solaar version 1.1.13
-
#url = "github:Svenum/Solaar-Flake/main"; # Uncomment line for latest unstable version
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
-
{
-
nixos-hardware,
nixos-wsl,
-
nix-ld,
-
solaar,
...
-
}@inputs:
-
let
-
lib = import ./lib { inherit inputs; };
-
forAllSystems =
-
function:
-
lib.genAttrs lib.systems.flakeExposed (system: function inputs.nixpkgs.legacyPackages.${system});
-
in
-
{
-
inherit lib;
-
# NixOS configurations
-
nixosConfigurations = lib.mapAttrs lib.mkSystem {
-
eris = { };
-
sapphic = {
modules = [
-
solaar.nixosModules.default
];
};
-
lavender = {
modules = [
-
nixos-hardware.nixosModules.raspberry-pi-4
];
};
-
solstice = {
-
modules = [
-
nix-ld.nixosModules.nix-ld
-
nixos-wsl.nixosModules.default
-
];
};
};
-
-
# packages = forAllSystems (pkgs: {
-
# cider = pkgs.callPackage ./packages/cider.nix { };
-
# });
-
-
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
};
}
···
description = "NixOS configuration for the Sapphic Angels system.";
inputs = {
+
# Packages
nixpkgs.url = "nixpkgs/nixos-unstable";
+
# Flakes
+
flake-parts.url = "github:hercules-ci/flake-parts";
+
easy-hosts.url = "github:tgirlcloud/easy-hosts";
+
+
# Systems
+
nix-darwin = {
+
url = "github:nix-darwin/nix-darwin";
+
inputs.nixpkgs.follows = "nixpkgs";
+
};
+
nixos-wsl = {
+
url = "github:nix-community/NixOS-WSL";
+
inputs.nixpkgs.follows = "nixpkgs";
+
};
+
+
# Userspace
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
+
# Misc
+
## Catppuccin theme
catppuccin = {
url = "github:catppuccin/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
+
## Nix Language Server
nil = {
url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs";
};
+
## Logitech config tool
solaar = {
+
url = "github:Svenum/Solaar-Flake/main";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
+
inputs@{
+
flake-parts,
nixos-wsl,
...
+
}:
+
flake-parts.lib.mkFlake { inherit inputs; } {
+
imports = [
+
inputs.easy-hosts.flakeModule
+
];
+
systems = [ "x86_64-linux" "aarch64-darwin" ];
+
perSystem = { pkgs, ... }: {
+
formatter = pkgs.nixfmt-rfc-style;
+
};
+
+
easy-hosts = {
+
path = ./hosts;
+
+
shared = {
modules = [
+
# Base modules (platform-agnostic)
+
./modules/base
];
+
specialArgs = {
+
inherit inputs;
+
};
};
+
perClass = class: {
modules = [
+
./modules/${class}/default.nix
];
};
+
hosts = {
+
caulfield = {
+
arch = "x86_64";
+
class = "nixos";
+
tags = [ "laptop" ];
+
};
+
+
juniper = {
+
arch = "aarch64";
+
class = "darwin";
+
tags = [ "laptop" ];
+
};
+
+
solstice = {
+
arch = "x86_64";
+
class = "nixos";
+
tags = [ "wsl" ];
+
};
};
};
};
}
-39
home/chloe/apps/cli/1password.nix
···
-
{
-
pkgs,
-
lib,
-
osConfig,
-
...
-
}:
-
-
let
-
inherit (pkgs) ps util-linux socat;
-
grep = pkgs.gnugrep;
-
in
-
{
-
home.packages = with pkgs; [
-
_1password-cli
-
_1password-gui
-
];
-
-
programs.zsh.initExtra = lib.mkIf (osConfig ? wsl) ''
-
# Configure ssh forwarding
-
export SSH_AUTH_SOCK=$HOME/.1password/agent.sock
-
-
# need `ps -ww` to get non-truncated command for matching
-
# use square brackets to generate a regex match for the process we want but that doesn't match the grep command running it!
-
ALREADY_RUNNING=$(${ps}/bin/ps -auxww | ${grep}/bin/grep -q "[n]piperelay.exe -ei -s //./pipe/openssh-ssh-agent"; echo $?)
-
-
if [[ $ALREADY_RUNNING != "0" ]]; then
-
if [[ -S $SSH_AUTH_SOCK ]]; then
-
# not expecting the socket to exist as the forwarding command isn't running (http://www.tldp.org/LDP/abs/html/fto.html)
-
echo "removing previous socket..."
-
rm $SSH_AUTH_SOCK
-
fi
-
-
echo "Starting SSH-Agent relay..."
-
# setsid to force new session to keep running
-
# set socat to listen on $SSH_AUTH_SOCK and forward to npiperelay which then forwards to openssh-ssh-agent on windows
-
(${util-linux}/bin/setsid ${socat}/bin/socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork &) >/dev/null 2>&1
-
fi
-
'';
-
}
···
-9
home/chloe/apps/cli/bat.nix
···
-
{
-
programs.bat = {
-
enable = true;
-
-
config = {
-
pager = "less -FR";
-
};
-
};
-
}
···
-5
home/chloe/apps/cli/btop.nix
···
-
{
-
programs.btop = {
-
enable = true;
-
};
-
}
···
+3 -3
home/chloe/apps/cli/default.nix home/chloe/programs/cli/default.nix
···
{
imports = [
-
./hyfetch
-
./zsh
-
./1password.nix
./bat.nix
./btop.nix
./eza.nix
./gh.nix
./git.nix
./mpv.nix
./ssh.nix
./zoxide.nix
];
}
···
{
imports = [
./bat.nix
./btop.nix
./eza.nix
./gh.nix
./git.nix
+
./hyfetch.nix
./mpv.nix
./ssh.nix
+
./ssh-agent.nix
./zoxide.nix
+
./zsh.nix
];
}
home/chloe/apps/cli/eza.nix home/chloe/programs/cli/eza.nix
-11
home/chloe/apps/cli/gh.nix
···
-
{
-
programs.gh = {
-
enable = true;
-
-
settings = {
-
aliases = {
-
clone = "repo clone";
-
};
-
};
-
};
-
}
···
-40
home/chloe/apps/cli/git.nix
···
-
{
-
pkgs,
-
lib,
-
osConfig,
-
...
-
}:
-
-
let
-
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICM6XP+CNc2CStEDe/W4LfkcRcG98obQiM2aqnydCRbX";
-
in
-
{
-
home.file.".ssh/allowed_signers".text = "
-
* ${signingKey}
-
";
-
programs.git = {
-
enable = true;
-
userName = "Chloe";
-
userEmail = "chloe@sapphic.moe";
-
-
extraConfig = {
-
core = lib.mkIf (osConfig ? wsl) {
-
sshCommand = "ssh.exe";
-
};
-
-
user.signingkey = signingKey;
-
gpg = {
-
format = "ssh";
-
ssh = {
-
program =
-
if (osConfig ? wsl) then
-
"/mnt/c/Users/Chloe/AppData/Local/1Password/app/8/op-ssh-sign-wsl"
-
else
-
"${pkgs._1password-gui}/bin/op-ssh-sign";
-
allowedSignersFile = "~/.ssh/allowed_signers";
-
};
-
};
-
commit.gpgsign = true;
-
};
-
};
-
}
···
+3 -3
home/chloe/apps/cli/hyfetch/default.nix home/chloe/programs/cli/hyfetch.nix
···
};
};
-
# xdg.configFile."neofetch/config.conf".source = ./neofetch.conf;
programs.fastfetch = {
enable = true;
settings = builtins.fromJSON (
builtins.unsafeDiscardStringContext (
-
builtins.readFile ./fastfetch.jsonc
)
);
};
-
home.packages = with pkgs; [pciutils]; # Required to display GPU
}
···
};
};
programs.fastfetch = {
enable = true;
settings = builtins.fromJSON (
builtins.unsafeDiscardStringContext (
+
builtins.readFile ../../files/fastfetch.jsonc
)
);
};
+
+
home.packages = with pkgs; [ pciutils ]; # Required to display GPU
}
+1 -2
home/chloe/apps/cli/hyfetch/fastfetch.jsonc home/chloe/files/fastfetch.jsonc
···
"type": "weather",
"timeout": 1000
},
-
"break",
-
"colors"
]
}
···
"type": "weather",
"timeout": 1000
},
+
"break"
]
}
-5
home/chloe/apps/cli/mpv.nix
···
-
{
-
programs.mpv = {
-
enable = true;
-
};
-
}
···
-12
home/chloe/apps/cli/ssh.nix
···
-
let
-
onePassPath = "~/.1password/agent.sock";
-
in
-
{
-
programs.ssh = {
-
enable = true;
-
extraConfig = ''
-
Host *
-
IdentityAgent ${onePassPath}
-
'';
-
};
-
}
···
home/chloe/apps/cli/zoxide.nix home/chloe/programs/cli/zoxide.nix
-65
home/chloe/apps/cli/zsh/default.nix
···
-
{
-
lib,
-
pkgs,
-
osConfig,
-
...
-
}:
-
{
-
programs.zsh = {
-
enable = true;
-
enableCompletion = true;
-
syntaxHighlighting.enable = true;
-
-
# zsh configuration file
-
dotDir = ".config/zsh";
-
-
initExtra = ''
-
eval "$(zoxide init zsh)"
-
'';
-
-
envExtra = ''
-
export PRISMA_SCHEMA_ENGINE_BINARY="${pkgs.prisma-engines}/bin/schema-engine"
-
export PRISMA_QUERY_ENGINE_BINARY="${pkgs.prisma-engines}/bin/query-engine"
-
export PRISMA_QUERY_ENGINE_LIBRARY="${pkgs.prisma-engines}/lib/libquery_engine.node"
-
export PRISMA_INTROSPECTION_ENGINE_BINARY="${pkgs.prisma-engines}/bin/introspection-engine"
-
export PRISMA_FMT_BINARY="${pkgs.prisma-engines}/bin/prisma-fmt"
-
'';
-
-
shellAliases =
-
{
-
cat = "bat";
-
cd = "z";
-
ls = "eza";
-
}
-
// lib.optionalAttrs (osConfig ? wsl) {
-
ssh = "ssh.exe";
-
ssh-add = "ssh-add.exe";
-
};
-
-
oh-my-zsh = {
-
enable = true;
-
plugins = [
-
"1password"
-
"bun"
-
"colored-man-pages"
-
"docker"
-
"docker-compose"
-
"git"
-
"vscode"
-
];
-
};
-
-
plugins = [
-
{
-
name = "powerlevel10k-config";
-
src = ./p10k;
-
file = "p10k.zsh";
-
}
-
{
-
name = "zsh-powerlevel10k";
-
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
-
file = "powerlevel10k.zsh-theme";
-
}
-
];
-
};
-
}
···
home/chloe/apps/cli/zsh/p10k/p10k.zsh home/chloe/files/p10k.zsh
home/chloe/apps/default.nix home/chloe/programs/default.nix
+1
home/chloe/apps/gui/default.nix home/chloe/programs/gui/default.nix
···
{
imports = [
./vscode.nix
];
}
···
{
imports = [
+
./ghostty.nix
./vscode.nix
];
}
-6
home/chloe/apps/gui/vscode.nix
···
-
{ osConfig, ... }:
-
{
-
programs.vscode = {
-
inherit (osConfig.settings.gui) enable;
-
};
-
}
···
+11 -1
home/chloe/catppuccin.nix
···
-
{ inputs, ... }:
{
imports = [ inputs.catppuccin.homeModules.catppuccin ];
···
accent = "pink";
flavor = "mocha";
};
}
···
+
{ inputs, lib, pkgs, osConfig, ... }:
+
{
imports = [ inputs.catppuccin.homeModules.catppuccin ];
···
accent = "pink";
flavor = "mocha";
};
+
+
# KDE-specific catppuccin package
+
home.packages = lib.optionals (osConfig.settings.desktop.kde.enable) [
+
(pkgs.catppuccin-kde.override {
+
flavour = [ "mocha" ];
+
accents = [ "pink" ];
+
winDecStyles = [ "classic" ];
+
})
+
];
}
+1 -1
home/chloe/default.nix
···
{
imports = [
-
./apps
./catppuccin.nix
./docs.nix
./files.nix
./packages
];
xdg.enable = true;
···
{
imports = [
./catppuccin.nix
./docs.nix
./files.nix
./packages
+
./programs
];
xdg.enable = true;
+2
home/chloe/docs.nix
···
{ lib, ... }:
let
inherit (lib.attrsets) mapAttrs;
···
+
# From https://github.com/isabelroses/dotfiles/blob/main/modules/home/docs.nix
+
{ lib, ... }:
let
inherit (lib.attrsets) mapAttrs;
+5 -3
home/chloe/files.nix
···
-
{ pkgs, ... }:
{
xdg.configFile = {
# 1Password configuration
···
};
home.file = {
-
# Catppuccin theme for Konsole
-
".local/share/konsole/catppuccin-mocha.colorscheme" = {
source =
pkgs.fetchFromGitHub {
owner = "catppuccin";
···
+
{ lib, osConfig, pkgs, ... }:
+
{
xdg.configFile = {
# 1Password configuration
···
};
home.file = {
+
# Catppuccin theme for Konsole (KDE terminal)
+
# Only on systems with KDE enabled
+
".local/share/konsole/catppuccin-mocha.colorscheme" = lib.mkIf (osConfig.settings.desktop.kde.enable or false) {
source =
pkgs.fetchFromGitHub {
owner = "catppuccin";
+18 -14
home/chloe/packages/autostart.nix
···
-
{ lib, osConfig, ... }:
{
-
config = lib.mkIf osConfig.settings.gui.enable {
xdg.configFile = {
-
"autostart/1password.desktop".text = ''
-
[Desktop Entry]
-
Name=1Password
-
Exec=1password --silent %U
-
Terminal=false
-
Type=Application
-
Icon=1password
-
StartupWMClass=1Password
-
Comment=Password manager and secure wallet
-
MimeType=x-scheme-handler/onepassword;
-
Categories=Office;
-
'';
};
};
}
···
+
{ lib, osConfig, pkgs, ... }:
+
{
+
config = lib.mkIf osConfig.settings.profiles.graphical.enable {
xdg.configFile = {
+
# .desktop files for autostart only work on Linux with XDG
+
"autostart/1password.desktop" = lib.mkIf pkgs.stdenv.isLinux {
+
text = ''
+
[Desktop Entry]
+
Name=1Password
+
Exec=1password --silent %U
+
Terminal=false
+
Type=Application
+
Icon=1password
+
StartupWMClass=1Password
+
Comment=Password manager and secure wallet
+
MimeType=x-scheme-handler/onepassword;
+
Categories=Office;
+
'';
+
};
};
};
}
-14
home/chloe/packages/custom.nix
···
-
{
-
lib,
-
osConfig,
-
pkgs,
-
inputs,
-
...
-
}:
-
{
-
config = lib.mkIf osConfig.settings.gui.enable {
-
# home.packages = [
-
# inputs.self.packages.${pkgs.system}.cider
-
# ];
-
};
-
}
···
+2 -3
home/chloe/packages/default.nix
···
in
{
imports = [
-
./autostart.nix # Apps that will run on boot
-
./custom.nix # Custom packages
-
./scripts.nix # Scripts
];
config = {
···
in
{
imports = [
+
./autostart.nix
+
./scripts.nix
];
config = {
+10
home/chloe/packages/list/default.nix
···
{ pkgs }:
with pkgs; [
nodejs
deno
cloudflared
corepack_latest
bun
]
···
{ pkgs }:
with pkgs; [
+
# dev tools
nodejs
deno
cloudflared
corepack_latest
bun
+
+
# fonts
+
iosevka
+
inter
+
atkinson-hyperlegible
+
nerd-fonts.jetbrains-mono
+
+
# other
+
_1password-cli
]
+23 -34
home/chloe/packages/list/gui.nix
···
{ pkgs, lib, osConfig }:
-
lib.optionals osConfig.settings.gui.enable (with pkgs; [
-
# cloud
-
owncloud-client
-
# messengers
-
telegram-desktop
-
vesktop
-
# notes
-
obsidian
-
# kde theme override
-
(catppuccin-kde.override {
-
flavour = [ "mocha" ];
-
accents = [ "pink" ];
-
winDecStyles = [ "classic" ];
-
})
-
# fonts
-
iosevka
-
inter
-
atkinson-hyperlegible
-
nerd-fonts.jetbrains-mono
-
# dev tools
-
bun
-
zed-editor
-
httpie-desktop
-
-
# mail
-
thunderbird
-
-
# games
-
prismlauncher
-
xivlauncher
-
# other GUI apps
-
kdePackages.akregator
-
obs-studio
-
])
···
{ pkgs, lib, osConfig }:
+
let
+
# Common GUI packages available on all platforms
+
commonPackages = with pkgs; [
+
# cloud
+
owncloud-client
+
# messengers
+
telegram-desktop
+
vesktop
+
# notes
+
obsidian
+
# dev tools
+
zed-editor
+
httpie-desktop
+
# mail
+
thunderbird
+
# games
+
prismlauncher
+
xivlauncher
+
# other GUI apps
+
obs-studio
+
_1password-gui
+
];
+
in lib.optionals osConfig.settings.profiles.graphical.enable commonPackages
+12 -20
home/chloe/packages/scripts.nix
···
-
{
-
lib,
-
pkgs,
-
osConfig,
-
...
-
}:
-
{
-
config = lib.mkIf osConfig.settings.scripts.enable {
-
home.packages = with pkgs; [
-
(writeShellScriptBin "shash" ''
-
nix hash to-sri --type sha256 $(nix-prefetch-url ''$1)
-
'')
-
(writeShellScriptBin "nix-rb" ''
-
sudo nixos-rebuild switch --flake .#$1
-
'')
-
(writeShellScriptBin "create-venv" ''
-
nix-shell -p python3 --command "python -m venv .venv --copies"
-
'')
-
];
-
};
}
···
+
{ pkgs, ... }:
+
{
+
home.packages = with pkgs; [
+
# Convert nix hash to SRI format and fetch from URL
+
(writeShellScriptBin "shash" ''
+
nix hash to-sri --type sha256 $(nix-prefetch-url ''$1)
+
'')
+
# Create a Python virtual environment with --copies flag
+
(writeShellScriptBin "create-venv" ''
+
nix run nixpkgs#python3 -- -m venv .venv --copies
+
'')
+
];
}
+7
home/chloe/programs/cli/1password.nix
···
···
+
{ pkgs, ... }:
+
+
{
+
home.packages = with pkgs; [
+
_1password-cli
+
];
+
}
+6
home/chloe/programs/cli/bat.nix
···
···
+
{
+
programs.bat = {
+
enable = true;
+
config.pager = "less -FR";
+
};
+
}
+3
home/chloe/programs/cli/btop.nix
···
···
+
{
+
programs.btop.enable = true;
+
}
+13
home/chloe/programs/cli/gh.nix
···
···
+
{
+
programs.gh = {
+
enable = true;
+
+
settings = {
+
git_protocol = "ssh";
+
aliases = {
+
# explore more aliases
+
cl = "repo clone";
+
};
+
};
+
};
+
}
+41
home/chloe/programs/cli/git.nix
···
···
+
{
+
lib,
+
pkgs,
+
osConfig,
+
...
+
}:
+
+
let
+
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICM6XP+CNc2CStEDe/W4LfkcRcG98obQiM2aqnydCRbX";
+
+
opSshSignPath =
+
if (osConfig ? wsl) then
+
"/mnt/c/Users/Chloe/AppData/Local/1Password/app/8/op-ssh-sign-wsl"
+
else if pkgs.stdenv.hostPlatform.isDarwin then
+
"/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
+
else
+
"${pkgs._1password-gui}/bin/op-ssh-sign";
+
in
+
{
+
home.file.".ssh/allowed_signers".text = "* ${signingKey}";
+
+
programs.git = {
+
enable = true;
+
userName = "Chloe";
+
userEmail = "chloe@sapphic.moe";
+
+
extraConfig = lib.mkMerge [
+
{
+
user.signingkey = signingKey;
+
gpg.format = "ssh";
+
gpg.ssh.program = opSshSignPath;
+
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
+
commit.gpgsign = true;
+
}
+
+
(lib.mkIf (osConfig ? wsl) {
+
core.sshCommand = "ssh.exe";
+
})
+
];
+
};
+
}
+3
home/chloe/programs/cli/mpv.nix
···
···
+
{
+
programs.mpv.enable = true;
+
}
+25
home/chloe/programs/cli/ssh-agent.nix
···
···
+
{ lib, pkgs, osConfig, ... }:
+
+
let
+
inherit (pkgs) ps util-linux socat;
+
grep = pkgs.gnugrep;
+
in
+
{
+
# WSL-specific SSH agent forwarding configuration
+
# Forwards the Windows SSH agent to a Unix socket in WSL
+
programs.zsh.initContent = lib.mkIf (osConfig ? wsl) ''
+
export SSH_AUTH_SOCK=$HOME/.1password/agent.sock
+
+
ALREADY_RUNNING=$(${ps}/bin/ps -auxww | ${grep}/bin/grep -q "[n]piperelay.exe -ei -s //./pipe/openssh-ssh-agent"; echo $?)
+
+
if [[ $ALREADY_RUNNING != "0" ]]; then
+
if [[ -S $SSH_AUTH_SOCK ]]; then
+
# not expecting the socket to exist as the forwarding command isn't running (http://www.tldp.org/LDP/abs/html/fto.html)
+
rm $SSH_AUTH_SOCK
+
fi
+
+
# otherwise, we start a new ssh-agent relay
+
(${util-linux}/bin/setsid ${socat}/bin/socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork &) >/dev/null 2>&1
+
fi
+
'';
+
}
+28
home/chloe/programs/cli/ssh.nix
···
···
+
{ lib, pkgs, ... }:
+
+
{
+
programs.ssh = {
+
enable = true;
+
enableDefaultConfig = false;
+
+
matchBlocks."*" = lib.mkMerge [
+
# {
+
# # Default configuration for all hosts
+
# addKeysToAgent = "yes";
+
# identitiesOnly = true;
+
# }
+
(lib.mkIf pkgs.stdenv.isLinux {
+
identityAgent = "~/.1password/agent.sock";
+
})
+
(lib.mkIf pkgs.stdenv.isDarwin {
+
identityAgent = "\"~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock\"";
+
})
+
];
+
+
# Fallback TERM for Ghostty if remote does not support xterm-ghostty
+
extraConfig = ''
+
Host *
+
SetEnv TERM=xterm-256color
+
'';
+
};
+
}
+69
home/chloe/programs/cli/zsh.nix
···
···
+
{ lib, pkgs, osConfig, config, ... }:
+
+
{
+
programs.zsh = {
+
enable = true;
+
enableCompletion = true;
+
syntaxHighlighting.enable = true;
+
autosuggestion.enable = true;
+
+
# zsh configuration file using XDG config directory
+
dotDir = "${config.xdg.configHome}/zsh";
+
+
initContent = ''
+
# Add Homebrew to PATH on macOS
+
${lib.optionalString pkgs.stdenv.isDarwin ''
+
eval "$(/opt/homebrew/bin/brew shellenv)"
+
''}
+
'';
+
+
envExtra = ''
+
${lib.optionalString pkgs.stdenv.isLinux ''
+
export PRISMA_SCHEMA_ENGINE_BINARY="${pkgs.prisma-engines}/bin/schema-engine"
+
export PRISMA_QUERY_ENGINE_BINARY="${pkgs.prisma-engines}/bin/query-engine"
+
export PRISMA_QUERY_ENGINE_LIBRARY="${pkgs.prisma-engines}/lib/libquery_engine.node"
+
export PRISMA_INTROSPECTION_ENGINE_BINARY="${pkgs.prisma-engines}/bin/introspection-engine"
+
export PRISMA_FMT_BINARY="${pkgs.prisma-engines}/bin/prisma-fmt"
+
''}
+
'';
+
+
shellAliases = lib.mkMerge [
+
{
+
cat = "bat";
+
cd = "z";
+
ls = "eza";
+
}
+
+
(lib.mkIf (osConfig ? wsl) {
+
ssh = "ssh.exe";
+
ssh-add = "ssh-add.exe";
+
})
+
];
+
+
oh-my-zsh = {
+
enable = true;
+
plugins = [
+
"1password"
+
"bun"
+
"colored-man-pages"
+
"docker"
+
"docker-compose"
+
"git"
+
"vscode"
+
];
+
};
+
+
plugins = [
+
{
+
name = "powerlevel10k-config";
+
src = ../../files;
+
file = "p10k.zsh";
+
}
+
{
+
name = "zsh-powerlevel10k";
+
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
+
file = "powerlevel10k.zsh-theme";
+
}
+
];
+
};
+
}
+7
home/chloe/programs/gui/1password.nix
···
···
+
{ pkgs, ... }:
+
+
{
+
home.packages = with pkgs; [
+
_1password-gui
+
];
+
}
+98
home/chloe/programs/gui/ghostty.nix
···
···
+
{ pkgs, ... }:
+
+
{
+
programs.ghostty = {
+
enable = true;
+
package = if pkgs.stdenv.hostPlatform.isLinux then pkgs.ghostty else pkgs.ghostty-bin;
+
+
settings = {
+
command = "/bin/zsh";
+
+
font-family = "Iosevka";
+
font-size = 14;
+
+
adjust-cell-height = "10%";
+
adjust-cell-width = "0";
+
+
background = "1e1e2e";
+
foreground = "cdd6f4";
+
+
palette = [
+
"0=#45475a"
+
"1=#f38ba8"
+
"2=#a6e3a1"
+
"3=#f9e2af"
+
"4=#89b4fa"
+
"5=#f5c2e7"
+
"6=#94e2d5"
+
"7=#bac2de"
+
"8=#585b70"
+
"9=#f38ba8"
+
"10=#a6e3a1"
+
"11=#f9e2af"
+
"12=#89b4fa"
+
"13=#f5c2e7"
+
"14=#94e2d5"
+
"15=#a6adc8"
+
];
+
+
cursor-style = "bar";
+
cursor-color = "f5c2e7";
+
cursor-style-blink = true;
+
cursor-opacity = 1;
+
+
selection-foreground = "1e1e2e";
+
selection-background = "cdd6f4";
+
+
window-padding-x = 8;
+
window-padding-y = 8;
+
window-padding-balance = true;
+
window-decoration = "client";
+
window-theme = "dark";
+
+
window-width = 120;
+
window-height = 25;
+
+
window-save-state = "always";
+
window-vsync = true;
+
+
scrollback-limit = 268435456;
+
+
copy-on-select = "clipboard";
+
+
confirm-close-surface = true;
+
+
shell-integration = "detect";
+
shell-integration-features = [ "cursor" "sudo" "title" "ssh-env" "ssh-terminfo" ];
+
+
keybind = [
+
"super+n=new_window"
+
"super+t=new_tab"
+
"super+shift+w=close_surface"
+
"super+w=close_window"
+
"super+shift+n=new_split:right"
+
"super+shift+d=new_split:down"
+
"super+shift+j=goto_split:previous"
+
"super+shift+k=goto_split:next"
+
"super+shift+h=goto_split:left"
+
"super+shift+l=goto_split:right"
+
"super+shift+up=goto_split:up"
+
"super+shift+down=goto_split:down"
+
"super+equal=increase_font_size:1"
+
"super+minus=decrease_font_size:1"
+
"super+0=reset_font_size"
+
"cmd+shift+comma=reload_config"
+
"super+f=toggle_fullscreen"
+
"super+shift+f=toggle_quick_terminal"
+
];
+
+
macos-option-as-alt = true;
+
macos-titlebar-style = "tabs";
+
macos-window-shadow = true;
+
macos-non-native-fullscreen = false;
+
+
background-blur = 40;
+
background-opacity = 0.85;
+
};
+
};
+
}
+6
home/chloe/programs/gui/vscode.nix
···
···
+
{ osConfig, ... }:
+
{
+
programs.vscode = {
+
inherit (osConfig.settings.profiles.graphical) enable;
+
};
+
}
+4 -6
home/default.nix
···
-
{
-
inputs,
-
...
-
}:
{
home-manager = {
useUserPackages = true;
···
{
home.stateVersion = "23.11";
-
# reload system units when changing configs
-
systemd.user.startServices = "sd-switch";
# let HM manage itself when in standalone mode
programs.home-manager.enable = true;
···
+
{ inputs, lib, osConfig, ... }:
+
{
home-manager = {
useUserPackages = true;
···
{
home.stateVersion = "23.11";
+
# reload system units when changing configs (only on Linux systems with systemd)
+
systemd.user.startServices = lib.mkIf (osConfig.services.systemd-tmpfiles.enable or false || osConfig.wsl.enable or false) "sd-switch";
# let HM manage itself when in standalone mode
programs.home-manager.enable = true;
-60
hosts/eris/default.nix
···
-
{ pkgs, ... }:
-
-
{
-
imports = [
-
./hardware.nix
-
];
-
-
networking.networkmanager.enable = true;
-
-
settings = {
-
kde.enable = true;
-
-
scripts.enable = true;
-
gui.enable = true;
-
-
bootloader.enable = true;
-
-
hardware = {
-
audio.enable = true;
-
acpi.enable = true;
-
fingerprint.enable = true;
-
};
-
};
-
-
boot = {
-
blacklistedKernelModules = [ "i915" ];
-
kernelParams = [
-
"snd_hda_intel.power_save=1"
-
"i915.enable_psr=0"
-
"bbswitch.load_state=0"
-
"bbswitch.unload_state=1"
-
];
-
};
-
-
hardware = {
-
graphics.enable = true;
-
graphics.extraPackages = with pkgs; [ intel-media-driver ];
-
bluetooth.enable = true;
-
enableRedistributableFirmware = true;
-
cpu.intel.updateMicrocode = true;
-
trackpoint = {
-
enable = true;
-
emulateWheel = true;
-
};
-
};
-
-
services = {
-
fstrim.enable = true;
-
fwupd.enable = true;
-
power-profiles-daemon.enable = false;
-
tlp.enable = true;
-
throttled.enable = true;
-
};
-
-
environment.sessionVariables = {
-
LIBVA_DRIVER_NAME = "iHD";
-
};
-
-
system.stateVersion = "23.11"; # Initial NixOS version
-
}
···
-41
hosts/eris/hardware.nix
···
-
# Do not modify this file! It was generated by ‘nixos-generate-config’
-
# and may be overwritten by future invocations. Please make changes
-
# to /etc/nixos/configuration.nix instead.
-
{ config, lib, pkgs, modulesPath, ... }:
-
-
{
-
imports =
-
[ (modulesPath + "/installer/scan/not-detected.nix")
-
];
-
-
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
-
boot.initrd.kernelModules = [ ];
-
boot.kernelModules = [ "kvm-intel" ];
-
boot.extraModulePackages = [ ];
-
-
fileSystems."/" =
-
{ device = "/dev/disk/by-uuid/d18ad583-3c29-46fb-b740-3f16cdf976d1";
-
fsType = "ext4";
-
};
-
-
fileSystems."/boot" =
-
{ device = "/dev/disk/by-uuid/4481-8EB8";
-
fsType = "vfat";
-
options = [ "fmask=0077" "dmask=0077" ];
-
};
-
-
swapDevices =
-
[ { device = "/dev/disk/by-uuid/dac60c98-c3a6-4c38-82bc-d023a498e9a2"; }
-
];
-
-
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
-
# networking.interfaces.wlp61s0.useDHCP = lib.mkDefault true;
-
-
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
-
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-
}
···
+3
hosts/juniper/default.nix
···
···
+
{
+
system.stateVersion = 6; # initial nix-darwin version
+
}
-16
hosts/lavender/default.nix
···
-
{
-
imports = [
-
./hardware.nix
-
];
-
-
settings = {
-
flatpak.enable = false;
-
-
scripts.enable = true;
-
};
-
-
networking.wireless.enable = true;
-
services.openssh.enable = true;
-
-
system.stateVersion = "23.11"; # Initial NixOS version
-
}
···
-33
hosts/lavender/hardware.nix
···
-
# Do not modify this file! It was generated by ‘nixos-generate-config’
-
# and may be overwritten by future invocations. Please make changes
-
# to /etc/nixos/configuration.nix instead.
-
{ config, lib, pkgs, modulesPath, ... }:
-
-
{
-
imports =
-
[ (modulesPath + "/installer/scan/not-detected.nix")
-
];
-
-
boot.initrd.availableKernelModules = [ "xhci_pci" ];
-
boot.initrd.kernelModules = [ ];
-
boot.kernelModules = [ ];
-
boot.extraModulePackages = [ ];
-
-
fileSystems."/" =
-
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
-
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.docker0.useDHCP = lib.mkDefault true;
-
# networking.interfaces.end0.useDHCP = lib.mkDefault true;
-
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
-
-
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
-
}
···
+9 -6
hosts/sapphic/default.nix hosts/caulfield/default.nix
···
./hardware.nix
];
-
networking.networkmanager.enable = true;
-
hardware.bluetooth.enable = true;
virtualisation.waydroid.enable = true;
settings = {
bootloader.enable = true;
-
gui.enable = true;
-
kde.enable = true;
solaar.enable = true;
hardware = {
nvidia.enable = true;
-
asus.enable = true;
-
audio.enable = true;
};
};
···
./hardware.nix
];
virtualisation.waydroid.enable = true;
settings = {
+
desktop.kde.enable = true;
+
bootloader.enable = true;
solaar.enable = true;
+
profiles = {
+
graphical.enable = true;
+
laptop.enable = true;
+
};
+
hardware = {
+
audio.enable = true;
+
bluetooth.enable = true;
nvidia.enable = true;
};
};
hosts/sapphic/hardware.nix hosts/caulfield/hardware.nix
+3 -8
hosts/solstice/default.nix
···
{
-
wsl = {
-
enable = true;
-
defaultUser = "chloe";
-
};
-
settings = {
-
flatpak.enable = false;
-
-
vscode-remote.enable = true;
};
system.stateVersion = "23.11"; # Initial NixOS version
···
{
settings = {
+
profiles = {
+
graphical.enable = false;
+
};
};
system.stateVersion = "23.11"; # Initial NixOS version
-11
lib/default.nix
···
-
{ inputs }:
-
let
-
lib0 = inputs.nixpkgs.lib;
-
-
myLib = lib0.makeExtensible (lib: {
-
mkSystem = import ./mkSystem.nix {
-
inherit lib inputs;
-
};
-
});
-
in
-
myLib.extend (_: _: lib0)
···
-28
lib/mkSystem.nix
···
-
{ lib, inputs }:
-
host:
-
{
-
specialArgs ? { },
-
modules ? [ ],
-
...
-
}:
-
lib.nixosSystem {
-
specialArgs = specialArgs // {
-
inherit lib inputs;
-
};
-
-
modules = [
-
# set hostname based on the host argument
-
{ networking.hostName = host; }
-
-
inputs.home-manager.nixosModules.home-manager
-
-
# import shared modules
-
../modules/shared
-
-
# import by hostname
-
../hosts/${host}
-
-
# import home manager
-
../home/default.nix
-
] ++ modules;
-
}
···
+9
modules/base/default.nix
···
···
+
{
+
imports = [
+
../shared
+
+
./nix.nix
+
./packages.nix
+
./zsh.nix
+
];
+
}
+11
modules/base/packages.nix
···
···
+
{ pkgs, ... }:
+
+
{
+
environment.systemPackages = with pkgs; [
+
git
+
wget
+
unzip
+
nil
+
jq
+
];
+
}
+12
modules/darwin/default.nix
···
···
+
{
+
imports = [
+
../../home
+
./extras.nix
+
./homebrew.nix
+
./legacy.nix
+
./packages.nix
+
./preferences
+
./security
+
./users.nix
+
];
+
}
+5
modules/darwin/environment/default.nix
···
···
+
{
+
imports = [
+
./locale.nix
+
];
+
}
+7
modules/darwin/environment/locale.nix
···
···
+
{
+
system.defaults.NSGlobalDomain = {
+
AppleMeasurementUnits = "Centimeters";
+
AppleMetricUnits = 1;
+
AppleTemperatureUnit = "Celsius";
+
};
+
}
+7
modules/darwin/extras.nix
···
···
+
{ inputs, ... }:
+
+
{
+
imports = [
+
inputs.home-manager.darwinModules.home-manager
+
];
+
}
+38
modules/darwin/homebrew.nix
···
···
+
{
+
# Enable Homebrew
+
homebrew = {
+
enable = true;
+
+
# Update Homebrew and upgrade all packages on activation
+
onActivation = {
+
autoUpdate = true;
+
upgrade = true;
+
cleanup = "zap"; # Uninstall all programs not declared
+
};
+
+
# Taps (third-party repositories)
+
taps = [];
+
+
# Formulae (CLI tools)
+
brews = [
+
"media-control"
+
"mas"
+
];
+
+
# Casks (GUI applications)
+
casks = [
+
"1password"
+
"maccy"
+
"microsoft-teams"
+
"music-presence"
+
"prismlauncher"
+
];
+
+
# Mac App Store apps (requires mas-cli)
+
masApps = {
+
"WhatsApp" = 310633997;
+
"Telegram" = 747648890;
+
"Tailscale" = 1475387142;
+
};
+
};
+
}
+7
modules/darwin/legacy.nix
···
···
+
{
+
# TODO: This is a legacy method.
+
# "This is a transition mechanism as nix-darwin reorganizes its options and will eventually be unnecessary and removed."
+
# See https://nix-darwin.github.io/nix-darwin/manual/#opt-system.primaryUser.
+
+
system.primaryUser = "chloe";
+
}
+19
modules/darwin/nix.nix
···
···
+
# From https://github.com/isabelroses/dotfiles/blob/main/modules/darwin/nix.nix
+
+
{
+
nix = {
+
# nix gc works slightly differently on darwin, so we need to adjust the
+
# interval such that it works properly here.
+
gc.interval = {
+
Hour = 3;
+
Minute = 15;
+
};
+
+
# we add more platforms here because of the limited number of darwin
+
# maintainers that exist, thus meaning less working packages for darwin.
+
settings.extra-platforms = [
+
"aarch64-darwin"
+
"x86-64-darwin"
+
];
+
};
+
}
+7
modules/darwin/packages.nix
···
···
+
{ pkgs, ... }:
+
+
{
+
environment.systemPackages = with pkgs; [
+
nh
+
];
+
}
+8
modules/darwin/preferences/default.nix
···
···
+
{
+
imports = [
+
./dock.nix
+
./finder.nix
+
./keyboard.nix
+
./trackpad.nix
+
];
+
}
+8
modules/darwin/preferences/dock.nix
···
···
+
{
+
system.defaults.dock = {
+
orientation = "bottom";
+
show-recents = false;
+
tilesize = 52;
+
minimize-to-application = true;
+
};
+
}
+7
modules/darwin/preferences/finder.nix
···
···
+
{
+
system.defaults.finder = {
+
AppleShowAllExtensions = true;
+
ShowPathbar = true;
+
FXEnableExtensionChangeWarning = false;
+
};
+
}
+3
modules/darwin/preferences/keyboard.nix
···
···
+
{
+
system.keyboard.enableKeyMapping = true;
+
}
+6
modules/darwin/preferences/trackpad.nix
···
···
+
{
+
system.defaults.trackpad = {
+
Clicking = true;
+
Dragging = true;
+
};
+
}
+5
modules/darwin/security/default.nix
···
···
+
{
+
imports = [
+
./pam.nix
+
];
+
}
+4
modules/darwin/security/pam.nix
···
···
+
{
+
# Enable Touch ID authentication for sudo
+
security.pam.services.sudo_local.touchIdAuth = true;
+
}
+9
modules/darwin/users.nix
···
···
+
{ pkgs, ... }:
+
+
{
+
users.users.chloe = {
+
name = "chloe";
+
home = "/Users/chloe";
+
shell = pkgs.zsh;
+
};
+
}
+5
modules/nixos/boot/default.nix
···
···
+
{
+
imports = [
+
./loader.nix
+
];
+
}
+18
modules/nixos/default.nix
···
···
+
{
+
imports = [
+
../../home
+
./boot
+
./catppuccin.nix
+
./environment
+
./extras.nix
+
./hardware
+
./kde.nix
+
./networking
+
./packages.nix
+
./polkit.nix
+
./programs
+
./services
+
./users.nix
+
./virtualization.nix
+
];
+
}
+5
modules/nixos/environment/default.nix
···
···
+
{
+
imports = [
+
./locale.nix
+
];
+
}
+13
modules/nixos/environment/locale.nix
···
···
+
{ lib, ... }:
+
+
{
+
time = {
+
timeZone = lib.mkDefault "Asia/Almaty";
+
hardwareClockInLocalTime = true;
+
};
+
+
i18n = {
+
defaultLocale = lib.mkDefault "en_US.UTF-8";
+
extraLocales = lib.mkDefault [ "ru_RU.UTF-8/UTF-8" ];
+
};
+
}
+7
modules/nixos/extras.nix
···
···
+
{ inputs, ... }:
+
+
{
+
imports = [
+
inputs.home-manager.nixosModules.home-manager
+
];
+
}
+15
modules/nixos/hardware/bluetooth.nix
···
···
+
{ lib, config, types, ... }:
+
+
{
+
options.hardware.bluetooth.enable = {
+
type = types.bool;
+
default = lib.mkIf lib.stdenv.hostPlatform.isLinux true false;
+
description = ''
+
Enable Bluetooth support.
+
'';
+
};
+
+
config = {
+
hardware.bluetooth.enable = lib.mkIf config.hardware.bluetooth.enable;
+
};
+
}
+10
modules/nixos/hardware/video.nix
···
···
+
{ lib, config, ... }:
+
+
{
+
config = lib.mkIf config.settings.profiles.graphical.enable {
+
hardware.graphics = {
+
enable = true;
+
enable32Bit = true;
+
};
+
};
+
}
+12
modules/nixos/kde.nix
···
···
+
{ lib, config, ... }:
+
+
{
+
config = lib.mkIf config.settings.desktop.kde.enable {
+
services.desktopManager.plasma6.enable = true;
+
+
services.displayManager.sddm = {
+
enable = true;
+
wayland.enable = true;
+
};
+
};
+
}
+5
modules/nixos/networking/default.nix
···
···
+
{
+
imports = [
+
./networkmanager.nix
+
];
+
}
+3
modules/nixos/networking/networkmanager.nix
···
···
+
{
+
networking.networkmanager.enable = true;
+
}
+7
modules/nixos/packages.nix
···
···
+
{ pkgs, ... }:
+
+
{
+
environment.systemPackages = with pkgs; [
+
gparted
+
];
+
}
+3
modules/nixos/polkit.nix
···
···
+
{
+
security.polkit.enable = true; # Enable PolKit for system authentication in 1Password
+
}
+10
modules/nixos/programs/1password.nix
···
···
+
{ lib, config, ... }:
+
+
{
+
config = lib.mkIf config.settings.profiles.graphical.enable {
+
programs._1password-gui = {
+
enable = true;
+
polkitPolicyOwners = [ "chloe" ]; # Define the users who can authenticate via PolKit
+
};
+
};
+
}
+7
modules/nixos/programs/kdeconnect.nix
···
···
+
{ lib, config, ... }:
+
+
{
+
config = lib.mkIf config.settings.desktop.kde.enable {
+
programs.kdeconnect.enable = true;
+
};
+
}
+3
modules/nixos/programs/nh.nix
···
···
+
{
+
programs.nh.enable = true;
+
}
+3
modules/nixos/programs/nix-ld.nix
···
···
+
{
+
programs.nix-ld.enable = true;
+
}
+6
modules/nixos/services/default.nix
···
···
+
{
+
imports = [
+
./flatpak.nix
+
./tailscale.nix
+
];
+
}
+7
modules/nixos/services/flatpak.nix
···
···
+
{ config, ... }:
+
+
{
+
config = {
+
services.flatpak.enable = config.settings.profiles.graphical.enable;
+
};
+
}
+16
modules/nixos/services/tailscale.nix
···
···
+
{ lib, config, ... }:
+
+
{
+
options = {
+
settings.tailscale.enable = lib.mkEnableOption "Enable Tailscale" // {
+
default = false;
+
};
+
};
+
+
config = {
+
services.tailscale = {
+
enable = config.settings.tailscale.enable;
+
useRoutingFeatures = "both";
+
};
+
};
+
}
+19
modules/nixos/virtualization.nix
···
···
+
{
+
config,
+
lib,
+
...
+
}:
+
+
{
+
options = {
+
settings.docker.enable = lib.mkEnableOption "Enable Docker" // {
+
default = true;
+
};
+
};
+
+
config = {
+
virtualisation.docker.enable = config.settings.docker.enable;
+
+
users.users.chloe.extraGroups = lib.mkForce (lib.unique (config.users.users.chloe.extraGroups ++ [ "docker" ]));
+
};
+
}
-11
modules/shared/apps/1password-gui.nix
···
-
{ lib, config, ... }:
-
{
-
config = lib.mkIf config.settings.gui.enable {
-
programs = {
-
_1password-gui = {
-
enable = true;
-
polkitPolicyOwners = [ "chloe" ]; # Define the users who can authenticate via PolKit
-
};
-
};
-
};
-
}
···
+2 -1
modules/shared/apps/default.nix modules/nixos/programs/default.nix
···
{
imports = [
-
./1password-gui.nix
./nh.nix
./solaar.nix
./steam.nix
···
{
imports = [
+
./1password.nix
+
./kdeconnect.nix
./nh.nix
./solaar.nix
./steam.nix
-7
modules/shared/apps/nh.nix
···
-
{ ... }:
-
-
{
-
programs.nh = {
-
enable = true;
-
};
-
}
···
+6 -1
modules/shared/apps/solaar.nix modules/nixos/programs/solaar.nix
···
-
{ lib, config, ... }:
{
options.settings.solaar.enable = lib.mkEnableOption "Enable Solaar" // {
default = false;
};
···
+
{ lib, config, inputs, ... }:
+
{
+
imports = [
+
inputs.solaar.nixosModules.solaar
+
];
+
options.settings.solaar.enable = lib.mkEnableOption "Enable Solaar" // {
default = false;
};
+2 -1
modules/shared/apps/steam.nix modules/nixos/programs/steam.nix
···
{ lib, config, ... }:
{
-
config = lib.mkIf config.settings.gui.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
···
{ lib, config, ... }:
+
{
+
config = lib.mkIf config.settings.profiles.graphical.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
+5
modules/shared/bootloader.nix modules/nixos/boot/loader.nix
···
{ lib, pkgs, config, ... }:
{
options.settings.bootloader.enable = lib.mkEnableOption "Enable bootloader configuration";
config = lib.mkIf config.settings.bootloader.enable {
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
···
{ lib, pkgs, config, ... }:
+
{
options.settings.bootloader.enable = lib.mkEnableOption "Enable bootloader configuration";
config = lib.mkIf config.settings.bootloader.enable {
boot = {
+
consoleLogLevel = 3;
+
kernelPackages = pkgs.linuxPackages_latest;
+
loader = {
+
timeout = 2;
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
+1
modules/shared/catppuccin.nix modules/nixos/catppuccin.nix
···
{ inputs, ... }:
{
imports = [ inputs.catppuccin.nixosModules.catppuccin ];
···
{ inputs, ... }:
+
{
imports = [ inputs.catppuccin.nixosModules.catppuccin ];
+2 -40
modules/shared/default.nix
···
-
{
-
config,
-
...
-
}:
-
{
imports = [
-
./apps
-
./hardware
-
./bootloader.nix
-
./catppuccin.nix
-
./kde.nix
-
./nix.nix
-
./options.nix
-
./packages.nix
-
./users.nix
-
./zsh.nix
];
-
-
config = {
-
programs = {
-
dconf.enable = true; # Fix missing cursors on Firefox
-
nix-ld.enable = config.settings.vscode-remote.enable; # Enable the VSCode Remote server via nix-ld
-
};
-
-
services = {
-
flatpak.enable = config.settings.flatpak.enable;
-
tailscale = {
-
enable = config.settings.tailscale.enable;
-
useRoutingFeatures = "both";
-
};
-
};
-
-
time = {
-
timeZone = "Asia/Almaty";
-
hardwareClockInLocalTime = true; # Keep time synced on Windows and NixOS
-
};
-
-
virtualisation.docker.enable = config.settings.docker.enable;
-
-
security.polkit.enable = true; # Enable PolKit for system authentication in 1Password
-
};
-
}
···
{
imports = [
+
./profiles.nix
];
+
}
-12
modules/shared/hardware/acpi.nix
···
-
# acpi_call makes tlp work for newer thinkpads
-
{ lib, config, ... }:
-
{
-
options.settings.hardware.acpi.enable = lib.mkEnableOption "Enable acpi_call kernel module";
-
-
config = lib.mkIf config.settings.hardware.acpi.enable {
-
boot = {
-
kernelModules = [ "acpi_call" ];
-
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
-
};
-
};
-
}
···
+2 -3
modules/shared/hardware/asus.nix modules/nixos/hardware/asus.nix
···
config,
...
}:
{
-
options.settings.hardware.asus.enable = lib.mkEnableOption "Nvidia driver support";
-
-
config = lib.mkIf config.settings.hardware.asus.enable {
environment.systemPackages = with pkgs; [ asusctl ]; # Control panel for ASUS laptops
services.asusd = {
···
config,
...
}:
+
{
+
config = lib.mkIf config.settings.hardware.laptop.enable {
environment.systemPackages = with pkgs; [ asusctl ]; # Control panel for ASUS laptops
services.asusd = {
+3
modules/shared/hardware/audio.nix modules/nixos/hardware/audio.nix
···
{ lib, config, ... }:
{
options.settings.hardware.audio.enable = lib.mkEnableOption "Enable audio support";
···
pulse.enable = true;
};
};
}
···
{ lib, config, ... }:
+
{
options.settings.hardware.audio.enable = lib.mkEnableOption "Enable audio support";
···
pulse.enable = true;
};
+
+
users.users.chloe.extraGroups = lib.mkForce (lib.unique (config.users.users.chloe.extraGroups ++ [ "audio" ]));
};
}
+1 -2
modules/shared/hardware/default.nix modules/nixos/hardware/default.nix
···
{
imports = [
-
./acpi.nix
./asus.nix
./audio.nix
-
./fingerprint.nix
./nvidia.nix
];
}
···
{
imports = [
./asus.nix
./audio.nix
./nvidia.nix
+
./video.nix
];
}
-22
modules/shared/hardware/fingerprint.nix
···
-
{
-
lib,
-
config,
-
inputs,
-
...
-
}:
-
{
-
imports = [
-
inputs.nixos-06cb-009a-fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"
-
];
-
-
options.settings.hardware.fingerprint.enable = lib.mkEnableOption "Enable fingerprint support";
-
-
config = lib.mkIf config.settings.hardware.fingerprint.enable {
-
services."06cb-009a-fingerprint-sensor" = {
-
enable = true;
-
backend = "libfprint-tod";
-
# Use backend = "python-validity"; for enrolling new fingerprints.
-
calib-data-file = ./fp-data/calib-data.bin;
-
};
-
};
-
}
···
modules/shared/hardware/fp-data/calib-data.bin

This is a binary file and will not be displayed.

+1 -6
modules/shared/hardware/nvidia.nix modules/nixos/hardware/nvidia.nix
···
{
config,
pkgs,
-
lib,
...
}:
{
options.settings.hardware.nvidia.enable = lib.mkEnableOption "Nvidia driver support";
config = lib.mkIf config.settings.hardware.nvidia.enable {
-
hardware.graphics = {
-
enable = true;
-
enable32Bit = true;
-
};
-
# Load NVIDIA driver for X11 and Wayland
services.xserver.videoDrivers = [ "nvidia" ];
···
{
+
lib,
config,
pkgs,
...
}:
{
options.settings.hardware.nvidia.enable = lib.mkEnableOption "Nvidia driver support";
config = lib.mkIf config.settings.hardware.nvidia.enable {
# Load NVIDIA driver for X11 and Wayland
services.xserver.videoDrivers = [ "nvidia" ];
-16
modules/shared/kde.nix
···
-
{ lib, config, ... }:
-
{
-
options.settings.kde.enable = lib.mkEnableOption "Enable KDE Plasma desktop environment";
-
-
config = lib.mkIf config.settings.kde.enable {
-
programs.kdeconnect.enable = true;
-
services.desktopManager.plasma6.enable = true;
-
-
services.displayManager = {
-
sddm = {
-
enable = true;
-
wayland.enable = true;
-
};
-
};
-
};
-
}
···
+4 -4
modules/shared/nix.nix modules/base/nix.nix
···
automatic = true;
options = "--delete-older-than 14d";
};
settings = {
# Literally a CVE waiting to happen.
accept-flake-config = false;
-
-
# Optimize symlinks.
-
auto-optimise-store = true;
# Enable Nix commands and flakes.
experimental-features = [
···
};
# Allow unfree packages.
-
# This is sadly not enough as I still have to pass the --impure flag.
nixpkgs.config.allowUnfree = true;
}
···
automatic = true;
options = "--delete-older-than 14d";
};
+
+
# Optimize symlinks.
+
optimise.automatic = true;
settings = {
# Literally a CVE waiting to happen.
accept-flake-config = false;
# Enable Nix commands and flakes.
experimental-features = [
···
};
# Allow unfree packages.
+
# This is sadly not enough as I still have to pass the --impure flag. 😒
nixpkgs.config.allowUnfree = true;
}
-26
modules/shared/options.nix
···
-
{ lib, ... }:
-
{
-
options.settings = {
-
docker.enable = lib.mkEnableOption "Enable Docker" // {
-
default = true;
-
};
-
-
flatpak.enable = lib.mkEnableOption "Enable Flatpak" // {
-
default = true;
-
};
-
-
gui.enable = lib.mkEnableOption "Enable GUI packages";
-
-
scripts.enable = lib.mkEnableOption "Enable scripts" // {
-
default = true;
-
};
-
-
tailscale.enable = lib.mkEnableOption "Enable Tailscale" // {
-
default = true;
-
};
-
-
vscode-remote.enable = lib.mkEnableOption "Enable the VSCode Remote server via nix-ld" // {
-
default = false;
-
};
-
};
-
}
···
-19
modules/shared/packages.nix
···
-
{ pkgs, ... }:
-
-
{
-
environment.systemPackages = with pkgs; [
-
git
-
wget
-
unzip
-
nil
-
jq
-
gparted
-
firefoxpwa
-
];
-
-
programs.firefox = {
-
enable = true;
-
package = pkgs.firefox;
-
nativeMessagingHosts.packages = [ pkgs.firefoxpwa ];
-
};
-
}
···
+12
modules/shared/profiles.nix
···
···
+
{ lib, ... }:
+
+
{
+
options.settings = {
+
profiles = {
+
graphical.enable = lib.mkEnableOption "Graphical interface";
+
laptop.enable = lib.mkEnableOption "Laptop";
+
};
+
+
desktop.kde.enable = lib.mkEnableOption "Enable KDE Plasma desktop environment";
+
};
+
}
+1 -2
modules/shared/users.nix modules/nixos/users.nix
···
{ pkgs, ... }:
{
users.users = {
chloe = {
isNormalUser = true;
-
description = "Chloe";
extraGroups = [
"networkmanager"
"wheel"
"docker"
-
"pipewire" # this give us access to the rt limits
];
shell = pkgs.zsh;
};
···
{ pkgs, ... }:
+
{
users.users = {
chloe = {
isNormalUser = true;
extraGroups = [
"networkmanager"
"wheel"
"docker"
];
shell = pkgs.zsh;
};
-1
modules/shared/zsh.nix modules/base/zsh.nix
···
programs.zsh = {
enable = true;
enableCompletion = true;
-
syntaxHighlighting.enable = true;
};
# Link zsh completions
···
programs.zsh = {
enable = true;
enableCompletion = true;
};
# Link zsh completions
+17
modules/wsl/default.nix
···
···
+
{
+
imports = [
+
../../home
+
./extras.nix
+
./packages.nix
+
];
+
+
config = {
+
wsl = {
+
enable = true;
+
defaultUser = "chloe";
+
};
+
+
# Allow opening files and links in Windows from WSL
+
environment.variable.BROWSER = "wsl-open";
+
};
+
}
+8
modules/wsl/extras.nix
···
···
+
{ inputs, ... }:
+
+
{
+
imports = [
+
inputs.home-manager.nixosModules.home-manager
+
inputs.nixos-wsl.nixosModules.default
+
];
+
}
+7
modules/wsl/packages.nix
···
···
+
{ pkgs, ... }:
+
+
{
+
environment.systemPackages = with pkgs; [
+
wsl-open
+
];
+
}
-45
packages/cider.nix
···
-
{
-
lib,
-
appimageTools,
-
makeWrapper,
-
requireFile,
-
}:
-
let
-
version = "2.5.0";
-
pname = "cider";
-
-
src = requireFile {
-
name = "Cider-linux-appimage-x64.AppImage";
-
url = "https://cidercollective.itch.io/cider";
-
# sha256sum /nix/store/deadb33f-Cider-linux-appimage-x64.AppImage
-
sha256 = "1f07c1c98f1abf502f23eb7bc2768d6e10cb5c1c60cd129888b1b584f52da3da";
-
};
-
-
appimageContents = appimageTools.extractType2 {
-
inherit pname version src;
-
};
-
in
-
appimageTools.wrapType2 {
-
inherit pname version src;
-
-
extraInstallCommands = ''
-
source "${makeWrapper}/nix-support/setup-hook"
-
-
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
-
-
substituteInPlace $out/share/applications/${pname}.desktop \
-
--replace 'Exec=AppRun' 'Exec=${pname}'
-
cp -r ${appimageContents}/usr/share/icons $out/share
-
'';
-
-
meta = {
-
description = "Cider is a new cross-platform Apple Music experience";
-
downloadPage = "https://cidercollective.itch.io/cider";
-
homepage = "https://cider.sh/";
-
license = lib.licenses.unfree;
-
mainProgram = "cider";
-
maintainers = with lib.maintainers; [ flexiondotorg ];
-
platforms = [ "x86_64-linux" ];
-
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
-
};
-
}
···