mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 04:58:19 -04:00
added leviathan and elise
This commit is contained in:
52
users/elise/default.nix
Normal file
52
users/elise/default.nix
Normal 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;
|
||||
}
|
||||
9
users/elise/home/cli/default.nix
Normal file
9
users/elise/home/cli/default.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
imports = [
|
||||
./direnv.nix
|
||||
./git.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
||||
programs.starship.enable = true;
|
||||
}
|
||||
8
users/elise/home/cli/direnv.nix
Normal file
8
users/elise/home/cli/direnv.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
12
users/elise/home/cli/git.nix
Normal file
12
users/elise/home/cli/git.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
31
users/elise/home/cli/zsh.nix
Normal file
31
users/elise/home/cli/zsh.nix
Normal 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='";
|
||||
};
|
||||
};
|
||||
}
|
||||
22
users/elise/home/global.nix
Normal file
22
users/elise/home/global.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
33
users/elise/home/gui/default.nix
Normal file
33
users/elise/home/gui/default.nix
Normal 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
|
||||
];
|
||||
}
|
||||
13
users/elise/home/gui/kitty.nix
Normal file
13
users/elise/home/gui/kitty.nix
Normal 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";
|
||||
};
|
||||
}
|
||||
19
users/elise/home/gui/vscode/default.nix
Normal file
19
users/elise/home/gui/vscode/default.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
68
users/elise/home/gui/vscode/extension_manager.py
Normal file
68
users/elise/home/gui/vscode/extension_manager.py
Normal 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()
|
||||
20
users/elise/home/gui/vscode/keybindings.json
Normal file
20
users/elise/home/gui/vscode/keybindings.json
Normal 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"
|
||||
}
|
||||
]
|
||||
77
users/elise/home/gui/vscode/settings.json
Normal file
77
users/elise/home/gui/vscode/settings.json
Normal 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
|
||||
}
|
||||
60
users/elise/home/programs.nix
Normal file
60
users/elise/home/programs.nix
Normal 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
|
||||
];
|
||||
}
|
||||
34
users/elise/home/ssh_config.nix
Normal file
34
users/elise/home/ssh_config.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
users/elise/systems/leviathan.nix
Normal file
6
users/elise/systems/leviathan.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
../home/global.nix
|
||||
../home/gui
|
||||
];
|
||||
}
|
||||
6
users/richie/systems/leviathan.nix
Normal file
6
users/richie/systems/leviathan.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
../home/global.nix
|
||||
../home/gui
|
||||
];
|
||||
}
|
||||
@@ -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]
|
||||
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]
|
||||
elise_password: ENC[AES256_GCM,data:bhTYGphCy528LuTmwNzA8fxmVa9opA2UomtPwV6prfxtE5k154G/AcK+AomoXAk/Mur/CjlyTeT0ohRoe17/T1iGFZSpYzPMbQ==,iv:1H1MlUPsKOtKrtDpqOL50/1agGrMMbb/5l08vl4WDdE=,tag:kA03EciqKE+iy+N9C2ii+w==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1u8zj599elqqvcmhxn8zuwrufsz8w8w366d3ayrljjejljt2q45kq8mxw9c
|
||||
@@ -50,7 +51,7 @@ sops:
|
||||
UzQzWEFtSDJwR201cmZoeXh5T0RmSk0KWLOpw5cWbtnfVP/ISa7n1vZchoD+nxmn
|
||||
7yr7igpEIro0Sd238KinOQYswVaT0NHB9p1dSW/mN+aGQliSNLzkDQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-08-07T01:48:02Z"
|
||||
mac: ENC[AES256_GCM,data:AyOAAIk07NArsiU9JaZPdLPXfWg43ajRe0iIvZQnu2AnznZ8DSgpPfznH4wT8HbxLMNDCJ7t3JGXVu7foxBwDF5GOuNq7o0X5NM4752CxyjdGP8zPDcw9TSiQ4MAn9FEjpRxFv34MDhmNdlBKelhIL2NLrGgdNhhKwayzWOReVM=,iv:5BrpLcpk8Mh3hmVeXksfHzkpNFGUTzPQIcb8A7GGAJY=,tag:3J/JJfYntUhkwIdwVpzUug==,type:str]
|
||||
lastmodified: "2025-08-24T22:36:28Z"
|
||||
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
|
||||
version: 3.10.2
|
||||
|
||||
Reference in New Issue
Block a user