added leviathan and elise

This commit is contained in:
2025-08-24 18:36:45 -04:00
parent 470be2b761
commit 62c3aa69fe
20 changed files with 570 additions and 3 deletions

View File

@@ -17,10 +17,10 @@ jobs:
- "bob" - "bob"
- "jeeves" - "jeeves"
- "rhapsody-in-green" - "rhapsody-in-green"
- "leviathan"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Build default package - name: Build default package
run: "nixos-rebuild build --flake ./#${{ matrix.system }}" run: "nixos-rebuild build --flake ./#${{ matrix.system }}"
- name: copy to nix-cache - name: copy to nix-cache
run: nix copy --to ssh://jeeves .#nixosConfigurations.${{ matrix.system }}.config.system.build.toplevel run: nix copy --to ssh://jeeves .#nixosConfigurations.${{ matrix.system }}.config.system.build.toplevel

View File

@@ -0,0 +1,27 @@
{ inputs, ... }:
{
imports = [
../../users/elise
../../users/richie
../../common/global
../../common/optional/desktop.nix
../../common/optional/steam.nix
../../common/optional/systemd-boot.nix
../../common/optional/update.nix
./hardware.nix
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
];
networking = {
hostName = "leviathan";
hostId = "cb9b64d8";
firewall.enable = true;
networkmanager.enable = true;
};
services = {
openssh.ports = [ 332 ];
};
system.stateVersion = "25.05";
}

View File

@@ -0,0 +1,69 @@
{
config,
lib,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules = [
"ahci"
"ehci_pci"
"nvme"
"sd_mod"
"usb_storage"
"usbhid"
"xhci_pci"
];
kernelModules = [ ];
luks.devices."luks-root-pool-nvme-Samsung_SSD_970_EVO_Plus_1TB_S6S1NS0T617615W-part2" = {
device = "/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_1TB_S6S1NS0T617615W-part2";
bypassWorkqueues = true;
allowDiscards = true;
};
};
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = lib.mkDefault {
device = "root_pool/root";
fsType = "zfs";
};
"/home" = {
device = "root_pool/home";
fsType = "zfs";
};
"/var" = {
device = "root_pool/var";
fsType = "zfs";
};
"/nix" = {
device = "root_pool/nix";
fsType = "zfs";
};
"/boot" = {
device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

52
users/elise/default.nix Normal file
View File

@@ -0,0 +1,52 @@
{
pkgs,
config,
...
}:
let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in
{
sops.secrets.elise_password = {
sopsFile = ../secrets.yaml;
neededForUsers = true;
};
users = {
users.elise = {
isNormalUser = true;
hashedPasswordFile = "${config.sops.secrets.elise_password.path}";
shell = pkgs.zsh;
group = "elise";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYZFsc9CSH03ZUP7y81AHwSyjLwFmcshVFCyxDcYhBT rhapsody-in-green" # cspell:disable-line
];
extraGroups = [
"audio"
"video"
"wheel"
"users"
]
++ ifTheyExist [
"dialout"
"docker"
"hass"
"libvirtd"
"networkmanager"
"plugdev"
"scanner"
"transmission"
"uaccess"
"wireshark"
];
uid = 1010;
};
groups.elise.gid = 1010;
};
home-manager.users.elise = import ./systems/${config.networking.hostName}.nix;
}

View File

@@ -0,0 +1,9 @@
{
imports = [
./direnv.nix
./git.nix
./zsh.nix
];
programs.starship.enable = true;
}

View File

@@ -0,0 +1,8 @@
{
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
}

View File

@@ -0,0 +1,12 @@
{
programs.git = {
enable = true;
userEmail = "Richie@tmmworkshop.com";
userName = "Richie Cahill";
extraConfig = {
pull.rebase = true;
color.ui = true;
};
lfs.enable = true;
};
}

View File

@@ -0,0 +1,31 @@
{
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
history.size = 10000;
oh-my-zsh = {
enable = true;
plugins = [
"git"
"docker"
"docker-compose"
"colored-man-pages"
"rust"
"systemd"
"tmux"
"ufw"
"z"
];
};
shellAliases = {
"lrt" = "eza --icons -lsnew";
"ls" = "eza";
"ll" = "eza --long --group";
"la" = "eza --all";
"rebuild" = "sudo nixos-rebuild switch --flake $HOME/dotfiles#$HOST";
"rebuild_backup" =
"sudo nixos-rebuild switch --flake $HOME/dotfiles#$HOST --option substituters 'https://nix-community.cachix.org' --option trusted-public-keys 'cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY='";
};
};
}

View File

