diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-10-12 11:23:58 -0400 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-10-12 11:24:13 -0400 |
commit | 57de4ede0cef89c04a3728e4f8c97f67ce771eff (patch) | |
tree | d183069bc9b8f93f429763ec35e1beb5abd8bc4c | |
parent | 607c7626001ba1ba4f0b8b4b4b774b508143cab5 (diff) |
generalize server
-rw-r--r-- | config/git/default.nix | 15 | ||||
-rw-r--r-- | flake.nix | 4 | ||||
-rw-r--r-- | machines/oxo/configuration.nix (renamed from machines/git/configuration.nix) | 9 | ||||
-rw-r--r-- | machines/oxo/git-home.nix (renamed from machines/git/home.nix) | 5 | ||||
-rw-r--r-- | machines/oxo/hardware-configuration.nix (renamed from machines/git/hardware-configuration.nix) | 0 | ||||
-rw-r--r-- | machines/oxo/home.nix | 37 | ||||
-rw-r--r-- | modules/compromyse.nix | 1 | ||||
-rw-r--r-- | modules/git/cgit.nix | 4 | ||||
-rw-r--r-- | modules/git/git.nix | 9 | ||||
-rw-r--r-- | modules/git/user.nix (renamed from modules/git/compromyse.nix) | 5 |
10 files changed, 64 insertions, 25 deletions
diff --git a/config/git/default.nix b/config/git/default.nix index 838af82..f3f223d 100644 --- a/config/git/default.nix +++ b/config/git/default.nix @@ -6,28 +6,35 @@ userName = "Raghuram Subramani"; userEmail = "raghus2247@gmail.com"; extraConfig = { + init = { defaultBranch = "main"; }; + format = { signoff = true; }; + url = { "git@github.com:" = { insteadOf = [ - "gh:" "github:" ]; }; "git@github.com:compromyse/" = { insteadOf = [ - "cm:" "compromyse:" ]; }; + "git@git.compromyse.xyz:" = { + insteadOf = [ + "oxo:" + ]; + }; + }; "filter \"lfs\"" = { @@ -36,7 +43,11 @@ process = "${pkgs.git-lfs}/bin/git-lfs filter-process --skip"; required = true; }; + push = { autoSetupRemote = true; }; + + safe.directory = "*"; + }; }; } @@ -49,11 +49,11 @@ ]; }; - git = nixpkgs.lib.nixosSystem { + oxo = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ./machines/git/configuration.nix + ./machines/oxo/configuration.nix inputs.home-manager.nixosModules.default ]; diff --git a/machines/git/configuration.nix b/machines/oxo/configuration.nix index a244c64..ef7a84b 100644 --- a/machines/git/configuration.nix +++ b/machines/oxo/configuration.nix @@ -7,12 +7,12 @@ ] ++ (map (path: ../../modules/${path}) [ "core/global.nix" "ssh.nix" - "git/compromyse.nix" + "compromyse.nix" + "git/user.nix" "git/cgit.nix" - "git/git.nix" ]); - networking.hostName = "git"; + networking.hostName = "oxo"; boot.loader.grub = { enable = true; @@ -26,7 +26,8 @@ useGlobalPkgs = true; useUserPackages = true; users = { - "compromyse" = import ./home.nix; + git = import ./git-home.nix; + compromyse = import ./home.nix }; }; } diff --git a/machines/git/home.nix b/machines/oxo/git-home.nix index 723879e..ce20f9e 100644 --- a/machines/git/home.nix +++ b/machines/oxo/git-home.nix @@ -2,8 +2,8 @@ { home = { - username = "compromyse"; - homeDirectory = "/home/compromyse"; + username = "git"; + homeDirectory = "/home/git"; }; home.packages = with pkgs; [ @@ -11,7 +11,6 @@ ]; imports = (map (path: ../../config/${path}) [ - "bash.nix" "git" "nvim" ]); diff --git a/machines/git/hardware-configuration.nix b/machines/oxo/hardware-configuration.nix index b10d174..b10d174 100644 --- a/machines/git/hardware-configuration.nix +++ b/machines/oxo/hardware-configuration.nix diff --git a/machines/oxo/home.nix b/machines/oxo/home.nix new file mode 100644 index 0000000..8672e15 --- /dev/null +++ b/machines/oxo/home.nix @@ -0,0 +1,37 @@ +{ inputs, pkgs, ... }: + +{ + home = { + username = "compromyse"; + homeDirectory = "/home/compromyse"; + }; + + home.packages = with pkgs; [ + tmux + fzf + fd + ripgrep + + unzip + zip + ]; + + programs = { + direnv = { + enable = true; + enableBashIntegration = true; + nix-direnv.enable = true; + }; + + bash.enable = true; + }; + + imports = (map (path: ../../config/${path}) [ + "bash.nix" + "dotfiles.nix" + "git" + "nvim" + ]); + + home.stateVersion = "23.11"; +} diff --git a/modules/compromyse.nix b/modules/compromyse.nix index e8484c8..0c4b2a0 100644 --- a/modules/compromyse.nix +++ b/modules/compromyse.nix @@ -4,6 +4,7 @@ users.users.compromyse = { hashedPassword = "$y$j9T$sLByWUVQIl0D6AzHKpVat/$VAsX7YK1NCy2H4XxhVTKdkhWXHuzdMMHq6tC4liH879"; isNormalUser = true; + openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDljZ44cNtYqvpeGuUsMRekkjiyaCLraX7GHp2BJGyhvUnCpVz7I5K6SGQ92vnEdkbQpUEs29Cw5RTYTKDXcn1zyl7fi/jLWVLgV3Apc7dbJvhQOTfxB24D5EuOR+3nZFtR1C89VNiB55ahqoBAxGMxr9GkOaKplruT1u+UOAW7wRwCGWoC7ySuVRnEoquWsv3ZHZhxTgmM6b8wnOk9K/to0JY51fbZ56OXcUKRUNkq4QzVMWEhWEpOuSFeufOewCjUIcMQkWzjG3XiqF7gBGnNqbvPlWOB3iLbAdOGBfkAxFlzTBGzwNEGWV39AMWHA1dRBKeETo5sHACsorpIQ3IHR3uHz3YccqhzOBqERqU419ioLdHSQt7uXS54AvZ7ZAMm/RZBeFdupT2dhfOdmvY/2ZHHEuP55A3GExlthaFR+SPKc1q/MhtX/+hBhtkPH+RMP/WPgPbXBCLVdL/ul/vGk8CGCFeKAVrexmz5q+5xax/gDIKfS3ynoMCrWxoto2U= raghus2247@gmail.com" ]; # openssh.authorizedKeys.keys = []; extraGroups = [ "wheel" "video" "storage" "input" "plugdev" "libvirtd" "docker" "kvm" "lp" ]; }; diff --git a/modules/git/cgit.nix b/modules/git/cgit.nix index cd29b82..56a9b76 100644 --- a/modules/git/cgit.nix +++ b/modules/git/cgit.nix @@ -18,10 +18,12 @@ in { settings = { root-title = "compromyse: CGIT"; root-desc = "Compromyse's Git Repositories"; - root-readme = "README.md"; + + repository-sort = "age"; enable-commit-graph = true; enable-follow-links = true; + section-from-path = true; source-filter = "${cgit}/lib/cgit/filters/syntax-highlighting.py"; about-filter = "${cgit}/lib/cgit/filters/about-formatting.sh"; diff --git a/modules/git/git.nix b/modules/git/git.nix deleted file mode 100644 index 9888dba..0000000 --- a/modules/git/git.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ lib, ... }: - -{ - environment.etc."gitconfig".text = " - [safe] - directory = * - "; -} - diff --git a/modules/git/compromyse.nix b/modules/git/user.nix index 41596d1..797b452 100644 --- a/modules/git/compromyse.nix +++ b/modules/git/user.nix @@ -1,11 +1,8 @@ { config, ... }: { - users.users.compromyse = { - initialPassword = "testing"; + users.users.git = { isNormalUser = true; openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDljZ44cNtYqvpeGuUsMRekkjiyaCLraX7GHp2BJGyhvUnCpVz7I5K6SGQ92vnEdkbQpUEs29Cw5RTYTKDXcn1zyl7fi/jLWVLgV3Apc7dbJvhQOTfxB24D5EuOR+3nZFtR1C89VNiB55ahqoBAxGMxr9GkOaKplruT1u+UOAW7wRwCGWoC7ySuVRnEoquWsv3ZHZhxTgmM6b8wnOk9K/to0JY51fbZ56OXcUKRUNkq4QzVMWEhWEpOuSFeufOewCjUIcMQkWzjG3XiqF7gBGnNqbvPlWOB3iLbAdOGBfkAxFlzTBGzwNEGWV39AMWHA1dRBKeETo5sHACsorpIQ3IHR3uHz3YccqhzOBqERqU419ioLdHSQt7uXS54AvZ7ZAMm/RZBeFdupT2dhfOdmvY/2ZHHEuP55A3GExlthaFR+SPKc1q/MhtX/+hBhtkPH+RMP/WPgPbXBCLVdL/ul/vGk8CGCFeKAVrexmz5q+5xax/gDIKfS3ynoMCrWxoto2U= raghus2247@gmail.com" ]; - extraGroups = [ "wheel" ]; }; - security.sudo.wheelNeedsPassword = false; } |