summary refs log tree commit diff
path: root/modules/users
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-01-13 14:20:21 +0100
committerRory& <root@rory.gay>2025-01-13 14:20:31 +0100
commitf1f4a97a0740018a4c6aa222fc659161ac3f4729 (patch)
treed317f78e59c032d6b86c22235044045defd3331f /modules/users
parentUpdate synapse, change some monitoring stuff, remove no-aaaa resolvconf optio... (diff)
downloadRory-Open-Architecture-f1f4a97a0740018a4c6aa222fc659161ac3f4729.tar.xz
Add arci
Diffstat (limited to 'modules/users')
-rw-r--r--modules/users/Arci.nix200
1 files changed, 200 insertions, 0 deletions
diff --git a/modules/users/Arci.nix b/modules/users/Arci.nix
new file mode 100644
index 0000000..f5e747d
--- /dev/null
+++ b/modules/users/Arci.nix
@@ -0,0 +1,200 @@
+{ lib, pkgs, ... }:
+
+{
+  users.users.Arci = {
+    isNormalUser = true;
+    extraGroups = [
+      "wheel"
+      "libvirtd"
+      "ocp"
+    ];
+    packages = with pkgs; [
+      lnav
+      age
+      git
+      lsd
+      duf
+      (btop.override { rocmSupport = true; })
+      htop
+      kitty.terminfo
+      tmux
+      jq
+      dig
+
+      # - zsh
+      zsh
+      zsh-powerlevel10k
+      zsh-nix-shell
+      zsh-you-should-use
+      zsh-syntax-highlighting
+      zsh-completions
+
+      wireguard-tools
+    ];
+    openssh.authorizedKeys.keys = [
+    ];
+    useDefaultShell = true;
+    shell = pkgs.zsh;
+  };
+  programs.zsh.enable = true;
+  environment.shells = with pkgs; [ zsh ];
+
+  home-manager.users.Arci = {
+    home.preferXdgDirectories = true;
+    home.sessionVariables = {
+      EDITOR = "nvim";
+      SYSTEMD_EDITOR = "nvim";
+      GIT_EDITOR = "nvim";
+      QT_QPA_PLATFORMTHEME = "xdgdesktopportal";
+      GTK_USE_PORTAL = "1";
+      _JAVA_AWT_WM_NONREPARENTING = "1";
+      WINEDEBUG = "-all";
+      CHOKIDAR_USEPOLLING = "true";
+      MSBUILDLIVELOGGER = "auto";
+      DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER = "1";
+      DOTNET_CLI_TELEMETRY_OPTOUT = "1";
+      NIXPKGS_ALLOW_UNFREE = "1";
+      MOZ_USE_XINPUT2 = "1";
+    };
+    programs = {
+      git = {
+        enable = true;
+        userName = "Rory&";
+        userEmail = "root@rory.gay";
+        extraConfig = {
+          safe = {
+            directory = "/";
+          };
+        };
+      };
+      zsh = {
+        enable = true;
+        #enableAutosuggestions = true;
+        autosuggestion.enable = true;
+        enableVteIntegration = true;
+        autocd = true;
+
+        initExtraFirst = ''
+          export EDITOR=nvim
+          export SYSTEMD_EDITOR=$EDITOR
+          export GIT_EDITOR=$EDITOR
+          export QT_QPA_PLATFORMTHEME=xdgdesktopportal
+          export GTK_USE_PORTAL=1
+          export _JAVA_AWT_WM_NONREPARENTING=1
+          export WINEDEBUG=-all
+          export DOTPROFILE_LOADED='yes'
+          export CHOKIDAR_USEPOLLING=true
+          export MSBUILDLIVELOGGER=auto
+          export DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER=1
+          export DOTNET_CLI_TELEMETRY_OPTOUT=1
+          function mkkey() {
+            echo "Making key for $1"
+            ssh-keygen -t ed25519 -C "$HOST -> $1" -f ~/.ssh/id_ed25519_$1
+            (
+              echo "Host $1"
+              echo "  IdentityFile ~/.ssh/id_ed25519_$1"
+            ) >> ~/.ssh/config
+            echo 'Done! Public key:'
+            cat ~/.ssh/id_ed25519_$1.pub
+          }
+
+          export DISABLE_AUTO_UPDATE=true
+          COMPLETION_WAITING_DOTS="true"
+        '';
+        initExtra = ''
+          alias mv='mv -v'
+          alias pre='npx prettier -w'
+          alias git-commit='git commit --signoff --sign'
+          alias npm='NODE_OPTIONS=--openssl-legacy-provider npm'
+          alias npx='NODE_OPTIONS=--openssl-legacy-provider npx'
+          alias yarn='NODE_OPTIONS=--openssl-legacy-provider npx -y yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config'
+          alias node='NODE_OPTIONS=--openssl-legacy-provider node'
+          # - dotnet
+          alias drun='dotnet watch run --no-hot-reload --property WarningLevel=0'
+          alias dbuild='dotnet watch build --no-hot-reload --property WarningLevel=0'
+          alias ls='lsd -lAhF --color=always --icon=always'
+          alias transfetch='neofetch --kitty ~/trans_witch.jpg'
+          alias gc='git-commit'
+          [ -f "$HOME/.profile" ] && . $HOME/.profile
+        '';
+        #alias knconfig='cp .config ../$(date ''+%Y%m%d_%k%M%S\'').config -v; make CC=clang LLVM=1 nconfig'
+        oh-my-zsh = {
+          enable = true;
+          plugins = [
+            "git"
+            "sudo"
+          ];
+        };
+
+        plugins = [
+          {
+            name = "powerlevel10k";
+            src = pkgs.zsh-powerlevel10k;
+            file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
+          }
+          {
+            name = "powerlevel10k-config";
+            src = lib.cleanSource ./Rory;
+            file = "p10k.zsh";
+          }
+          {
+            name = "zsh-syntax-highlighting";
+            src = pkgs.zsh-syntax-highlighting;
+            file = "share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh";
+          }
+          {
+            name = "zsh-autosuggestions";
+            src = pkgs.zsh-autosuggestions;
+            file = "share/zsh-autosuggestions/zsh-autosuggestions.zsh";
+          }
+        ];
+
+        localVariables = {
+          POWERLEVEL9K_LEFT_PROMPT_ELEMENTS = [
+            "os_icon"
+            "dir"
+            "vcs"
+            "prompt_char"
+          ];
+          POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS = [
+            "status"
+            "command_execution_time"
+            "background_jobs"
+            "direnv"
+            "virtualenv"
+            "pyenv"
+            "nodeenv"
+            "context"
+            "nix_shell"
+            "vi_mode"
+            "load"
+            "disk_usage"
+            "ram"
+          ];
+          POWERLEVEL9K_MODE = "nerdfont-complete";
+          POWERLEVEL9K_ICON_PADDING = "none";
+          POWERLEVEL9K_PROMPT_ADD_NEWLINE = "false";
+          POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR = "\uE0B1";
+          POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR = "\uE0B3";
+          POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR = "\uE0B0";
+          POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR = "\uE0B2";
+          POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL = "\uE0B0";
+          POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL = "\uE0B2";
+          POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE = true;
+        };
+      };
+      neovim = {
+        defaultEditor = true;
+        viAlias = true;
+        vimAlias = true;
+        vimdiffAlias = true;
+        coc = {
+          enable = true;
+
+        };
+      };
+    };
+
+    home.stateVersion = "22.11";
+  };
+}