@@ -0,0 +1,22 @@
{ config, ... }:
{
imports = [
./cli
./programs.nix
./ssh_config.nix
];
programs = {
home-manager.enable = true;
git.enable = true;
};
home = {
username = "elise";
homeDirectory = "/home/${config.home.username}";
stateVersion = "24.05";
sessionVariables = {
FLAKE = "$HOME/dotfiles";
};
};
}

View File

@@ -0,0 +1,33 @@
{ pkgs, ... }:
{
imports = [
./vscode
./kitty.nix
];
home.packages = with pkgs; [
candy-icons
chromium
discord-canary
gimp
gparted
jetbrains.datagrip
mediainfo
nemo
nemo-fileroller
obs-studio
obsidian
prismlauncher
proxychains
prusa-slicer
signal-desktop
sweet-nova
util-linux
vlc
zoom-us
# games
dwarf-fortress
tower-pixel-dungeon
endless-sky
];
}

View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
programs.kitty = {
enable = true;
font.name = "IntoneMono Nerd Font";
settings = {
allow_remote_control = "no";
shell = "${pkgs.zsh}/bin/zsh";
wayland_titlebar_color = "background";
};
themeFile = "VSCode_Dark";
};
}

View File

@@ -0,0 +1,19 @@
{ config, pkgs, ... }:
let
vscode_dir = "/home/richie/dotfiles/users/richie/home/gui/vscode";
in
{
# mutable symlinks to key binds and settings
xdg.configFile."Code/User/settings.json".source =
config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/settings.json";
xdg.configFile."Code/User/keybindings.json".source =
config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/keybindings.json";
home.packages = with pkgs; [ nil ];
programs.vscode = {
enable = true;
package = pkgs.vscode;
mutableExtensionsDir = true;
};
}

View File

@@ -0,0 +1,68 @@
from subprocess import run
def get_installed_extensions():
process = run("code --list-extensions".split(), check=True, capture_output=True)
return set(process.stdout.decode("utf-8").strip().split("\n"))
def main():
print("starting vscode extension manager")
extensions = {
# vscode
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
"ms-vscode-remote.remote-ssh-edit",
"ms-vscode-remote.remote-ssh",
"ms-vscode.hexeditor",
"ms-vscode.remote-explorer",
"ms-vsliveshare.vsliveshare",
"oderwat.indent-rainbow",
"usernamehw.errorlens",
# git
"codezombiech.gitignore",
"eamodio.gitlens",
"gitHub.vscode-github-actions",
# python
"charliermarsh.ruff",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.debugpy",
# rust
"rust-lang.rust-analyzer",
# MD
"davidanson.vscode-markdownlint",
"yzhang.markdown-all-in-one",
# configs
"redhat.vscode-yaml",
"tamasfe.even-better-toml",
# shell
"timonwong.shellcheck",
"foxundermoon.shell-format",
# nix
"jnoortheen.nix-ide",
# database
"mtxr.sqltools-driver-pg",
"mtxr.sqltools",
# other
"esbenp.prettier-vscode",
"mechatroner.rainbow-csv",
"streetsidesoftware.code-spell-checker",
"supermaven.supermaven",
}
installed_extensions = get_installed_extensions()
missing_extensions = extensions.difference(installed_extensions)
for extension in missing_extensions:
run(f"code --install-extension {extension} --force".split(), check=True)
if extra_extensions := installed_extensions.difference(extensions):
print(f"Extra extensions installed: {extra_extensions}")
print("vscode extension manager finished")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,20 @@
[
{
"key": "shift+alt+f",
"command": "editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
},
{
"key": "alt+a d",
"command": "cSpell.addWordToWorkspaceSettings"
},
{
"key": "ctrl+shift+`",
"command": "workbench.action.createTerminalEditor"
},
{
"key": "ctrl+shift+`",
"command": "-workbench.action.terminal.new",
"when": "terminalProcessSupported || terminalWebExtensionContributedProfile"
}
]

View File

