diff --git a/users/math/default.nix b/users/math/default.nix new file mode 100644 index 0000000..11dd46f --- /dev/null +++ b/users/math/default.nix @@ -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; +} diff --git a/users/math/home/cli/default.nix b/users/math/home/cli/default.nix new file mode 100644 index 0000000..863c25f --- /dev/null +++ b/users/math/home/cli/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./direnv.nix + ./git.nix + ./zsh.nix + ]; + + programs.starship.enable = true; +} diff --git a/users/math/home/cli/direnv.nix b/users/math/home/cli/direnv.nix new file mode 100644 index 0000000..75129d9 --- /dev/null +++ b/users/math/home/cli/direnv.nix @@ -0,0 +1,8 @@ +{ + + programs.direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + }; +} diff --git a/users/math/home/cli/git.nix b/users/math/home/cli/git.nix new file mode 100644 index 0000000..30fe69c --- /dev/null +++ b/users/math/home/cli/git.nix @@ -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; + }; +} diff --git a/users/math/home/cli/zsh.nix b/users/math/home/cli/zsh.nix new file mode 100644 index 0000000..69cf853 --- /dev/null +++ b/users/math/home/cli/zsh.nix @@ -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"; + + }; + }; +} diff --git a/users/math/home/global.nix b/users/math/home/global.nix new file mode 100644 index 0000000..793b371 --- /dev/null +++ b/users/math/home/global.nix @@ -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"; + }; + }; +} diff --git a/users/math/home/programs.nix b/users/math/home/programs.nix new file mode 100644 index 0000000..37178c9 --- /dev/null +++ b/users/math/home/programs.nix @@ -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 + ]; +} diff --git a/users/math/home/ssh_config.nix b/users/math/home/ssh_config.nix new file mode 100644 index 0000000..929cc51 --- /dev/null +++ b/users/math/home/ssh_config.nix @@ -0,0 +1,5 @@ +{ + programs.ssh = { + enable = true; + }; +} diff --git a/users/math/systems/jeeves.nix b/users/math/systems/jeeves.nix new file mode 100644 index 0000000..6bbef61 --- /dev/null +++ b/users/math/systems/jeeves.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../home/global.nix + ]; +} diff --git a/users/richie/home/gui/default.nix b/users/richie/home/gui/default.nix index 7c057c1..548dbc9 100644 --- a/users/richie/home/gui/default.nix +++ b/users/richie/home/gui/default.nix @@ -26,5 +26,9 @@ util-linux vlc zoom-us + # games + dwarf-fortress + tower-pixel-dungeon + endless-sky ]; } diff --git a/users/richie/home/gui/vscode/settings.json b/users/richie/home/gui/vscode/settings.json index e6bfdce..41d533a 100644 --- a/users/richie/home/gui/vscode/settings.json +++ b/users/richie/home/gui/vscode/settings.json @@ -53,6 +53,7 @@ "[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,