From 3fdcb088dd4855523d1d77773dc6b6c811cb9d2e Mon Sep 17 00:00:00 2001 From: Yuto Nishida Date: Sun, 3 Aug 2025 15:13:42 -0700 Subject: [PATCH] Init venus --- .../{venus => venus-legacy}/README.md | 0 .../aluminum-nitride/configuration.nix | 0 .../hardware-configuration.nix | 0 .../aluminum-nitride/hm.nix | 0 .../configs/git/venus.txt | 0 .../configs/halloy-config.toml | 0 .../configs/nixpkgs-config.nix | 0 .../configs/restic-profile.toml | 0 .../configs/starship-jetpack.toml | 0 .../configs/starship-pastel-powerline.toml | 0 .../configs/starship-pure.toml | 0 .../configs/starship.toml | 0 .../darwin-configuration.nix | 0 .../{venus => venus-legacy}/devenv.nix | 0 .../flake-profiles/common-outputs.nix | 0 .../hydrogen-sulfide/flake.lock | 0 .../flake-profiles/hydrogen-sulfide/flake.nix | 0 .../link-to-this-from-venus-root.envrc | 0 .../legacy-root-flake/flake.lock | 0 .../legacy-root-flake/flake.nix | 0 .../link-to-this-from-venus-root.envrc | 0 .../flake-profiles/sodium/flake.lock | 0 .../flake-profiles/sodium/flake.nix | 0 .../sodium/link-to-this-from-venus-root.envrc | 0 .../{venus => venus-legacy}/hm-base.nix | 0 .../hm-modules/magnesium-hydroxide.nix | 0 .../hm-modules/ooss-maker.nix | 0 .../hm-modules/sodium.nix | 0 .../hm-modules/tilderef2-starptr.nix | 0 .../hm-modules/use-alacritty.nix | 0 .../hm-modules/use-direnv.nix | 0 .../hm-modules/use-fish.nix | 0 .../hm-modules/use-halloy.nix | 0 .../hm-modules/use-jujutsu.nix | 0 .../hm-modules/use-mpv.nix | 0 .../hm-modules/use-nixpkgs-config.nix | 0 .../hm-modules/use-resticprofile.nix | 0 .../hm-modules/use-tealdeer.nix | 0 .../hm-modules/use-yt-dlp.nix | 0 .../hm-modules/venus-location.nix | 0 .../hydrogen-sulfide/configuration.nix | 0 .../hydrogen-sulfide/hm.nix | 0 .../darwin-configuration.nix | 0 flake-profiles/outputs.nix | 36 + flake-profiles/system-sodium/flake.lock | 734 ++++++++++++++++++ flake-profiles/system-sodium/flake.nix | 56 ++ venus/app-configs/git/venus.txt | 13 + venus/app-configs/halloy-config.toml | 7 + venus/app-configs/nixpkgs-config.nix | 6 + venus/app-configs/restic-profile.toml | 20 + venus/app-configs/starship-jetpack.toml | 284 +++++++ .../starship-pastel-powerline.toml | 144 ++++ venus/app-configs/starship-pure.toml | 46 ++ venus/app-configs/starship.toml | 61 ++ .../venus => venus}/hot-files/alacritty.toml | 0 .../venus => venus}/hot-files/ghostty-config | 0 .../hot-files/jellyfin-mpv-shim-conf.json | 0 .../venus => venus}/hot-files/mpv/input.conf | 0 .../venus => venus}/hot-files/mpv/mpv.conf | 0 .../venus => venus}/hot-files/ssh-config.txt | 0 .../venus => venus}/hot-files/test/hi.txt | 0 .../legacy-yadm/alacritty/alacritty.toml | 0 .../legacy-yadm/alacritty/alacritty.yml | 0 .../alacritty/alacritty.yml.day-n-nite | 0 .../legacy-yadm/git-config.txt | 0 .../legacy-yadm/ssh-config.txt | 0 venus/modules/home-manager/legacy-base.nix | 173 +++++ .../home-manager/magnesium-hydroxide.nix | 71 ++ venus/modules/home-manager/ooss-maker.nix | 48 ++ venus/modules/home-manager/sodium.nix | 136 ++++ .../home-manager/tilderef2-starptr.nix | 55 ++ venus/modules/home-manager/use-alacritty.nix | 22 + venus/modules/home-manager/use-direnv.nix | 13 + venus/modules/home-manager/use-fish.nix | 87 +++ venus/modules/home-manager/use-halloy.nix | 11 + venus/modules/home-manager/use-jujutsu.nix | 21 + venus/modules/home-manager/use-mpv.nix | 80 ++ .../home-manager/use-nixpkgs-config.nix | 11 + .../home-manager/use-resticprofile.nix | 84 ++ venus/modules/home-manager/use-tealdeer.nix | 14 + venus/modules/home-manager/use-yt-dlp.nix | 9 + venus/modules/home-manager/venus-location.nix | 38 + venus/modules/nixos-darwin/sodium.nix | 108 +++ 83 files changed, 2388 insertions(+) rename experimental/{venus => venus-legacy}/README.md (100%) rename experimental/{venus => venus-legacy}/aluminum-nitride/configuration.nix (100%) rename experimental/{venus => venus-legacy}/aluminum-nitride/hardware-configuration.nix (100%) rename experimental/{venus => venus-legacy}/aluminum-nitride/hm.nix (100%) rename experimental/{venus => venus-legacy}/configs/git/venus.txt (100%) rename experimental/{venus => venus-legacy}/configs/halloy-config.toml (100%) rename experimental/{venus => venus-legacy}/configs/nixpkgs-config.nix (100%) rename experimental/{venus => venus-legacy}/configs/restic-profile.toml (100%) rename experimental/{venus => venus-legacy}/configs/starship-jetpack.toml (100%) rename experimental/{venus => venus-legacy}/configs/starship-pastel-powerline.toml (100%) rename experimental/{venus => venus-legacy}/configs/starship-pure.toml (100%) rename experimental/{venus => venus-legacy}/configs/starship.toml (100%) rename experimental/{venus => venus-legacy}/darwin-configuration.nix (100%) rename experimental/{venus => venus-legacy}/devenv.nix (100%) rename experimental/{venus => venus-legacy}/flake-profiles/common-outputs.nix (100%) rename experimental/{venus => venus-legacy}/flake-profiles/hydrogen-sulfide/flake.lock (100%) rename experimental/{venus => venus-legacy}/flake-profiles/hydrogen-sulfide/flake.nix (100%) rename experimental/{venus => venus-legacy}/flake-profiles/hydrogen-sulfide/link-to-this-from-venus-root.envrc (100%) rename experimental/{venus => venus-legacy}/flake-profiles/legacy-root-flake/flake.lock (100%) rename experimental/{venus => venus-legacy}/flake-profiles/legacy-root-flake/flake.nix (100%) rename experimental/{venus => venus-legacy}/flake-profiles/legacy-root-flake/link-to-this-from-venus-root.envrc (100%) rename experimental/{venus => venus-legacy}/flake-profiles/sodium/flake.lock (100%) rename experimental/{venus => venus-legacy}/flake-profiles/sodium/flake.nix (100%) rename experimental/{venus => venus-legacy}/flake-profiles/sodium/link-to-this-from-venus-root.envrc (100%) rename experimental/{venus => venus-legacy}/hm-base.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/magnesium-hydroxide.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/ooss-maker.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/sodium.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/tilderef2-starptr.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/use-alacritty.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/use-direnv.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/use-fish.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/use-halloy.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/use-jujutsu.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/use-mpv.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/use-nixpkgs-config.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/use-resticprofile.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/use-tealdeer.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/use-yt-dlp.nix (100%) rename experimental/{venus => venus-legacy}/hm-modules/venus-location.nix (100%) rename experimental/{venus => venus-legacy}/hydrogen-sulfide/configuration.nix (100%) rename experimental/{venus => venus-legacy}/hydrogen-sulfide/hm.nix (100%) rename experimental/{venus => venus-legacy}/magnesium-hydroxide/darwin-configuration.nix (100%) create mode 100644 flake-profiles/system-sodium/flake.lock create mode 100644 flake-profiles/system-sodium/flake.nix create mode 100644 venus/app-configs/git/venus.txt create mode 100644 venus/app-configs/halloy-config.toml create mode 100644 venus/app-configs/nixpkgs-config.nix create mode 100644 venus/app-configs/restic-profile.toml create mode 100644 venus/app-configs/starship-jetpack.toml create mode 100644 venus/app-configs/starship-pastel-powerline.toml create mode 100644 venus/app-configs/starship-pure.toml create mode 100644 venus/app-configs/starship.toml rename {experimental/venus => venus}/hot-files/alacritty.toml (100%) rename {experimental/venus => venus}/hot-files/ghostty-config (100%) rename {experimental/venus => venus}/hot-files/jellyfin-mpv-shim-conf.json (100%) rename {experimental/venus => venus}/hot-files/mpv/input.conf (100%) rename {experimental/venus => venus}/hot-files/mpv/mpv.conf (100%) rename {experimental/venus => venus}/hot-files/ssh-config.txt (100%) rename {experimental/venus => venus}/hot-files/test/hi.txt (100%) rename {experimental/venus => venus}/legacy-yadm/alacritty/alacritty.toml (100%) rename {experimental/venus => venus}/legacy-yadm/alacritty/alacritty.yml (100%) rename {experimental/venus => venus}/legacy-yadm/alacritty/alacritty.yml.day-n-nite (100%) rename {experimental/venus => venus}/legacy-yadm/git-config.txt (100%) rename {experimental/venus => venus}/legacy-yadm/ssh-config.txt (100%) create mode 100644 venus/modules/home-manager/legacy-base.nix create mode 100644 venus/modules/home-manager/magnesium-hydroxide.nix create mode 100644 venus/modules/home-manager/ooss-maker.nix create mode 100644 venus/modules/home-manager/sodium.nix create mode 100644 venus/modules/home-manager/tilderef2-starptr.nix create mode 100644 venus/modules/home-manager/use-alacritty.nix create mode 100644 venus/modules/home-manager/use-direnv.nix create mode 100644 venus/modules/home-manager/use-fish.nix create mode 100644 venus/modules/home-manager/use-halloy.nix create mode 100644 venus/modules/home-manager/use-jujutsu.nix create mode 100644 venus/modules/home-manager/use-mpv.nix create mode 100644 venus/modules/home-manager/use-nixpkgs-config.nix create mode 100644 venus/modules/home-manager/use-resticprofile.nix create mode 100644 venus/modules/home-manager/use-tealdeer.nix create mode 100644 venus/modules/home-manager/use-yt-dlp.nix create mode 100644 venus/modules/home-manager/venus-location.nix create mode 100644 venus/modules/nixos-darwin/sodium.nix diff --git a/experimental/venus/README.md b/experimental/venus-legacy/README.md similarity index 100% rename from experimental/venus/README.md rename to experimental/venus-legacy/README.md diff --git a/experimental/venus/aluminum-nitride/configuration.nix b/experimental/venus-legacy/aluminum-nitride/configuration.nix similarity index 100% rename from experimental/venus/aluminum-nitride/configuration.nix rename to experimental/venus-legacy/aluminum-nitride/configuration.nix diff --git a/experimental/venus/aluminum-nitride/hardware-configuration.nix b/experimental/venus-legacy/aluminum-nitride/hardware-configuration.nix similarity index 100% rename from experimental/venus/aluminum-nitride/hardware-configuration.nix rename to experimental/venus-legacy/aluminum-nitride/hardware-configuration.nix diff --git a/experimental/venus/aluminum-nitride/hm.nix b/experimental/venus-legacy/aluminum-nitride/hm.nix similarity index 100% rename from experimental/venus/aluminum-nitride/hm.nix rename to experimental/venus-legacy/aluminum-nitride/hm.nix diff --git a/experimental/venus/configs/git/venus.txt b/experimental/venus-legacy/configs/git/venus.txt similarity index 100% rename from experimental/venus/configs/git/venus.txt rename to experimental/venus-legacy/configs/git/venus.txt diff --git a/experimental/venus/configs/halloy-config.toml b/experimental/venus-legacy/configs/halloy-config.toml similarity index 100% rename from experimental/venus/configs/halloy-config.toml rename to experimental/venus-legacy/configs/halloy-config.toml diff --git a/experimental/venus/configs/nixpkgs-config.nix b/experimental/venus-legacy/configs/nixpkgs-config.nix similarity index 100% rename from experimental/venus/configs/nixpkgs-config.nix rename to experimental/venus-legacy/configs/nixpkgs-config.nix diff --git a/experimental/venus/configs/restic-profile.toml b/experimental/venus-legacy/configs/restic-profile.toml similarity index 100% rename from experimental/venus/configs/restic-profile.toml rename to experimental/venus-legacy/configs/restic-profile.toml diff --git a/experimental/venus/configs/starship-jetpack.toml b/experimental/venus-legacy/configs/starship-jetpack.toml similarity index 100% rename from experimental/venus/configs/starship-jetpack.toml rename to experimental/venus-legacy/configs/starship-jetpack.toml diff --git a/experimental/venus/configs/starship-pastel-powerline.toml b/experimental/venus-legacy/configs/starship-pastel-powerline.toml similarity index 100% rename from experimental/venus/configs/starship-pastel-powerline.toml rename to experimental/venus-legacy/configs/starship-pastel-powerline.toml diff --git a/experimental/venus/configs/starship-pure.toml b/experimental/venus-legacy/configs/starship-pure.toml similarity index 100% rename from experimental/venus/configs/starship-pure.toml rename to experimental/venus-legacy/configs/starship-pure.toml diff --git a/experimental/venus/configs/starship.toml b/experimental/venus-legacy/configs/starship.toml similarity index 100% rename from experimental/venus/configs/starship.toml rename to experimental/venus-legacy/configs/starship.toml diff --git a/experimental/venus/darwin-configuration.nix b/experimental/venus-legacy/darwin-configuration.nix similarity index 100% rename from experimental/venus/darwin-configuration.nix rename to experimental/venus-legacy/darwin-configuration.nix diff --git a/experimental/venus/devenv.nix b/experimental/venus-legacy/devenv.nix similarity index 100% rename from experimental/venus/devenv.nix rename to experimental/venus-legacy/devenv.nix diff --git a/experimental/venus/flake-profiles/common-outputs.nix b/experimental/venus-legacy/flake-profiles/common-outputs.nix similarity index 100% rename from experimental/venus/flake-profiles/common-outputs.nix rename to experimental/venus-legacy/flake-profiles/common-outputs.nix diff --git a/experimental/venus/flake-profiles/hydrogen-sulfide/flake.lock b/experimental/venus-legacy/flake-profiles/hydrogen-sulfide/flake.lock similarity index 100% rename from experimental/venus/flake-profiles/hydrogen-sulfide/flake.lock rename to experimental/venus-legacy/flake-profiles/hydrogen-sulfide/flake.lock diff --git a/experimental/venus/flake-profiles/hydrogen-sulfide/flake.nix b/experimental/venus-legacy/flake-profiles/hydrogen-sulfide/flake.nix similarity index 100% rename from experimental/venus/flake-profiles/hydrogen-sulfide/flake.nix rename to experimental/venus-legacy/flake-profiles/hydrogen-sulfide/flake.nix diff --git a/experimental/venus/flake-profiles/hydrogen-sulfide/link-to-this-from-venus-root.envrc b/experimental/venus-legacy/flake-profiles/hydrogen-sulfide/link-to-this-from-venus-root.envrc similarity index 100% rename from experimental/venus/flake-profiles/hydrogen-sulfide/link-to-this-from-venus-root.envrc rename to experimental/venus-legacy/flake-profiles/hydrogen-sulfide/link-to-this-from-venus-root.envrc diff --git a/experimental/venus/flake-profiles/legacy-root-flake/flake.lock b/experimental/venus-legacy/flake-profiles/legacy-root-flake/flake.lock similarity index 100% rename from experimental/venus/flake-profiles/legacy-root-flake/flake.lock rename to experimental/venus-legacy/flake-profiles/legacy-root-flake/flake.lock diff --git a/experimental/venus/flake-profiles/legacy-root-flake/flake.nix b/experimental/venus-legacy/flake-profiles/legacy-root-flake/flake.nix similarity index 100% rename from experimental/venus/flake-profiles/legacy-root-flake/flake.nix rename to experimental/venus-legacy/flake-profiles/legacy-root-flake/flake.nix diff --git a/experimental/venus/flake-profiles/legacy-root-flake/link-to-this-from-venus-root.envrc b/experimental/venus-legacy/flake-profiles/legacy-root-flake/link-to-this-from-venus-root.envrc similarity index 100% rename from experimental/venus/flake-profiles/legacy-root-flake/link-to-this-from-venus-root.envrc rename to experimental/venus-legacy/flake-profiles/legacy-root-flake/link-to-this-from-venus-root.envrc diff --git a/experimental/venus/flake-profiles/sodium/flake.lock b/experimental/venus-legacy/flake-profiles/sodium/flake.lock similarity index 100% rename from experimental/venus/flake-profiles/sodium/flake.lock rename to experimental/venus-legacy/flake-profiles/sodium/flake.lock diff --git a/experimental/venus/flake-profiles/sodium/flake.nix b/experimental/venus-legacy/flake-profiles/sodium/flake.nix similarity index 100% rename from experimental/venus/flake-profiles/sodium/flake.nix rename to experimental/venus-legacy/flake-profiles/sodium/flake.nix diff --git a/experimental/venus/flake-profiles/sodium/link-to-this-from-venus-root.envrc b/experimental/venus-legacy/flake-profiles/sodium/link-to-this-from-venus-root.envrc similarity index 100% rename from experimental/venus/flake-profiles/sodium/link-to-this-from-venus-root.envrc rename to experimental/venus-legacy/flake-profiles/sodium/link-to-this-from-venus-root.envrc diff --git a/experimental/venus/hm-base.nix b/experimental/venus-legacy/hm-base.nix similarity index 100% rename from experimental/venus/hm-base.nix rename to experimental/venus-legacy/hm-base.nix diff --git a/experimental/venus/hm-modules/magnesium-hydroxide.nix b/experimental/venus-legacy/hm-modules/magnesium-hydroxide.nix similarity index 100% rename from experimental/venus/hm-modules/magnesium-hydroxide.nix rename to experimental/venus-legacy/hm-modules/magnesium-hydroxide.nix diff --git a/experimental/venus/hm-modules/ooss-maker.nix b/experimental/venus-legacy/hm-modules/ooss-maker.nix similarity index 100% rename from experimental/venus/hm-modules/ooss-maker.nix rename to experimental/venus-legacy/hm-modules/ooss-maker.nix diff --git a/experimental/venus/hm-modules/sodium.nix b/experimental/venus-legacy/hm-modules/sodium.nix similarity index 100% rename from experimental/venus/hm-modules/sodium.nix rename to experimental/venus-legacy/hm-modules/sodium.nix diff --git a/experimental/venus/hm-modules/tilderef2-starptr.nix b/experimental/venus-legacy/hm-modules/tilderef2-starptr.nix similarity index 100% rename from experimental/venus/hm-modules/tilderef2-starptr.nix rename to experimental/venus-legacy/hm-modules/tilderef2-starptr.nix diff --git a/experimental/venus/hm-modules/use-alacritty.nix b/experimental/venus-legacy/hm-modules/use-alacritty.nix similarity index 100% rename from experimental/venus/hm-modules/use-alacritty.nix rename to experimental/venus-legacy/hm-modules/use-alacritty.nix diff --git a/experimental/venus/hm-modules/use-direnv.nix b/experimental/venus-legacy/hm-modules/use-direnv.nix similarity index 100% rename from experimental/venus/hm-modules/use-direnv.nix rename to experimental/venus-legacy/hm-modules/use-direnv.nix diff --git a/experimental/venus/hm-modules/use-fish.nix b/experimental/venus-legacy/hm-modules/use-fish.nix similarity index 100% rename from experimental/venus/hm-modules/use-fish.nix rename to experimental/venus-legacy/hm-modules/use-fish.nix diff --git a/experimental/venus/hm-modules/use-halloy.nix b/experimental/venus-legacy/hm-modules/use-halloy.nix similarity index 100% rename from experimental/venus/hm-modules/use-halloy.nix rename to experimental/venus-legacy/hm-modules/use-halloy.nix diff --git a/experimental/venus/hm-modules/use-jujutsu.nix b/experimental/venus-legacy/hm-modules/use-jujutsu.nix similarity index 100% rename from experimental/venus/hm-modules/use-jujutsu.nix rename to experimental/venus-legacy/hm-modules/use-jujutsu.nix diff --git a/experimental/venus/hm-modules/use-mpv.nix b/experimental/venus-legacy/hm-modules/use-mpv.nix similarity index 100% rename from experimental/venus/hm-modules/use-mpv.nix rename to experimental/venus-legacy/hm-modules/use-mpv.nix diff --git a/experimental/venus/hm-modules/use-nixpkgs-config.nix b/experimental/venus-legacy/hm-modules/use-nixpkgs-config.nix similarity index 100% rename from experimental/venus/hm-modules/use-nixpkgs-config.nix rename to experimental/venus-legacy/hm-modules/use-nixpkgs-config.nix diff --git a/experimental/venus/hm-modules/use-resticprofile.nix b/experimental/venus-legacy/hm-modules/use-resticprofile.nix similarity index 100% rename from experimental/venus/hm-modules/use-resticprofile.nix rename to experimental/venus-legacy/hm-modules/use-resticprofile.nix diff --git a/experimental/venus/hm-modules/use-tealdeer.nix b/experimental/venus-legacy/hm-modules/use-tealdeer.nix similarity index 100% rename from experimental/venus/hm-modules/use-tealdeer.nix rename to experimental/venus-legacy/hm-modules/use-tealdeer.nix diff --git a/experimental/venus/hm-modules/use-yt-dlp.nix b/experimental/venus-legacy/hm-modules/use-yt-dlp.nix similarity index 100% rename from experimental/venus/hm-modules/use-yt-dlp.nix rename to experimental/venus-legacy/hm-modules/use-yt-dlp.nix diff --git a/experimental/venus/hm-modules/venus-location.nix b/experimental/venus-legacy/hm-modules/venus-location.nix similarity index 100% rename from experimental/venus/hm-modules/venus-location.nix rename to experimental/venus-legacy/hm-modules/venus-location.nix diff --git a/experimental/venus/hydrogen-sulfide/configuration.nix b/experimental/venus-legacy/hydrogen-sulfide/configuration.nix similarity index 100% rename from experimental/venus/hydrogen-sulfide/configuration.nix rename to experimental/venus-legacy/hydrogen-sulfide/configuration.nix diff --git a/experimental/venus/hydrogen-sulfide/hm.nix b/experimental/venus-legacy/hydrogen-sulfide/hm.nix similarity index 100% rename from experimental/venus/hydrogen-sulfide/hm.nix rename to experimental/venus-legacy/hydrogen-sulfide/hm.nix diff --git a/experimental/venus/magnesium-hydroxide/darwin-configuration.nix b/experimental/venus-legacy/magnesium-hydroxide/darwin-configuration.nix similarity index 100% rename from experimental/venus/magnesium-hydroxide/darwin-configuration.nix rename to experimental/venus-legacy/magnesium-hydroxide/darwin-configuration.nix diff --git a/flake-profiles/outputs.nix b/flake-profiles/outputs.nix index d9d1b18..7fa82e7 100644 --- a/flake-profiles/outputs.nix +++ b/flake-profiles/outputs.nix @@ -35,4 +35,40 @@ in ]; }; }); + + darwinConfigurations."Yutos-Sodium" = inputs.nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + modules = [ + ../venus/modules/nixos-darwin/sodium.nix + inputs.home-manager.darwinModules.home-manager + { + nixpkgs = { + overlays = [ + (self: super: { + jellyfin-mpv-shim = inputs.jellyfin-mpv-shim-darwin.packages."aarch64-darwin".default; + }) + #chaseln.overlays.chaseln + inputs.soup.overlays.chaseln + (final: super: { + check-gits = inputs.soup.legacyPackages."aarch64-darwin".check-gits; + }) + ]; + config = import ../venus/app-configs/nixpkgs-config.nix; # Configures pkgs for evaluating this darwinConfiguration ("buildtime" config) + }; + } + { + home-manager.useGlobalPkgs = true; + #home-manager.useUserPackages = true; # This breaks fish?? + home-manager.users.yuto = { + imports = [ + inputs.sops-nix.homeManagerModules.sops + (import ../venus/modules/home-manager/sodium.nix) + ]; + }; + home-manager.extraSpecialArgs = { + inherit (inputs) nixpkgs; + }; + } + ]; + }; } \ No newline at end of file diff --git a/flake-profiles/system-sodium/flake.lock b/flake-profiles/system-sodium/flake.lock new file mode 100644 index 0000000..439fe48 --- /dev/null +++ b/flake-profiles/system-sodium/flake.lock @@ -0,0 +1,734 @@ +{ + "nodes": { + "cachix": { + "inputs": { + "devenv": [ + "devenv" + ], + "flake-compat": [ + "devenv" + ], + "git-hooks": [ + "devenv", + "git-hooks" + ], + "nixpkgs": [ + "devenv", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748883665, + "narHash": "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A=", + "owner": "cachix", + "repo": "cachix", + "rev": "f707778d902af4d62d8dd92c269f8e70de09acbe", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "latest", + "repo": "cachix", + "type": "github" + } + }, + "cardboard": { + "locked": { + "lastModified": 1733553805, + "narHash": "sha256-KVqwZvx5kKrUAqaxtk/TgKbS7Su31w9l2pBgwYpx6Nc=", + "owner": "starptr", + "repo": "cardboard", + "rev": "5ba1798960438a76d9c83e16a78c34e5f931c562", + "type": "github" + }, + "original": { + "owner": "starptr", + "repo": "cardboard", + "type": "github" + } + }, + "cardboard_2": { + "locked": { + "lastModified": 1733553805, + "narHash": "sha256-KVqwZvx5kKrUAqaxtk/TgKbS7Su31w9l2pBgwYpx6Nc=", + "owner": "starptr", + "repo": "cardboard", + "rev": "5ba1798960438a76d9c83e16a78c34e5f931c562", + "type": "github" + }, + "original": { + "owner": "starptr", + "repo": "cardboard", + "type": "github" + } + }, + "cardboard_3": { + "locked": { + "lastModified": 1733553805, + "narHash": "sha256-KVqwZvx5kKrUAqaxtk/TgKbS7Su31w9l2pBgwYpx6Nc=", + "owner": "starptr", + "repo": "cardboard", + "rev": "5ba1798960438a76d9c83e16a78c34e5f931c562", + "type": "github" + }, + "original": { + "owner": "starptr", + "repo": "cardboard", + "type": "github" + } + }, + "chaseln": { + "inputs": { + "cardboard": "cardboard", + "devenv": [ + "soup", + "devenv" + ], + "flake-compat": "flake-compat_2", + "nixpkgs": [ + "soup", + "nixpkgs-devenv" + ], + "systems": "systems_2" + }, + "locked": { + "lastModified": 1733554501, + "narHash": "sha256-lZvgcmPHmymgAlCd8n1W57KIAwbLxEfHKlNabyyF2RA=", + "owner": "starptr", + "repo": "chaseln", + "rev": "14dad3e0316c3397aef06863fb9584f8fcb291b7", + "type": "github" + }, + "original": { + "owner": "starptr", + "repo": "chaseln", + "type": "github" + } + }, + "check-gits": { + "inputs": { + "cardboard": "cardboard_2", + "devenv": [ + "soup", + "devenv" + ], + "flake-compat": "flake-compat_3", + "nixpkgs": [ + "soup", + "nixpkgs-devenv" + ], + "systems": "systems_3" + }, + "locked": { + "lastModified": 1733554669, + "narHash": "sha256-i+t1GGBQqgLvVR5bU6RQzP+1zs9bIuClj9IuH4Lf4sc=", + "owner": "starptr", + "repo": "check-gits", + "rev": "639ff0845b68aae5e780f4a56fad71f8df0ca634", + "type": "github" + }, + "original": { + "owner": "starptr", + "repo": "check-gits", + "type": "github" + } + }, + "dark-notify": { + "inputs": { + "cardboard": "cardboard_3", + "devenv": [ + "soup", + "devenv" + ], + "fenix": [ + "soup", + "fenix" + ], + "flake-compat": "flake-compat_4", + "nixpkgs": [ + "soup", + "nixpkgs-devenv" + ], + "systems": "systems_4" + }, + "locked": { + "lastModified": 1733554618, + "narHash": "sha256-pyQtvSZjv9GI4qR4SeEVA1BO0ACOJ8CUm74NmCTyC04=", + "owner": "starptr", + "repo": "dark-notify", + "rev": "c057528026b11eb0a501012d35d00e35a6f90422", + "type": "github" + }, + "original": { + "owner": "starptr", + "repo": "dark-notify", + "type": "github" + } + }, + "devenv": { + "inputs": { + "cachix": "cachix", + "flake-compat": "flake-compat", + "git-hooks": "git-hooks", + "nix": "nix", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754158015, + "narHash": "sha256-B/o0XiDj06Knm7t/9KmLKnkrpI9s5O13qU+SNL/4Gp8=", + "owner": "cachix", + "repo": "devenv", + "rev": "062f3f42de2f6bb7382f88f6dbcbbbaa118a3791", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "soup", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1730356297, + "narHash": "sha256-pMW/yx6urzUimYdMHLGKRWxu2wmWMd7Dqz9oiGHBi8o=", + "owner": "nix-community", + "repo": "fenix", + "rev": "3a35e2c06a31ff4420639a454eeca4ccdfe69f13", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_3": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_4": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_5": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "devenv", + "nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "devenv", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "devenv", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1750779888, + "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "devenv", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754225444, + "narHash": "sha256-mv01SQtqlhBMavc1dgNjgqJw4WfZxy+w3xBgwJU3YmU=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "0de18bd5c6681280d7ae017fa34ffd91bdcf0557", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "jellyfin-mpv-shim": { + "flake": false, + "locked": { + "lastModified": 1717627803, + "narHash": "sha256-miShs82yexR5ozglH1mG27MpmEN4VZv5tNa7bnGFDO4=", + "owner": "jellyfin", + "repo": "jellyfin-mpv-shim", + "rev": "3fdbfc1798d24d9b71a1d588f4bf42248137da03", + "type": "github" + }, + "original": { + "owner": "jellyfin", + "ref": "v2.8.0", + "repo": "jellyfin-mpv-shim", + "type": "github" + } + }, + "jellyfin-mpv-shim-darwin": { + "inputs": { + "flake-utils": "flake-utils", + "jellyfin-mpv-shim": "jellyfin-mpv-shim", + "nixpkgs": "nixpkgs", + "pystray": "pystray" + }, + "locked": { + "lastModified": 1730240303, + "narHash": "sha256-TliVj5t4pf1lqA4vufOT7DrPx1yXOAn6CyjTGXt7QEU=", + "owner": "starptr", + "repo": "jellyfin-mpv-shim.nix", + "rev": "661f916fe0fc4d51d31c5d6d48bc1e6074822d07", + "type": "github" + }, + "original": { + "owner": "starptr", + "repo": "jellyfin-mpv-shim.nix", + "type": "github" + } + }, + "love": { + "flake": false, + "locked": { + "lastModified": 1709486057, + "narHash": "sha256-sQeclZFv+042Ijbh1mAsRdY1XBrUVwIx4X0qgB+Avj4=", + "type": "tarball", + "url": "https://github.com/love2d/love/releases/download/11.5/love-11.5-macos.zip" + }, + "original": { + "type": "tarball", + "url": "https://github.com/love2d/love/releases/download/11.5/love-11.5-macos.zip" + } + }, + "nix": { + "inputs": { + "flake-compat": [ + "devenv", + "flake-compat" + ], + "flake-parts": "flake-parts", + "git-hooks-nix": [ + "devenv", + "git-hooks" + ], + "nixpkgs": [ + "devenv", + "nixpkgs" + ], + "nixpkgs-23-11": [ + "devenv" + ], + "nixpkgs-regression": [ + "devenv" + ] + }, + "locked": { + "lastModified": 1752773918, + "narHash": "sha256-dOi/M6yNeuJlj88exI+7k154z+hAhFcuB8tZktiW7rg=", + "owner": "cachix", + "repo": "nix", + "rev": "031c3cf42d2e9391eee373507d8c12e0f9606779", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "devenv-2.30", + "repo": "nix", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751313918, + "narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1753939845, + "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "94def634a20494ee057c76998843c015909d6311", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-firefox-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754183990, + "narHash": "sha256-7PmWqsFNn8bIx1nMgLk+Ej1gWTYm1JiqkYMZi9Chcac=", + "owner": "bandithedoge", + "repo": "nixpkgs-firefox-darwin", + "rev": "b85153e6e56f8babf0d100ff0d3cf329c00a424d", + "type": "github" + }, + "original": { + "owner": "bandithedoge", + "repo": "nixpkgs-firefox-darwin", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1754217164, + "narHash": "sha256-7zupXwqbChmsEyOCUzUbrWVwnUxPc6ExBajgk/Y1oeU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "94bcd9f5bcc94c0a1451ea873e38dddea7360bdc", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pystray": { + "flake": false, + "locked": { + "lastModified": 1694958242, + "narHash": "sha256-CZhbaXwKFrRBEomzfFPMQdMkTOl5lbgI64etfDRiRu4=", + "owner": "moses-palmer", + "repo": "pystray", + "rev": "1907f8681d6d421517c63d94f425f9cdd74d0034", + "type": "github" + }, + "original": { + "owner": "moses-palmer", + "ref": "v0.19.5", + "repo": "pystray", + "type": "github" + } + }, + "root": { + "inputs": { + "devenv": "devenv", + "home-manager": "home-manager", + "jellyfin-mpv-shim-darwin": "jellyfin-mpv-shim-darwin", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs_2", + "nixpkgs-firefox-darwin": "nixpkgs-firefox-darwin", + "sops-nix": "sops-nix", + "soup": "soup", + "systems": "systems_5" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1730315096, + "narHash": "sha256-Kvve0NSLliNl1cv7qLSPdVWqLUEeAq0aZGsMeV632Cg=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "8244f30eff828355f5ec92b2307c216d10caa25b", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "sops-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1752544651, + "narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "2c8def626f54708a9c38a5861866660395bb3461", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "sops-nix", + "type": "github" + } + }, + "soup": { + "inputs": { + "chaseln": "chaseln", + "check-gits": "check-gits", + "dark-notify": "dark-notify", + "devenv": [ + "devenv" + ], + "fenix": "fenix", + "flake-compat": "flake-compat_5", + "love": "love", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-devenv": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1733554806, + "narHash": "sha256-vowuNq35h+Jh7gDipMr7R1g2lgGcxbfCiTkD7znOvVQ=", + "owner": "starptr", + "repo": "soup", + "rev": "951471b427536c56a0a87e8d6363237d049889f2", + "type": "github" + }, + "original": { + "owner": "starptr", + "repo": "soup", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1689347925, + "narHash": "sha256-ozenz5bFe1UUqOn7f60HRmgc01BgTGIKZ4Xl+HbocGQ=", + "owner": "nix-systems", + "repo": "default-darwin", + "rev": "2235d7e6cc29ae99878133c95e9fe5e157661ffb", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-darwin", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake-profiles/system-sodium/flake.nix b/flake-profiles/system-sodium/flake.nix new file mode 100644 index 0000000..1616d72 --- /dev/null +++ b/flake-profiles/system-sodium/flake.nix @@ -0,0 +1,56 @@ +{ + description = "Yuto's system profiles"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nix-darwin = { + url = "github:LnL7/nix-darwin"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixpkgs-firefox-darwin = { + url = "github:bandithedoge/nixpkgs-firefox-darwin"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + sops-nix = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + jellyfin-mpv-shim-darwin = { + url = "github:starptr/jellyfin-mpv-shim.nix"; + #inputs.nixpkgs.follows = "nixpkgs"; # TODO: migrate to support new shim + }; + + systems.url = "github:nix-systems/default"; # For soup + soup = { + url = "github:starptr/soup"; + inputs = { + nixpkgs.follows = "nixpkgs"; + nixpkgs-devenv.follows = "nixpkgs"; # Does not need to be devenv's nixpkgs, since we don't use soup's devshell + systems.follows = "systems"; + devenv.follows = "devenv"; + }; + }; + # TODO: remove these by removing them from soup + # TODO: move soup into this monorepo + devenv.url = "github:cachix/devenv"; + devenv.inputs.nixpkgs.follows = "nixpkgs"; + }; + + nixConfig = { + extra-trusted-public-keys = [ + "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + extra-substituters = [ + "https://devenv.cachix.org" + "https://nix-community.cachix.org" + ]; + }; + + outputs = inputs: (import ../outputs.nix) inputs; +} diff --git a/venus/app-configs/git/venus.txt b/venus/app-configs/git/venus.txt new file mode 100644 index 0000000..aeafcd5 --- /dev/null +++ b/venus/app-configs/git/venus.txt @@ -0,0 +1,13 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = https://github.com/starptr/nix-venus.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "main"] + remote = origin + merge = refs/heads/main diff --git a/venus/app-configs/halloy-config.toml b/venus/app-configs/halloy-config.toml new file mode 100644 index 0000000..76be2ae --- /dev/null +++ b/venus/app-configs/halloy-config.toml @@ -0,0 +1,7 @@ +[servers.liberachat] +nickname = "halloy-user" +server = "irc.libera.chat" +channels = ["#halloy"] + +[buffer.channel.topic] +enabled = true \ No newline at end of file diff --git a/venus/app-configs/nixpkgs-config.nix b/venus/app-configs/nixpkgs-config.nix new file mode 100644 index 0000000..2ae2a13 --- /dev/null +++ b/venus/app-configs/nixpkgs-config.nix @@ -0,0 +1,6 @@ +{ + allowUnfree = true; + permittedInsecurePackages = [ + "cinny-4.2.2" + ]; +} diff --git a/venus/app-configs/restic-profile.toml b/venus/app-configs/restic-profile.toml new file mode 100644 index 0000000..d6b6d98 --- /dev/null +++ b/venus/app-configs/restic-profile.toml @@ -0,0 +1,20 @@ +#:schema https://creativeprojects.github.io/resticprofile/jsonschema/config-1.json +# +# indentation is not needed but it makes it easier to read ;) +# +version = "1" + +[default] + repository = "rclone:storj-baks:backup-repos/main-restic-backups" + password-file = "password.txt" + + [default.backup] + verbose = true + tag = [ "sodium" ] + source = [ + "{{ .Env.HOME }}/Downloads" + ] + +[use-native] + inherit = "default" + repository = "rclone:storj-baks-native:backup-repos/main-restic-backups" \ No newline at end of file diff --git a/venus/app-configs/starship-jetpack.toml b/venus/app-configs/starship-jetpack.toml new file mode 100644 index 0000000..7d7fa90 --- /dev/null +++ b/venus/app-configs/starship-jetpack.toml @@ -0,0 +1,284 @@ +format = """ +$cmd_duration\ +$hostname\ +$localip\ +$shlvl\ +$shell\ +$env_var\ +$username\ +$sudo\ +$character\ +""" + +right_format = """ +$singularity\ +$kubernetes\ +$directory\ +$vcsh\ +$fossil_branch\ +$git_branch\ +$git_commit\ +$git_state\ +$git_metrics\ +$git_status\ +$hg_branch\ +$pijul_channel\ +$docker_context\ +$package\ +$c\ +$cmake\ +$cobol\ +$daml\ +$dart\ +$deno\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$fennel\ +$golang\ +$guix_shell\ +$haskell\ +$haxe\ +$helm\ +$java\ +$julia\ +$kotlin\ +$gradle\ +$lua\ +$nim\ +$nodejs\ +$ocaml\ +$opa\ +$perl\ +$php\ +$pulumi\ +$purescript\ +$python\ +$raku\ +$rlang\ +$red\ +$ruby\ +$rust\ +$scala\ +$solidity\ +$swift\ +$terraform\ +$vlang\ +$vagrant\ +$zig\ +$buf\ +$nix_shell\ +$conda\ +$meson\ +$spack\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$azure\ +$crystal\ +$custom\ +$jobs\ +$status\ +$os\ +$container\ +$battery\ +$time\ +""" + +add_newline = true + +[character] +format = "$symbol " +success_symbol = "[◉](bold bright-yellow)" +error_symbol = "[⊘](italic purple)" + +[env_var.VIMSHELL] # vim subshell +format = "[$env_value]($style)" +style = 'green italic' + +[sudo] +format = "[$symbol]($style)" +style = "italic bright-purple" +symbol = "◇┈" +disabled = false + +[username] +style_user = "yellow bold" +style_root = "purple bold italic" +format = "[$user]($style) ▻ " +disabled = false + +[directory] +home_symbol = "⌂" +truncation_length = 2 +truncation_symbol = "▦ " +read_only = " ■" +style = "italic blue" +format = ' [$path]($style)[$read_only]($read_only_style)' + +[cmd_duration] +min_time = 500 +format = "[$duration ](italic bright-yellow)" + +[jobs] +format = "[ $symbol$number]($style)" +style = "white" +symbol = "[▶ ](blue italic)" + +[localip] +ssh_only = true +format = " ◯[$localipv4](bold magenta)" +disabled = false + +[time] +disabled = false +format = "[ $time]($style)" +time_format = "%R" +utc_time_offset = "local" +style = "dimmed white" + +[battery] +format = "[ $percentage $symbol]($style)" +full_symbol = "[█](italic green)" +charging_symbol = "[↑](italic green)" +discharging_symbol = "[↓](italic)" +unknown_symbol = "[░](italic)" +empty_symbol = "[▃](italic red)" + +[[battery.display]] +threshold = 40 +style = "dimmed yellow" + +[[battery.display]] +threshold = 70 +style = "dimmed white" + +[git_branch] +format = "[ $symbol $branch(:$remote_branch)]($style)" +symbol = "[◬](bold bright-blue)" +style = "bold italic bright-blue" + +[git_status] +style = "italic bright-blue" +format = """([⎪$ahead_behind$staged$modified$untracked$renamed$deleted$conflicted$stashed⎥]($style))""" +conflicted = "[◪◦](italic bright-magenta)" +ahead = "[▲│[${count}](bold white)│](italic green)" +behind = "[▽│[${count}](bold white)│](italic red)" +diverged = "[◇ ▲┤[${ahead_count}](regular white)│▽┤[${behind_count}](regular white)│](italic bright-magenta)" +untracked = "[◌◦](italic bright-yellow)" +stashed = "[◦◫◦](italic white)" +modified = "[●◦](italic yellow)" +staged = "[■┤[$count](bold white)│](italic bright-cyan)" +renamed = "[◎◦](italic bright-blue)" +deleted = "[✕](italic red)" + +[deno] +format = " deno [∫ $version](blue italic)" +version_format = "${major}.${minor}" + +[lua] +format = " lua [${symbol}${version}]($style)" +symbol = "⨀ " +style = "italic bright-yellow" + +[nodejs] +format = " node [◫ ($version)](italic bright-green)" +detect_files = ["package-lock.json", "yarn.lock"] +version_format = "${major}.${minor}" + +[python] +format = " py [${symbol}${version}]($style)" +symbol = "[⌉](italic bright-blue)⌊ " +version_format = "${major}.${minor}" +style = "italic bright-yellow" + +[ruby] +format = " rb [${symbol}${version}]($style)" +symbol = "◆ " +version_format = "${major}.${minor}" +style = "italic red" + +[rust] +format = " rs [$symbol$version]($style)" +symbol = "⊃ " +version_format = "${major}.${minor}" +style = "italic red" + +[package] +format = " pkg [$symbol$version]($style)" +version_format = "${major}.${minor}" +symbol = "◫ " +style = "bright-yellow italic" + +[swift] +format = " sw [${symbol}${version}]($style)" +symbol = "◁ " +style = "italic bright-red" +version_format = "${major}.${minor}" + +[aws] +format = " aws [$symbol $profile $region]($style)" +style = "italic blue" +symbol = "▲ " + +[buf] +symbol = "■ " +format = " buf [$symbol $version $buf_version]($style)" + +[c] +symbol = "∁ " +format = " c [$symbol($version(-$name))]($style)" + +[conda] +symbol = "◯ " +format = " conda [$symbol$environment]($style)" + +[dart] +symbol = "◁◅ " +format = " dart [$symbol($version )]($style)" + +[docker_context] +symbol = "◧ " +format = " docker [$symbol$context]($style)" + +[elixir] +symbol = "△ " +format = " exs [$symbol $version OTP $otp_version ]($style)" + +[elm] +symbol = "◩ " +format = " elm [$symbol($version )]($style)" + +[golang] +symbol = "∩ " +format = " go [$symbol($version )]($style)" + +[haskell] +symbol = "❯λ " +format = " hs [$symbol($version )]($style)" + +[java] +symbol = "∪ " +format = " java [${symbol}(${version} )]($style)" + +[julia] +symbol = "◎ " +format = " jl [$symbol($version )]($style)" + +[memory_usage] +symbol = "▪▫▪ " +format = " mem [${ram}( ${swap})]($style)" + +[nim] +symbol = "▴▲▴ " +format = " nim [$symbol($version )]($style)" + +[nix_shell] +symbol = "⊛ " +format = " nix [$symbol$state $name]($style)" + +[spack] +symbol = "◇ " +format = " spack [$symbol$environment]($style)" diff --git a/venus/app-configs/starship-pastel-powerline.toml b/venus/app-configs/starship-pastel-powerline.toml new file mode 100644 index 0000000..983acba --- /dev/null +++ b/venus/app-configs/starship-pastel-powerline.toml @@ -0,0 +1,144 @@ +format = """ +[](#9A348E)\ +$os\ +$username\ +[](bg:#DA627D fg:#9A348E)\ +$directory\ +[](fg:#DA627D bg:#FCA17D)\ +$git_branch\ +$git_status\ +[](fg:#FCA17D bg:#86BBD8)\ +$c\ +$elixir\ +$elm\ +$golang\ +$gradle\ +$haskell\ +$java\ +$julia\ +$nodejs\ +$nim\ +$rust\ +$scala\ +[](fg:#86BBD8 bg:#06969A)\ +$docker_context\ +[](fg:#06969A bg:#33658A)\ +$time\ +[ ](fg:#33658A)\ +""" + +# Disable the blank line at the start of the prompt +# add_newline = false + +# You can also replace your username with a neat symbol like  or disable this +# and use the os module below +[username] +show_always = true +style_user = "bg:#9A348E" +style_root = "bg:#9A348E" +format = '[$user ]($style)' +disabled = false + +# An alternative to the username module which displays a symbol that +# represents the current operating system +[os] +style = "bg:#9A348E" +disabled = true # Disabled by default + +[directory] +style = "bg:#DA627D" +format = "[ $path ]($style)" +truncation_length = 3 +truncation_symbol = "…/" + +# Here is how you can shorten some long paths by text replacement +# similar to mapped_locations in Oh My Posh: +[directory.substitutions] +"Documents" = "󰈙 " +"Downloads" = " " +"Music" = " " +"Pictures" = " " +# Keep in mind that the order matters. For example: +# "Important Documents" = " 󰈙 " +# will not be replaced, because "Documents" was already substituted before. +# So either put "Important Documents" before "Documents" or use the substituted version: +# "Important 󰈙 " = " 󰈙 " + +[c] +symbol = " " +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[docker_context] +symbol = " " +style = "bg:#06969A" +format = '[ $symbol $context ]($style)' + +[elixir] +symbol = " " +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[elm] +symbol = " " +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[git_branch] +symbol = "" +style = "bg:#FCA17D" +format = '[ $symbol $branch ]($style)' + +[git_status] +style = "bg:#FCA17D" +format = '[$all_status$ahead_behind ]($style)' + +[golang] +symbol = " " +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[gradle] +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[haskell] +symbol = " " +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[java] +symbol = " " +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[julia] +symbol = " " +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[nodejs] +symbol = "" +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[nim] +symbol = "󰆥 " +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[rust] +symbol = "" +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[scala] +symbol = " " +style = "bg:#86BBD8" +format = '[ $symbol ($version) ]($style)' + +[time] +disabled = false +time_format = "%R" # Hour:Minute Format +style = "bg:#33658A" +format = '[ ♥ $time ]($style)' diff --git a/venus/app-configs/starship-pure.toml b/venus/app-configs/starship-pure.toml new file mode 100644 index 0000000..9636f52 --- /dev/null +++ b/venus/app-configs/starship-pure.toml @@ -0,0 +1,46 @@ +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vimcmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" diff --git a/venus/app-configs/starship.toml b/venus/app-configs/starship.toml new file mode 100644 index 0000000..8695385 --- /dev/null +++ b/venus/app-configs/starship.toml @@ -0,0 +1,61 @@ +"$schema" = 'https://starship.rs/config-schema.json' + +format = """ +$status +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +add_newline = false + +[line_break] +disabled = true + +[directory] +style = "blue" + +[status] +disabled = false +symbol = '[$common_meaning$signal_name$maybe_int ](bg:red fg:white)' +success_symbol = '[$int ](bg:green fg:black)' +format = '[$symbol]()' + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vimcmd_symbol = "[❮](green)" +format = '$symbol ' + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed) ]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" diff --git a/experimental/venus/hot-files/alacritty.toml b/venus/hot-files/alacritty.toml similarity index 100% rename from experimental/venus/hot-files/alacritty.toml rename to venus/hot-files/alacritty.toml diff --git a/experimental/venus/hot-files/ghostty-config b/venus/hot-files/ghostty-config similarity index 100% rename from experimental/venus/hot-files/ghostty-config rename to venus/hot-files/ghostty-config diff --git a/experimental/venus/hot-files/jellyfin-mpv-shim-conf.json b/venus/hot-files/jellyfin-mpv-shim-conf.json similarity index 100% rename from experimental/venus/hot-files/jellyfin-mpv-shim-conf.json rename to venus/hot-files/jellyfin-mpv-shim-conf.json diff --git a/experimental/venus/hot-files/mpv/input.conf b/venus/hot-files/mpv/input.conf similarity index 100% rename from experimental/venus/hot-files/mpv/input.conf rename to venus/hot-files/mpv/input.conf diff --git a/experimental/venus/hot-files/mpv/mpv.conf b/venus/hot-files/mpv/mpv.conf similarity index 100% rename from experimental/venus/hot-files/mpv/mpv.conf rename to venus/hot-files/mpv/mpv.conf diff --git a/experimental/venus/hot-files/ssh-config.txt b/venus/hot-files/ssh-config.txt similarity index 100% rename from experimental/venus/hot-files/ssh-config.txt rename to venus/hot-files/ssh-config.txt diff --git a/experimental/venus/hot-files/test/hi.txt b/venus/hot-files/test/hi.txt similarity index 100% rename from experimental/venus/hot-files/test/hi.txt rename to venus/hot-files/test/hi.txt diff --git a/experimental/venus/legacy-yadm/alacritty/alacritty.toml b/venus/legacy-yadm/alacritty/alacritty.toml similarity index 100% rename from experimental/venus/legacy-yadm/alacritty/alacritty.toml rename to venus/legacy-yadm/alacritty/alacritty.toml diff --git a/experimental/venus/legacy-yadm/alacritty/alacritty.yml b/venus/legacy-yadm/alacritty/alacritty.yml similarity index 100% rename from experimental/venus/legacy-yadm/alacritty/alacritty.yml rename to venus/legacy-yadm/alacritty/alacritty.yml diff --git a/experimental/venus/legacy-yadm/alacritty/alacritty.yml.day-n-nite b/venus/legacy-yadm/alacritty/alacritty.yml.day-n-nite similarity index 100% rename from experimental/venus/legacy-yadm/alacritty/alacritty.yml.day-n-nite rename to venus/legacy-yadm/alacritty/alacritty.yml.day-n-nite diff --git a/experimental/venus/legacy-yadm/git-config.txt b/venus/legacy-yadm/git-config.txt similarity index 100% rename from experimental/venus/legacy-yadm/git-config.txt rename to venus/legacy-yadm/git-config.txt diff --git a/experimental/venus/legacy-yadm/ssh-config.txt b/venus/legacy-yadm/ssh-config.txt similarity index 100% rename from experimental/venus/legacy-yadm/ssh-config.txt rename to venus/legacy-yadm/ssh-config.txt diff --git a/venus/modules/home-manager/legacy-base.nix b/venus/modules/home-manager/legacy-base.nix new file mode 100644 index 0000000..56e073f --- /dev/null +++ b/venus/modules/home-manager/legacy-base.nix @@ -0,0 +1,173 @@ +# Formerly `hm-base.nix`; do not use in new configurations! +{ + config, + pkgs, + lib, + osConfig, + ... +}: + +# Base profile any time I use home-manager + +let + my-emacs = pkgs.emacs29-macport.override { }; + my-emacs-with-packages = (pkgs.emacsPackagesFor my-emacs).emacsWithPackages (epkgs: [ + epkgs.vterm + ]); +in +{ + imports = [ + ./use-nixpkgs-config.nix + ./use-alacritty.nix + ]; + # Home Manager needs a bit of information about you and the paths it should + # manage. + #home.username = "yuto"; + #home.homeDirectory = "/Users/yuto"; + + # useGlobalPkgs makes this ignored + #nixpkgs = { + # config = import ./configs/nixpkgs-config.nix; + #}; + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = [ + # # Adds the 'hello' command to your environment. It prints a friendly + # # "Hello, world!" when run. + # pkgs.hello + + # This should not throw if unfree is allowed + pkgs.hello-unfree + + pkgs.fd + + pkgs.ripgrep + + pkgs.emacs-all-the-icons-fonts + + #pkgs.mkvtoolnix + #pkgs.handbrake # Broken + #pkgs.ccextractor # Broken + #pkgs.tsduck # Broken + + pkgs.age + + # Don't add project-local binaries to global userspace!! + # pkgs.morph + + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + }; + + # Home Manager can also manage your environment variables through + # 'home.sessionVariables'. If you don't want to manage your shell through Home + # Manager then you have to manually source 'hm-session-vars.sh' located at + # either + # + # ~/.nix-profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # /etc/profiles/per-user/yuto/etc/profile.d/hm-session-vars.sh + # + home.sessionVariables = { + # EDITOR = "emacs"; + }; + + home.shellAliases = { + }; + + # Use homebrew; gh is very impure + programs.gh = { + enable = false; + }; + + programs.starship = { + enable = true; + settings = builtins.fromTOML (builtins.readFile ../../app-configs/starship.toml); + enableFishIntegration = false; + }; + + # TODO: clean up firefox + programs.firefox = { + enable = false; + + package = pkgs.firefox-bin; + }; + + # TODO: clean up emacs + programs.emacs = { + enable = false; + package = my-emacs-with-packages; + }; + + # FIXME: doesn't work on darwin + #programs.vscode = { + # enable = true; + # package = pkgs.vscode.fhs; + # enableUpdateCheck = false; + #}; + + programs.git = { + enable = true; + #package = pkgs.git # Use the system git, as it contains Apple-specific patches (TODO: are they important?) + delta = { + enable = true; + }; + includes = [ + { + # Include the following in an emergency to use git with the old working configuration + # TODO: Remove this after implementing the config directly in `programs.git.extraConfig` + path = ../../legacy-yadm/git-config.txt; + } + ]; + userEmail = "yuto@berkeley.edu"; + userName = "Yuto Nishida"; + }; + + programs.bat = { + enable = true; + }; + + # Let Home Manager install and manage itself. + # programs.home-manager.enable = true; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "23.11"; # Please read the comment before changing. +} diff --git a/venus/modules/home-manager/magnesium-hydroxide.nix b/venus/modules/home-manager/magnesium-hydroxide.nix new file mode 100644 index 0000000..fdf5afa --- /dev/null +++ b/venus/modules/home-manager/magnesium-hydroxide.nix @@ -0,0 +1,71 @@ +{ config, pkgs, lib, ... }: +{ + imports = [ + ./venus-location.nix + ./ooss-maker.nix + #./use-fish.nix + #./use-direnv.nix + ./use-tealdeer.nix + ./use-alacritty.nix + ]; + config = { + venus.ooss-maker-for-this-system = config.lib.file.mkOOSS-Magnesium-Hydroxide; + #use-fish.enableHomebrewEscapeHatch = true; + #use-fish.enableDarwinPathWorkaround = true; + + home.packages = [ + pkgs.iina + #pkgs.ffmpeg-full + pkgs.terminal-notifier + pkgs.comma + pkgs.lsd + #pkgs.chaseln + pkgs.neovim # Temporary until I figure out how to integrate ammonia into the sodium config + #pkgs.check-gits + ]; + + home.sessionVariables = { + MANPAGER = "${pkgs.neovim}/bin/nvim +Man!"; + #MANPAGER = "${pkgs.vim}/bin/vim +Man!"; # Doesn't work; you need to run `:runtime! ftplugin/main.vim:Man ` followed by the keyword + #MANPAGER = "${pkgs.nvimpager}/bin/nvimpager"; + #MANPAGER = "${pkgs.bat-extras.batman}/bin/batman"; + EDITOR = "${pkgs.neovim}/bin/nvim"; + }; + + home.shellAliases = { + # This assumes this repo is in ~/src/venus + drs = "darwin-rebuild switch --flake ${config.venus-location.magnesium-hydroxide}"; + #maybe-code = "/opt/homebrew/bin/code"; + + "maybe-NH₂OH" = "nix run ${config.home.homeDirectory}/src/hydroxylamine"; + maybe-hydroxylamine = "maybe-NH₂OH"; + + maybe-ammonia = "nix run ${config.home.homeDirectory}/src/ammonia"; + maybe-ammonia-cached = "${config.home.homeDirectory}/src/ammonia/result/bin/nvim"; + + ban = ''BAT_THEME="Monokai Extended" ${pkgs.bat-extras.batman}/bin/batman''; # Select dark theme for dark alacritty + }; + + #home.file.".ssh/config".source = config.venus.ooss-maker-for-this-system "ssh-config.txt"; + + # TODO: clean this up + # This builds manual pages for the current intance of nixpkgs + #home.file."nix-manuals/nixos-release".source = "${(import "${nixpkgs}/nixos/release.nix" { inherit nixpkgs; }).manualHTML.x86_64-linux}/share/doc/nixos"; + #home.file."nix-manuals/nixpkgs-manual".source = "${pkgs.nixpkgs-manual.override { inherit nixpkgs; }}/share/doc/nixpkgs"; + + # TODO: clean this up + xdg.configFile."ghostty/config".source = config.venus.ooss-maker-for-this-system "ghostty-config"; + + # TODO: clean this up + home.file.".emacs.d/init.el".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/src/cyanide/result/init-file/init.el"; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "23.11"; # Please read the comment before changing. + }; +} diff --git a/venus/modules/home-manager/ooss-maker.nix b/venus/modules/home-manager/ooss-maker.nix new file mode 100644 index 0000000..aad1cae --- /dev/null +++ b/venus/modules/home-manager/ooss-maker.nix @@ -0,0 +1,48 @@ +{ + config, + pkgs, + lib, + ... +}: +{ + imports = [ + ./venus-location.nix + ]; + options = { + venus.ooss-maker-for-this-system = lib.mkOption { + default = config.lib.file.mkOOSS-never; + type = lib.types.anything; + description = '' + Set the function that will generate the OOSS given a path relative to hot-files. + This option applies to this (current) configuration. + ''; + }; + }; + config = + let + ooss-maker = + hot-files-path: + ( + #assert lib.assertMsg (builtins.isString hot-files-path) "hot-files-path must be a string"; # This doesn't print out the trace at all + assert builtins.isString hot-files-path; + ( + hot-file-relpath: + assert builtins.isString hot-file-relpath; + let + # This is the path to the hot file + hot-file-abspath = "${hot-files-path}/${hot-file-relpath}"; + in + # TODO: figure out how to convert the return code of the command to a Boolean + #assert (pkgs.runCommandLocal "" {} ''test -f ${lib.escapeShellArg hot-file-abspath}''); + config.lib.file.mkOutOfStoreSymlink hot-file-abspath + ) + ); + in + { + lib.file.mkOOSS-Sodium = ooss-maker "${config.venus-location.sodium}/hot-files"; + lib.file.mkOOSS-Tilderef2-starptr = ooss-maker "${config.venus-location.tilderef2-starptr}/hot-files"; + lib.file.mkOOSS-never = hot-files-path: builtins.throw "This is a placeholder mkOOSS function. Please override it with eg. config.lib.file.mkOOSS-Sodium."; + lib.file.mkOOSS-Magnesium-Hydroxide = ooss-maker "${config.venus-location.magnesium-hydroxide}/hot-files"; + lib.file.mkOOSS-Hydrogen-Sulfide = ooss-maker "${config.venus-location.hydrogen-sulfide}/hot-files"; + }; +} diff --git a/venus/modules/home-manager/sodium.nix b/venus/modules/home-manager/sodium.nix new file mode 100644 index 0000000..c99ffd0 --- /dev/null +++ b/venus/modules/home-manager/sodium.nix @@ -0,0 +1,136 @@ +# Main hm module for Sodium +{ config, pkgs, lib, nixpkgs, ... }: +{ + imports = [ + ./venus-location.nix + ./legacy-base.nix + ./use-jujutsu.nix + ./use-yt-dlp.nix + ./use-fish.nix + #./use-halloy.nix + ./use-mpv.nix + ./use-direnv.nix + ./use-tealdeer.nix + ./use-resticprofile.nix + ./ooss-maker.nix + ]; + config = { + venus.ooss-maker-for-this-system = config.lib.file.mkOOSS-Sodium; + use-fish.enableHomebrewEscapeHatch = true; + use-fish.enableDarwinPathWorkaround = true; + venus.use-mpv.enableDarwinAppBundleWorkaround = true; + + home.packages = [ + pkgs.borgbackup + pkgs.iina + pkgs.ffmpeg-full + pkgs.terminal-notifier + pkgs.comma + pkgs.lsd + #pkgs.jellyfin-mpv-shim # TODO: fix this + pkgs.devenv + pkgs.chaseln + #pkgs.cinny-desktop + pkgs.element-desktop + pkgs.neovim # Temporary until I figure out how to integrate ammonia into the sodium config + pkgs.check-gits + pkgs.rclone + pkgs.audacity + pkgs.kubectl + ]; + + home.sessionVariables = { + MANPAGER = "${pkgs.neovim}/bin/nvim +Man!"; + #MANPAGER = "${pkgs.vim}/bin/vim +Man!"; # Doesn't work; you need to run `:runtime! ftplugin/main.vim:Man ` followed by the keyword + #MANPAGER = "${pkgs.nvimpager}/bin/nvimpager"; + #MANPAGER = "${pkgs.bat-extras.batman}/bin/batman"; + EDITOR = "${pkgs.neovim}/bin/nvim"; + }; + + home.shellAliases = { + # This assumes this repo is in ~/src/venus + drs = "darwin-rebuild switch --flake ${config.venus-location.sodium}/flake-profiles/sodium"; + # TODO: package makemkv + maybe-makemkvcon = "/Applications/MakeMKV.app/Contents/MacOS/makemkvcon"; + maybe-pulumi = "/opt/homebrew/bin/pulumi"; + maybe-code = "/opt/homebrew/bin/code"; + maybe-love = "/Applications/love.app/Contents/MacOS/love"; + + "maybe-NH₂OH" = "nix run ${config.home.homeDirectory}/src/hydroxylamine"; + maybe-hydroxylamine = "maybe-NH₂OH"; + + maybe-ammonia = "nix run ${config.home.homeDirectory}/src/ammonia"; + maybe-ammonia-cached = "${config.home.homeDirectory}/src/ammonia/result/bin/nvim"; + + ban = ''BAT_THEME="Monokai Extended" ${pkgs.bat-extras.batman}/bin/batman''; # Select dark theme for dark alacritty + }; + + home.file.".ssh/config".source = config.venus.ooss-maker-for-this-system "ssh-config.txt"; + + # TODO: this is coupled with jellyfin-mpv-shim + # jellyfin-mpv-shim uses its own directory to store its configs. It does NOT load scripts from the vanilla mpv config directory. + # v This is a symlink to the vanilla mpv config file. + # We use a non-hotlink symlink because the config file is generated by home-manager. + # The path depends on the value of the config directory (private variable declared https://github.com/nix-community/home-manager/blob/2f23fa308a7c067e52dfcc30a0758f47043ec176/modules/misc/xdg.nix#L15) + # and the hardcoded mpv.conf path (https://github.com/nix-community/home-manager/blob/2f23fa308a7c067e52dfcc30a0758f47043ec176/modules/programs/mpv.nix#L209) + home.file."Library/Application Support/jellyfin-mpv-shim/mpv.conf".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/mpv/mpv.conf"; + # v This is another config file similar to the above. + # At the time of writing this, `input.conf` isn't actually generated because I'm not using that option in home-manager. + home.file."Library/Application Support/jellyfin-mpv-shim/input.conf".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/mpv/input.conf"; + # v This is another symlink similar to the above, but for a whole directory. + # Perhaps in the future, I will be more granular and link file-by-file (so that some conf files can be used only for jellyfin-mpv-shim, and vice versa. This is apparently useful since not all scripts are usable in jellyfin-mpv-shim.) + home.file."Library/Application Support/jellyfin-mpv-shim/script-opts".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/mpv/script-opts"; + # v This is another symlink similar to the above, also for a whole directory. + home.file."Library/Application Support/jellyfin-mpv-shim/scripts".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/mpv/scripts"; + # v This is a hot-file config for jellyfin-mpv-shim. Since it is configurable via GUI, it needs to be out of store. + home.file."Library/Application Support/jellyfin-mpv-shim/conf.json".source = config.venus.ooss-maker-for-this-system "jellyfin-mpv-shim-conf.json"; + + # TODO: clean this up + # This builds manual pages for the current intance of nixpkgs + home.file."nix-manuals/nixos-release".source = "${(import "${nixpkgs}/nixos/release.nix" { inherit nixpkgs; }).manualHTML.x86_64-linux}/share/doc/nixos"; + home.file."nix-manuals/nixpkgs-manual".source = "${pkgs.nixpkgs-manual.override { inherit nixpkgs; }}/share/doc/nixpkgs"; + + # TODO: clean this up + xdg.configFile."ghostty/config".source = config.venus.ooss-maker-for-this-system "ghostty-config"; + + # TODO: clean this up + home.file.".emacs.d/init.el".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/src/cyanide/result/init-file/init.el"; + + services.syncthing = { + enable = true; + #tray = { + # enable = true; + #}; + overrideDevices = false; + overrideFolders = false; + + # INFO: doesn't seem to do anything + #passwordFile = builtins.trace "pw file is here ${config.sops.secrets.syncthing_pw.path}" config.sops.secrets.syncthing_pw.path; + }; + + sops = { + defaultSopsFile = ./../../../secrets/example.yaml; + age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; + secrets.example_key = { }; + secrets.main_restic_backups = { + sopsFile = ./../../../secrets/personal/restic-repo-passwords.yaml; + path = "${config.home.homeDirectory}/.config/resticprofile/password.txt"; + }; + secrets.syncthing_pw = { + sopsFile = ./../../../secrets/personal/passwords.yaml; + }; + secrets."personal/rclone.conf.ini" = { + format = "ini"; + mode = "0400"; # Of the regular unenc file in ~/.config/sops-nix/secrets/personal/rclone.conf.ini + sopsFile = ./../../../secrets/personal/rclone.conf.ini; # Override the defaultSopsFile + path = "${config.home.homeDirectory}/.config/rclone/rclone.conf"; # Symlink to the regular unenc file + }; + secrets."personal/jupiter.env" = { + format = "dotenv"; + mode = "0400"; + sopsFile = ./../../../secrets/personal/jupiter.env; + path = "${config.home.homeDirectory}/src/gas-giants/jupiter/.env"; + }; + }; + }; +} diff --git a/venus/modules/home-manager/tilderef2-starptr.nix b/venus/modules/home-manager/tilderef2-starptr.nix new file mode 100644 index 0000000..8a03baa --- /dev/null +++ b/venus/modules/home-manager/tilderef2-starptr.nix @@ -0,0 +1,55 @@ +# Main hm module for the starptr profile on tilderef2 +{ config, pkgs, lib, ... }: +{ + imports = [ + ./venus-location.nix + ./use-fish.nix + ./use-tealdeer.nix + ./use-direnv.nix + ]; + home.stateVersion = "24.05"; + home.username = "starptr"; + home.homeDirectory = "/home/starptr"; + + home.packages = [ + pkgs.radicle-node + ]; + + programs.home-manager.enable = true; + + programs.ripgrep.enable = true; + + systemd.user.startServices = true; + systemd.user.services = { + set-bot = { + Unit = { + Description = "set-bot service"; + After = [ "network.target" ]; + }; + Install = { + WantedBy = [ "default.target" ]; + }; + Service = { + Type = "exec"; + #User = "starptr"; # This breaks user services, since setting the user requires elevated perms + Restart = "on-failure"; + WorkingDirectory = ''/home/starptr/src/set/app''; + ExecStart = ''/home/starptr/src/set/app/target/debug/set-bot''; + }; + }; + radish = { + Unit = { + Description = "radicle on login"; + }; + Install = { + WantedBy = [ "default.target" ]; + }; + Service = { + Type = "exec"; + Environment = ''"PATH=${lib.makeBinPath [ pkgs.radicle-node ]}:$PATH"''; + ExecStart = ''${pkgs.radicle-node}/bin/rad node start --foreground --verbose''; + PAMName = "login"; + }; + }; + }; +} diff --git a/venus/modules/home-manager/use-alacritty.nix b/venus/modules/home-manager/use-alacritty.nix new file mode 100644 index 0000000..5374829 --- /dev/null +++ b/venus/modules/home-manager/use-alacritty.nix @@ -0,0 +1,22 @@ +# Set alacritty config +{ config, pkgs, ... }: +{ + imports = [ ./ooss-maker.nix ]; + config = { + home.packages = [ pkgs.alacritty ]; + xdg.configFile = { + #"alacritty/alacritty.toml".source = config.lib.file.mkOutOfStoreSymlink "/Users/yuto/.nixpkgs/hot-files/alacritty.toml"; + "alacritty/alacritty.toml".source = config.venus.ooss-maker-for-this-system "alacritty.toml"; + }; + programs.alacritty = { + enable = false; # Use xdg.configFile and mkOutOfStoreSymlink instead + # TODO: clean up toml config + # The text is 2 sizes too big + # Keybinds are suspicious + # TODO: override src to control the pinned version (0.12.0) (5a72819) + # Ideally, pin the package since alacritty is unstable + # Then, use xdg to symlink to the yaml. Probably best to create a new homeManagerPartial for this. + settings = builtins.fromTOML (builtins.readFile ../legacy-yadm/alacritty/alacritty.toml); + }; + }; +} diff --git a/venus/modules/home-manager/use-direnv.nix b/venus/modules/home-manager/use-direnv.nix new file mode 100644 index 0000000..b0bd3a2 --- /dev/null +++ b/venus/modules/home-manager/use-direnv.nix @@ -0,0 +1,13 @@ +# Set direnv config +{ ... }: +{ + config = { + programs.direnv = { + enable = true; + # Fish integration is automatically enabled + nix-direnv = { + enable = true; + }; + }; + }; +} diff --git a/venus/modules/home-manager/use-fish.nix b/venus/modules/home-manager/use-fish.nix new file mode 100644 index 0000000..8967a4e --- /dev/null +++ b/venus/modules/home-manager/use-fish.nix @@ -0,0 +1,87 @@ +# Set personal fish shell configuration +{ + config, + pkgs, + lib, + osConfig, + ... +}: +{ + options = { + use-fish.enableHomebrewEscapeHatch = lib.mkOption { + default = false; + type = lib.types.bool; + description = '' + Enable a command for homebrew initialization in fish shell. + ''; + }; + use-fish.enableDarwinPathWorkaround = lib.mkOption { + default = false; + type = lib.types.bool; + description = '' + Enable a hacky workaround for the bugged fish shell path on Darwin. + HACK: See https://github.com/LnL7/nix-darwin/issues/122#issuecomment-1659465635 and https://github.com/LnL7/nix-darwin/issues/122#issuecomment-1666623924 + ''; + }; + }; + config = lib.mkMerge [ + { + programs.fish = { + enable = true; + functions = { + d = '' + # This function is defined in home-yuto.nix + if [ "$PWD" = "$HOME/Downloads" ] + ${pkgs.lsd}/bin/lsd -A --sort time $argv + else + ${pkgs.lsd}/bin/lsd -A $argv + end + ''; + da = '' + # This function is defined in home-yuto.nix + if [ "$PWD" = "$HOME/Downloads" ] + ${pkgs.lsd}/bin/lsd -Alr --sort time $argv + else + ${pkgs.lsd}/bin/lsd -Al $argv + end + ''; + }; + + plugins = [ + { + name = "tide"; + src = pkgs.fishPlugins.tide.src; + } + { + name = "done"; + src = pkgs.fishPlugins.done.src; + } + ]; + }; + } + (lib.mkIf config.use-fish.enableHomebrewEscapeHatch { + programs.fish.functions.legacy-brew-init = '' + # Initializes brew in fish, as was done in ~/.zprofile + # This function is defined in home-yuto.nix + /opt/homebrew/bin/brew shellenv | source + ''; + }) + (lib.mkIf config.use-fish.enableDarwinPathWorkaround { + programs.fish.loginShellInit = + let + # This naive quoting is good enough in this case. There shouldn't be any + # double quotes in the input string, and it needs to be double quoted in case + # it contains a space (which is unlikely!) + dquote = str: "\"" + str + "\""; + + makeBinPathList = map (path: path + "/bin"); + in + '' + fish_add_path --move --prepend --path ${ + lib.concatMapStringsSep " " dquote (makeBinPathList osConfig.environment.profiles) + } + set fish_user_paths $fish_user_paths + ''; + }) + ]; +} diff --git a/venus/modules/home-manager/use-halloy.nix b/venus/modules/home-manager/use-halloy.nix new file mode 100644 index 0000000..ae9835f --- /dev/null +++ b/venus/modules/home-manager/use-halloy.nix @@ -0,0 +1,11 @@ +# Set halloy config +{ pkgs, ... }: +{ + config = { + xdg = { + configFile."halloy/config.toml".source = ./../configs/halloy-config.toml; + }; + + home.packages = [ pkgs.halloy ]; + }; +} diff --git a/venus/modules/home-manager/use-jujutsu.nix b/venus/modules/home-manager/use-jujutsu.nix new file mode 100644 index 0000000..269d0fb --- /dev/null +++ b/venus/modules/home-manager/use-jujutsu.nix @@ -0,0 +1,21 @@ +# Set personal jujutsu configuration +{ + config, + pkgs, + lib, + osConfig, + ... +}: +{ + config = { + programs.jujutsu = { + enable = true; + settings = { + user = { + name = "Yuto Nishida"; # TODO: consolidate magic values + email = "yuto@berkeley.edu"; # TODO: consolidate magic values + }; + }; + }; + }; +} diff --git a/venus/modules/home-manager/use-mpv.nix b/venus/modules/home-manager/use-mpv.nix new file mode 100644 index 0000000..bd13721 --- /dev/null +++ b/venus/modules/home-manager/use-mpv.nix @@ -0,0 +1,80 @@ +# Set mpv config +{ config, pkgs, lib, ... }: +{ + imports = [ + ./venus-location.nix + ]; + options = { + venus.use-mpv.enableDarwinAppBundleWorkaround = lib.mkOption { + default = false; + type = lib.types.bool; + description = '' + Enable a workaround for the broken application bundle caused by the mpv-unwrapped wrapper. + See https://github.com/NixOS/nixpkgs/issues/366964 + ''; + }; + venus.use-mpv.enableHotfileConfig = lib.mkOption { + default = true; + type = lib.types.bool; + description = '' + Use OOSS to expose hot-file configuration for mpv. + ''; + }; + }; + config = let + mpv-scripts = [ + pkgs.mpvScripts.mpv-webm + ]; + in lib.mkMerge [ + { + programs.mpv = { + enable = true; + # Let's try using hot-files + #config = { + # vo = "gpu-next"; + # target-colorspace-hint = "yes"; + #}; + #bindings = { + # "CTRL+1" = "show-text target-peak"; + # "CTRL+2" = "apply-profile upscale-sdr-to-hdr"; + # "CTRL+SHIFT+2" = "apply-profile upscale-sdr-to-hdr restore"; + #}; + #profiles = { + # "upscale-sdr-to-hdr" = { + # profile-desc = "Upscale SDR to HDR"; + # profile-restore = "copy"; + # tone-mapping = "spline"; + # inverse-tone-mapping = "yes"; + # }; + #}; + package = lib.mkDefault (pkgs.mpv-unwrapped.wrapper { + mpv = pkgs.mpv-unwrapped.override { ffmpeg = pkgs.ffmpeg-full; }; + scripts = mpv-scripts; + }); + scriptOpts = { + webm = { + output_directory = "~/Downloads"; + output_template = "%T"; + }; + }; + }; + } + (lib.mkIf config.venus.use-mpv.enableDarwinAppBundleWorkaround { + programs.mpv.package = pkgs.mpv-unwrapped; + xdg.configFile = let + configs = { + "mpv/scripts/webm.lua".source = "${pkgs.mpvScripts.mpv-webm}/share/mpv/scripts/webm.lua"; + }; + in + (lib.throwIf + (builtins.length (builtins.attrNames configs) != builtins.length mpv-scripts) + # If I forget to update one of the lists causing the lengths to be different, I want to know. + "Darwin mpv scripts list is differently sized from the canonical list of mpv scripts" + configs); + }) + (lib.mkIf config.venus.use-mpv.enableHotfileConfig { + xdg.configFile."mpv/mpv.conf".source = config.venus.ooss-maker-for-this-system "mpv/mpv.conf"; + xdg.configFile."mpv/input.conf".source = config.venus.ooss-maker-for-this-system "mpv/input.conf"; + }) + ]; +} diff --git a/venus/modules/home-manager/use-nixpkgs-config.nix b/venus/modules/home-manager/use-nixpkgs-config.nix new file mode 100644 index 0000000..7e20c1c --- /dev/null +++ b/venus/modules/home-manager/use-nixpkgs-config.nix @@ -0,0 +1,11 @@ +# Use a sane nixpkgs/config.nix file (eg. allowUnfree) +{ ... }: +{ + config = { + xdg = { + enable = true; + # Configure commands like `nix-shell` (eg. `allowUnfree`) (i.e. "runtime" configuration) + configFile."nixpkgs/config.nix".source = ./../../app-configs/nixpkgs-config.nix; + }; + }; +} diff --git a/venus/modules/home-manager/use-resticprofile.nix b/venus/modules/home-manager/use-resticprofile.nix new file mode 100644 index 0000000..42f5ce1 --- /dev/null +++ b/venus/modules/home-manager/use-resticprofile.nix @@ -0,0 +1,84 @@ +# Set resticprofile options +{ + config, + pkgs, + lib, + osConfig, + ... +}: +{ + #options = { + # use-resticprofile.for-sodium = { + # default = false; + # type = lib.types.bool; + # description = '' + # Enable resticprofile configuration for Sodium. + # ''; + # }; + #}; + config = { + home.packages = [ + pkgs.resticprofile + ]; + + #xdg.configFile."resticprofile/profiles.toml".source = ../configs/restic-profile.toml; + xdg.configFile."resticprofile/profiles.json".text = builtins.toJSON (lib.fix (self: { + sources = { + downloads = "${config.home.homeDirectory}/Downloads"; + ryujinx-appdata = "${config.home.homeDirectory}/Library/Application Support/Ryujinx"; + aaaaxy-appdata = "${config.home.homeDirectory}/Library/Application Support/AAAAXY"; + blue3ds-checkpoint-saves = "/Volumes/Blue3DS/3ds/Checkpoint"; + blue3ds-sdcard = "/Volumes/Blue3DS"; + }; + repositories = { + main-restic-repo-via-s3 = "rclone:storj-baks:backup-repos/main-restic-backups"; + main-restic-repo-via-native = "rclone:storj-baks-native:backup-repos/main-restic-backups"; + }; + config-partials = { + base = { + exclude = [ "/**/.git" ]; + password-file = "password.txt"; + backup = { + verbose = true; + }; + }; + }; + config = { + version = "1"; + default = lib.recursiveUpdate self.config-partials.base { + repository = self.repositories.main-restic-repo-via-s3; + backup.tag = [ "sodium" "ryujinx" "blue3ds-checkpoint" ]; + backup.source = [ + #self.sources.downloads # TODO: maybe add a new profile that includes downlaods + self.sources.ryujinx-appdata + self.sources.aaaaxy-appdata + self.sources.blue3ds-checkpoint-saves + ]; + }; + default-use-native = lib.recursiveUpdate self.config.default { + repository = self.repositories.main-restic-repo-via-native; + }; + ryujinx = lib.recursiveUpdate self.config-partials.base { + repository = self.repositories.main-restic-repo-via-s3; + backup.tag = [ "sodium" "ryujinx" ]; + backup.source = [ + self.sources.ryujinx-appdata + ]; + }; + ryujinx-use-native = lib.recursiveUpdate self.config.ryujinx { + repository = self.repositories.main-restic-repo-via-native; + }; + blue3ds = lib.recursiveUpdate self.config-partials.base { + repository = self.repositories.main-restic-repo-via-s3; + backup.tag = [ "sodium" "blue3ds-checkpoint" "blue3ds" ]; + backup.source = [ + self.sources.blue3ds-sdcard + ]; + }; + blue3ds-use-native = lib.recursiveUpdate self.config.blue3ds { + repository = self.repositories.main-restic-repo-via-native; + }; + }; + })).config; + }; +} diff --git a/venus/modules/home-manager/use-tealdeer.nix b/venus/modules/home-manager/use-tealdeer.nix new file mode 100644 index 0000000..8d48349 --- /dev/null +++ b/venus/modules/home-manager/use-tealdeer.nix @@ -0,0 +1,14 @@ +# Set tealdeer config +{ ... }: +{ + config = { + programs.tealdeer = { + enable = true; + settings = { + display = { + compact = true; + }; + }; + }; + }; +} diff --git a/venus/modules/home-manager/use-yt-dlp.nix b/venus/modules/home-manager/use-yt-dlp.nix new file mode 100644 index 0000000..a4321bf --- /dev/null +++ b/venus/modules/home-manager/use-yt-dlp.nix @@ -0,0 +1,9 @@ +# Set yt-dlp config +{ ... }: +{ + config = { + programs.yt-dlp = { + enable = true; + }; + }; +} diff --git a/venus/modules/home-manager/venus-location.nix b/venus/modules/home-manager/venus-location.nix new file mode 100644 index 0000000..2712dba --- /dev/null +++ b/venus/modules/home-manager/venus-location.nix @@ -0,0 +1,38 @@ +{ config, lib, ... }: +{ + # This file contains the single-source-of-truth for the location of the venus repository. + options = { + venus-location.sodium = lib.mkOption { + readOnly = true; + default = "${config.home.homeDirectory}/src/everything/venus"; + type = lib.types.str; + description = '' + The location of the venus repository. + ''; + }; + #venus-location.tilderef2-starptr = lib.mkOption { + # readOnly = true; + # default = "${config.home.homeDirectory}/src/everything/venus"; + # type = lib.types.str; + # description = '' + # The location of the venus repository for the starptr profile on tilderef2. + # ''; + #}; + #venus-location.magnesium-hydroxide = lib.mkOption { + # readOnly = true; + # default = "${config.home.homeDirectory}/src/everything/venus"; + # type = lib.types.str; + # description = '' + # The location of the venus repository for the starptr profile on magnesium-hydroxide. + # ''; + #}; + #venus-location.hydrogen-sulfide = lib.mkOption { + # readOnly = true; + # default = "${config.home.homeDirectory}/src/everything/venus"; + # type = lib.types.str; + # description = '' + # The location of the venus repository for the starptr profile on hydrogen-sulfide. + # ''; + #}; + }; +} diff --git a/venus/modules/nixos-darwin/sodium.nix b/venus/modules/nixos-darwin/sodium.nix new file mode 100644 index 0000000..6d12fd0 --- /dev/null +++ b/venus/modules/nixos-darwin/sodium.nix @@ -0,0 +1,108 @@ +{ config, pkgs, ... }: + +# This file is the equivalent of /etc/nixos/configuration.nix on darwin +{ + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + environment.systemPackages = [ + pkgs.vim + pkgs.nix-info + ]; + + # Use a custom configuration.nix location. + # $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix + # environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; + + fonts.packages = [ + pkgs.noto-fonts-cjk-sans + pkgs.noto-fonts-cjk-serif + pkgs.nerd-fonts.iosevka-term + pkgs.nerd-fonts.inconsolata + pkgs.inconsolata + ]; + + # Auto upgrade nix package and the daemon service. + #services.nix-daemon.enable = true; + + services.yabai = { + enable = false; + }; + + security.pam.services.sudo_local.touchIdAuth = true; + + system.defaults.CustomUserPreferences = { + NSGlobalDomain.NSInitialToolTipDelay = 100; + NSGlobalDomain.NSToolbarTitleViewRolloverDelay = 0; + #NSGlobalDomain."com.apple.trackpad.scaling" = 5.134689; # Makes more sense to set in GUI # Values larger than 3 don't seem to make a difference + }; + + system.primaryUser = "yuto"; + system.defaults.".GlobalPreferences"."com.apple.mouse.scaling" = 2.0; + system.defaults.LaunchServices.LSQuarantine = true; + system.defaults.NSGlobalDomain.AppleInterfaceStyleSwitchesAutomatically = true; + system.defaults.NSGlobalDomain.AppleShowAllExtensions = true; + system.defaults.NSGlobalDomain.NSAutomaticCapitalizationEnabled = false; + system.defaults.NSGlobalDomain.NSAutomaticDashSubstitutionEnabled = false; + system.defaults.NSGlobalDomain.NSAutomaticPeriodSubstitutionEnabled = false; + system.defaults.NSGlobalDomain.NSAutomaticSpellingCorrectionEnabled = false; + system.defaults.NSGlobalDomain."com.apple.keyboard.fnState" = true; + system.defaults.NSGlobalDomain._HIHideMenuBar = false; + system.defaults.dock.autohide = true; + system.defaults.dock.autohide-time-modifier = 0.2; + system.defaults.finder = { + AppleShowAllExtensions = true; + FXDefaultSearchScope = "SCcf"; + FXPreferredViewStyle = "Nlsv"; + #ShowPathBar = true; + _FXShowPosixPathInTitle = true; + }; + + # nix.package = pkgs.nix; + nix = { + settings.experimental-features = [ + "nix-command" + "flakes" + ]; + settings.trusted-users = [ + "root" + "@admin" + "yuto" + ]; + + distributedBuilds = true; + buildMachines = [ + { + hostName = "x86_64.nix.yuto.sh"; + sshUser = "yuto"; + sshKey = "/Users/yuto/.ssh/id_rsa"; + system = "x86_64-linux"; + publicHostKey = "c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFDQVFERThiZ1AyQithb1BUWU81V002aGh1WTNQT2M3VWZSSFdmd29pVDJXYzg1SnhNUVhRYkgxRjBPeTNZdHhPUFlMSFlrUkVuYTRJMkI4U1NWVTNFeFloTDNISWtaUXcvSloxdFdnMk9ZTTZ4WnUyMTdWL2pYWXo0TWxhMEFkNUhJb3cxMlo3MnZSTkhCQ3VUVE9NSGNOeTRCQk94TWE5TFhDRTNZb2o3TWJSZmRTNkFXejNLV1VYYzUvVmd1Q0JpLzBsVDFLQXRKN21PK0txQ1JNb1c5NU51L0N1c0hCT0h1dy9TdzhDY2FRd1g5WFZBOEs1N25Hcm9KbkJuTjBBalk3cHA3QXBCVjFBSzZkMk40UTBVY2lxSUdXOXM0NVM0cXk0Qk5kZW9UZXljUkZ6cDRmM3cwQXFQN0JHZzY4d0U1SDJZV29TQ2F5eDkwd2dBWW9oTnFrRGg2OUI0Z05aUmZUZ2JMUmZkNm1EZjQzYVNZWFo2bm0rY1dJVUg3Yk1iZElhYTA4NWFWNlc5TE9wcUMxU2RnVmt5MUJqVDRRbitMMzJQdlF4UEdtSU1UYVFZR2xqaW05WGJ1eG9WMjlRVEZweHNvZVBEV2lhT1ZUTVdMWWRYZTFEbkRhdUhPbnhLMERQMkRNY1pFUEZpQk1oWFVZSXZRbXFabUxGMWpHU3lLdGNTeGtkZnhtR1BwendXcUNBaElIamVhazk4U25WVXpNVlI4V05KQnRBNmhIUjBwWWxFdU93YkgrTTcyWnVsOWhnRWdUeGI1RVVmMHZxcVBnb0lPU2plSUZaQ2JZN0xJMEZmcFZGZkFSdUw5S0VDb0hzSTFCQW9CYXlJQ3ZEb2NURWtIVGt6SFU0QWFRN1NXQm5YN285b3AxZUdqS1ZaVlVlQmozYXVrMjhXUlE9PSByb290QG5peC1idWlsZGVyLXg4Ngo="; + protocol = "ssh-ng"; + } + ]; + # This automatically adds itself (aarch64-linux) to available buildMachines; no need for an entry above + linux-builder = { + enable = true; + maxJobs = 4; + }; + }; + + # Create /etc/zshrc that loads the nix-darwin environment. + programs.zsh.enable = true; # default shell on catalina + programs.fish.enable = true; + + # For nix-darwin + nixpkgs.hostPlatform = "aarch64-darwin"; + nixpkgs.config = import ../../app-configs/nixpkgs-config.nix; + + # User info + users.users."yuto" = { + name = "yuto"; + home = "/Users/yuto"; + shell = pkgs.fish; + }; + + # Used for backwards compatibility, please read the changelog before changing. + # $ darwin-rebuild changelog + system.stateVersion = 4; +} -- 2.51.2