@@ -0,0 +1,77 @@
{
// vscode settings
"diffEditor.ignoreTrimWhitespace": false,
"editor.formatOnSave": true,
"editor.minimap.renderCharacters": false,
"editor.minimap.showSlider": "always",
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"explorer.confirmPasteNative": false,
"files.autoSave": "afterDelay",
"git.autofetch": true,
"git.confirmSync": false,
"git.fetchOnPull": true,
"git.pruneOnFetch": true,
"terminal.integrated.scrollback": 10000,
"update.mode": "none",
"workbench.colorTheme": "Default Dark+",
"workbench.secondarySideBar.showLabels": false,
// turns off all sounds and announcements
"accessibility.signals.terminalCommandFailed": {
"sound": "off",
"announcement": "off"
},
"accessibility.signals.terminalQuickFix": {
"sound": "off",
"announcement": "off"
},
"accessibility.signals.terminalBell": {
"sound": "off",
"announcement": "off"
},
// database settings
"sqltools.connections": [
{
"previewLimit": 50,
"server": "192.168.90.40",
"port": 5432,
"askForPassword": true,
"driver": "PostgreSQL",
"name": "main",
"database": "postgres",
"username": "richie"
}
],
// formatters
"[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[nix]": { "editor.defaultFormatter": "jnoortheen.nix-ide" },
"[python]": { "editor.defaultFormatter": "charliermarsh.ruff" },
"[yaml]": { "editor.defaultFormatter": "redhat.vscode-yaml" },
"[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
// spell check
"cSpell.enabled": true,
"cSpell.language": "en,en-US",
"cSpell.enableFiletypes": ["bat", "csv", "nix", "toml"],
"cSpell.userWords": ["Cahill", "syncthing"],
// nix
"nix.enableLanguageServer": true,
"nix.serverPath": "nil",
// python tools
"mypy.runUsingActiveInterpreter": true,
// force the use of rust-analyzer from dev shell
"rust-analyzer.server.path": "rust-analyzer",
"redhat.telemetry.enabled": true,
"gitlens.plusFeatures.enabled": false,
// new
"hediet.vscode-drawio.resizeImages": null
}

View File

@@ -0,0 +1,60 @@
{ pkgs, inputs, ... }:
{
home.packages = with pkgs; [
# cli
bat
btop
eza
fd
ffmpegthumbnailer
fzf
git
gnupg
imagemagick
jq
ncdu
neofetch
ouch
p7zip
poppler
rar
ripgrep
starship
tmux
unzip
yazi
zoxide
# system info
hwloc
lynis
pciutils
smartmontools
usbutils
# networking
iperf3
nmap
wget
# python
poetry
python313
ruff
uv
# nodejs
nodejs
# Rust packages
trunk
wasm-pack
cargo-watch
cargo-generate
cargo-audit
cargo-update
# nix
nix-init
nix-output-monitor
nix-prefetch
nix-tree
nixfmt-rfc-style
treefmt
inputs.system_tools.packages.x86_64-linux.default
];
}

View File

@@ -0,0 +1,34 @@
{
programs.ssh = {
enable = true;
matchBlocks = {
jeeves = {
hostname = "192.168.90.40";
user = "richie";
identityFile = "~/.ssh/id_ed25519";
port = 629;
dynamicForwards = [ { port = 9050; } ];
};
unlock-jeeves = {
hostname = "192.168.99.14";
user = "root";
identityFile = "~/.ssh/id_ed25519";
port = 2222;
};
bob = {
hostname = "192.168.90.25";
user = "richie";
identityFile = "~/.ssh/id_ed25519";
port = 262;
dynamicForwards = [ { port = 9050; } ];
};
rhapsody-in-green = {
hostname = "192.168.90.221";
user = "richie";
identityFile = "~/.ssh/id_ed25519";
port = 922;
};
};
};
}

View File

@@ -0,0 +1,6 @@
{
imports = [
../home/global.nix
../home/gui
];
}

View File

@@ -0,0 +1,6 @@
{
imports = [
../home/global.nix
../home/gui
];
}

View File

