mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 13:08:19 -04:00
adding math user
This commit is contained in:
52
users/math/default.nix
Normal file
52
users/math/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.math_password = {
|
||||||
|
sopsFile = ../secrets.yaml;
|
||||||
|
neededForUsers = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users = {
|
||||||
|
users.math = {
|
||||||
|
isNormalUser = true;
|
||||||
|
|
||||||
|
hashedPasswordFile = "${config.sops.secrets.math_password.path}";
|
||||||
|
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
group = "math";
|
||||||
|
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 = 1003;
|
||||||
|
};
|
||||||
|
|
||||||
|
groups.math.gid = 1003;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.math = import ./systems/${config.networking.hostName}.nix;
|
||||||
|
}
|
||||||
9
users/math/home/cli/default.nix
Normal file
9
users/math/home/cli/default.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./direnv.nix
|
||||||
|
./git.nix
|
||||||
|
./zsh.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.starship.enable = true;
|
||||||
|
}
|
||||||
8
users/math/home/cli/direnv.nix
Normal file
8
users/math/home/cli/direnv.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
12
users/math/home/cli/git.nix
Normal file
12
users/math/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;
|
||||||
|
};
|
||||||
|
}
|
||||||
28
users/math/home/cli/zsh.nix
Normal file
28
users/math/home/cli/zsh.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
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";
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
22
users/math/home/global.nix
Normal file
22
users/math/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 = "math";
|
||||||
|
homeDirectory = "/home/${config.home.username}";
|
||||||
|
stateVersion = "24.05";
|
||||||
|
sessionVariables = {
|
||||||
|
FLAKE = "$HOME/dotfiles";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
59
users/math/home/programs.nix
Normal file
59
users/math/home/programs.nix
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
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
|
||||||
|
];
|
||||||
|
}
|
||||||
5
users/math/home/ssh_config.nix
Normal file
5
users/math/home/ssh_config.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
5
users/math/systems/jeeves.nix
Normal file
5
users/math/systems/jeeves.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../home/global.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -26,5 +26,9 @@
|
|||||||
util-linux
|
util-linux
|
||||||
vlc
|
vlc
|
||||||
zoom-us
|
zoom-us
|
||||||
|
# games
|
||||||
|
dwarf-fortress
|
||||||
|
tower-pixel-dungeon
|
||||||
|
endless-sky
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
"[nix]": { "editor.defaultFormatter": "jnoortheen.nix-ide" },
|
"[nix]": { "editor.defaultFormatter": "jnoortheen.nix-ide" },
|
||||||
"[python]": { "editor.defaultFormatter": "charliermarsh.ruff" },
|
"[python]": { "editor.defaultFormatter": "charliermarsh.ruff" },
|
||||||
"[yaml]": { "editor.defaultFormatter": "redhat.vscode-yaml" },
|
"[yaml]": { "editor.defaultFormatter": "redhat.vscode-yaml" },
|
||||||
|
"[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
||||||
|
|
||||||
// spell check
|
// spell check
|
||||||
"cSpell.enabled": true,
|
"cSpell.enabled": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user