From 8336883d91eb48dc2311e8d6cf59eb4bf5a8433f Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Tue, 12 Aug 2025 16:12:28 +0200 Subject: [PATCH] Add pedro user config and hm --- users/pedro/configuration.nix | 11 ++++ users/pedro/home-configuration/default.nix | 3 ++ users/pedro/home-configuration/zsh.nix | 61 ++++++++++++++++++++++ users/pedro/home.nix | 11 ++++ 4 files changed, 86 insertions(+) create mode 100644 users/pedro/configuration.nix create mode 100644 users/pedro/home-configuration/default.nix create mode 100644 users/pedro/home-configuration/zsh.nix create mode 100644 users/pedro/home.nix diff --git a/users/pedro/configuration.nix b/users/pedro/configuration.nix new file mode 100644 index 0000000..0ff31c1 --- /dev/null +++ b/users/pedro/configuration.nix @@ -0,0 +1,11 @@ +# This are some NixOS options this user requires +{pkgs, ...}: { + users.users.pedro = { + shell = pkgs.zsh; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJji4h4bgzgmp7YoRX/8ePN0TcCYRfI2wlrEeZkBQ/y2 personal@peprolinbot.com" + ]; + }; + + programs.zsh.enable = true; +} diff --git a/users/pedro/home-configuration/default.nix b/users/pedro/home-configuration/default.nix new file mode 100644 index 0000000..fc8e5a3 --- /dev/null +++ b/users/pedro/home-configuration/default.nix @@ -0,0 +1,3 @@ +{...}: { + imports = [(import ./zsh.nix)]; # shell +} diff --git a/users/pedro/home-configuration/zsh.nix b/users/pedro/home-configuration/zsh.nix new file mode 100644 index 0000000..0dd772b --- /dev/null +++ b/users/pedro/home-configuration/zsh.nix @@ -0,0 +1,61 @@ +{pkgs, ...}: { + home.packages = with pkgs; [fzf git gtrash]; # Required packages + + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + oh-my-zsh = { + enable = true; + plugins = ["git" "fzf"]; + }; + + shellAliases = { + # Utils + c = "clear"; + cd = "z"; + tt = "gtrash put"; + icat = "kitten icat"; + open = "xdg-open"; + + # Git + ga = "git add"; + gaa = "git add --all"; + gs = "git status"; + gb = "git branch"; + gm = "git merge"; + gpl = "git pull"; + gplo = "git pull origin"; + gps = "git push"; + gpst = "git push --follow-tags"; + gpso = "git push origin"; + gc = "git commit"; + gcm = "git commit -m"; + gcma = "git add --all && git commit -m"; + gtag = "git tag -ma"; + gch = "git checkout"; + gchb = "git checkout -b"; + gcoe = "git config user.email"; + gcon = "git config user.name"; + + # python + piv = "python -m venv .venv"; + psv = "source .venv/bin/activate"; + + # ssh + s = "kitten ssh"; + kssh = "kitten ssh"; + }; + }; + + programs.zoxide = { + enable = true; + enableZshIntegration = true; + }; + + programs.starship.enable = true; + + programs.fzf.enable = true; +} diff --git a/users/pedro/home.nix b/users/pedro/home.nix new file mode 100644 index 0000000..181fe72 --- /dev/null +++ b/users/pedro/home.nix @@ -0,0 +1,11 @@ +{self, ...}: { + imports = [self.inputs.home-manager.nixosModules.default ./configuration.nix]; + + home-manager.users.pedro = { + imports = [ + ./home-configuration + ]; + + home.stateVersion = "25.05"; + }; +}