@@ -3,6 +3,7 @@ gaming_password: ENC[AES256_GCM,data:i692UsQaCOjE4V1y9d8yYDlK+TRMIprCHJkhl1UBZRM
megan_password: ENC[AES256_GCM,data:Udrs9OWFI2TDM1yxRwfy7uiONh1G3Mr9HabwpmRykp1Xw9KK+q245nxN7QQbR0AiTCyyyivhn6GB2+DvBBY/6UrN5iGs+LaXgg==,iv:n02HzE8jvWM5xDfaPB9BHxtfoAZQ/Tk80XuySY2NyoU=,tag:L9wPVy7zt6mp09qWhzdLpg==,type:str] megan_password: ENC[AES256_GCM,data:Udrs9OWFI2TDM1yxRwfy7uiONh1G3Mr9HabwpmRykp1Xw9KK+q245nxN7QQbR0AiTCyyyivhn6GB2+DvBBY/6UrN5iGs+LaXgg==,iv:n02HzE8jvWM5xDfaPB9BHxtfoAZQ/Tk80XuySY2NyoU=,tag:L9wPVy7zt6mp09qWhzdLpg==,type:str]
gcw_password: ENC[AES256_GCM,data:T5CliWyyw4igunGRokOW7dNTOQ7DbOhM4gLa8YN4gbVLEVU7n3jxAVF9Uy9zM7LBBqdLvyXnqGzC1HBSBmE+pKBV7YIN3aQkng==,iv:SLq4aeLHdwfq0+A4N6UO4Dz7oBoC0ZDKBr74hheHQFw=,tag:4a71PZcyzoWjOmYEPx07ag==,type:str] gcw_password: ENC[AES256_GCM,data:T5CliWyyw4igunGRokOW7dNTOQ7DbOhM4gLa8YN4gbVLEVU7n3jxAVF9Uy9zM7LBBqdLvyXnqGzC1HBSBmE+pKBV7YIN3aQkng==,iv:SLq4aeLHdwfq0+A4N6UO4Dz7oBoC0ZDKBr74hheHQFw=,tag:4a71PZcyzoWjOmYEPx07ag==,type:str]
math_password: ENC[AES256_GCM,data:ykiSr3iBHrShJarEQSJ/zuXbCPcbW2oUpaAjblu1V15ufFKVSMZM94LlpMiCYtN9cYBLs98hcMeajJbvgbwT5emPHthy9+TJDw==,iv:1TJEUo0ishqFAZiUE1473yR3RT6Gbtqt4zM+C1a1KEk=,tag:pR6jyIj+bu3XaSx5yIHSmA==,type:str] math_password: ENC[AES256_GCM,data:ykiSr3iBHrShJarEQSJ/zuXbCPcbW2oUpaAjblu1V15ufFKVSMZM94LlpMiCYtN9cYBLs98hcMeajJbvgbwT5emPHthy9+TJDw==,iv:1TJEUo0ishqFAZiUE1473yR3RT6Gbtqt4zM+C1a1KEk=,tag:pR6jyIj+bu3XaSx5yIHSmA==,type:str]
elise_password: ENC[AES256_GCM,data:bhTYGphCy528LuTmwNzA8fxmVa9opA2UomtPwV6prfxtE5k154G/AcK+AomoXAk/Mur/CjlyTeT0ohRoe17/T1iGFZSpYzPMbQ==,iv:1H1MlUPsKOtKrtDpqOL50/1agGrMMbb/5l08vl4WDdE=,tag:kA03EciqKE+iy+N9C2ii+w==,type:str]
sops: sops:
age: age:
- recipient: age1u8zj599elqqvcmhxn8zuwrufsz8w8w366d3ayrljjejljt2q45kq8mxw9c - recipient: age1u8zj599elqqvcmhxn8zuwrufsz8w8w366d3ayrljjejljt2q45kq8mxw9c
@@ -50,7 +51,7 @@ sops:
UzQzWEFtSDJwR201cmZoeXh5T0RmSk0KWLOpw5cWbtnfVP/ISa7n1vZchoD+nxmn UzQzWEFtSDJwR201cmZoeXh5T0RmSk0KWLOpw5cWbtnfVP/ISa7n1vZchoD+nxmn
7yr7igpEIro0Sd238KinOQYswVaT0NHB9p1dSW/mN+aGQliSNLzkDQ== 7yr7igpEIro0Sd238KinOQYswVaT0NHB9p1dSW/mN+aGQliSNLzkDQ==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2025-08-07T01:48:02Z" lastmodified: "2025-08-24T22:36:28Z"
mac: ENC[AES256_GCM,data:AyOAAIk07NArsiU9JaZPdLPXfWg43ajRe0iIvZQnu2AnznZ8DSgpPfznH4wT8HbxLMNDCJ7t3JGXVu7foxBwDF5GOuNq7o0X5NM4752CxyjdGP8zPDcw9TSiQ4MAn9FEjpRxFv34MDhmNdlBKelhIL2NLrGgdNhhKwayzWOReVM=,iv:5BrpLcpk8Mh3hmVeXksfHzkpNFGUTzPQIcb8A7GGAJY=,tag:3J/JJfYntUhkwIdwVpzUug==,type:str] mac: ENC[AES256_GCM,data:gtY2M4+BGBRJFzuRURjJypTTbjhn+pVJoKy2REa4a/hSpn7Rnp2Nk3t0/DNYKIquGS7gFxYpXQnUyhBHlAfXqnQWu5InE2b6iLG6INdzeyPI4dGfJaop8ZxXTCKNy3kLgW9kkjBbS1uQlHvy9y/2J+QjjjHPw7M4Fh+E9XKwDGk=,iv:OoCyzLvP6iVwrU2xmK/7ov4h0QqrWk+XbGDiUJ68kJo=,tag:iYVF12f7iHm/dkWFTIsO8Q==,type:str]
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.10.2 version: 3.10.2