diff --git a/.envrc b/.envrc index d437ea0f..9ec28702 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1,3 @@ -use flake -export FLAKE=$PWD +# use flake + + diff --git a/.github/workflows/flake-update.yaml b/.github/workflows/flake-update.yaml index 0a620c1c..69471232 100644 --- a/.github/workflows/flake-update.yaml +++ b/.github/workflows/flake-update.yaml @@ -14,4 +14,4 @@ jobs: env: GH_TOKEN: ${{ secrets.PAT }} run: - nix develop . -c gh-flake-update + nix run .#gh-flake-update diff --git a/.github/workflows/nix-fmt.yaml b/.github/workflows/nix-fmt.yaml index 1e23c833..4be4524c 100644 --- a/.github/workflows/nix-fmt.yaml +++ b/.github/workflows/nix-fmt.yaml @@ -16,4 +16,4 @@ jobs: with: name: vix authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - - run: nix build .#checks.x86_64-linux.formatted + - run: nix fmt -- --ci diff --git a/README.md b/README.md index 903b3dd9..8da4e189 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ nix develop .#nixos -c vic-sops-rotate ## Hosts -Defined at [`/hosts`]([tree/main/hosts](https://github.com/vic/vix/tree/main/hosts) directory. +Defined at [`/modules/flake/osConfigurations.nix`](https://github.com/vic/vix/tree/main/modules/flake/osConfigurations.nix). [![Workflow](https://github.com/vic/vix/actions/workflows/build-systems.yaml/badge.svg)](https://github.com/vic/vix/actions/workflows/build-systems.yaml) diff --git a/checks/formatted.nix b/checks/formatted.nix deleted file mode 100644 index f9a156c5..00000000 --- a/checks/formatted.nix +++ /dev/null @@ -1 +0,0 @@ -{ pkgs, inputs, ... }: (inputs.self.lib.treefmt pkgs).config.build.check inputs.self diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..40b48eee --- /dev/null +++ b/default.nix @@ -0,0 +1 @@ +inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules) diff --git a/devshell.toml b/devshell.toml deleted file mode 100644 index 9cd34418..00000000 --- a/devshell.toml +++ /dev/null @@ -1 +0,0 @@ -imports = ["./devshells/nixos.toml"] diff --git a/devshells/lean4.toml b/devshells/lean4.toml deleted file mode 100644 index 41307dce..00000000 --- a/devshells/lean4.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[commands]] -package = "lean4" diff --git a/devshells/nixos.toml b/devshells/nixos.toml deleted file mode 100644 index cff3db71..00000000 --- a/devshells/nixos.toml +++ /dev/null @@ -1,46 +0,0 @@ -imports = [ "./nixos/gh-flake-update.nix" ] - -[devshell] -packages = ["sops", "age", "nh"] - -[[commands]] -name = "vic-sops" -help = "Sops for vic" -command = """ -if test -z "${1:-}"; then - sops --config ./modules/home/vic/sops.yaml edit ./modules/home/vic/secrets.yaml -else - sops --config ./modules/home/vic/sops.yaml "${@}" -fi -""" - -[[commands]] -name = "vic-sops-rotate" -help = "Rotate sops secrets" -command = """ -ls -1 modules/home/vic/secrets{.yaml,/*} | xargs -n 1 sops rotate -i -""" - -[[commands]] -name = "logs-home-manager-vic" -help = "See logs for home-manager-vic activation" -command = """ -journalctl -u home-manager-vic.service "${@}" -""" - -[[commands]] -name = "os-rebuild" -help = "OS rebuild" -command = """ -sudo nix --extra-experimental-features "flakes nix-command" run .#os-rebuild -- "${@}" -""" - -[[commands]] -name = "clean" -help = "nh clean all" -command = "nh clean all" - -[[commands]] -name = "fmt" -help = "nix fmt" -command = "nix fmt" diff --git a/devshells/nixos/gh-flake-update.nix b/devshells/nixos/gh-flake-update.nix deleted file mode 100644 index b89abb56..00000000 --- a/devshells/nixos/gh-flake-update.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ pkgs, ... }: -let - - app = pkgs.writeShellApplication { - name = "gh-flake-update"; - text = '' - export GIT_AUTHOR_NAME="Victor Borja" - export GIT_AUTHOR_EMAIL="vborja@apache.org" - export GIT_COMMITTER_NAME="Victor Borja" - export GIT_COMMITTER_EMAIL="vborja@apache.org" - - branch="flake-update-$(date '+%F')" - - git checkout -b "$branch" - title="Updating flake inputs $(date)" - - ( - echo "$title" - echo -ne "\n\n\n\n" - echo '```shell' - echo '$ nix flake update' - nix flake update --accept-flake-config 2>&1 - echo '```' - echo -ne "\n\n\n\n" - echo 'request-checks: true' - ) | tee /tmp/commit-message.md - - changes="$(git status -s | grep -o 'M ' | wc -l)" - - if test "$changes" -eq 0; then - echo "No changes" - exit 0 - fi - - git status -s | grep 'M ' | cut -d 'M' -f 2 | xargs git add - git commit -F /tmp/commit-message.md --no-signoff --no-verify --trailer "request-checks:true" --no-edit --cleanup=verbatim - git push origin "$branch:$branch" --force - - gh pr create --base main --label flake-update --reviewer vic --assignee vic --body-file /tmp/commit-message.md --title "$title" --head "$branch" | tee /tmp/pr-url - ''; - }; - -in -{ - devshell.packages = [ app ]; -} diff --git a/devshells/nixos/leader.nix b/devshells/nixos/leader.nix deleted file mode 100644 index 95cef9c2..00000000 --- a/devshells/nixos/leader.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - perSystem, - ... -}: -{ - commands = [ - { - package = perSystem.self.leader; - help = "Leader key"; - } - ]; -} diff --git a/devshells/scala3.nix b/devshells/scala3.nix deleted file mode 100644 index de06682d..00000000 --- a/devshells/scala3.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, perSystem, ... }: -let - jre = pkgs.graalvm-ce; - - mill = pkgs.mill.override { inherit jre; }; - scala-cli = pkgs.scala-cli.override { inherit jre; }; - sbt = pkgs.sbt.override { inherit jre; }; - metals = pkgs.metals.override { inherit jre; }; -in -perSystem.devshell.mkShell { - - commands = [ - { package = mill; } - { package = scala-cli; } - { package = sbt; } - ]; - - devshell.packages = [ metals ]; - -} diff --git a/devshells/upterm.nix b/devshells/upterm.nix deleted file mode 100644 index d8d77ed3..00000000 --- a/devshells/upterm.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ pkgs, perSystem, ... }: -let - - ssh_config_text = '' - Host * - ForwardAgent yes - ForwardX11 yes - ForwardX11Trusted yes - StrictHostKeyChecking no - CheckHostIP no - TCPKeepAlive yes - ServerAliveInterval 30 - ServerAliveCountMax 180 - VerifyHostKeyDNS yes - UpdateHostKeys yes - ''; - - runtimeInputs = [ - pkgs.upterm - pkgs.screen - pkgs.openssh - pkgs.bash - pkgs.coreutils - pkgs.findutils - pkgs.gawk - ] ++ (pkgs.lib.optionals (pkgs.config.allowUnfree) [ pkgs.vscode ]); - - gh-action = pkgs.writeShellApplication { - name = "gh-action"; - text = '' - mkdir -p ~/.ssh - echo "${ssh_config_text}" > ~/.ssh/config - export PATH="${pkgs.lib.makeBinPath runtimeInputs}:$PATH" - ${pkgs.openssh}/bin/ssh-agent ${pkgs.bash}/bin/bash ${./upterm/gh-action.bash} - ''; - }; - -in -perSystem.devshell.mkShell { - - devshell.packages = [ - gh-action - perSystem.self.vic-sops-get - ]; - -} diff --git a/devshells/upterm/gh-action.bash b/devshells/upterm/gh-action.bash deleted file mode 100644 index f503c461..00000000 --- a/devshells/upterm/gh-action.bash +++ /dev/null @@ -1,20 +0,0 @@ -mkdir -p ~/.ssh ~/.upterm -touch ~/.upterm/out.log ~/.upterm/upterm.log -ssh-keygen -q -t rsa -N '' -C "$GITHUB_TRIGGERING_ACTOR@$GITHUB_REPOSITORY:$GITHUB_RUN_ID" -f ~/.ssh/id_rsa -ssh-keygen -q -t ed25519 -N '' -C "$GITHUB_TRIGGERING_ACTOR@$GITHUB_REPOSITORY:$GITHUB_RUN_ID" -f ~/.ssh/id_ed25519 -ssh-add -echo Adding uptermd.upterm.dev to known_hosts -ssh-keyscan uptermd.upterm.dev 2> /dev/null >> ~/.ssh/known_upterm -cat ~/.ssh/known_upterm >> ~/.ssh/known_hosts -grep 'uptermd.upterm.dev ' ~/.ssh/known_upterm | gawk -e '{ print "@cert-authority * " $2 " " $3 }' >> ~/.ssh/known_hosts -cat ~/.ssh/known_hosts -echo Starting in background -screen -A -U -O -T xterm-256color -dmS upterm bash -c "upterm host --accept --github-user $GITHUB_REPOSITORY_OWNER 2>&1 | tee -a ~/.upterm/out.log" -echo Waiting for upterm to start -tail -f ~/.upterm/out.log | head -n 1 -while ! grep 'SSH Session:' ~/.upterm/out.log; do sleep 1 ; done -echo Waiting for join -while ! grep 'Client joined' ~/.upterm/upterm.log >/dev/null; do sleep 10; done -echo Joined -while ! grep 'Client left' ~/.upterm/upterm.log >/dev/null; do sleep 10; done -echo Left \ No newline at end of file diff --git a/devshells/zig.toml b/devshells/zig.toml deleted file mode 100644 index e69de29b..00000000 diff --git a/flake.lock b/flake.lock index 9bef7d0a..7de0e4e8 100644 --- a/flake.lock +++ b/flake.lock @@ -4,9 +4,7 @@ "inputs": { "bats-assert": "bats-assert", "bats-support": "bats-support", - "blueprint": [ - "blueprint" - ], + "blueprint": "blueprint", "nixpkgs": [ "nixpkgs" ], @@ -28,22 +26,6 @@ "type": "github" } }, - "advisory-db": { - "flake": false, - "locked": { - "lastModified": 1739520703, - "narHash": "sha256-UqR1f9gThWNBCBobWet7T46vTSxkB6dVAdeqNBoF8mc=", - "owner": "rustsec", - "repo": "advisory-db", - "rev": "ddccfe8aced779f7b54d27bbe7e122ecb1dda33a", - "type": "github" - }, - "original": { - "owner": "rustsec", - "repo": "advisory-db", - "type": "github" - } - }, "bats-assert": { "flake": false, "locked": { @@ -79,18 +61,17 @@ "blueprint": { "inputs": { "nixpkgs": [ + "SPC", "nixpkgs" ], - "systems": [ - "systems" - ] + "systems": "systems" }, "locked": { - "lastModified": 1744632722, - "narHash": "sha256-0chvqUV1Kzf8BMQ7MsH3CeicJEb2HeCpwliS77FGyfc=", + "lastModified": 1741365449, + "narHash": "sha256-4bmMbrmc6p6QxmF0Frc6SoZUfaodWcxjqEgw5mGmTAQ=", "owner": "numtide", "repo": "blueprint", - "rev": "49bbd5d072b577072f4a1d07d4b0621ecce768af", + "rev": "09a2c2c7bb08e5baeb88319e042ccfe6acaa9664", "type": "github" }, "original": { @@ -99,54 +80,6 @@ "type": "github" } }, - "cli-leader": { - "flake": false, - "locked": { - "lastModified": 1535730734, - "narHash": "sha256-t20pzwGUZnMmwmYqAw4im45q7/bdKBTsFTvj30o4Kr8=", - "owner": "dhamidi", - "repo": "leader", - "rev": "14373a25d8693681e7917f230de555977a12d2ba", - "type": "github" - }, - "original": { - "owner": "dhamidi", - "ref": "14373a2", - "repo": "leader", - "type": "github" - } - }, - "crane": { - "locked": { - "lastModified": 1745454774, - "narHash": "sha256-oLvmxOnsEKGtwczxp/CwhrfmQUG2ym24OMWowcoRhH8=", - "owner": "ipetkov", - "repo": "crane", - "rev": "efd36682371678e2b6da3f108fdb5c613b3ec598", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "devicon-lookup": { - "flake": false, - "locked": { - "lastModified": 1708787643, - "narHash": "sha256-eHxUSrN/wzitT95Sdt0DTNv4UuvwRn4gHmIzgK6ELZk=", - "owner": "coreyja", - "repo": "devicon-lookup", - "rev": "404c9cbd477b3dee0e757aa93a66d5e59b85e596", - "type": "github" - }, - "original": { - "owner": "coreyja", - "repo": "devicon-lookup", - "type": "github" - } - }, "devshell": { "inputs": { "nixpkgs": [ @@ -167,35 +100,14 @@ "type": "github" } }, - "devshell_2": { - "inputs": { - "nixpkgs": [ - "nix-versions", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1741473158, - "narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=", - "owner": "numtide", - "repo": "devshell", - "rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, "doom-emacs": { "flake": false, "locked": { - "lastModified": 1745483329, - "narHash": "sha256-3jYdqfEeQ0zoJ8svX5nzh8Bjq1HClJ9AUcpNLE3U09I=", + "lastModified": 1746509951, + "narHash": "sha256-bfoTBSsy/1S7+6uR3ig5EA8AAQ1RhmDLNF/m2RXU2sM=", "owner": "doomemacs", "repo": "doomemacs", - "rev": "303dd28db808b42a2397c0f4b9fdd71e606026ff", + "rev": "b70d137f1a224cdbac3994d249fb5e8c7fcc203a", "type": "github" }, "original": { @@ -204,46 +116,7 @@ "type": "github" } }, - "dream2nix": { - "inputs": { - "nixpkgs": [ - "nci", - "nixpkgs" - ], - "purescript-overlay": "purescript-overlay", - "pyproject-nix": "pyproject-nix" - }, - "locked": { - "lastModified": 1735160684, - "narHash": "sha256-n5CwhmqKxifuD4Sq4WuRP/h5LO6f23cGnSAuJemnd/4=", - "owner": "nix-community", - "repo": "dream2nix", - "rev": "8ce6284ff58208ed8961681276f82c2f8f978ef4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "dream2nix", - "type": "github" - } - }, "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { "flake": false, "locked": { "lastModified": 1733328505, @@ -259,22 +132,6 @@ "type": "github" } }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -295,16 +152,14 @@ }, "flake-utils": { "inputs": { - "systems": [ - "systems" - ] + "systems": "systems_3" }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", "type": "github" }, "original": { @@ -313,61 +168,38 @@ "type": "github" } }, - "gitignore": { - "flake": false, - "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" - } - }, - "gitignore_2": { + "home-manager": { "inputs": { "nixpkgs": [ - "radicle", - "pre-commit-hooks", "nixpkgs" ] }, "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "lastModified": 1746413188, + "narHash": "sha256-i6BoiQP0PasExESQHszC0reQHfO6D4aI2GzOwZMOI20=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "8a318641ac13d3bc0a53651feaee9560f9b2d89a", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", + "owner": "nix-community", + "repo": "home-manager", "type": "github" } }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, + "import-tree": { "locked": { - "lastModified": 1745555634, - "narHash": "sha256-lhVyVn1utb2UVTbyKJ6mfKB7wLTjrj14OlebvO0WU2s=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "98f4fef7fd7b4a77245db12e33616023162bc6d9", + "lastModified": 1745565707, + "narHash": "sha256-ccFeWWQ9RLgCd1k+xwV/ASUkJ7AGTTaGDhlRWZgytxY=", + "owner": "vic", + "repo": "import-tree", + "rev": "ed504db425c363b13f13d5ca52f1a2600c4a7703", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "home-manager", + "owner": "vic", + "repo": "import-tree", "type": "github" } }, @@ -386,22 +218,6 @@ "type": "indirect" } }, - "jj-fzf": { - "flake": false, - "locked": { - "lastModified": 1738203280, - "narHash": "sha256-1ND9pMzLaW+iIJYFDoseUixK522x/1N2ryAySnYOjGs=", - "owner": "tim-janik", - "repo": "jj-fzf", - "rev": "501a936d4f5843b0a3b4df37caec529fbe199c2b", - "type": "github" - }, - "original": { - "owner": "tim-janik", - "repo": "jj-fzf", - "type": "github" - } - }, "jjui": { "inputs": { "flake-parts": [ @@ -415,11 +231,11 @@ ] }, "locked": { - "lastModified": 1745351251, - "narHash": "sha256-2M69r3r4VeESymiJzLr2tfKBsmTcAZJsCLEYQkRKoMw=", + "lastModified": 1746474255, + "narHash": "sha256-flK5Bq3O/GiRDH1hJM6eoBQMqSTQ0lRMBO1f4xAM2fU=", "owner": "idursun", "repo": "jjui", - "rev": "24872197db930a780f91a77a0ea8db660f0e03fe", + "rev": "41cafa297151786d8da7e9e8e1ca13555e1889b8", "type": "github" }, "original": { @@ -428,72 +244,6 @@ "type": "github" } }, - "lazyjj": { - "flake": false, - "locked": { - "lastModified": 1745255220, - "narHash": "sha256-18qtv5Pe4Fwhj5vIJDeYq7p597HX4uT8glLqw2VVmCA=", - "owner": "Cretezy", - "repo": "lazyjj", - "rev": "d729aad58caefd48f754a81bfb32e8a32a2fba9f", - "type": "github" - }, - "original": { - "owner": "Cretezy", - "repo": "lazyjj", - "type": "github" - } - }, - "mk-naked-shell": { - "flake": false, - "locked": { - "lastModified": 1681286841, - "narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=", - "owner": "yusdacra", - "repo": "mk-naked-shell", - "rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd", - "type": "github" - }, - "original": { - "owner": "yusdacra", - "repo": "mk-naked-shell", - "type": "github" - } - }, - "nci": { - "inputs": { - "crane": [ - "crane" - ], - "dream2nix": "dream2nix", - "mk-naked-shell": "mk-naked-shell", - "nixpkgs": [ - "nixpkgs" - ], - "parts": [ - "flake-parts" - ], - "rust-overlay": [ - "rust-overlay" - ], - "treefmt": [ - "treefmt-nix" - ] - }, - "locked": { - "lastModified": 1745475473, - "narHash": "sha256-agOKeQ5/wwJaMA3akk+X5NBlazK/KYf+4qmsQBmEWsA=", - "owner": "yusdacra", - "repo": "nix-cargo-integration", - "rev": "36f8235765940ea5739a5f1030c1381082f514c8", - "type": "github" - }, - "original": { - "owner": "yusdacra", - "repo": "nix-cargo-integration", - "type": "github" - } - }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -501,11 +251,11 @@ ] }, "locked": { - "lastModified": 1744478979, - "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", + "lastModified": 1746254942, + "narHash": "sha256-Y062AuRx6l+TJNX8wxZcT59SSLsqD9EedAY0mqgTtQE=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "rev": "760a11c87009155afa0140d55c40e7c336d62d7a", "type": "github" }, "original": { @@ -521,11 +271,11 @@ ] }, "locked": { - "lastModified": 1745120797, - "narHash": "sha256-owQ0VQ+7cSanTVPxaZMWEzI22Q4bGnuvhVjLAJBNQ3E=", + "lastModified": 1746330942, + "narHash": "sha256-ShizFaJCAST23tSrHHtFFGF0fwd72AG+KhPZFFQX/0o=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "69716041f881a2af935021c1182ed5b0cc04d40e", + "rev": "137fd2bd726fff343874f85601b51769b48685cc", "type": "github" }, "original": { @@ -534,111 +284,19 @@ "type": "github" } }, - "nix-inspect": { - "inputs": { - "nci": [ - "nci" - ], - "nixpkgs": [ - "nixpkgs" - ], - "parts": [ - "flake-parts" - ] - }, - "locked": { - "lastModified": 1733357226, - "narHash": "sha256-ArwdTtlIje7yOTblkZs4aQ1+HBtEwJKkfKOiA9tY8nA=", - "owner": "bluskript", - "repo": "nix-inspect", - "rev": "2938c8e94acca6a7f1569f478cac6ddc4877558e", - "type": "github" - }, - "original": { - "owner": "bluskript", - "repo": "nix-inspect", - "type": "github" - } - }, - "nix-versions": { - "inputs": { - "devshell": "devshell_2", - "flake-parts": [ - "flake-parts" - ], - "nixpkgs": [ - "nixpkgs" - ], - "systems": [ - "systems" - ], - "treefmt-nix": [ - "treefmt-nix" - ] - }, - "locked": { - "lastModified": 1744513513, - "narHash": "sha256-ukDfyA5lPwKr6WO0Z2fqN4TsRkAejBAtR4arFYnyASY=", - "owner": "vic", - "repo": "nix-versions", - "rev": "ef2fadc629f9d8a3ae22e435d81833c86b382d9f", - "type": "github" - }, - "original": { - "owner": "vic", - "repo": "nix-versions", - "type": "github" - } - }, - "nixlib": { - "locked": { - "lastModified": 1736643958, - "narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixos-generators": { - "inputs": { - "nixlib": "nixlib", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1742568034, - "narHash": "sha256-QaMEhcnscfF2MqB7flZr+sLJMMYZPnvqO4NYf9B4G38=", - "owner": "nix-community", - "repo": "nixos-generators", - "rev": "42ee229088490e3777ed7d1162cb9e9d8c3dbb11", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixos-generators", - "type": "github" - } - }, "nixos-wsl": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1744290088, - "narHash": "sha256-/X9XVEl0EiyisNbF5srrxXRSVoRqdwExuqyspYqqEjQ=", + "lastModified": 1746453552, + "narHash": "sha256-r66UGha+7KVHkI7ksrcMjnw/mm9Sg4l5bQlylxHwdGU=", "owner": "nix-community", "repo": "nixos-wsl", - "rev": "60b4904a1390ac4c89e93d95f6ed928975e525ed", + "rev": "be618645aa0adf461f778500172b6896d5ab2d01", "type": "github" }, "original": { @@ -649,11 +307,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1745377448, - "narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=", + "lastModified": 1746397377, + "narHash": "sha256-5oLdRa3vWSRbuqPIFFmQBGGUqaYZBxX+GGtN9f/n4lU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c", + "rev": "ed30f8aba41605e3ab46421e3dcb4510ec560ff8", "type": "github" }, "original": { @@ -678,78 +336,6 @@ "type": "github" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1740142985, - "narHash": "sha256-fCPt2PVnQgiHXGlTRmU5/gFdG/+JT3ycpt+GxY1Vp+s=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1d1ce35bb6052a23f5692cd89b7cc49acdcb8d0e", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1740142985, - "narHash": "sha256-fCPt2PVnQgiHXGlTRmU5/gFdG/+JT3ycpt+GxY1Vp+s=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1d1ce35bb6052a23f5692cd89b7cc49acdcb8d0e", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nox": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1743876182, - "narHash": "sha256-qfiVewr5huupheLqStX60JSbjBEm9/PDncLQXE0dsXo=", - "owner": "madsbv", - "repo": "nix-options-search", - "rev": "f52dc6986161570a2ffffdf337c88b503e9a58fb", - "type": "github" - }, - "original": { - "owner": "madsbv", - "repo": "nix-options-search", - "type": "github" - } - }, "ntv": { "inputs": { "devshell": [ @@ -781,200 +367,78 @@ "type": "github" } }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat_3", - "gitignore": "gitignore_2", - "nixpkgs": [ - "radicle", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "purescript-overlay": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": [ - "nci", - "dream2nix", - "nixpkgs" - ], - "slimlock": "slimlock" - }, - "locked": { - "lastModified": 1728546539, - "narHash": "sha256-Sws7w0tlnjD+Bjck1nv29NjC5DbL6nH5auL9Ex9Iz2A=", - "owner": "thomashoneyman", - "repo": "purescript-overlay", - "rev": "4ad4c15d07bd899d7346b331f377606631eb0ee4", - "type": "github" - }, - "original": { - "owner": "thomashoneyman", - "repo": "purescript-overlay", - "type": "github" - } - }, - "pyproject-nix": { - "flake": false, - "locked": { - "lastModified": 1702448246, - "narHash": "sha256-hFg5s/hoJFv7tDpiGvEvXP0UfFvFEDgTdyHIjDVHu1I=", - "owner": "davhau", - "repo": "pyproject.nix", - "rev": "5a06a2697b228c04dd2f35659b4b659ca74f7aeb", - "type": "github" - }, - "original": { - "owner": "davhau", - "ref": "dream2nix", - "repo": "pyproject.nix", - "type": "github" - } - }, - "radicle": { - "inputs": { - "advisory-db": "advisory-db", - "crane": [ - "crane" - ], - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable", - "nixpkgs-unstable": "nixpkgs-unstable", - "pre-commit-hooks": "pre-commit-hooks", - "rust-overlay": [ - "rust-overlay" - ] - }, - "locked": { - "lastModified": 1745506298, - "narHash": "sha256-UTrZih6C0Pbm+V22gWJ+FtwI4D2Mp6T+1t/XzKz2dhU=", - "ref": "refs/heads/master", - "rev": "f13afe491d169004159a033c4ad7548a7ba76271", - "revCount": 2212, - "type": "git", - "url": "https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git" - }, - "original": { - "type": "git", - "url": "https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git" - } - }, "root": { "inputs": { "SPC": "SPC", - "blueprint": "blueprint", - "cli-leader": "cli-leader", - "crane": "crane", - "devicon-lookup": "devicon-lookup", "devshell": "devshell", "doom-emacs": "doom-emacs", "flake-parts": "flake-parts", - "flake-utils": "flake-utils", "home-manager": "home-manager", - "jj-fzf": "jj-fzf", + "import-tree": "import-tree", "jjui": "jjui", - "lazyjj": "lazyjj", - "nci": "nci", "nix-darwin": "nix-darwin", "nix-index-database": "nix-index-database", - "nix-inspect": "nix-inspect", - "nix-versions": "nix-versions", - "nixos-generators": "nixos-generators", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", - "nox": "nox", "ntv": "ntv", - "radicle": "radicle", - "rust-overlay": "rust-overlay", "sops-nix": "sops-nix", - "systems": "systems", + "systems": "systems_2", "treefmt-nix": "treefmt-nix", - "use_devshell_toml": "use_devshell_toml", "versioned": "versioned", "vscode-server": "vscode-server" } }, - "rust-overlay": { + "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1745548521, - "narHash": "sha256-xyliq8oS5OnzXjHRGr92RtmrtYI/dflf2gSEo0wMFjc=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "eb0afb4ac0720d55c29e88eb29432103d73ae11d", + "lastModified": 1746485181, + "narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "e93ee1d900ad264d65e9701a5c6f895683433386", "type": "github" }, "original": { - "owner": "oxalica", - "repo": "rust-overlay", + "owner": "Mic92", + "repo": "sops-nix", "type": "github" } }, - "slimlock": { - "inputs": { - "nixpkgs": [ - "nci", - "dream2nix", - "purescript-overlay", - "nixpkgs" - ] - }, + "systems": { "locked": { - "lastModified": 1688756706, - "narHash": "sha256-xzkkMv3neJJJ89zo3o2ojp7nFeaZc2G0fYwNXNJRFlo=", - "owner": "thomashoneyman", - "repo": "slimlock", - "rev": "cf72723f59e2340d24881fd7bf61cb113b4c407c", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "thomashoneyman", - "repo": "slimlock", + "owner": "nix-systems", + "repo": "default", "type": "github" } }, - "sops-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, + "systems_2": { "locked": { - "lastModified": 1745310711, - "narHash": "sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "5e3e92b16d6fdf9923425a8d4df7496b2434f39c", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "Mic92", - "repo": "sops-nix", + "owner": "nix-systems", + "repo": "default", "type": "github" } }, - "systems": { + "systems_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -996,11 +460,11 @@ ] }, "locked": { - "lastModified": 1744961264, - "narHash": "sha256-aRmUh0AMwcbdjJHnytg1e5h5ECcaWtIFQa6d9gI85AI=", + "lastModified": 1746216483, + "narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "8d404a69efe76146368885110f29a2ca3700bee6", + "rev": "29ec5026372e0dec56f890e50dbe4f45930320fd", "type": "github" }, "original": { @@ -1009,29 +473,6 @@ "type": "github" } }, - "use_devshell_toml": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "treefmt-nix": [ - "treefmt-nix" - ] - }, - "locked": { - "lastModified": 1741354009, - "narHash": "sha256-+zXgbNiN9Cwnd/21vY7Wo31/gkyKUbaoXHIx65KY79o=", - "owner": "vic", - "repo": "use_devshell_toml", - "rev": "63f65adffe7d94a237552451bd70b10372492dab", - "type": "github" - }, - "original": { - "owner": "vic", - "repo": "use_devshell_toml", - "type": "github" - } - }, "versioned": { "inputs": { "input-leap": "input-leap", @@ -1043,7 +484,7 @@ ] }, "locked": { - "lastModified": 312768000, + "lastModified": 312789600, "narHash": "sha256-lAhV+c203eZDOZXAyBsKuDk6mCgGQhHkcfM9PJJ0mzE=", "type": "tarball", "url": "https://nix-versions.alwaysdata.net/flake.zip/input-leap" @@ -1055,9 +496,7 @@ }, "vscode-server": { "inputs": { - "flake-utils": [ - "flake-utils" - ], + "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" ] diff --git a/flake.nix b/flake.nix index 7448a86d..8c3e3b23 100644 --- a/flake.nix +++ b/flake.nix @@ -1,132 +1,55 @@ { description = "Vic's Nix Environment"; + outputs = inputs: import ./. inputs; + nixConfig = { allow-import-from-derivation = true; - extra-trusted-public-keys = [ "vix.cachix.org-1:hP/Lpdsi1dB3AxK9o6coWh+xHzvAc4ztdDYuG7lC6dI=" ]; extra-substituters = [ "https://vix.cachix.org" ]; }; - inputs = { - nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable"; - - systems.url = "github:nix-systems/default"; - - # not used here but followed by other deps to get a flat dep tree - flake-utils.url = "github:numtide/flake-utils"; - flake-utils.inputs.systems.follows = "systems"; - - blueprint.url = "github:numtide/blueprint"; - blueprint.inputs.nixpkgs.follows = "nixpkgs"; - blueprint.inputs.systems.follows = "systems"; - - nix-darwin.url = "github:LnL7/nix-darwin"; - nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; - - nixos-wsl.url = "github:nix-community/nixos-wsl"; - nixos-wsl.inputs.nixpkgs.follows = "nixpkgs"; - - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - - nixos-generators.url = "github:nix-community/nixos-generators"; - nixos-generators.inputs.nixpkgs.follows = "nixpkgs"; - - vscode-server.url = "github:nix-community/nixos-vscode-server"; - vscode-server.inputs.nixpkgs.follows = "nixpkgs"; - vscode-server.inputs.flake-utils.follows = "flake-utils"; - - cli-leader.url = "github:dhamidi/leader?ref=14373a2"; - cli-leader.flake = false; - nox.url = "github:madsbv/nix-options-search"; - nox.inputs.nixpkgs.follows = "nixpkgs"; - nox.inputs.flake-utils.follows = "flake-utils"; + inputs = { - devshell.url = "github:numtide/devshell"; devshell.inputs.nixpkgs.follows = "nixpkgs"; - - sops-nix.url = "github:Mic92/sops-nix"; - sops-nix.inputs.nixpkgs.follows = "nixpkgs"; - - nix-index-database.url = "github:nix-community/nix-index-database"; - nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; - - treefmt-nix.url = "github:numtide/treefmt-nix"; - treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; - - use_devshell_toml.url = "github:vic/use_devshell_toml"; - use_devshell_toml.inputs.nixpkgs.follows = "nixpkgs"; - use_devshell_toml.inputs.treefmt-nix.follows = "treefmt-nix"; - - SPC.url = "github:vic/SPC"; - SPC.inputs.nixpkgs.follows = "nixpkgs"; - SPC.inputs.blueprint.follows = "blueprint"; - SPC.inputs.treefmt-nix.follows = "treefmt-nix"; - - doom-emacs.url = "github:doomemacs/doomemacs"; + devshell.url = "github:numtide/devshell"; doom-emacs.flake = false; - + doom-emacs.url = "github:doomemacs/doomemacs"; flake-parts.url = "github:hercules-ci/flake-parts"; - - nix-versions.url = "github:vic/nix-versions"; - nix-versions.inputs.nixpkgs.follows = "nixpkgs"; - nix-versions.inputs.flake-parts.follows = "flake-parts"; - nix-versions.inputs.systems.follows = "systems"; - nix-versions.inputs.treefmt-nix.follows = "treefmt-nix"; - - rust-overlay.url = "github:oxalica/rust-overlay"; - crane.url = "github:ipetkov/crane"; - - nci.url = "github:yusdacra/nix-cargo-integration"; - nci.inputs.nixpkgs.follows = "nixpkgs"; - nci.inputs.parts.follows = "flake-parts"; - nci.inputs.crane.follows = "crane"; - nci.inputs.treefmt.follows = "treefmt-nix"; - nci.inputs.rust-overlay.follows = "rust-overlay"; - - nix-inspect.url = "github:bluskript/nix-inspect"; - nix-inspect.inputs.nixpkgs.follows = "nixpkgs"; - nix-inspect.inputs.parts.follows = "flake-parts"; - nix-inspect.inputs.nci.follows = "nci"; - - radicle.url = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git"; - radicle.inputs.nixpkgs.follows = "nixpkgs"; - radicle.inputs.flake-utils.follows = "flake-utils"; - radicle.inputs.crane.follows = "crane"; - radicle.inputs.rust-overlay.follows = "rust-overlay"; - - devicon-lookup.url = "github:coreyja/devicon-lookup"; - devicon-lookup.flake = false; - - jj-fzf.url = "github:tim-janik/jj-fzf"; - jj-fzf.flake = false; - - lazyjj.url = "github:Cretezy/lazyjj"; - lazyjj.flake = false; - - jjui.url = "github:idursun/jjui"; - jjui.inputs.nixpkgs.follows = "nixpkgs"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + home-manager.url = "github:nix-community/home-manager"; + import-tree.url = "github:vic/import-tree"; jjui.inputs.flake-parts.follows = "flake-parts"; + jjui.inputs.nixpkgs.follows = "nixpkgs"; jjui.inputs.systems.follows = "systems"; - - ntv.url = "github:vic/ntv?dir=nix/flakeModules"; - ntv.inputs.nixpkgs.follows = "nixpkgs"; - ntv.inputs.systems.follows = "systems"; + jjui.url = "github:idursun/jjui"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + nix-darwin.url = "github:LnL7/nix-darwin"; + nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; + nix-index-database.url = "github:nix-community/nix-index-database"; + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; ntv.inputs.devshell.follows = "devshell"; ntv.inputs.flake-parts.follows = "flake-parts"; - - versioned.url = "https://nix-versions.alwaysdata.net/flake.zip/input-leap"; + ntv.inputs.nixpkgs.follows = "nixpkgs"; + ntv.inputs.systems.follows = "systems"; + ntv.url = "github:vic/ntv?dir=nix/flakeModules"; + sops-nix.inputs.nixpkgs.follows = "nixpkgs"; + sops-nix.url = "github:Mic92/sops-nix"; + SPC.inputs.nixpkgs.follows = "nixpkgs"; + SPC.inputs.treefmt-nix.follows = "treefmt-nix"; + SPC.url = "github:vic/SPC"; + systems.url = "github:nix-systems/default"; + treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; + treefmt-nix.url = "github:numtide/treefmt-nix"; versioned.inputs.nixpkgs.follows = "nixpkgs"; versioned.inputs.ntv.follows = "ntv"; + versioned.url = "https://nix-versions.alwaysdata.net/flake.zip/input-leap"; + vscode-server.inputs.nixpkgs.follows = "nixpkgs"; + vscode-server.url = "github:nix-community/nixos-vscode-server"; + nixos-wsl.url = "github:nix-community/nixos-wsl"; + nixos-wsl.inputs.nixpkgs.follows = "nixpkgs"; }; - - outputs = - inputs: - inputs.blueprint { - inherit inputs; - }; } diff --git a/formatter.nix b/formatter.nix deleted file mode 100644 index 8d610330..00000000 --- a/formatter.nix +++ /dev/null @@ -1 +0,0 @@ -{ inputs, pkgs, ... }: (inputs.self.lib.treefmt pkgs).config.build.wrapper diff --git a/hosts/annatar/configuration.nix b/hosts/annatar/configuration.nix deleted file mode 100644 index 824bdf6d..00000000 --- a/hosts/annatar/configuration.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ inputs, ... }: -{ - - imports = with inputs.self.nixosModules; [ - wsl - nix-features - vic - ./static.nix - ]; - - wsl.defaultUser = "vic"; - -} diff --git a/hosts/annatar/static.nix b/hosts/annatar/static.nix deleted file mode 100644 index 519f2268..00000000 --- a/hosts/annatar/static.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - networking.hostName = "annatar"; - nixpkgs.hostPlatform = "x86_64-linux"; - system.stateVersion = "25.05"; -} diff --git a/hosts/annatar/users/vic.nix b/hosts/annatar/users/vic.nix deleted file mode 100644 index 1d7818ce..00000000 --- a/hosts/annatar/users/vic.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - vic - vscode-server - ]; - - home.stateVersion = with import ./../static.nix; system.stateVersion; -} diff --git a/hosts/bert/darwin-configuration.nix b/hosts/bert/darwin-configuration.nix deleted file mode 100644 index 3d46ba64..00000000 --- a/hosts/bert/darwin-configuration.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ ... }: -{ - nixpkgs.hostPlatform = "aarch64-darwin"; - system.stateVersion = 6; - users.users.runner.home = "/Users/runner"; -} diff --git a/hosts/bert/users/runner.nix b/hosts/bert/users/runner.nix deleted file mode 100644 index 77ad1bbd..00000000 --- a/hosts/bert/users/runner.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - runner - ]; - home.stateVersion = "25.05"; -} diff --git a/hosts/bill/configuration.nix b/hosts/bill/configuration.nix deleted file mode 100644 index df5a034b..00000000 --- a/hosts/bill/configuration.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: -{ - boot.loader.grub.enable = false; - fileSystems."/".device = "/dev/null"; - nixpkgs.hostPlatform = "aarch64-linux"; - system.stateVersion = "25.05"; - users.users.runner.isNormalUser = true; -} diff --git a/hosts/bill/users/runner.nix b/hosts/bill/users/runner.nix deleted file mode 100644 index 77ad1bbd..00000000 --- a/hosts/bill/users/runner.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - runner - ]; - home.stateVersion = "25.05"; -} diff --git a/hosts/bombadil/configuration.nix b/hosts/bombadil/configuration.nix deleted file mode 100644 index 90309f9e..00000000 --- a/hosts/bombadil/configuration.nix +++ /dev/null @@ -1,42 +0,0 @@ -# nix build .#.nixosConfigurations.bombadil.config.system.build.isoImage -{ - modulesPath, - config, - lib, - inputs, - ... -}: -{ - imports = with inputs.self.nixosModules; [ - "${toString modulesPath}/installer/cd-dvd/installation-cd-base.nix" - nix-features - vic - vic-autologin - macos-keys - kvm-intel - wl-broadcom - all-firmware - xfce-desktop - ./static.nix - ]; - - lib.isoFileSystems."/home/vic" = { - device = "/dev/disk/by-label/vic"; - fsType = "ext4"; - }; - - users.users.vic.uid = 1000; - users.users.nixos.uid = 1001; - - vix.features.macos-keys.enable = true; - - isoImage.edition = lib.mkDefault config.networking.hostName; - networking.networkmanager.enable = true; - networking.wireless.enable = lib.mkImageMediaOverride false; - - hardware.bluetooth.enable = true; - hardware.bluetooth.powerOnBoot = true; - services.blueman.enable = true; - services.pulseaudio.enable = false; - -} diff --git a/hosts/bombadil/static.nix b/hosts/bombadil/static.nix deleted file mode 100644 index e3c08239..00000000 --- a/hosts/bombadil/static.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - networking.hostName = "bombadil"; - nixpkgs.hostPlatform = "x86_64-linux"; - system.stateVersion = "25.05"; -} diff --git a/hosts/bombadil/users/vic.nix b/hosts/bombadil/users/vic.nix deleted file mode 100644 index 0505a191..00000000 --- a/hosts/bombadil/users/vic.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - vic - vic-desktop - ]; - home.stateVersion = with import ./../static.nix; system.stateVersion; -} diff --git a/hosts/mordor/configuration.nix b/hosts/mordor/configuration.nix deleted file mode 100644 index 0524cb3b..00000000 --- a/hosts/mordor/configuration.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ inputs, ... }: -{ - - imports = with inputs.self.nixosModules; [ - nix-features - bootable - xfce-desktop - barrier - vic - vic-autologin - kvm-amd - nvidia - ./static.nix - ./filesystems.nix - ./hardware-configuration.nix - ]; - -} diff --git a/hosts/mordor/filesystems.nix b/hosts/mordor/filesystems.nix deleted file mode 100644 index 4e6d8577..00000000 --- a/hosts/mordor/filesystems.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - - boot.initrd.availableKernelModules = [ "nvme" ]; - - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; - - fileSystems."/home" = { - device = "/dev/disk/by-label/home"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; - options = [ - "fmask=0022" - "dmask=0022" - ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-label/swap"; } - ]; - -} diff --git a/hosts/mordor/static.nix b/hosts/mordor/static.nix deleted file mode 100644 index 1ea0183b..00000000 --- a/hosts/mordor/static.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - networking.hostName = "mordor"; - nixpkgs.hostPlatform = "x86_64-linux"; - system.stateVersion = "25.05"; -} diff --git a/hosts/mordor/users/vic.nix b/hosts/mordor/users/vic.nix deleted file mode 100644 index 7ce34e81..00000000 --- a/hosts/mordor/users/vic.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - vic - vic-desktop - ]; - - home.stateVersion = with import ./../static.nix; system.stateVersion; -} diff --git a/hosts/nargun/configuration.nix b/hosts/nargun/configuration.nix deleted file mode 100644 index 976cc17f..00000000 --- a/hosts/nargun/configuration.nix +++ /dev/null @@ -1,27 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - -{ - inputs, - ... -}: - -{ - imports = with inputs.self.nixosModules; [ - barrier - bootable - kde-desktop - kvm-amd - macos-keys - nix-features - vic - vic-autologin - ./static.nix - ./filesystems.nix - ./hardware-configuration.nix - ]; - - vix.features.macos-keys.enable = true; - -} diff --git a/hosts/nargun/filesystems.nix b/hosts/nargun/filesystems.nix deleted file mode 100644 index 79939aa1..00000000 --- a/hosts/nargun/filesystems.nix +++ /dev/null @@ -1,26 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - ... -}: - -{ - - fileSystems."/" = { - device = "/dev/disk/by-uuid/5e0a5652-9af6-4590-9bd1-be059e339b84"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/3902-2085"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - swapDevices = [ { device = "/dev/disk/by-uuid/3be2776b-3153-443b-95b8-0fbd06becb75"; } ]; - -} diff --git a/hosts/nargun/hardware-configuration.nix b/hosts/nargun/hardware-configuration.nix deleted file mode 100644 index d5fb3164..00000000 --- a/hosts/nargun/hardware-configuration.nix +++ /dev/null @@ -1,18 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - ... -}: - -{ - - boot.initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "usb_storage" - "sd_mod" - "sdhci_pci" - ]; - -} diff --git a/hosts/nargun/static.nix b/hosts/nargun/static.nix deleted file mode 100644 index e1a1e7d4..00000000 --- a/hosts/nargun/static.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - networking.hostName = "nargun"; - nixpkgs.hostPlatform = "x86_64-linux"; - system.stateVersion = "25.05"; -} diff --git a/hosts/nargun/users/vic.nix b/hosts/nargun/users/vic.nix deleted file mode 100644 index 7ce34e81..00000000 --- a/hosts/nargun/users/vic.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - vic - vic-desktop - ]; - - home.stateVersion = with import ./../static.nix; system.stateVersion; -} diff --git a/hosts/nienna/filesystems.nix b/hosts/nienna/filesystems.nix deleted file mode 100644 index 99c3ce45..00000000 --- a/hosts/nienna/filesystems.nix +++ /dev/null @@ -1,28 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - ... -}: - -{ - - fileSystems."/" = { - device = "/dev/disk/by-uuid/49a514f4-ba6e-47aa-b3c0-83a650c2e22d"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/45F4-4CED"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/f774218c-ec59-427d-bada-8eb7b6b928b8"; } - ]; - -} diff --git a/hosts/nienna/hardware-configuration.nix b/hosts/nienna/hardware-configuration.nix deleted file mode 100644 index 6156529d..00000000 --- a/hosts/nienna/hardware-configuration.nix +++ /dev/null @@ -1,19 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - ... -}: - -{ - boot.initrd.availableKernelModules = [ - "uhci_hcd" - "ehci_pci" - "ahci" - "firewire_ohci" - "usbhid" - "usb_storage" - "sd_mod" - "sdhci_pci" - ]; -} diff --git a/hosts/nienna/static.nix b/hosts/nienna/static.nix deleted file mode 100644 index 778456f1..00000000 --- a/hosts/nienna/static.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - networking.hostName = "nienna"; - nixpkgs.hostPlatform = "x86_64-linux"; - system.stateVersion = "25.05"; -} diff --git a/hosts/nienna/users/vic.nix b/hosts/nienna/users/vic.nix deleted file mode 100644 index 7ce34e81..00000000 --- a/hosts/nienna/users/vic.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - vic - vic-desktop - ]; - - home.stateVersion = with import ./../static.nix; system.stateVersion; -} diff --git a/hosts/smaug/filesystems.nix b/hosts/smaug/filesystems.nix deleted file mode 100644 index afaf9b6a..00000000 --- a/hosts/smaug/filesystems.nix +++ /dev/null @@ -1,31 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ ... }: - -{ - - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-label/boot"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - fileSystems."/home" = { - device = "/dev/disk/by-label/home"; - fsType = "ext4"; - }; - - swapDevices = [ - { device = "/dev/disk/by-label/swap"; } - ]; - -} diff --git a/hosts/smaug/hardware-configuration.nix b/hosts/smaug/hardware-configuration.nix deleted file mode 100644 index 338649a0..00000000 --- a/hosts/smaug/hardware-configuration.nix +++ /dev/null @@ -1,16 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - ... -}: - -{ - - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ehci_pci" - "usb_storage" - "sd_mod" - ]; -} diff --git a/hosts/smaug/static.nix b/hosts/smaug/static.nix deleted file mode 100644 index 8e49fe03..00000000 --- a/hosts/smaug/static.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - networking.hostName = "smaug"; - nixpkgs.hostPlatform = "x86_64-linux"; - system.stateVersion = "25.05"; -} diff --git a/hosts/smaug/users/vic.nix b/hosts/smaug/users/vic.nix deleted file mode 100644 index 7ce34e81..00000000 --- a/hosts/smaug/users/vic.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - vic - vic-desktop - ]; - - home.stateVersion = with import ./../static.nix; system.stateVersion; -} diff --git a/hosts/tom/configuration.nix b/hosts/tom/configuration.nix deleted file mode 100644 index 0eb424f3..00000000 --- a/hosts/tom/configuration.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: -{ - boot.loader.grub.enable = false; - fileSystems."/".device = "/dev/null"; - nixpkgs.hostPlatform = "x86_64-linux"; - system.stateVersion = "25.05"; - users.users.runner.isNormalUser = true; -} diff --git a/hosts/tom/users/runner.nix b/hosts/tom/users/runner.nix deleted file mode 100644 index 77ad1bbd..00000000 --- a/hosts/tom/users/runner.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - runner - ]; - home.stateVersion = "25.05"; -} diff --git a/hosts/varda/darwin-configuration.nix b/hosts/varda/darwin-configuration.nix deleted file mode 100644 index 26397f18..00000000 --- a/hosts/varda/darwin-configuration.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.nixosModules; [ - darwin - nix-features - vic - ./static.nix - ]; - - users.users.vic.home = "/Users/vic"; -} diff --git a/hosts/varda/static.nix b/hosts/varda/static.nix deleted file mode 100644 index ddac1acc..00000000 --- a/hosts/varda/static.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - networking.hostName = "varda"; - nixpkgs.hostPlatform = "aarch64-darwin"; - system.stateVersion = 6; -} diff --git a/hosts/varda/users/vic.nix b/hosts/varda/users/vic.nix deleted file mode 100644 index 5c237042..00000000 --- a/hosts/varda/users/vic.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - vic - ]; - - home.stateVersion = "25.05"; -} diff --git a/hosts/yavanna/darwin-configuration.nix b/hosts/yavanna/darwin-configuration.nix deleted file mode 100644 index 237709c5..00000000 --- a/hosts/yavanna/darwin-configuration.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.nixosModules; [ - darwin - nix-features - vic - ./static.nix - ]; - - users.users.vic.home = "/v/home"; -} diff --git a/hosts/yavanna/static.nix b/hosts/yavanna/static.nix deleted file mode 100644 index c174542a..00000000 --- a/hosts/yavanna/static.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - networking.hostName = "yavanna"; - nixpkgs.hostPlatform = "x86_64-darwin"; - system.stateVersion = 6; -} diff --git a/hosts/yavanna/users/vic.nix b/hosts/yavanna/users/vic.nix deleted file mode 100644 index 5c237042..00000000 --- a/hosts/yavanna/users/vic.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ inputs, ... }: -{ - imports = with inputs.self.homeModules; [ - vic - ]; - - home.stateVersion = "25.05"; -} diff --git a/lib/default.nix b/lib/default.nix deleted file mode 100644 index eb3f925a..00000000 --- a/lib/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ inputs, ... }: -{ - - treefmt = pkgs: pkgs.callPackage ./treefmt.nix { inherit inputs; }; - - hostsBySystem = - system: - let - # pkgs expects we run on a linux. - pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; - lib = pkgs.lib; - where = - ({ - "x86_64-linux" = inputs.self.nixosConfigurations; - "aarch64-linux" = inputs.self.nixosConfigurations; - "x86_64-darwin" = inputs.self.darwinConfigurations; - "aarch64-darwin" = inputs.self.darwinConfigurations; - }).${system} or (throw "Unsupported system: ${system}"); - sameSystem = lib.filterAttrs (_: v: v.config.nixpkgs.hostPlatform.system == system) where; - in - lib.attrNames sameSystem; - -} diff --git a/lib/treefmt.nix b/lib/treefmt.nix deleted file mode 100644 index 293b775b..00000000 --- a/lib/treefmt.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ pkgs, inputs, ... }: -inputs.treefmt-nix.lib.evalModule pkgs { - projectRootFile = "flake.nix"; - programs.nixfmt.enable = true; - programs.nixfmt.excludes = [ ".direnv" ]; - programs.deadnix.enable = true; -} diff --git a/modules/nixos/macos-keys/macos-keys.nix b/modules/features/_macos-keys.nix similarity index 100% rename from modules/nixos/macos-keys/macos-keys.nix rename to modules/features/_macos-keys.nix diff --git a/modules/features/all-firmware.nix b/modules/features/all-firmware.nix new file mode 100644 index 00000000..a39b5e13 --- /dev/null +++ b/modules/features/all-firmware.nix @@ -0,0 +1,7 @@ +{ + flake.modules.nixos.all-firmware = { + hardware.enableAllFirmware = true; + hardware.enableRedistributableFirmware = true; + nixpkgs.config.allowUnfree = true; # enableAllFirmware depends on this + }; +} diff --git a/modules/features/bootable.nix b/modules/features/bootable.nix new file mode 100644 index 00000000..176c418c --- /dev/null +++ b/modules/features/bootable.nix @@ -0,0 +1,87 @@ +{ + + flake.modules.nixos.bootable = + { lib, modulesPath, ... }: + { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + powerManagement.enable = true; + + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "America/Mexico_City"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable sound with pipewire. + # sound.enable = true; + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + services.pulseaudio.enable = false; + services.blueman.enable = true; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + networking.useDHCP = lib.mkDefault true; + }; + +} diff --git a/modules/features/darwin.nix b/modules/features/darwin.nix new file mode 100644 index 00000000..d117ab1b --- /dev/null +++ b/modules/features/darwin.nix @@ -0,0 +1,34 @@ +{ inputs, ... }: +let + flake.modules.darwin.darwin.imports = [ + inputs.home-manager.darwinModules.home-manager + nix-darwin-pkgs + darwin-cfg + ]; + + darwin-cfg = { + # Determinate uses its own daemon to manage the Nix installation + nix.enable = false; + + system.defaults.trackpad.Clicking = true; + system.defaults.trackpad.TrackpadThreeFingerDrag = true; + system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = false; + + system.keyboard.enableKeyMapping = true; + system.keyboard.remapCapsLockToControl = true; + }; + + nix-darwin-pkgs = + { pkgs, ... }: + { + environment.systemPackages = with inputs.nix-darwin.packages.${pkgs.system}; [ + darwin-option + darwin-rebuild + darwin-version + darwin-uninstaller + ]; + }; +in +{ + inherit flake; +} diff --git a/modules/features/gnome-desktop.nix b/modules/features/gnome-desktop.nix new file mode 100644 index 00000000..189d0532 --- /dev/null +++ b/modules/features/gnome-desktop.nix @@ -0,0 +1,11 @@ +{ + flake.modules.nixos.gnome-desktop = { + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 + systemd.services."getty@tty1".enable = false; + systemd.services."autovt@tty1".enable = false; + }; +} diff --git a/modules/features/kde-desktop.nix b/modules/features/kde-desktop.nix new file mode 100644 index 00000000..aa300382 --- /dev/null +++ b/modules/features/kde-desktop.nix @@ -0,0 +1,18 @@ +{ + flake.modules.nixos.kde-desktop = { + # Enable the KDE Plasma Desktop Environment. + services.displayManager.sddm.wayland.enable = true; + services.desktopManager.plasma6.enable = true; + + services.avahi = { + nssmdns4 = true; + enable = true; + publish = { + enable = true; + userServices = true; + domain = true; + }; + }; + + }; +} diff --git a/modules/features/kvm-amd.nix b/modules/features/kvm-amd.nix new file mode 100644 index 00000000..2c9c86ed --- /dev/null +++ b/modules/features/kvm-amd.nix @@ -0,0 +1,8 @@ +{ + flake.modules.nixos.kvm-amd = + { lib, config, ... }: + { + boot.kernelModules = [ "kvm-amd" ]; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/modules/features/kvm-intel.nix b/modules/features/kvm-intel.nix new file mode 100644 index 00000000..25749ed9 --- /dev/null +++ b/modules/features/kvm-intel.nix @@ -0,0 +1,8 @@ +{ + flake.modules.nixos.kvm-intel = + { lib, config, ... }: + { + boot.kernelModules = [ "kvm-intel" ]; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/modules/features/macos-keys.nix b/modules/features/macos-keys.nix new file mode 100644 index 00000000..19611102 --- /dev/null +++ b/modules/features/macos-keys.nix @@ -0,0 +1,14 @@ +{ + flake.modules.nixos.macos-keys = + { + lib, + pkgs, + config, + ... + }: + { + services.keyd.enable = true; + services.keyd.keyboards.default.ids = [ "*" ]; # apply on all devices + services.keyd.keyboards.default.settings = import ./_macos-keys.nix { inherit lib pkgs config; }; + }; +} diff --git a/modules/features/nix-setttings.nix b/modules/features/nix-setttings.nix new file mode 100644 index 00000000..e86d8cda --- /dev/null +++ b/modules/features/nix-setttings.nix @@ -0,0 +1,34 @@ +{ + flake.modules.nixos.nix-settings = + { pkgs, config, ... }: + { + nix = { + settings = { + substituters = [ + "https://vix.cachix.org" + "https://devenv.cachix.org" + ]; + trusted-public-keys = [ + "vix.cachix.org-1:hP/Lpdsi1dB3AxK9o6coWh+xHzvAc4ztdDYuG7lC6dI=" + "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" + ]; + + auto-optimise-store = true; + experimental-features = [ + "nix-command" + "flakes" + # "allow-import-from-derivation" + ]; + trusted-users = [ + "root" + "@wheel" + ]; + }; + gc = pkgs.lib.optionalAttrs config.nix.enable { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + }; + }; +} diff --git a/modules/features/nixos.nix b/modules/features/nixos.nix new file mode 100644 index 00000000..c37efbb4 --- /dev/null +++ b/modules/features/nixos.nix @@ -0,0 +1,9 @@ +{ inputs, ... }: +{ + flake.modules.nixos.nixos.imports = [ + inputs.home-manager.nixosModules.home-manager + inputs.self.modules.nixos.bootable + inputs.self.modules.nixos.nix-settings + inputs.self.modules.nixos.unfree + ]; +} diff --git a/modules/features/nvidia.nix b/modules/features/nvidia.nix new file mode 100644 index 00000000..84dbde47 --- /dev/null +++ b/modules/features/nvidia.nix @@ -0,0 +1,29 @@ +{ + + flake.modules.nixos.nvidia = + { config, ... }: + { + boot.initrd.kernelModules = [ "nvidia" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ]; + boot.blacklistedKernelModules = [ "nouveau" ]; + boot.extraModprobeConfig = '' + blacklist nouveau + options nouveau modeset=0 + ''; + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.graphics.enable = true; + hardware.nvidia = rec { + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + powerManagement.enable = true; + powerManagement.finegrained = false; + modesetting.enable = true; + + prime = { + offload.enable = powerManagement.finegrained; + offload.enableOffloadCmd = prime.offload.enable; + }; + }; + }; +} diff --git a/modules/features/platform.nix b/modules/features/platform.nix new file mode 100644 index 00000000..ca1dd0a3 --- /dev/null +++ b/modules/features/platform.nix @@ -0,0 +1,6 @@ +{ + flake.modules.nixos.x86_64-linux = { }; + flake.modules.nixos.aarch64-linux = { }; + flake.modules.darwin.x86_64-darwin = { }; + flake.modules.darwin.aarch64-darwin = { }; +} diff --git a/modules/features/rdesk.nix b/modules/features/rdesk.nix new file mode 100644 index 00000000..66a3a66e --- /dev/null +++ b/modules/features/rdesk.nix @@ -0,0 +1,30 @@ +{ inputs, ... }: +let + + flake.modules.homeManager.rdesk = + { pkgs, lib, ... }: + { + home.packages = lib.optionals pkgs.stdenvNoCC.isLinux [ + pkgs.anydesk + inputs.versioned.packages.${pkgs.system}.input-leap + ]; + }; + + flake.modules.nixos.rdesk.networking.firewall = { + enable = true; + allowedTCPPorts = [ + 24800 # inputleap + 6568 # anydesk + 50001 # anydesk + ]; + allowedUDPPorts = [ + 24800 # inputleap + 6568 # anydesk + 50001 # anydesk + ]; + }; + +in +{ + inherit flake; +} diff --git a/modules/features/unfree.nix b/modules/features/unfree.nix new file mode 100644 index 00000000..7fee0e11 --- /dev/null +++ b/modules/features/unfree.nix @@ -0,0 +1,4 @@ +{ inputs, ... }: +{ + flake.modules.nixos.unfree = inputs.self.lib.unfree-module [ ]; +} diff --git a/modules/features/wl-broadcom.nix b/modules/features/wl-broadcom.nix new file mode 100644 index 00000000..0c43f100 --- /dev/null +++ b/modules/features/wl-broadcom.nix @@ -0,0 +1,8 @@ +{ + flake.modules.nixos.wl-broadcom = + { config, ... }: + { + boot.kernelModules = [ "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + }; +} diff --git a/modules/features/wsl.nix b/modules/features/wsl.nix new file mode 100644 index 00000000..29131043 --- /dev/null +++ b/modules/features/wsl.nix @@ -0,0 +1,13 @@ +{ inputs, ... }: +{ + flake.modules.nixos.wsl = { + imports = [ + inputs.nixos-wsl.nixosModules.default + inputs.home-manager.nixosModules.home-manager + inputs.self.modules.nixos.nix-settings + inputs.self.modules.nixos.unfree + ]; + + wsl.enable = true; + }; +} diff --git a/modules/features/xfce-desktop.nix b/modules/features/xfce-desktop.nix new file mode 100644 index 00000000..0c2a412e --- /dev/null +++ b/modules/features/xfce-desktop.nix @@ -0,0 +1,19 @@ +{ + + flake.modules.nixos.xfce-desktop = { + # https://gist.github.com/nat-418/1101881371c9a7b419ba5f944a7118b0 + services.xserver = { + enable = true; + desktopManager = { + xterm.enable = false; + xfce.enable = true; + }; + }; + + services.displayManager = { + defaultSession = "xfce"; + enable = true; + }; + }; + +} diff --git a/modules/flake/formatter.nix b/modules/flake/formatter.nix new file mode 100644 index 00000000..6b1a6d68 --- /dev/null +++ b/modules/flake/formatter.nix @@ -0,0 +1,8 @@ +{ + perSystem.treefmt.projectRootFile = "flake.nix"; + perSystem.treefmt.programs = { + nixfmt.enable = true; + nixfmt.excludes = [ ".direnv" ]; + deadnix.enable = true; + }; +} diff --git a/modules/flake/imports.nix b/modules/flake/imports.nix new file mode 100644 index 00000000..141ac625 --- /dev/null +++ b/modules/flake/imports.nix @@ -0,0 +1,9 @@ +{ inputs, ... }: +{ + imports = [ + inputs.devshell.flakeModule + inputs.flake-parts.flakeModules.modules + inputs.home-manager.flakeModules.home-manager + inputs.treefmt-nix.flakeModule + ]; +} diff --git a/modules/flake/lib/hosts-by-system.nix b/modules/flake/lib/hosts-by-system.nix new file mode 100644 index 00000000..04093ed9 --- /dev/null +++ b/modules/flake/lib/hosts-by-system.nix @@ -0,0 +1,12 @@ +{ inputs, lib, ... }: +{ + flake.lib.hostsBySystem = + system: + let + self = inputs.self; + where = + if lib.hasSuffix "darwin" system then self.darwinConfigurations else self.nixosConfigurations; + sameSystem = lib.filterAttrs (_: v: v.config.nixpkgs.hostPlatform.system == system) where; + in + lib.attrNames sameSystem; +} diff --git a/modules/flake/lib/option.nix b/modules/flake/lib/option.nix new file mode 100644 index 00000000..a7d4d68e --- /dev/null +++ b/modules/flake/lib/option.nix @@ -0,0 +1,7 @@ +{ lib, ... }: +{ + options.flake.lib = lib.mkOption { + type = lib.types.attrsOf lib.types.unspecified; + default = { }; + }; +} diff --git a/modules/flake/lib/unfree-module.nix b/modules/flake/lib/unfree-module.nix new file mode 100644 index 00000000..375ae4e7 --- /dev/null +++ b/modules/flake/lib/unfree-module.nix @@ -0,0 +1,8 @@ +{ + flake.lib.unfree-module = + names: + { lib, ... }: + { + nixpkgs.config.allowUnfreePredicate = pkg: lib.elem (lib.getName pkg) names; + }; +} diff --git a/modules/flake/osConfigurations.nix b/modules/flake/osConfigurations.nix new file mode 100644 index 00000000..3c827933 --- /dev/null +++ b/modules/flake/osConfigurations.nix @@ -0,0 +1,63 @@ +{ inputs, lib, ... }: +let + flake.nixosConfigurations = { + annatar = wsl "annatar"; + mordor = linux "mordor"; + nargun = linux "nargun"; + smaug = linux "smaug"; + nienna = linux "nienna"; + tom = linux "tom"; + bombadil = linux "bombadil"; + bill = linux-arm "bill"; + }; + + flake.darwinConfigurations = { + yavanna = darwin-intel "yavanna"; + varda = darwin-arm "varda"; + bert = darwin-arm "bert"; + }; + + wsl = mkNixos "x86_64-linux" "wsl"; + + linux = mkNixos "x86_64-linux" "nixos"; + linux-arm = mkNixos "aarch64-linux" "nixos"; + + darwin-intel = mkDarwin "x86_64-darwin"; + darwin-arm = mkDarwin "aarch64-darwin"; + + mkNixos = + system: cls: name: + inputs.nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + inputs.self.modules.nixos.${cls} + inputs.self.modules.nixos.${name} + inputs.self.modules.nixos.${system} + { + networking.hostName = lib.mkDefault name; + nixpkgs.hostPlatform = lib.mkDefault system; + system.stateVersion = lib.mkDefault "25.05"; + } + ]; + }; + + mkDarwin = + system: name: + inputs.nix-darwin.lib.darwinSystem { + inherit system; + modules = [ + inputs.self.modules.darwin.darwin + inputs.self.modules.darwin.${name} + inputs.self.modules.darwin.${system} + { + networking.hostName = lib.mkDefault name; + nixpkgs.hostPlatform = lib.mkDefault system; + system.stateVersion = lib.mkDefault 6; + } + ]; + }; + +in +{ + inherit flake; +} diff --git a/modules/flake/systems.nix b/modules/flake/systems.nix new file mode 100644 index 00000000..aa9cd586 --- /dev/null +++ b/modules/flake/systems.nix @@ -0,0 +1,4 @@ +{ inputs, ... }: +{ + systems = import inputs.systems; +} diff --git a/modules/home/devshells.nix b/modules/home/devshells.nix deleted file mode 100644 index 03f50a62..00000000 --- a/modules/home/devshells.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - pkgs, - imports, - inputs, - perSystem, - ... -}: -let - - envs = - with pkgs.lib; - mergeAttrsList ( - map ( - name: - setAttrByPath [ ".cache/envs/${name}/.envrc" "text" ] "use flake ${inputs.self.outPath}#${name}" - ) (attrNames inputs.self.devShells.${pkgs.system}) - ); -in -{ - - imports = [ - inputs.use_devshell_toml.homeModules.default - { home.file = envs; } - ]; - - home.packages = with pkgs; [ - perSystem.devshell.default - # devenv - ]; - - home.file.".envrc".text = '' - export FLAKE="$HOME/.flake" - ''; - -} diff --git a/modules/home/nix-index.nix b/modules/home/nix-index.nix index 1df39b8b..b8851694 100644 --- a/modules/home/nix-index.nix +++ b/modules/home/nix-index.nix @@ -1,13 +1,12 @@ { inputs, ... }: { + flake.modules.homeManager.nix-index = { + imports = [ + inputs.nix-index-database.hmModules.nix-index + ]; - imports = [ - inputs.nix-index-database.hmModules.nix-index - ]; - - programs.nix-index.enable = true; - programs.nix-index.enableFishIntegration = true; - programs.nix-index-database.comma.enable = true; - - home.file.".nix-flake".source = inputs.self.outPath; + programs.nix-index.enable = true; + programs.nix-index.enableFishIntegration = true; + programs.nix-index-database.comma.enable = true; + }; } diff --git a/modules/home/nix-registry.nix b/modules/home/nix-registry.nix index 648d30fc..ee78a6fd 100644 --- a/modules/home/nix-registry.nix +++ b/modules/home/nix-registry.nix @@ -1,8 +1,8 @@ -{ inputs, pkgs, ... }: +{ inputs, lib, ... }: { - nix.registry = - with pkgs.lib; - mapAttrs (_name: v: { flake = v; }) (filterAttrs (_name: value: value ? outputs) inputs); + flake.modules.homeManager.nix-registry.nix.registry = lib.mapAttrs (_name: v: { flake = v; }) ( + lib.filterAttrs (_name: value: value ? outputs) inputs + ); } diff --git a/modules/home/runner.nix b/modules/home/runner.nix deleted file mode 100644 index facb35d6..00000000 --- a/modules/home/runner.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ ... }: -{ - -} diff --git a/modules/home/vic-desktop.nix b/modules/home/vic-desktop.nix deleted file mode 100644 index 2f18c110..00000000 --- a/modules/home/vic-desktop.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - pkgs, - osConfig, - lib, - ... -}: -{ - - home.packages = - ([ - pkgs.librewolf - pkgs.vscode - pkgs.wezterm - pkgs.ghostty - ]) - ++ (lib.optionals (osConfig.networking.hostName != "bombadil") [ - pkgs.code-cursor - pkgs.zed-editor - ]); - -} diff --git a/modules/home/vic.nix b/modules/home/vic.nix deleted file mode 100644 index 26a0ebe5..00000000 --- a/modules/home/vic.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ - lib, - pkgs, - perSystem, - osConfig ? null, - ... -}: -let - hostName = if osConfig == null then "bombadil" else osConfig.networking.hostName; -in -{ - - imports = - [ - ./vic/secrets.nix - ./vic/ssh.nix - ./vic/fish.nix - ./vic/git.nix - ./vic/jujutsu.nix - ./vic/doom.nix - ./vic/nvim.nix - ./vic/dots.nix - ] - ++ (lib.optionals (hostName != "bombadil") [ - ./nix-registry.nix - ./devshells.nix - ./nix-index.nix - ]); - - home.packages = - let - nonBombadil = lib.optionals (hostName != "bombadil") [ - perSystem.nox.default - perSystem.self.devicon-lookup # for eee - perSystem.self.leader - pkgs.yazi # file tui - pkgs.zoxide # cd - pkgs.nix-search-cli - pkgs.nixd # lsp - pkgs.nixfmt-rfc-style - pkgs.ispell - pkgs.gh - ]; - - anywhere = nonBombadil ++ [ - perSystem.nix-versions.default - perSystem.self.vic-sops-get - pkgs.tree - pkgs.fzf - pkgs.ripgrep # grep - pkgs.bat # cat - pkgs.bottom - pkgs.htop - pkgs.eza # ls - pkgs.fd # find - pkgs.lazygit # no magit - pkgs.tig # alucard - pkgs.cachix - pkgs.jq - pkgs.helix - ]; - - perHost = { - nargun = [ - # pkgs.obsidian # notion - perSystem.radicle.radicle-full - perSystem.nix-inspect.default # TODO: enabling it causes GH-action to fail - ]; - bombadil = [ - pkgs.home-manager - pkgs.gnome-disk-utility - ]; - }; - - perPlatform = { - "x86_64-linux" = [ - pkgs.gparted - pkgs.wl-clipboard - perSystem.self.copilot-language-server # tab tab tab - ]; - }; - - packages = anywhere ++ (perHost.${hostName} or [ ]) ++ (perPlatform.${pkgs.system} or [ ]); - - in - packages; - - programs.nh.enable = true; - programs.home-manager.enable = true; - - programs.direnv.enable = true; - programs.direnv.nix-direnv.enable = true; - -} diff --git a/modules/home/vic/doom.nix b/modules/home/vic/doom.nix deleted file mode 100644 index 764fa0a5..00000000 --- a/modules/home/vic/doom.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ - pkgs, - lib, - inputs, - ... -}: -let - - emacsPkg = pkgs.emacs30; - - doom-install = pkgs.writeShellApplication { - name = "doom-install"; - runtimeInputs = with pkgs; [ - git - emacsPkg - ripgrep - openssh - ]; - text = '' - set -e - if test -f "$HOME"/.config/emacs/.local/etc/@/init*.el; then - doom_rev="$(rg "put 'doom-version 'ref '\"(\w+)\"" "$HOME"/.config/emacs/.local/etc/@/init*.el -or '$1')" - fi - - if test "''${doom_rev:-}" = "${inputs.doom-emacs.rev}"; then - echo "DOOM Emacs already at revision ${inputs.doom-emacs.rev}" - exit 0 # doom already pointing to same revision - fi - - ( - echo "DOOM Emacs obtaining revision ${inputs.doom-emacs.rev}" - if ! test -d "$HOME/.config/emacs/.git"; then - git clone --depth 1 https://github.com/doomemacs/doomemacs "$HOME/.config/emacs" - fi - cd "$HOME/.config/emacs" - git fetch --depth 1 origin "${inputs.doom-emacs.rev}" - git reset --hard "${inputs.doom-emacs.rev}" - bin/doom install --no-config --no-env --no-install --no-fonts --no-hooks --force - echo "DOOM Emacs updated to revision ${inputs.doom-emacs.rev}" - bin/doom sync -e --force - ) - ''; - }; - - SPC = inputs.SPC.packages.${pkgs.system}.SPC.override { emacs = emacsPkg; }; - -in -{ - programs.emacs.enable = true; - programs.emacs.package = emacsPkg; - services.emacs.enable = true; - services.emacs.package = emacsPkg; - services.emacs.extraOptions = [ - "--init-directory" - "~/.config/emacs" - ]; - - home.packages = [ - SPC - (pkgs.writeShellScriptBin "doom" ''exec $HOME/.config/emacs/bin/doom "$@"'') - (pkgs.writeShellScriptBin "doomscript" ''exec $HOME/.config/emacs/bin/doomscript "$@"'') - (pkgs.writeShellScriptBin "d" ''exec emacsclient -nw -a "doom run -nw --" "$@"'') - ]; - - home.activation.doom-install = lib.hm.dag.entryAfter [ "link-ssh-id" ] '' - run ${lib.getExe doom-install} - ''; - -} diff --git a/modules/home/vic/dots.nix b/modules/home/vic/dots.nix deleted file mode 100644 index e4fedddc..00000000 --- a/modules/home/vic/dots.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, pkgs, ... }: -let - dotsLink = - path: - config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.flake/modules/home/vic/dots/${path}"; -in -{ - home.activation.link-flake = config.lib.dag.entryAfter [ "writeBoundary" ] '' - echo Checking that "$HOME/.flake" exists. - test -L "$HOME/.flake" - ''; - - home.file.".ssh" = { - recursive = true; - source = ./dots/ssh; - }; - - home.file.".config/nvim".source = dotsLink "config/nvim"; - home.file.".config/doom".source = dotsLink "config/doom"; - home.file.".config/zed".source = dotsLink "config/zed"; - home.file.".config/wezterm".source = dotsLink "config/wezterm"; - home.file.".config/ghostty".source = dotsLink "config/ghostty"; - - home.file.".config/Code/User/settings.json".source = dotsLink "config/Code/User/settings.json"; - home.file.".config/Code/User/keybindings.json".source = - dotsLink "config/Code/User/keybindings.json"; - home.file.".vscode/extensions/extensions.json".source = - dotsLink "vscode/extensions/extensions-${pkgs.stdenv.hostPlatform.uname.system}.json"; - - home.file.".config/Cursor/User/settings.json".source = dotsLink "config/Code/User/settings.json"; - home.file.".config/Cursor/User/keybindings.json".source = - dotsLink "config/Code/User/keybindings.json"; - home.file.".cursor/extensions/extensions.json".source = - dotsLink "cursor/extensions/extensions-${pkgs.stdenv.hostPlatform.uname.system}.json"; - -} diff --git a/modules/home/vic/dots/vscode/extensions/extensions-Linux.json b/modules/home/vic/dots/vscode/extensions/extensions-Linux.json deleted file mode 100644 index e8caaabd..00000000 --- a/modules/home/vic/dots/vscode/extensions/extensions-Linux.json +++ /dev/null @@ -1 +0,0 @@ -[{"identifier":{"id":"cybersamurai.midnight-purple-2077","uuid":"093e3b44-8c4f-461b-8aa8-ba46f938aae3"},"version":"1.1.9","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/cybersamurai.midnight-purple-2077-1.1.9","scheme":"file"},"relativeLocation":"cybersamurai.midnight-purple-2077-1.1.9","metadata":{"installedTimestamp":1742623962707,"pinned":false,"source":"gallery","id":"093e3b44-8c4f-461b-8aa8-ba46f938aae3","publisherId":"716a7a71-9c4e-490a-ba29-0780f389e5e8","publisherDisplayName":"cyber samurai","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"vspacecode.vspacecode","uuid":"1c81ab96-0424-43c4-b356-fe408a1bd1cf"},"version":"0.10.19","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/vspacecode.vspacecode-0.10.19","scheme":"file"},"relativeLocation":"vspacecode.vspacecode-0.10.19","metadata":{"installedTimestamp":1742624039079,"pinned":false,"source":"gallery","id":"1c81ab96-0424-43c4-b356-fe408a1bd1cf","publisherId":"60415ab6-4581-4e73-a7e0-6fc6b3369f12","publisherDisplayName":"VSpaceCode","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"vscodevim.vim","uuid":"d96e79c6-8b25-4be3-8545-0e0ecefcae03"},"version":"1.29.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/vscodevim.vim-1.29.0","scheme":"file"},"relativeLocation":"vscodevim.vim-1.29.0","metadata":{"installedTimestamp":1742624039081,"pinned":false,"source":"gallery","id":"d96e79c6-8b25-4be3-8545-0e0ecefcae03","publisherId":"5d63889b-1b67-4b1f-8350-4f1dce041a26","publisherDisplayName":"vscodevim","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"vspacecode.whichkey","uuid":"47ddeb9c-b4bb-4594-906b-412886e20e47"},"version":"0.11.4","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/vspacecode.whichkey-0.11.4","scheme":"file"},"relativeLocation":"vspacecode.whichkey-0.11.4","metadata":{"installedTimestamp":1742624039084,"pinned":false,"source":"gallery","id":"47ddeb9c-b4bb-4594-906b-412886e20e47","publisherId":"60415ab6-4581-4e73-a7e0-6fc6b3369f12","publisherDisplayName":"VSpaceCode","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"kahole.magit","uuid":"4d965b97-6bfd-43d8-882c-d4dfce310168"},"version":"0.6.66","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/kahole.magit-0.6.66","scheme":"file"},"relativeLocation":"kahole.magit-0.6.66","metadata":{"installedTimestamp":1742624119333,"pinned":false,"source":"gallery","id":"4d965b97-6bfd-43d8-882c-d4dfce310168","publisherId":"74af81ef-7bda-475b-bfe0-ccf6aa9b34dc","publisherDisplayName":"Kristian Andersen Hole","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"jnoortheen.nix-ide","uuid":"0ffebccd-4265-4f2d-a855-db1adcf278c7"},"version":"0.4.16","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/jnoortheen.nix-ide-0.4.16","scheme":"file"},"relativeLocation":"jnoortheen.nix-ide-0.4.16","metadata":{"installedTimestamp":1742624124907,"pinned":false,"source":"gallery","id":"0ffebccd-4265-4f2d-a855-db1adcf278c7","publisherId":"3a7c13d8-8768-454a-be53-290c25bd0f85","publisherDisplayName":"Noortheen","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"jacobdufault.fuzzy-search","uuid":"c2ebe7f7-8974-4ceb-a4a5-aea798305313"},"version":"0.0.3","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/jacobdufault.fuzzy-search-0.0.3","scheme":"file"},"relativeLocation":"jacobdufault.fuzzy-search-0.0.3","metadata":{"installedTimestamp":1742624140341,"pinned":false,"source":"gallery","id":"c2ebe7f7-8974-4ceb-a4a5-aea798305313","publisherId":"e7902c39-c8b4-4fb0-b245-6241b490a67b","publisherDisplayName":"jacobdufault","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"golang.go","uuid":"d6f6cfea-4b6f-41f4-b571-6ad2ab7918da"},"version":"0.46.1","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/golang.go-0.46.1","scheme":"file"},"relativeLocation":"golang.go-0.46.1","metadata":{"installedTimestamp":1742624149848,"pinned":false,"source":"gallery","id":"d6f6cfea-4b6f-41f4-b571-6ad2ab7918da","publisherId":"dbf6ae0a-da75-4167-ac8b-75b4512f2153","publisherDisplayName":"Go Team at Google","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"github.vscode-github-actions","uuid":"04f49bfc-8330-4eee-8237-ea938fb755ef"},"version":"0.27.1","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/github.vscode-github-actions-0.27.1","scheme":"file"},"relativeLocation":"github.vscode-github-actions-0.27.1","metadata":{"installedTimestamp":1742624155234,"pinned":false,"source":"gallery","id":"04f49bfc-8330-4eee-8237-ea938fb755ef","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"chaitanyashahare.lazygit","uuid":"e370d573-0664-4b89-b241-5d3cfeb9a427"},"version":"1.0.7","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/chaitanyashahare.lazygit-1.0.7","scheme":"file"},"relativeLocation":"chaitanyashahare.lazygit-1.0.7","metadata":{"installedTimestamp":1742624175976,"pinned":false,"source":"gallery","id":"e370d573-0664-4b89-b241-5d3cfeb9a427","publisherId":"dce96627-2e0f-4f44-8cd1-a081a4b4e98e","publisherDisplayName":"Chaitanya Shahare","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"bodil.file-browser","uuid":"97a82b1e-e6f7-4519-b1fc-f6be103e3824"},"version":"0.2.11","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/bodil.file-browser-0.2.11","scheme":"file"},"relativeLocation":"bodil.file-browser-0.2.11","metadata":{"installedTimestamp":1742624185638,"pinned":false,"source":"gallery","id":"97a82b1e-e6f7-4519-b1fc-f6be103e3824","publisherId":"e5c9456a-b78b-41ec-95c2-0cc218272ab9","publisherDisplayName":"Bodil Stokke","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"vitchu.vscode-autohide-vim","uuid":"316a5b14-0b5e-4dae-9bdc-319e3cf6c8d4"},"version":"1.0.7","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/vitchu.vscode-autohide-vim-1.0.7","scheme":"file"},"relativeLocation":"vitchu.vscode-autohide-vim-1.0.7","metadata":{"installedTimestamp":1742624218711,"pinned":false,"source":"gallery","id":"316a5b14-0b5e-4dae-9bdc-319e3cf6c8d4","publisherId":"27774761-fc08-46a2-b1e5-e5d295dcc507","publisherDisplayName":"Vitchu","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"mkhl.direnv","uuid":"e365e970-aeef-4dcd-8e4a-17306a27ab62"},"version":"0.17.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/mkhl.direnv-0.17.0","scheme":"file"},"relativeLocation":"mkhl.direnv-0.17.0","metadata":{"installedTimestamp":1742624267822,"pinned":false,"source":"gallery","id":"e365e970-aeef-4dcd-8e4a-17306a27ab62","publisherId":"577d6c37-7054-4ca5-b4ce-9250409f3903","publisherDisplayName":"Martin Kühl","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"tomrijndorp.find-it-faster","uuid":"d5eafbee-176a-421a-b74d-fbc51bd86a21"},"version":"0.0.39","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/tomrijndorp.find-it-faster-0.0.39","scheme":"file"},"relativeLocation":"tomrijndorp.find-it-faster-0.0.39","metadata":{"installedTimestamp":1742624662955,"pinned":false,"source":"gallery","id":"d5eafbee-176a-421a-b74d-fbc51bd86a21","publisherId":"f002c5e6-5db9-4df2-8791-8800b44272a4","publisherDisplayName":"Tom Rijndorp","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"usernamehw.errorlens","uuid":"9d8c32ab-354c-4daf-a9bf-20b633734435"},"version":"3.25.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/usernamehw.errorlens-3.25.0","scheme":"file"},"relativeLocation":"usernamehw.errorlens-3.25.0","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1743573836435,"pinned":false,"source":"gallery","id":"9d8c32ab-354c-4daf-a9bf-20b633734435","publisherId":"151820df-5dc5-4c97-8751-eb84643203fa","publisherDisplayName":"Alexander","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-vscode.cpptools-themes","uuid":"99b17261-8f6e-45f0-9ad5-a69c6f509a4f"},"version":"2.0.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode.cpptools-themes-2.0.0","scheme":"file"},"relativeLocation":"ms-vscode.cpptools-themes-2.0.0","metadata":{"installedTimestamp":1743618545498,"source":"gallery","id":"99b17261-8f6e-45f0-9ad5-a69c6f509a4f","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"github.github-vscode-theme","uuid":"7328a705-91fc-49e6-8293-da6f112e482d"},"version":"6.3.5","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/github.github-vscode-theme-6.3.5","scheme":"file"},"relativeLocation":"github.github-vscode-theme-6.3.5","metadata":{"installedTimestamp":1743618590147,"source":"gallery","id":"7328a705-91fc-49e6-8293-da6f112e482d","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-vscode-remote.remote-containers","uuid":"93ce222b-5f6f-49b7-9ab1-a0463c6238df"},"version":"0.409.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode-remote.remote-containers-0.409.0","scheme":"file"},"relativeLocation":"ms-vscode-remote.remote-containers-0.409.0","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1744177988353,"pinned":false,"source":"gallery","id":"93ce222b-5f6f-49b7-9ab1-a0463c6238df","publisherId":"ac9410a2-0d75-40ec-90de-b59bb705801d","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"github.copilot-chat","uuid":"7ec7d6e6-b89e-4cc5-a59b-d6c4d238246f"},"version":"0.26.3","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/github.copilot-chat-0.26.3","scheme":"file"},"relativeLocation":"github.copilot-chat-0.26.3","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1744177992493,"pinned":false,"source":"gallery","id":"7ec7d6e6-b89e-4cc5-a59b-d6c4d238246f","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"rust-lang.rust-analyzer","uuid":"06574cb4-e5dc-4631-8174-a543a4533621"},"version":"0.3.2370","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/rust-lang.rust-analyzer-0.3.2370-linux-x64","scheme":"file"},"relativeLocation":"rust-lang.rust-analyzer-0.3.2370-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1744177988356,"pinned":false,"source":"gallery","id":"06574cb4-e5dc-4631-8174-a543a4533621","publisherId":"cb14a7a7-a188-40bd-a953-e0a20757c5dd","publisherDisplayName":"The Rust Programming Language ","targetPlatform":"linux-x64","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-vscode.remote-explorer","uuid":"11858313-52cc-4e57-b3e4-d7b65281e34b"},"version":"0.4.3","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode.remote-explorer-0.4.3","scheme":"file"},"relativeLocation":"ms-vscode.remote-explorer-0.4.3","metadata":{"installedTimestamp":1744178019887,"pinned":false,"source":"gallery","id":"11858313-52cc-4e57-b3e4-d7b65281e34b","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-vscode-remote.remote-ssh-edit","uuid":"bfeaf631-bcff-4908-93ed-fda4ef9a0c5c"},"version":"0.87.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode-remote.remote-ssh-edit-0.87.0","scheme":"file"},"relativeLocation":"ms-vscode-remote.remote-ssh-edit-0.87.0","metadata":{"installedTimestamp":1744178019886,"pinned":false,"source":"gallery","id":"bfeaf631-bcff-4908-93ed-fda4ef9a0c5c","publisherId":"ac9410a2-0d75-40ec-90de-b59bb705801d","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-vscode-remote.remote-ssh","uuid":"607fd052-be03-4363-b657-2bd62b83d28a"},"version":"0.119.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0","scheme":"file"},"relativeLocation":"ms-vscode-remote.remote-ssh-0.119.0","metadata":{"installedTimestamp":1744178019884,"pinned":false,"source":"gallery","id":"607fd052-be03-4363-b657-2bd62b83d28a","publisherId":"ac9410a2-0d75-40ec-90de-b59bb705801d","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-vscode.remote-server","uuid":"105c0b3c-07a9-4156-a4fc-4141040eb07e"},"version":"1.5.2","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode.remote-server-1.5.2","scheme":"file"},"relativeLocation":"ms-vscode.remote-server-1.5.2","metadata":{"installedTimestamp":1744222972457,"pinned":false,"source":"gallery","id":"105c0b3c-07a9-4156-a4fc-4141040eb07e","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"dracula-theme.theme-dracula","uuid":"4e44877c-1c8d-4f9c-ba86-1372d0fbeeb1"},"version":"2.25.1","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/dracula-theme.theme-dracula-2.25.1","scheme":"file"},"relativeLocation":"dracula-theme.theme-dracula-2.25.1","metadata":{"installedTimestamp":1744233970240,"source":"gallery","id":"4e44877c-1c8d-4f9c-ba86-1372d0fbeeb1","publisherId":"fbb3d024-f8f2-460c-bdb5-99552f6d8c4b","publisherDisplayName":"Dracula Theme","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"hyzeta.vscode-theme-github-light","uuid":"b84ed643-ec7d-49cc-a514-3ce104ed777f"},"version":"7.14.2","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/hyzeta.vscode-theme-github-light-7.14.2","scheme":"file"},"relativeLocation":"hyzeta.vscode-theme-github-light-7.14.2","metadata":{"installedTimestamp":1744238749461,"source":"gallery","id":"b84ed643-ec7d-49cc-a514-3ce104ed777f","publisherId":"18f3a989-6d93-420d-a045-baf7651c8552","publisherDisplayName":"Hyzeta","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"github.copilot","uuid":"23c4aeee-f844-43cd-b53e-1113e483f1a6"},"version":"1.300.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/github.copilot-1.300.0","scheme":"file"},"relativeLocation":"github.copilot-1.300.0","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1744238774409,"pinned":false,"source":"gallery","id":"23c4aeee-f844-43cd-b53e-1113e483f1a6","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"jjk.jjk","uuid":"27fecc3e-093e-4ff1-b130-b3ccf371337d"},"version":"0.6.2","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/jjk.jjk-0.6.2","scheme":"file"},"relativeLocation":"jjk.jjk-0.6.2","metadata":{"installedTimestamp":1744254626428,"pinned":false,"source":"gallery","id":"27fecc3e-093e-4ff1-b130-b3ccf371337d","publisherId":"8a38bc31-626a-4853-9ef7-91fe4f1486f4","publisherDisplayName":"Jujutsu Kaizen","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}}] \ No newline at end of file diff --git a/modules/home/vic/fish.nix b/modules/home/vic/fish.nix deleted file mode 100644 index a62430d8..00000000 --- a/modules/home/vic/fish.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ inputs, pkgs, ... }: -let - inherit (pkgs) lib; -in -{ - - home.file.".config/fish/conf.d/init-leader.fish".source = - "${inputs.cli-leader.outPath}/assets/leader.fish.sh"; - - programs.fzf.enable = true; - programs.fzf.enableFishIntegration = true; - - programs.fish = { - enable = true; - - functions = import ./fish/functions.nix { inherit inputs lib; }; - shellAliases = import ./fish/aliases.nix; - shellAbbrs = import ./fish/abbrs.nix; - - plugins = [ ]; # pure done fzf.fish pisces z - }; - -} diff --git a/modules/home/vic/git.nix b/modules/home/vic/git.nix deleted file mode 100644 index 1a3a81bb..00000000 --- a/modules/home/vic/git.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ pkgs, ... }: -{ - - home.packages = [ pkgs.difftastic ]; - - programs.git = { - enable = true; - userName = "Victor Borja"; - userEmail = "vborja@apache.org"; - signing.format = "ssh"; - - extraConfig = { - init.defaultBranch = "main"; - pull.rebase = true; - pager.difftool = true; - diff.tool = "difftastic"; - difftool.prompt = false; - difftool.difftastic.cmd = "${pkgs.difftastic}/bin/difft $LOCAL $REMOTE"; - - github.user = "vic"; - gitlab.user = "vic"; - - core.editor = "vim"; - }; - aliases = { - "dff" = "difftool"; - "fap" = "fetch --all -p"; - "rm-merged" = - "for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D"; - "recents" = - "for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'"; - }; - ignores = [ - ".DS_Store" - "*.swp" - ".direnv" - ".envrc" - ".envrc.local" - ".env" - ".env.local" - ".jj" - "/devshell.toml" - "/.tool-versions" - "*.key" - "/vic" - "*~" - ]; - includes = [ ]; - # { path = "${DOTS}/git/something"; } - - lfs.enable = true; - - delta.enable = true; - delta.options = { - line-numbers = true; - side-by-side = false; - }; - }; - -} diff --git a/modules/home/vic/jujutsu.nix b/modules/home/vic/jujutsu.nix deleted file mode 100644 index 917221b2..00000000 --- a/modules/home/vic/jujutsu.nix +++ /dev/null @@ -1,144 +0,0 @@ -{ pkgs, perSystem, ... }: -{ - - home.packages = - let - jj-for-tui = pkgs.stdenvNoCC.mkDerivation { - inherit (pkgs.jujutsu) name version meta; - nativeBuildInputs = [ pkgs.makeWrapper ]; - phases = "wrap"; - wrap = '' - makeWrapper ${pkgs.jujutsu}/bin/jj $out/bin/jj \ - --add-flags --config-file \ - --add-flags "~/.config/jj/tui.toml" - ''; - }; - - jj-tui-wrap = - main: drv: extra: - pkgs.stdenvNoCC.mkDerivation { - inherit (drv) name meta; - nativeBuildInputs = [ pkgs.makeWrapper ]; - phases = "wrap"; - wrap = '' - makeWrapper \ - "${drv}/bin/${main}" \ - "$out/bin/${main}" \ - --prefix PATH : ${jj-for-tui}/bin \ - ${extra} - ''; - }; - in - [ - (jj-tui-wrap "lazyjj" pkgs.lazyjj "--add-flags --jj-bin --add-flags ${jj-for-tui}/bin/jj") - (jj-tui-wrap "jj-fzf" pkgs.jj-fzf "--add-flags --key-bindings") - (jj-tui-wrap "jjui" perSystem.jjui.default "") - ]; - - programs.jujutsu = { - enable = true; - - # See https://jj-vcs.github.io/jj/v0.17.0/config - settings = { - user.name = "Victor Borja"; - user.email = "vborja@apache.org"; - - revset-aliases = { - "trunk()" = "main@origin"; - - # commits on working-copy compared to `trunk` - "compared_to_trunk()" = "(trunk()..@):: | (trunk()..@)-"; - - # immutable heads: - # main and not mine commits. - "immutable_heads()" = "trunk() | (trunk().. & ~mine())"; - - "default_log()" = "present(@) | ancestors(immutable_heads().., 2) | present(trunk())"; - }; - - template-aliases = { - "format_short_id(id)" = "id.shortest().upper()"; # default is shortest(12) - "format_short_change_id(id)" = "format_short_id(id)"; - "format_short_signature(signature)" = "signature.email()"; - }; - - ui = { - default-command = [ - "status" - "--no-pager" - ]; - diff.tool = [ - (pkgs.lib.getExe pkgs.difftastic) - "--color=always" - "$left" - "$right" - ]; - # pager = ":builtin"; - # editor = "nvim"; - merge-editor = "vscode"; # meld - }; - - signing = { - behaviour = "own"; - backend = "ssh"; - key = "~/.ssh/id_ed25519.pub"; - }; - - git = { - push-bookmark-prefix = "vic/jj-change-"; - }; - - aliases = { - l = [ - "log" - "-r" - "compared_to_trunk()" - "--config" - "template-aliases.'format_short_id(id)'='id.shortest().upper()'" - "--config" - "template-aliases.'format_short_change_id(id)'='id.shortest().upper()'" - "--config" - "template-aliases.'format_timestamp(timestamp)'='timestamp.ago()'" - ]; - - # like git log, all visible commits in the repo - ll = [ - "log" - "-r" - ".." - ]; - }; - - }; - }; - - home.file.".config/jj/tui.toml".source = - let - toml = { - ui.editor = "vim"; - jj-fzf = { - show-keys = "true"; - revsets.log = ".."; - diff-mode = "jj-diff"; - }; - template-aliases = { - "format_short_id(id)" = "id.shortest().upper()"; # default is shortest(12) - "format_short_change_id(id)" = "format_short_id(id)"; - "format_short_signature(signature)" = "signature.email()"; - "format_timestamp(timestamp)" = "timestamp.ago()"; - }; - }; - fmt = pkgs.formats.toml { }; - in - fmt.generate "tui.toml" toml; - - home.file.".config/jjui/config.toml".source = - let - # https://github.com/idursun/jjui/wiki/Configuration - toml = { - - }; - fmt = pkgs.formats.toml { }; - in - fmt.generate "config.toml" toml; -} diff --git a/modules/home/vic/nvim.nix b/modules/home/vic/nvim.nix deleted file mode 100644 index 8ecb3e19..00000000 --- a/modules/home/vic/nvim.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ pkgs, ... }: -{ - home.sessionVariables.EDITOR = "vim"; - programs.neovim.enable = true; - programs.neovim.viAlias = true; - programs.neovim.vimAlias = true; - programs.neovim.withNodeJs = true; - programs.neovim.extraPackages = with pkgs; [ - zig - sqlite - treefmt - ]; - -} diff --git a/modules/home/vic/secrets.nix b/modules/home/vic/secrets.nix deleted file mode 100644 index 190c0361..00000000 --- a/modules/home/vic/secrets.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - inputs, - config, - pkgs, - ... -}: -{ - - imports = [ - inputs.sops-nix.homeManagerModules.sops - ]; - - home.packages = [ pkgs.sops ]; - - sops = { - age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt"; - age.sshKeyPaths = [ ]; - age.generateKey = false; - defaultSopsFile = ./secrets.yaml; - validateSopsFiles = true; - - secrets = { - "hello" = { }; - "ssh/id_ed25519" = { - format = "binary"; - sopsFile = ./secrets/mordor; - }; - "ssh/sops_ssh_config" = { - format = "binary"; - sopsFile = ./secrets/ssh-conf; - }; - }; - - templates = { - "hello.toml".content = '' - hello = "Wooo ${config.sops.placeholder.hello} Hoo"; - ''; - }; - }; - -} diff --git a/modules/home/vic/secrets.yaml b/modules/home/vic/secrets.yaml deleted file mode 100644 index fbe64ef6..00000000 --- a/modules/home/vic/secrets.yaml +++ /dev/null @@ -1,27 +0,0 @@ -hello: ENC[AES256_GCM,data:7R26OBoPCxSV8AwDFyI92R2s+x4N1LuIPDcGuGJ4QNdHqxCsnewLm1aS2KT5Sg==,iv:f8cgbppFfeESlcEwAxBQFVNVJP2EVib2uCiUw0zfwP8=,tag:Gkn+AOjMAncEwAvEqtzfxg==,type:str] -gh_actions_pat: ENC[AES256_GCM,data:BKfkJkymrgW1nh6GxbuT0OyLZRhsbZG+cqNqn5zY8gjlxOFdBysfLLYZcNeqHM/CQG/Z3UGWE3i47s8j7iCVrliiZVaKXwqeku4SXql9h6AVjVye6FM44lN8jzTa,iv:NONHWFikaQCiTz+gzrJ5dn9bKgo1NjbustcsNCRDUXI=,tag:d+qQSeHQFxQG0J8zgMoZFg==,type:str] -cachix_personal: ENC[AES256_GCM,data:H/TieCTS0igCKbgDvHMJr6RAGdB0+hBNcYEZEL36DFRPVDln2UJkz4Z/x+7B+A6Vu+08QN3qBas7YdEI3FQzezTVtr+hix9MfwSe+5V1si9YXaGwZuz/FKEpCBiMhVo5kylExtbZ7CF3XwqaOlzdhhliRmPj9tSfC8kFsLkwRXxC27ec1L8huzkBCHDutxMStw==,iv:mymYXDiM7gheeCWR5vYJI3plVSIbT9g6l6oZGrB8k0Y=,tag:mX6weKnUe5TF1k4/YszDBA==,type:str] -cachix_gleam_nix: ENC[AES256_GCM,data:ZqY3/L47SKb39kSvp3N/55aBoLIeS6t6b+iUxnPQvkUmnkn4/gkVpGnwlMU1IEp6Y5OCDUOYXthaRsBwWuiiukpesaygqOTquX1yUXCgFJ2t4FlvigMTl18sOLjGK7Xenfjo/V//sNGi3N1LNItywg/Fvna5smegoOJ40fm9ogX+5mnvh9CJUHrd1gjz3c0cDZjQU4g=,iv:ylE+G++jSOEto2pipGxHZBb8doYR2gGiZ8ZcaD6sdq4=,tag:33NAdmJ80NmJPlL8LeIdQQ==,type:str] -cachix_vix: ENC[AES256_GCM,data:OqdKuc/clXIcN8nppKo/XbM3EfuLF745EpXAtM+eAag4FMh3l9mMgq4eGcEmnPX86Ba9CSpQawTgwK7rgj2DB12NAC2CiTDyEgk/b5LAGk9/oKnzKkvSbaotevAJT6eNtMYEtDuNbX2md9ltOARVPT46zdAZZvenzLUxQCGICVIRKjCjx02voVyj27p6aWd07f/cbuo=,iv:8xnWPN7l+5dg5NQhYMkqytQDHl+JKIBdM13HmmnlyEQ=,tag:Q5QfFnQ5mFVKfDjNf+ycIA==,type:str] -alwaysdata_vic: ENC[AES256_GCM,data:Jl7hSEhy3KXKM8ue2SNnxifpqY3FDGePfZTYFlIGNEU=,iv:WevxrLrFeDe7T4b/t0+ETP1h0K8AXOmuASlszaaTdhE=,tag:xKMK5jCoqkmQxvUG0G8KKg==,type:str] -alwaysdata_vix: ENC[AES256_GCM,data:UTAw7Gpw2KlQDUSYpuY7LUEvY9P0YEIVogM=,iv:MPAh+oPqfgbYiZhLPq2YkxI2A0YevI6tQ63A4errBss=,tag:iyscRaCY8ZBDmhbge97H1Q==,type:str] -alwaysdata_nix_versions: ENC[AES256_GCM,data:wYnsbyeziI/1RTwuF/5PYpcdgoxzx+s=,iv:JblAEGt7rRmSkuIo4IJYfV2zFVIEVofThJcRb9dORv0=,tag:z8FT3g6PM6iC8p1TqttHdg==,type:str] -alwaysdata_nix_versions_api_key: ENC[AES256_GCM,data:nRrAKYEzUOm9dmBBbZFzCFxd9vAnbFhXF/0VnwosMZA=,iv:EcRH91F8r4FVonyy16ys+mOf2E4tx8qmZttU1CXEVr4=,tag:uAEQIG+jxz3qmXy0QlI3yg==,type:str] -alwaysdata_nix_versions_totp: ENC[AES256_GCM,data:eNfxUBoImr1ogdZ2CfCLF7hU3S0vDzil9i+LC37aePA=,iv:5akqwLvFLePU0zs3LhLAE5pxWrdGwQdSZtMSWTI4XYY=,tag:bj4WYKPWM6qEyQMdkzmWzQ==,type:str] -nix_versions_ssh: ENC[AES256_GCM,data:BW6q6byHFulS9pAeLh8mBQl4A+BGg7XFlMM=,iv:Xbe5TQhadHKtgJjDb2ncew4XfhLsD9pl4YVnkdv7na4=,tag:4CTRkH8pLoDa6o4Xb/aFUw==,type:str] -gemini_api_key: ENC[AES256_GCM,data:crJzUYfhNFKURDtfSvuzHVw4MtqAcJUEy088okk1uP5oPR5M8Db9,iv:3zsX3cvbnz1+PDSwGGjN9nX9gDC9hrzgFhG3VPzXb/E=,tag:yYxKM7aJoy62Aepgv+fmYQ==,type:str] -sops: - age: - - recipient: age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4QzBuV2cyWlVObEhhN0V2 - YzlRandEQ2FSakUxSUQrcmY1NVkrYkFMVmhRCkdRWlBiNENQNTkvVGRIUm80TmQz - SjBUeGI4bk9nQjRucWtvN2N3SGJsKzQKLS0tIHdwclZINk5tTVRWakNQQnlYRTVy - RngvNDFJVis4bnFTSDcyemtSM1kvNGcKN4Dx+YvXieoGnPUOlp9Qpl1CdFM/5A0s - j+UxpVFZGaTYntcE5oZ16w+I8fG4VQhPc27RRPPY6R5kWwL9gtteSg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-04-11T00:33:26Z" - mac: ENC[AES256_GCM,data:QDzgWgQ55vsgY6T4/gEoTgdmrEMuSUb1c23/7z/Qhfgxo4doHVVY5ZQtQYIcerTFvYapmWr3DrlyPCWco/Ju3SdHuCLXNGn7aFeHp27fmSbippOFy7d+ec6/HRU9XU42/KDTYqgrJwuPqblzej2lkt28JXigPD1nDeHtGxiPa+s=,iv:jimzvL5YjNLvM5MQfR3SzbP/FKxyRzZM8WLRNCPzo9I=,tag:rzcgcUwRwv10dMz6FPcT1g==,type:str] - unencrypted_suffix: _unencrypted - version: 3.10.1 diff --git a/modules/home/vic/secrets/gh-recover b/modules/home/vic/secrets/gh-recover deleted file mode 100644 index bdecbfaf..00000000 --- a/modules/home/vic/secrets/gh-recover +++ /dev/null @@ -1,15 +0,0 @@ -{ - "data": "ENC[AES256_GCM,data:EXyvdrebmHRETKD/GNdovyNg/8xHe4hPffrfivWYoZ6KBcS/Ecw2D5Mkw+zmdWY5PPSfoo7u6nxjLB/gWQiEIfEhD/UjeJH3UnvGdml+Z7bNyBBl8eoTDdCZQlECCewYipeSKidhz3UOLGU2Hr2mkD0tgQ1Ie2yTFB4jp6pSpiJASR4ss3VUilHVYZnOWexczG11lwtW9mtYLk5zNxEc47FPKVOthjAgkysrtIYo55VBHUZ//xbN/DCKASQ7MNKDAqGXzs0R2qDne81CBNk=,iv:aCjlCntFSHeb8iuJ+DAEzBPY7pRXCpFGZSBuhJiM3/M=,tag:9Z0G7QlCtCb6pXDuw+uQNQ==,type:str]", - "sops": { - "age": [ - { - "recipient": "age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0VW5rWTNhaStiZFA1elhr\nTjZEMjYzT3hpN3BjNFJvTDE0TW1DVlNBVDFZClV6RytOUlFNd2hzNWI1UEpzYlNx\nbytzTnViU04wRlA3SlYrcUxqU090SncKLS0tIHdZZGVXSzFKd2pMV1B2NHdqN3Rz\ndjZWbU9Bd2YxMDQyQ3FTY0loOFNEQmcKcnt8vuVzXnwxt72tZqCIJFqXMaEWgtO1\nkQZLapcfLfoJsSgVtYIimJcGjc+7rkyabQSk0qxgH+/9eYTCziJ4MQ==\n-----END AGE ENCRYPTED FILE-----\n" - } - ], - "lastmodified": "2025-04-10T19:56:44Z", - "mac": "ENC[AES256_GCM,data:hKLV3HNBnC0hNjdStGYIGbQ4IEcRwUQEi3bUi6gro7jmSDyd+am0zjwA8m9WnIW8lTWH4PurMjZh4mhY8p5rLymfFUy08ik0MUP0FVzlrhk54YvW3crTT4aI2Jgcq22b1297al/hLRYplqKAExaN08QmYkedMtH6jdCSuBI/kxM=,iv:cW/G/IzJ+bSIvjfg3VsWn9mWtygf1r8biGlODkioAvU=,tag:QGKIt4dbEbZKxW5ULvt0oQ==,type:str]", - "unencrypted_suffix": "_unencrypted", - "version": "3.9.4" - } -} diff --git a/modules/home/vic/secrets/mordor b/modules/home/vic/secrets/mordor deleted file mode 100644 index 04023f89..00000000 --- a/modules/home/vic/secrets/mordor +++ /dev/null @@ -1,15 +0,0 @@ -{ - "data": "ENC[AES256_GCM,data:5MyZ/JK2AicnHxylksPGNScJo/9gDtsQjjHC+Cf/Uq93ygkwrAmMsPuTaCgg7wiJBA4i4jTtigZSuHCDoi+JOeft8hM5Jb8p47pnF51q2WbbygdsR5egTb2hW0ZPrEsY1EzYAabRnqmaVAo3SfSPSbKetRV9LqTmJVwyE7V9BOa/nAwVWx9/3ZiqDn0rN3lrMn3yK7J7HN9Fg1FB9gXG9V79mBNZlCM226qQ38FsUFZkcppOD8nWDAaG/h8CTcKcmyOubP8iJTtSZAlp1VyUK3jzRoaaI06tklLuRZEUPVEwhZ65QL2ak5xddk92zXu+lAjirj9XEHXYN2C0rzNaPu+XpXweHCjFXyUxkGgIcylfJ00r0FeANDieM+yIvO3BjKTNpUsm0naoFi6KeT70HX7qpDm4F9gkJwU27V1Pd1i/pMPEx8pRosrJbb5TKoX+u09FTJ/9mJU4alXHD4d9cdaDv1J6bnIhsWmi/X0DYdN15dYW0QnAWtmw9wTCTKCEGLmJyLFCD2R2SjJVALV9U2C9Qp7zVc4Z5iER/NsiW6JDAwvsblQxvq1aYv10J0v3X9YIucUMC9wgEsGL,iv:+Zm1AEglKHEH/TIzrZnFH+vDFQtQKrdFBGVzGx+IjlU=,tag:cQa4aVuIdKSOGIP8AoYv5A==,type:str]", - "sops": { - "age": [ - { - "recipient": "age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBXTVlYalB5Sk84QnQrbVR1\nOWtPQngrc2lINGRHR0Vwd3NtdjRSRXo0aGlFCmZxM1dHWUo0NjlCd1pXTjA4bjlU\nNmFFdWxmdnV4bUJBdHM3Ym5mQ0dGcjQKLS0tIGJ2Rm5iVVZ1L0VOTDlmK3UyU2Ur\nWXo0OC9QTlNEU0NWZnk5VVZJemNCem8KF9zaaJh1NA0QH60XmWK6SKEzyha64UfP\nydwJMpo17F8sP++/tJQ/m3h6jTYcdnx9UKUTglVyMLGnQ6k/XZ4+rw==\n-----END AGE ENCRYPTED FILE-----\n" - } - ], - "lastmodified": "2025-04-10T19:56:44Z", - "mac": "ENC[AES256_GCM,data:mmOEpuR9Ej68EC2MJm7esXwX/EsUvIS5CNwax+CcteHDqjACTJK3EBu9O3zDYt7Da/aj5usbJsJsiIcjsdGPmEdVdQs/oE11GLO+aT4viZj8OxPM7NExXNSxR/Ol3botOXF6mYWEqeucdlbnwuqV+s5XAfxg9+rAh77nvrMoKGw=,iv:gxS45hLs58RSA1uyjxc+scHjDI6Rol+ewFwPhUiuaYg=,tag:jYROtv3BBGrTn+K4jKkzXQ==,type:str]", - "unencrypted_suffix": "_unencrypted", - "version": "3.9.4" - } -} diff --git a/modules/home/vic/secrets/nix-versions b/modules/home/vic/secrets/nix-versions deleted file mode 100644 index 9cebdb29..00000000 --- a/modules/home/vic/secrets/nix-versions +++ /dev/null @@ -1,15 +0,0 @@ -{ - "data": "ENC[AES256_GCM,data:AR0/oB9uP6DJo+D6z3a9qiUZLBc/HaFKZ5ZNv/ksCVcYf6WPimQcBBp9dPPB3X68jZir8hIDHStaZYgGtqFKtHdskg8BXqZYb+ka65OQ+HVH6hry26YHJ75yueGqACPYlMYBf1mmAWUXRfaKpw0hO0Bxu21bEzBVePrmpnx3UTsuaQxHYIXtyS8GmNeLtK9lbeWTdy7WcV4T7T2g0lIahhbd8snT3qlL5iJU3nbBdB2n8XxUD3JL5XFJ2Byq2Is2JhPwkm0AIpyYYNgNMNJ9jfXnkLvyKdqg1VY5iNiiM1+yJY0ksYJMwiFRLcGui/VsMbwDEfLtE7PZv49ryz75QRybDHf7K/l0PyhtS5OhyxiWISL/LAbfCfspOb+mX1r7JSqHyaVSLlJtIZn2rmS/b3lN/ond5PGmxpQF0N0bTl/PBL+f9qoiByqwvlrKI1iMZmkgKgK6eW5YSvajupjtTA7BTMDp5XXS4dy4m402xLN6Uj+67MUIFyuxZuUvA08ZQxQsX2gSHNlsX5vm9f1Z,iv:crVwb2Sr694f047Dg35t86/gOy5XVzCKR7eyPB1v3CQ=,tag:yeiHiQgQinV8QUVQDwZoPA==,type:str]", - "sops": { - "age": [ - { - "recipient": "age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBEdW1oVXdpZ2ovUStVc3Vr\ndk1DWUhrV2R2SUZIQVhxWTVNR0MyU1lNSGhBClkxWGlhQnRrZ2dqVWs2dkk5YzBV\nckZ5bzl1ekxHTUdRYWZiL005ZzZzRU0KLS0tIGJWalZha21aR09BcStpam1oVUcy\nWG9udWV0LzhYSzZPMVhOaWs2UEI2aGsKv8KSI03x/7GAb3sGjDOh3wBQTHHG5rTI\nBaHtxm8FqPiHaqvrWmwRSzn5SQVX4z/VVrF2TcfhQEFB3+Gdqny5Xw==\n-----END AGE ENCRYPTED FILE-----\n" - } - ], - "lastmodified": "2025-04-10T19:56:44Z", - "mac": "ENC[AES256_GCM,data:mmAQieBJBQmF0/JxJpd4vcycjC+w5/ngd8QnTco5r4jb+Xf0PK0rTQUlWDXXGCW5bLatQbTv4X4eesmdg85e/4W+PRA+/yKX3MAnkS+jlUflhFogLB+XjoXM0UFCyMhoH66rLXkaSjr2rXPzUQr7FV56+6F0om74xInw9nCnoZs=,iv:m3XioSm/bY2MxctKi9Z/aTNoelMitjriqILrUQdR6Uk=,tag:bMHjE5TL3ys7ZSvW+EtE5w==,type:str]", - "unencrypted_suffix": "_unencrypted", - "version": "3.9.4" - } -} diff --git a/modules/home/vic/secrets/ssh-conf b/modules/home/vic/secrets/ssh-conf deleted file mode 100644 index 14cf429a..00000000 --- a/modules/home/vic/secrets/ssh-conf +++ /dev/null @@ -1,15 +0,0 @@ -{ - "data": "ENC[AES256_GCM,data:0afUmtZuYqVgaF5TXrCoBfqdOmh0S0H+ojWG2DbMwtBUEIv8fMBg9MI/6sFMC5PIyVNFXrgQdf1x0UfYRKheM/jXRG5VIdEeYpm/FDCrcnEdgSClyhX4lSdUCGkmIY3ujyo1q7CXHxVrJhEiezU5vzXyKdgSyJ9zOaiYcZLnXyv5Yi7/BzTPP5sqHADzkuaigmFW2VwD4rGUN9Qn0lFCb/ZvO8IlZ4rIcflFJkV+XOcZydXm/zKflhGxpOJAWdgNwGD7/wC6mJov6zBv+wjdQvNgIfLJ6nQvqjBLVttpFPaeLU+x23M3GQY/nDiXrGaDqdjH8esyc4whnA==,iv:iSlNo/WSvc2G31qmwXxFECC+gOH9YK2gA7mzvsdVoU8=,tag:HALJyzuksFjxCN6tmwNLNQ==,type:str]", - "sops": { - "age": [ - { - "recipient": "age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4bitQK0xPR0VjdEpNdmRZ\nYTNHeHRoUmh2UjlhYVFjU0NLVlFESzRzTUZ3ClZVUjdKNGNrbUZ0bHJSOERUSFhC\nOGltbGhuVVMyMVR4bDdKdWFOekNwdFEKLS0tIGk0bWRtNUxHcEcwM2oxditXaXZt\nR2kxQ3haeUVzbXdQRjlBclVjVFdvUEkKRtxh9sWNdkIiIMSXpy2NnIz3Z2HvK3rc\n3oIg9U2misRj3ko+23kgPzWRYRfVjyOo/zMazQz0SRjn9s4eJ1TDPQ==\n-----END AGE ENCRYPTED FILE-----\n" - } - ], - "lastmodified": "2025-04-10T19:56:44Z", - "mac": "ENC[AES256_GCM,data:UNXAJLsLSQAPv9K43TwqkC6lh0GpfWngAe0Yqefs7XNi6Yj0rihV/nDoPYK7bgTRPLB8W8Hbr2v2NxKa0i3xoXC92KD/oGQxAa7iJtlIWtScc3IpN8Hay8yYqXs34/tKpfeDkG5U9aDvV0kPik054/Nx3eRj7BPpZ5411pVDeFM=,iv:HzBrTV5w0MMz1Zt/XWidGwByMVRC61siCKAJUVGuQkA=,tag:MYA6NUT9DIaAiF5ciVw7LA==,type:str]", - "unencrypted_suffix": "_unencrypted", - "version": "3.9.4" - } -} diff --git a/modules/home/vic/secrets/vix b/modules/home/vic/secrets/vix deleted file mode 100644 index 5bcf28d4..00000000 --- a/modules/home/vic/secrets/vix +++ /dev/null @@ -1,15 +0,0 @@ -{ - "data": "ENC[AES256_GCM,data:F0e973VLxDZQxZkJHgi+Nm6UGj1eJBJty2fsuNCkDnZOpq1Yndwzuz6wmg+umoRGH8AZlxw51NXCDEJ9XfcOULrofIcx3N5/O6kbiUWIXqeLzTGgTXNELb3CBN4ukXImu94+2sLXaIFeXZFWJqccgN6tFKaIZoYiqhMviU5hEXVyQNOuRUCULjEJQmQPVw7APO/crBs6zWX6EB+xL+dggYLZyPDkKHyPCYlaVjj8a+CFu89b4vySdOKZjVg0E0ItoA9sYV7j6Lhxt6p1GZ0nPpQGZdiHr1QhfuB8gnvxGHH7OS0vfzJ+FdWt2Ftf291sZyL6e2US8hw/r8fK0TSARzaW11ppbvPfRe8ffYHe89O3ZkOHIcyk+YvkdVIKJTuirdiSLs0xqhlsBICzCJFSy/jPWUhyHdF0chgRNQTVLHI3OHTTSJnGn5bndCfJ4xd/LEKMQYp2qsrgnznv/UBQEYAwDs0GI5Vu0712060OluUO4PcVV/RQsR7iDxw/tRPsRFPQ,iv:A4LRsPwPU5uIkLFNE/tyqsTBJZmUa8FN3r7D7kS6hig=,tag:5DNmUy0MdIdXTjSn3BUiWQ==,type:str]", - "sops": { - "age": [ - { - "recipient": "age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWSEtDd1hmVUJaWDhXSTJn\nZjNJZm9lKzgva0ZNLzdTWkxISG9UaUNIcFdNCmJ0YmtOWEFudCtUd0F4VVhaaDZk\nUXBSRTZzb3hNVWwwNmtMdTczdVgvYlUKLS0tIExNUUZreEthMC9yWWZROElPU2ZG\nVHhUc3JrV29qTmR1MDNHc2tnRjFKN1kKhcfyx/oqfD1yZmywUZGI602sHwMSbN+Z\nwFY/brBj/JnFCMRUnoRoB8VFr840DxAzCPxR925Hgi6f3xGWyMpGtQ==\n-----END AGE ENCRYPTED FILE-----\n" - } - ], - "lastmodified": "2025-04-11T00:37:17Z", - "mac": "ENC[AES256_GCM,data:iccU5Tvf1ic0ss1TmV5ROx9mOnascfVaUBtuaD5U5O4QRWlmaxRS7O96WJludRGpezgvGaL8dWO13GhCU8Ab+C2KD4hSuVJMq98gNjvkPh/KTLwl30NqewTPmilKho+2LQOdNanUM38g4Q2Dq3N/jSfvRCwvohDoYuOjZ2dRc0A=,iv:FiWH5G4/LRcCM2krRJWmls/ZzDV9rRD66IcKG6XROlc=,tag:LOhQleOaS5YY6oCJ5fnqnw==,type:str]", - "unencrypted_suffix": "_unencrypted", - "version": "3.10.1" - } -} diff --git a/modules/home/vic/ssh.nix b/modules/home/vic/ssh.nix deleted file mode 100644 index 35a92cac..00000000 --- a/modules/home/vic/ssh.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: -{ - programs.ssh = { - enable = true; - addKeysToAgent = "yes"; - controlMaster = "auto"; - controlPath = "~/.ssh/%r@%h:%p"; - controlPersist = "10m"; - includes = [ "~/.config/sops-nix/secrets/ssh/sops_ssh_config" ]; - - matchBlocks = { - "github.com" = { - identityFile = "~/.ssh/id_ed25519"; - extraOptions.ControlPersist = "no"; - }; - - "uptermd.upterm.dev" = { - forwardAgent = true; - serverAliveInterval = 10; - serverAliveCountMax = 6; - extraOptions.ControlPath = "~/.ssh/upterm-%C"; - setEnv.TERM = "xterm-256color"; - localForwards = [ - { - bind.port = 8000; # http - host.address = "127.0.0.1"; - host.port = 8000; - } - { - bind.port = 5900; # vnc - host.address = "127.0.0.1"; - host.port = 5900; - } - ]; - remoteForwards = [ - { - bind.port = 5000; # sops - host.address = "127.0.0.1"; - host.port = 5000; - } - ]; - }; - - }; - }; - - services.ssh-agent.enable = pkgs.stdenv.isLinux; - - home.activation.link-ssh-id = lib.hm.dag.entryAfter [ "link-flake" "sops-nix" "reloadSystemd" ] '' - run ln -sf "${config.sops.secrets."ssh/id_ed25519".path}" $HOME/.ssh/id_ed25519 - ''; -} diff --git a/modules/home/vscode-server.nix b/modules/home/vscode-server.nix index 4722bc7b..789e6d58 100644 --- a/modules/home/vscode-server.nix +++ b/modules/home/vscode-server.nix @@ -1,15 +1,19 @@ -{ inputs, pkgs, ... }: +{ inputs, ... }: { - imports = [ - inputs.vscode-server.homeModules.default - ]; + flake.modules.homeManager.vscode-server = + { pkgs, ... }: + { + imports = [ + inputs.vscode-server.homeModules.default + ]; - services.vscode-server = { - enable = true; - nodejsPackage = pkgs.nodejs_latest; - extraRuntimeDependencies = with pkgs; [ - curl - wget - ]; - }; + services.vscode-server = { + enable = true; + nodejsPackage = pkgs.nodejs_latest; + extraRuntimeDependencies = with pkgs; [ + curl + wget + ]; + }; + }; } diff --git a/modules/hosts/annatar/configuration.nix b/modules/hosts/annatar/configuration.nix new file mode 100644 index 00000000..6e872015 --- /dev/null +++ b/modules/hosts/annatar/configuration.nix @@ -0,0 +1,10 @@ +{ inputs, ... }: +let + flake.modules.nixos.annatar.imports = with inputs.self.modules.nixos; [ + vic + { wsl.defaultUser = "vic"; } + ]; +in +{ + inherit flake; +} diff --git a/modules/hosts/bert/darwin-configuration.nix b/modules/hosts/bert/darwin-configuration.nix new file mode 100644 index 00000000..91766119 --- /dev/null +++ b/modules/hosts/bert/darwin-configuration.nix @@ -0,0 +1,5 @@ +{ + flake.modules.darwin.bert = { + users.users.runner.home = "/Users/runner"; + }; +} diff --git a/modules/hosts/bill/configuration.nix b/modules/hosts/bill/configuration.nix new file mode 100644 index 00000000..3b4c279e --- /dev/null +++ b/modules/hosts/bill/configuration.nix @@ -0,0 +1,7 @@ +{ + flake.modules.nixos.bill = { + boot.loader.grub.enable = false; + fileSystems."/".device = "/dev/null"; + users.users.runner.isNormalUser = true; + }; +} diff --git a/modules/hosts/bombadil/configuration.nix b/modules/hosts/bombadil/configuration.nix new file mode 100644 index 00000000..5df9909a --- /dev/null +++ b/modules/hosts/bombadil/configuration.nix @@ -0,0 +1,40 @@ +# nix build .#.nixosConfigurations.bombadil.config.system.build.isoImage +{ inputs, ... }: +{ + flake.modules.nixos.bombadil = + { + modulesPath, + config, + lib, + ... + }: + { + imports = with inputs.self.modules.nixos; [ + "${toString modulesPath}/installer/cd-dvd/installation-cd-base.nix" + vic + macos-keys + kvm-intel + wl-broadcom + all-firmware + xfce-desktop + ]; + + lib.isoFileSystems."/home/vic" = { + device = "/dev/disk/by-label/vic"; + fsType = "ext4"; + }; + + users.users.vic.uid = 1000; + users.users.nixos.uid = 1001; + + isoImage.edition = lib.mkDefault config.networking.hostName; + networking.networkmanager.enable = true; + networking.wireless.enable = lib.mkImageMediaOverride false; + + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + services.blueman.enable = true; + services.pulseaudio.enable = false; + + }; +} diff --git a/modules/hosts/mordor/configuration.nix b/modules/hosts/mordor/configuration.nix new file mode 100644 index 00000000..d869e668 --- /dev/null +++ b/modules/hosts/mordor/configuration.nix @@ -0,0 +1,23 @@ +{ inputs, ... }: +let + flake.modules.nixos.mordor.imports = with inputs.self.modules.nixos; [ + kvm-amd + mordor-nvidia + mordor-unfree + nvidia + vic + xfce-desktop + ]; + + mordor-nvidia = { + hardware.nvidia.prime.nvidiaBusId = "PCI:9:0:0"; + }; + mordor-unfree = inputs.self.lib.unfree-module [ + "nvidia-x11" + "nvidia-settings" + ]; + +in +{ + inherit flake; +} diff --git a/modules/hosts/mordor/filesystems.nix b/modules/hosts/mordor/filesystems.nix new file mode 100644 index 00000000..b8d62d72 --- /dev/null +++ b/modules/hosts/mordor/filesystems.nix @@ -0,0 +1,30 @@ +{ + flake.modules.nixos.mordor = { + + boot.initrd.availableKernelModules = [ "nvme" ]; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + fileSystems."/home" = { + device = "/dev/disk/by-label/home"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-label/BOOT"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-label/swap"; } + ]; + + }; +} diff --git a/hosts/mordor/hardware-configuration.nix b/modules/hosts/mordor/hardware-configuration.nix similarity index 53% rename from hosts/mordor/hardware-configuration.nix rename to modules/hosts/mordor/hardware-configuration.nix index b43dbb09..65cd0c78 100644 --- a/hosts/mordor/hardware-configuration.nix +++ b/modules/hosts/mordor/hardware-configuration.nix @@ -2,15 +2,14 @@ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. { - ... -}: -{ - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" - ]; + flake.modules.nixos.mordor = { + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + }; } diff --git a/modules/hosts/nargun/configuration.nix b/modules/hosts/nargun/configuration.nix new file mode 100644 index 00000000..7a48bbed --- /dev/null +++ b/modules/hosts/nargun/configuration.nix @@ -0,0 +1,14 @@ +{ inputs, ... }: +let + + flake.modules.nixos.nargun.imports = with inputs.self.modules.nixos; [ + vic + xfce-desktop + macos-keys + kvm-amd + ]; + +in +{ + inherit flake; +} diff --git a/modules/hosts/nargun/filesystems.nix b/modules/hosts/nargun/filesystems.nix new file mode 100644 index 00000000..05deff06 --- /dev/null +++ b/modules/hosts/nargun/filesystems.nix @@ -0,0 +1,21 @@ +{ + flake.modules.nixos.nargun = { + + fileSystems."/" = { + device = "/dev/disk/by-uuid/5e0a5652-9af6-4590-9bd1-be059e339b84"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/3902-2085"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ { device = "/dev/disk/by-uuid/3be2776b-3153-443b-95b8-0fbd06becb75"; } ]; + + }; +} diff --git a/modules/hosts/nargun/hardware-configuration.nix b/modules/hosts/nargun/hardware-configuration.nix new file mode 100644 index 00000000..381473ff --- /dev/null +++ b/modules/hosts/nargun/hardware-configuration.nix @@ -0,0 +1,13 @@ +{ + flake.modules.nixos.nargun = { + + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "usb_storage" + "sd_mod" + "sdhci_pci" + ]; + + }; +} diff --git a/hosts/nienna/configuration.nix b/modules/hosts/nienna/configuration.nix similarity index 54% rename from hosts/nienna/configuration.nix rename to modules/hosts/nienna/configuration.nix index d5469804..7df5b1c5 100644 --- a/hosts/nienna/configuration.nix +++ b/modules/hosts/nienna/configuration.nix @@ -6,23 +6,19 @@ inputs, ... }: - -{ - imports = with inputs.self.nixosModules; [ - nix-features +let + flake.modules.nixos.nienna.imports = with inputs.self.modules.nixos; [ vic - vic-autologin - bootable - gnome-desktop - barrier + xfce-desktop macos-keys kvm-intel wl-broadcom - ./static.nix - ./filesystems.nix - ./hardware-configuration.nix + nienna-unfree ]; - - vix.features.macos-keys.enable = false; - + nienna-unfree = inputs.self.lib.unfree-module [ + "broadcom-sta" + ]; +in +{ + inherit flake; } diff --git a/modules/hosts/nienna/filesystems.nix b/modules/hosts/nienna/filesystems.nix new file mode 100644 index 00000000..b022c2e0 --- /dev/null +++ b/modules/hosts/nienna/filesystems.nix @@ -0,0 +1,26 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + flake.modules.nixos.nienna = { + + fileSystems."/" = { + device = "/dev/disk/by-uuid/49a514f4-ba6e-47aa-b3c0-83a650c2e22d"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/45F4-4CED"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/f774218c-ec59-427d-bada-8eb7b6b928b8"; } + ]; + + }; +} diff --git a/modules/hosts/nienna/hardware-configuration.nix b/modules/hosts/nienna/hardware-configuration.nix new file mode 100644 index 00000000..16d10c8b --- /dev/null +++ b/modules/hosts/nienna/hardware-configuration.nix @@ -0,0 +1,19 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + + flake.modules.nixos.nienna = { + boot.initrd.availableKernelModules = [ + "uhci_hcd" + "ehci_pci" + "ahci" + "firewire_ohci" + "usbhid" + "usb_storage" + "sd_mod" + "sdhci_pci" + ]; + }; + +} diff --git a/hosts/smaug/configuration.nix b/modules/hosts/smaug/configuration.nix similarity index 53% rename from hosts/smaug/configuration.nix rename to modules/hosts/smaug/configuration.nix index 5f15a69a..e638402b 100644 --- a/hosts/smaug/configuration.nix +++ b/modules/hosts/smaug/configuration.nix @@ -1,30 +1,15 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - +{ inputs, ... }: { - inputs, - ... -}: - -{ - imports = with inputs.self.nixosModules; [ - nix-features + flake.modules.nixos.smaug.imports = with inputs.self.modules.nixos; [ vic - vic-autologin - bootable - kde-desktop - barrier + xfce-desktop macos-keys kvm-intel wl-broadcom nvidia all-firmware - ./static.nix - ./filesystems.nix - ./hardware-configuration.nix ]; - - vix.features.macos-keys.enable = true; - } diff --git a/modules/hosts/smaug/filesystems.nix b/modules/hosts/smaug/filesystems.nix new file mode 100644 index 00000000..e87e9b00 --- /dev/null +++ b/modules/hosts/smaug/filesystems.nix @@ -0,0 +1,32 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + + flake.modules.nixos.smaug = { + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-label/boot"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + fileSystems."/home" = { + device = "/dev/disk/by-label/home"; + fsType = "ext4"; + }; + + swapDevices = [ + { device = "/dev/disk/by-label/swap"; } + ]; + + }; +} diff --git a/modules/hosts/smaug/hardware-configuration.nix b/modules/hosts/smaug/hardware-configuration.nix new file mode 100644 index 00000000..d400f6cf --- /dev/null +++ b/modules/hosts/smaug/hardware-configuration.nix @@ -0,0 +1,11 @@ +{ + flake.modules.nixos.smaug = { + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ehci_pci" + "usb_storage" + "sd_mod" + ]; + }; +} diff --git a/modules/hosts/tom/configuration.nix b/modules/hosts/tom/configuration.nix new file mode 100644 index 00000000..60a168a2 --- /dev/null +++ b/modules/hosts/tom/configuration.nix @@ -0,0 +1,7 @@ +{ + flake.modules.nixos.tom = { + boot.loader.grub.enable = false; + fileSystems."/".device = "/dev/null"; + users.users.runner.isNormalUser = true; + }; +} diff --git a/modules/hosts/varda/darwin-configuration.nix b/modules/hosts/varda/darwin-configuration.nix new file mode 100644 index 00000000..db4dcf9c --- /dev/null +++ b/modules/hosts/varda/darwin-configuration.nix @@ -0,0 +1,7 @@ +{ inputs, ... }: +{ + flake.modules.darwin.varda.imports = with inputs.self.modules.darwin; [ + vic + { users.users.vic.home = "/Users/vic"; } + ]; +} diff --git a/modules/hosts/yavanna/darwin-configuration.nix b/modules/hosts/yavanna/darwin-configuration.nix new file mode 100644 index 00000000..6007b3f4 --- /dev/null +++ b/modules/hosts/yavanna/darwin-configuration.nix @@ -0,0 +1,8 @@ +{ inputs, ... }: +{ + flake.modules.darwin.yavanna.imports = with inputs.self.modules.darwin; [ + vic + { users.users.vic.home = "/v/home"; } + ]; + +} diff --git a/modules/nixos/all-firmware.nix b/modules/nixos/all-firmware.nix deleted file mode 100644 index cb0bb8ce..00000000 --- a/modules/nixos/all-firmware.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - hardware.enableAllFirmware = true; - hardware.enableRedistributableFirmware = true; - nixpkgs.config.allowUnfree = true; # enableAllFirmware depends on this -} diff --git a/modules/nixos/barrier.nix b/modules/nixos/barrier.nix deleted file mode 100644 index fcd6481b..00000000 --- a/modules/nixos/barrier.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ pkgs, perSystem, ... }: -{ - - environment.systemPackages = with pkgs; [ - anydesk - perSystem.versioned.input-leap - ]; - - networking.firewall = { - enable = true; - allowedTCPPorts = [ - 24800 # inputleap - 6568 # anydesk - 50001 # anydesk - ]; - allowedUDPPorts = [ - 24800 # inputleap - 6568 # anydesk - 50001 # anydesk - ]; - }; - -} diff --git a/modules/nixos/bootable.nix b/modules/nixos/bootable.nix deleted file mode 100644 index 354f6104..00000000 --- a/modules/nixos/bootable.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ lib, modulesPath, ... }: -{ - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - powerManagement.enable = true; - - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Enable networking - networking.networkmanager.enable = true; - - # Set your time zone. - time.timeZone = "America/Mexico_City"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Configure keymap in X11 - services.xserver.xkb = { - layout = "us"; - variant = ""; - }; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable sound with pipewire. - # sound.enable = true; - hardware.bluetooth.enable = true; - hardware.bluetooth.powerOnBoot = true; - services.pulseaudio.enable = false; - services.blueman.enable = true; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - networking.useDHCP = lib.mkDefault true; -} diff --git a/modules/nixos/darwin.nix b/modules/nixos/darwin.nix deleted file mode 100644 index 198d4412..00000000 --- a/modules/nixos/darwin.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ perSystem, pkgs, ... }: -let - nix-darwin-pkgs = with perSystem.nix-darwin; [ - darwin-option - darwin-rebuild - darwin-version - darwin-uninstaller - ]; -in -{ - - environment.systemPackages = - nix-darwin-pkgs - ++ (with pkgs; [ - iterm2 - wezterm - ]); - - # Determinate uses its own daemon to manage the Nix installation - nix.enable = false; - - system.defaults.trackpad.Clicking = true; - system.defaults.trackpad.TrackpadThreeFingerDrag = true; - system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = false; - - system.keyboard.enableKeyMapping = true; - system.keyboard.remapCapsLockToControl = true; -} diff --git a/modules/nixos/gnome-desktop.nix b/modules/nixos/gnome-desktop.nix deleted file mode 100644 index 2ddcae56..00000000 --- a/modules/nixos/gnome-desktop.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: -{ - # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; - - # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 - systemd.services."getty@tty1".enable = false; - systemd.services."autovt@tty1".enable = false; -} diff --git a/modules/nixos/kde-desktop.nix b/modules/nixos/kde-desktop.nix deleted file mode 100644 index 6371322c..00000000 --- a/modules/nixos/kde-desktop.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ ... }: -{ - # Enable the KDE Plasma Desktop Environment. - services.displayManager.sddm.wayland.enable = true; - services.desktopManager.plasma6.enable = true; - - services.avahi = { - nssmdns4 = true; - enable = true; - publish = { - enable = true; - userServices = true; - domain = true; - }; - }; - -} diff --git a/modules/nixos/kvm-amd.nix b/modules/nixos/kvm-amd.nix deleted file mode 100644 index 01574621..00000000 --- a/modules/nixos/kvm-amd.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ lib, config, ... }: -{ - boot.kernelModules = [ "kvm-amd" ]; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/modules/nixos/kvm-intel.nix b/modules/nixos/kvm-intel.nix deleted file mode 100644 index 70ad6542..00000000 --- a/modules/nixos/kvm-intel.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ lib, config, ... }: -{ - boot.kernelModules = [ "kvm-intel" ]; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/modules/nixos/macos-keys/caps-is-ctrl-or-esc.nix b/modules/nixos/macos-keys/caps-is-ctrl-or-esc.nix deleted file mode 100644 index 971ad45a..00000000 --- a/modules/nixos/macos-keys/caps-is-ctrl-or-esc.nix +++ /dev/null @@ -1,5 +0,0 @@ -# see https://github.com/rvaiya/keyd/blob/master/examples/capslock-esc-basic.conf -{ - main.capslock = "overload(capscontrol, esc)"; - "capscontrol:C" = { }; -} diff --git a/modules/nixos/macos-keys/default.nix b/modules/nixos/macos-keys/default.nix deleted file mode 100644 index 63321fe6..00000000 --- a/modules/nixos/macos-keys/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - cfg = config.vix.features.macos-keys; -in -{ - - options.vix.features.macos-keys = with lib; { - enable = options.mkEnableOption "MacOS keys"; - }; - - config = lib.mkIf cfg.enable { - services.keyd.enable = true; - services.keyd.keyboards.default.ids = [ "*" ]; # apply on all devices - services.keyd.keyboards.default.settings = lib.mkMerge [ - (import ./macos-keys.nix { - inherit lib pkgs config; - }) - ]; - - }; -} diff --git a/modules/nixos/macos-keys/desktop-keys-options.nix b/modules/nixos/macos-keys/desktop-keys-options.nix deleted file mode 100644 index 19c20389..00000000 --- a/modules/nixos/macos-keys/desktop-keys-options.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ lib, ... }: -with lib; -{ - launcher = mkOption { - type = types.str; - default = "A-f1"; - description = "Key to open the launcher"; - }; - close-app = mkOption { - type = types.str; - default = "A-f4"; - description = "Key to close the current app"; - }; - new-tab = mkOption { - type = types.str; - default = "C-t"; - description = "Key to create a tab new"; - }; - close-tab = mkOption { - type = types.str; - default = "C-w"; - description = "Key to close the current tab"; - }; - next-app = mkOption { - type = types.str; - default = "G-tab"; - description = "Key to switch to the next app"; - }; - prev-app = mkOption { - type = types.str; - default = "G-S-tab"; - description = "Key to switch to the previous app"; - }; - next-window-in-group = mkOption { - type = types.str; - default = "G-`"; - description = "Key to switch to the next window in the current group"; - }; - next-desktop = mkOption { - type = types.str; - default = "M-tab"; - description = "Key to switch to the next desktop"; - }; - prev-desktop = mkOption { - type = types.str; - default = "M-S-tab"; - description = "Key to switch to the previous desktop"; - }; - copy = mkOption { - type = types.str; - default = "C-insert"; - description = "Key to copy"; - }; - paste = mkOption { - type = types.str; - default = "S-insert"; - description = "Key to paste"; - }; - cut = mkOption { - type = types.str; - default = "S-delete"; - description = "Key to cut"; - }; - switch-tab-n-prefix = mkOption { - type = types.str; - default = "A"; - description = "Key to switch to the nth tab. Modifier without -"; - }; - beginning-of-line = mkOption { - type = types.str; - default = "home"; - description = "Key to go to the beginning of the line"; - }; - end-of-line = mkOption { - type = types.str; - default = "end"; - description = "Key to go to the end of the line"; - }; -} diff --git a/modules/nixos/nix-features.nix b/modules/nixos/nix-features.nix deleted file mode 100644 index c61c8667..00000000 --- a/modules/nixos/nix-features.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, pkgs, ... }: -{ - imports = [ - ./nix-substituters.nix - ./nixpkgs-unfree.nix - ]; - - nix = { - settings = { - auto-optimise-store = true; - experimental-features = [ - "nix-command" - "flakes" - # "allow-import-from-derivation" - ]; - trusted-users = [ - "root" - "@wheel" - ]; - }; - gc = pkgs.lib.optionalAttrs config.nix.enable { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - }; -} diff --git a/modules/nixos/nix-substituters.nix b/modules/nixos/nix-substituters.nix deleted file mode 100644 index b3faa198..00000000 --- a/modules/nixos/nix-substituters.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ ... }: -{ - - nix.settings = { - substituters = [ - "https://vix.cachix.org" - "https://devenv.cachix.org" - ]; - trusted-public-keys = [ - "vix.cachix.org-1:hP/Lpdsi1dB3AxK9o6coWh+xHzvAc4ztdDYuG7lC6dI=" - "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" - ]; - }; -} diff --git a/modules/nixos/nixpkgs-unfree.nix b/modules/nixos/nixpkgs-unfree.nix deleted file mode 100644 index 4417cb7e..00000000 --- a/modules/nixos/nixpkgs-unfree.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, pkgs, ... }: -{ - nixpkgs.config.allowUnfreePredicate = - pkg: - let - name = pkgs.lib.getName pkg; - - global = [ - "copilot-language-server" - "cursor" - "vscode" - "obsidian" - "anydesk" - ]; - - perHost = - { - "mordor" = [ - "nvidia-x11" - "nvidia-settings" - ]; - "nienna" = [ - "broadcom-sta" - ]; - "smaug" = [ - "broadcom-sta" - "nvidia-x11" - "nvidia-settings" - ]; - } - .${config.networking.hostName} or [ ]; - - allowed = builtins.elem name (global ++ perHost); - msg = if allowed then "Allowed unfree: ${name}" else "Not allowed unfree ${name}"; - in - builtins.trace msg allowed; -} diff --git a/modules/nixos/nvidia.nix b/modules/nixos/nvidia.nix deleted file mode 100644 index c3da14cc..00000000 --- a/modules/nixos/nvidia.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, ... }: -{ - boot.initrd.kernelModules = [ "nvidia" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ]; - boot.blacklistedKernelModules = [ "nouveau" ]; - boot.extraModprobeConfig = '' - blacklist nouveau - options nouveau modeset=0 - ''; - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.graphics.enable = true; - hardware.nvidia = rec { - open = false; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; - powerManagement.enable = true; - powerManagement.finegrained = false; - modesetting.enable = true; - - prime = { - offload.enable = powerManagement.finegrained; - offload.enableOffloadCmd = prime.offload.enable; - nvidiaBusId = ( - { - mordor = "PCI:9:0:0"; - } - .${config.networking.hostName} or "" - ); - }; - }; -} diff --git a/modules/nixos/vic-autologin.nix b/modules/nixos/vic-autologin.nix deleted file mode 100644 index f24bd24e..00000000 --- a/modules/nixos/vic-autologin.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - # Enable automatic login for the user. - services.displayManager.autoLogin.enable = true; - services.displayManager.autoLogin.user = "vic"; -} diff --git a/modules/nixos/vic.nix b/modules/nixos/vic.nix deleted file mode 100644 index 77640fb5..00000000 --- a/modules/nixos/vic.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - lib, - pkgs, - ... -}: -{ - - home-manager.backupFileExtension = "backup"; - - programs.fish.enable = true; - - fonts.packages = with pkgs.nerd-fonts; [ - victor-mono - jetbrains-mono - inconsolata - ]; - - users.users.vic = { - description = "vic"; - shell = pkgs.fish; - }; - - imports = [ - (lib.mkIf pkgs.stdenv.isLinux { - users.users.vic = { - isNormalUser = true; - extraGroups = [ - "networkmanager" - "wheel" - ]; - }; - }) - ]; -} diff --git a/modules/nixos/wl-broadcom.nix b/modules/nixos/wl-broadcom.nix deleted file mode 100644 index 4076968d..00000000 --- a/modules/nixos/wl-broadcom.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, ... }: -{ - boot.kernelModules = [ "wl" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; -} diff --git a/modules/nixos/wsl.nix b/modules/nixos/wsl.nix deleted file mode 100644 index 58423479..00000000 --- a/modules/nixos/wsl.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ inputs, ... }: -{ - imports = [ inputs.nixos-wsl.nixosModules.default ]; - - wsl.enable = true; -} diff --git a/modules/nixos/xfce-desktop.nix b/modules/nixos/xfce-desktop.nix deleted file mode 100644 index 0ba7a934..00000000 --- a/modules/nixos/xfce-desktop.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ ... }: -{ - - # https://gist.github.com/nat-418/1101881371c9a7b419ba5f944a7118b0 - services.xserver = { - enable = true; - desktopManager = { - xterm.enable = false; - xfce.enable = true; - }; - }; - - services.displayManager = { - defaultSession = "xfce"; - enable = true; - }; - -} diff --git a/modules/packages/gh-flake-update.nix b/modules/packages/gh-flake-update.nix new file mode 100644 index 00000000..9ddc1db1 --- /dev/null +++ b/modules/packages/gh-flake-update.nix @@ -0,0 +1,51 @@ +let + + app = + pkgs: + pkgs.writeShellApplication { + name = "gh-flake-update"; + text = '' + export GIT_AUTHOR_NAME="Victor Borja" + export GIT_AUTHOR_EMAIL="vborja@apache.org" + export GIT_COMMITTER_NAME="Victor Borja" + export GIT_COMMITTER_EMAIL="vborja@apache.org" + + branch="flake-update-$(date '+%F')" + + git checkout -b "$branch" + title="Updating flake inputs $(date)" + + ( + echo "$title" + echo -ne "\n\n\n\n" + echo '```shell' + echo '$ nix flake update' + nix flake update --accept-flake-config 2>&1 + echo '```' + echo -ne "\n\n\n\n" + echo 'request-checks: true' + ) | tee /tmp/commit-message.md + + changes="$(git status -s | grep -o 'M ' | wc -l)" + + if test "$changes" -eq 0; then + echo "No changes" + exit 0 + fi + + git status -s | grep 'M ' | cut -d 'M' -f 2 | xargs git add + git commit -F /tmp/commit-message.md --no-signoff --no-verify --trailer "request-checks:true" --no-edit --cleanup=verbatim + git push origin "$branch:$branch" --force + + gh pr create --base main --label flake-update --reviewer vic --assignee vic --body-file /tmp/commit-message.md --title "$title" --head "$branch" | tee /tmp/pr-url + ''; + }; + +in +{ + perSystem = + { pkgs, ... }: + { + packages.gh-flake-update = app pkgs; + }; +} diff --git a/modules/packages/os-rebuild.nix b/modules/packages/os-rebuild.nix new file mode 100644 index 00000000..2d0e0110 --- /dev/null +++ b/modules/packages/os-rebuild.nix @@ -0,0 +1,79 @@ +{ inputs, ... }: +{ + + perSystem = + { pkgs, lib, ... }: + let + + same-system-oses = + let + has-same-system = _n: o: o.config.nixpkgs.hostPlatform.system == pkgs.system; + all-oses = (inputs.self.nixosConfigurations or { }) // (inputs.self.darwinConfigurations or { }); + in + lib.filterAttrs has-same-system all-oses; + + os-builder = + name: os: + let + platform = os.config.nixpkgs.hostPlatform; + darwin-rebuild = lib.getExe inputs.nix-darwin.packages.${platform.system}.darwin-rebuild; + nixos-rebuild = lib.getExe pkgs.nixos-rebuild; + flake-param = ''--flake "path:${inputs.self}#${name}" ''; + in + pkgs.writeShellApplication { + name = "${name}-os-rebuild"; + text = '' + ${if platform.isDarwin then darwin-rebuild else nixos-rebuild} ${flake-param} "''${@}" + ''; + }; + + os-builders = lib.mapAttrs os-builder same-system-oses; + + os-rebuild = pkgs.writeShellApplication { + name = "os-rebuild"; + text = '' + export PATH="${ + pkgs.lib.makeBinPath ( + (lib.attrValues os-builders) + ++ [ + pkgs.coreutils + ] + ++ (lib.optionals pkgs.stdenv.isLinux [ pkgs.systemd ]) + + ) + }" + + if [ "-h" = "''${1:-}" ] || [ "--help" = "''${1:-}" ]; then + echo Usage: "$0" [HOSTNAME] [${ + if pkgs.stdenv.isDarwin then "DARWIN" else "NIXOS" + }-REBUILD OPTIONS ...] + echo + echo Default hostname: "$(uname -n)" + echo Default ${if pkgs.stdenv.isDarwin then "darwin" else "nixos"}-rebuild options: switch + echo + echo Known hostnames on ${pkgs.system}: + echo "${lib.concatStringsSep "\n" (lib.attrNames same-system-oses)}" + exit 0 + fi + + if test "file" = "$(type -t "''${1:-_}-os-rebuild")"; then + hostname="$1" + shift + else + hostname="$(uname -n)" + fi + + if test "file" = "$(type -t "$hostname-os-rebuild")"; then + "$hostname-os-rebuild" "''${@:-switch}" + else + echo "No configuration found for host: $hostname" + exit 1 + fi + ''; + }; + + in + { + packages.os-rebuild = os-rebuild; + }; +} diff --git a/modules/packages/vic-sops-get.nix b/modules/packages/vic-sops-get.nix new file mode 100644 index 00000000..46df5127 --- /dev/null +++ b/modules/packages/vic-sops-get.nix @@ -0,0 +1,87 @@ +{ + perSystem = + { pkgs, ... }: + let + vic-sops-get = pkgs.writeShellApplication { + name = "vic-sops-get"; + text = '' + export PATH="${ + pkgs.lib.makeBinPath [ + pkgs.sops + pkgs.ssh-to-age + ] + }:$PATH" + declare -a args more + + file="" + dry="" + extract="" + server="" + setup="" + + while test -n "''${1:-}"; do + first="$1" + shift + case "$first" in + "--setup") + setup="$1" + shift + ;; + "--dry-run") + dry="true" + ;; + "-f" | "--file") + file="${./..}/modules/home/vic/secrets/$1" + shift + ;; + "-a" | "--attr") + file="${./..}/modules/home/vic/secrets.yaml" + extract="[\"$1\"]" + shift + ;; + "-s" | "--keyservice") + server="$1" + shift + ;; + *) + more+=("$first") + ;; + esac + done + + if test -n "$extract"; then + args+=("--extract" "$extract") + fi + + if test -n "$server"; then + args+=("--enable-local-service=false" "--keyservice" "$server") + fi + + args+=("''${more[@]}") + + if test -n "$file"; then + args+=("$file") + fi + + function perform_setup() { + echo -n "Password: " >&2 + local pass + read -r -s pass + sops decrypt "''${args[@]}" | SSH_TO_AGE_PASSPHRASE="$pass" ssh-to-age -private-key -o "$setup" 2>/dev/null + } + + if test -n "$dry"; then + echo "sops decrypt" "''${args[@]}" + exit 0 + elif test -n "$setup"; then + perform_setup + else + exec sops decrypt "''${args[@]}" + fi + ''; + }; + in + { + packages.vic-sops-get = vic-sops-get; + }; +} diff --git a/modules/packages/vic-sops-rotate.nix b/modules/packages/vic-sops-rotate.nix new file mode 100644 index 00000000..a1c43f66 --- /dev/null +++ b/modules/packages/vic-sops-rotate.nix @@ -0,0 +1,13 @@ +{ + perSystem = + { pkgs, ... }: + { + packages.vic-sops-rotate = pkgs.writeShellApplication { + name = "vic-sops-rotate"; + text = '' + # shellcheck disable=SC2011 + ls --zero modules/vic/secrets{.yaml,/*} | xargs -0 -n 1 sops rotate -i + ''; + }; + }; +} diff --git a/modules/home/vic/fish/abbrs.nix b/modules/vic/_fish/abbrs.nix similarity index 100% rename from modules/home/vic/fish/abbrs.nix rename to modules/vic/_fish/abbrs.nix diff --git a/modules/home/vic/fish/aliases.nix b/modules/vic/_fish/aliases.nix similarity index 100% rename from modules/home/vic/fish/aliases.nix rename to modules/vic/_fish/aliases.nix diff --git a/modules/home/vic/fish/functions.nix b/modules/vic/_fish/functions.nix similarity index 100% rename from modules/home/vic/fish/functions.nix rename to modules/vic/_fish/functions.nix diff --git a/modules/vic/apps.nix b/modules/vic/apps.nix new file mode 100644 index 00000000..3bfd4bc1 --- /dev/null +++ b/modules/vic/apps.nix @@ -0,0 +1,72 @@ +let + flake.modules.homeManager.vic.imports = [ + nonBombadil + anywhere + linux + ]; + + linux = + { lib, pkgs, ... }: + lib.mkIf (pkgs.stdenvNoCC.isLinux) { + home.packages = [ + pkgs.gparted + pkgs.wl-clipboard + # perSystem.self.copilot-language-server # tab tab tab + ]; + }; + + nonBombadil = + { + lib, + pkgs, + osConfig, + ... + }: + lib.mkIf (osConfig.networking.hostName != "bombadil") { + home.packages = [ + #perSystem.nox.default + #perSystem.self.devicon-lookup # for eee + #perSystem.self.leader + pkgs.yazi # file tui + pkgs.zoxide # cd + pkgs.nix-search-cli + pkgs.nixd # lsp + pkgs.nixfmt-rfc-style + pkgs.ispell + pkgs.gh + ]; + }; + + anywhere = + { pkgs, ... }: + { + programs.nh.enable = true; + programs.home-manager.enable = true; + + programs.direnv.enable = true; + programs.direnv.nix-direnv.enable = true; + + home.packages = [ + + #perSystem.nix-versions.default + #perSystem.self.vic-sops-get + pkgs.tree + pkgs.fzf + pkgs.ripgrep # grep + pkgs.bat # cat + pkgs.bottom + pkgs.htop + pkgs.eza # ls + pkgs.fd # find + pkgs.lazygit # no magit + pkgs.tig # alucard + pkgs.cachix + pkgs.jq + pkgs.home-manager + ]; + }; + +in +{ + inherit flake; +} diff --git a/modules/vic/desktop-apps.nix b/modules/vic/desktop-apps.nix new file mode 100644 index 00000000..bb4a9ed2 --- /dev/null +++ b/modules/vic/desktop-apps.nix @@ -0,0 +1,54 @@ +{ ... }: +let + + flake.modules.homeManager.vic.imports = [ + everywhere + nonBombadil + darwin + ]; + + darwin = + { pkgs, lib, ... }: + lib.mkIf pkgs.stdenvNoCC.isDarwin { + home.packages = [ pkgs.iterm2 ]; + }; + + nonBombadil = + { + pkgs, + osConfig, + lib, + ... + }: + lib.mkIf (osConfig.networking.hostName != "bombadil") { + home.packages = [ + pkgs.code-cursor + pkgs.zed-editor + ]; + }; + + everywhere = + { + pkgs, + lib, + ... + }: + { + home.packages = + [ + pkgs.librewolf + pkgs.vscode + pkgs.wezterm + ] + ++ (lib.optionals (pkgs.system == "aarm64-darwin" || pkgs.stdenvNoCC.isLinux) [ + pkgs.ghostty + ]) + ++ (lib.optionals pkgs.stdenvNoCC.isLinux [ + pkgs.gnome-disk-utility + ]); + }; + +in +{ + inherit flake; +} diff --git a/modules/vic/doom.nix b/modules/vic/doom.nix new file mode 100644 index 00000000..0a486ab9 --- /dev/null +++ b/modules/vic/doom.nix @@ -0,0 +1,72 @@ +{ inputs, ... }: +{ + flake.modules.homeManager.vic = + { + pkgs, + lib, + ... + }: + let + + emacsPkg = pkgs.emacs30; + + doom-install = pkgs.writeShellApplication { + name = "doom-install"; + runtimeInputs = with pkgs; [ + git + emacsPkg + ripgrep + openssh + ]; + text = '' + set -e + if test -f "$HOME"/.config/emacs/.local/etc/@/init*.el; then + doom_rev="$(rg "put 'doom-version 'ref '\"(\w+)\"" "$HOME"/.config/emacs/.local/etc/@/init*.el -or '$1')" + fi + + if test "''${doom_rev:-}" = "${inputs.doom-emacs.rev}"; then + echo "DOOM Emacs already at revision ${inputs.doom-emacs.rev}" + exit 0 # doom already pointing to same revision + fi + + ( + echo "DOOM Emacs obtaining revision ${inputs.doom-emacs.rev}" + if ! test -d "$HOME/.config/emacs/.git"; then + git clone --depth 1 https://github.com/doomemacs/doomemacs "$HOME/.config/emacs" + fi + cd "$HOME/.config/emacs" + git fetch --depth 1 origin "${inputs.doom-emacs.rev}" + git reset --hard "${inputs.doom-emacs.rev}" + bin/doom install --no-config --no-env --no-install --no-fonts --no-hooks --force + echo "DOOM Emacs updated to revision ${inputs.doom-emacs.rev}" + bin/doom sync -e --force + ) + ''; + }; + + SPC = inputs.SPC.packages.${pkgs.system}.SPC.override { emacs = emacsPkg; }; + + in + { + programs.emacs.enable = true; + programs.emacs.package = emacsPkg; + services.emacs.enable = true; + services.emacs.package = emacsPkg; + services.emacs.extraOptions = [ + "--init-directory" + "~/.config/emacs" + ]; + + home.packages = [ + SPC + (pkgs.writeShellScriptBin "doom" ''exec $HOME/.config/emacs/bin/doom "$@"'') + (pkgs.writeShellScriptBin "doomscript" ''exec $HOME/.config/emacs/bin/doomscript "$@"'') + (pkgs.writeShellScriptBin "d" ''exec emacsclient -nw -a "doom run -nw --" "$@"'') + ]; + + home.activation.doom-install = lib.hm.dag.entryAfter [ "link-ssh-id" ] '' + run ${lib.getExe doom-install} + ''; + + }; +} diff --git a/modules/vic/dots.nix b/modules/vic/dots.nix new file mode 100644 index 00000000..9a412d09 --- /dev/null +++ b/modules/vic/dots.nix @@ -0,0 +1,42 @@ +{ + flake.modules.homeManager.vic = + { config, pkgs, ... }: + let + dotsLink = + path: + config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.flake/modules/vic/dots/${path}"; + in + { + home.activation.link-flake = config.lib.dag.entryAfter [ "writeBoundary" ] '' + echo Checking that "$HOME/.flake" exists. + if ! test -L "$HOME/.flake"; then + echo "Missing $HOME/.flake link" + exit 1 + fi + ''; + + home.file.".ssh" = { + recursive = true; + source = ./dots/ssh; + }; + + home.file.".config/nvim".source = dotsLink "config/nvim"; + home.file.".config/doom".source = dotsLink "config/doom"; + home.file.".config/zed".source = dotsLink "config/zed"; + home.file.".config/wezterm".source = dotsLink "config/wezterm"; + home.file.".config/ghostty".source = dotsLink "config/ghostty"; + + home.file.".config/Code/User/settings.json".source = dotsLink "config/Code/User/settings.json"; + home.file.".config/Code/User/keybindings.json".source = + dotsLink "config/Code/User/keybindings.json"; + home.file.".vscode/extensions/extensions.json".source = + dotsLink "vscode/extensions/extensions-${pkgs.stdenv.hostPlatform.uname.system}.json"; + + home.file.".config/Cursor/User/settings.json".source = dotsLink "config/Code/User/settings.json"; + home.file.".config/Cursor/User/keybindings.json".source = + dotsLink "config/Code/User/keybindings.json"; + home.file.".cursor/extensions/extensions.json".source = + dotsLink "cursor/extensions/extensions-${pkgs.stdenv.hostPlatform.uname.system}.json"; + + }; +} diff --git a/modules/home/vic/dots/config/Code/User/keybindings.json b/modules/vic/dots/config/Code/User/keybindings.json similarity index 100% rename from modules/home/vic/dots/config/Code/User/keybindings.json rename to modules/vic/dots/config/Code/User/keybindings.json diff --git a/modules/home/vic/dots/config/Code/User/settings.json b/modules/vic/dots/config/Code/User/settings.json similarity index 97% rename from modules/home/vic/dots/config/Code/User/settings.json rename to modules/vic/dots/config/Code/User/settings.json index 4aa8a260..f7d16dd5 100644 --- a/modules/home/vic/dots/config/Code/User/settings.json +++ b/modules/vic/dots/config/Code/User/settings.json @@ -161,7 +161,6 @@ "direnv.restart.automatic": true, "window.autoDetectColorScheme": true, "workbench.preferredLightColorTheme": "Dracula Theme Soft", - "workbench.preferredDarkColorTheme": "Midnight Purple 2077", "workbench.view.showQuietly": { "workbench.panel.output": false }, @@ -171,7 +170,6 @@ "errorLens.statusBarColorsEnabled": true, "workbench.sideBar.location": "right", "workbench.activityBar.location": "top", - "workbench.editor.showTabs": "none", "workbench.editor.limit.excludeDirty": true, "workbench.editor.limit.perEditorGroup": true, "cursor.cmdk.useThemedDiffBackground": true, @@ -181,5 +179,6 @@ "opensource-explorer.defaultClonePath": "~/hk", "opensource-explorer.defaultView": "recent", "debug.openExplorerOnEnd": true, - "jjk.enableAnnotations": false + "jjk.enableAnnotations": false, + "workbench.preferredHighContrastColorTheme": "Abyss" } \ No newline at end of file diff --git a/modules/home/vic/dots/config/doom/config.el b/modules/vic/dots/config/doom/config.el similarity index 99% rename from modules/home/vic/dots/config/doom/config.el rename to modules/vic/dots/config/doom/config.el index 796cee31..2396f503 100644 --- a/modules/home/vic/dots/config/doom/config.el +++ b/modules/vic/dots/config/doom/config.el @@ -36,7 +36,7 @@ ;; There are two ways to load a theme. Both assume the theme is installed and ;; available. You can either set `doom-theme' or manually load a theme with the ;; `load-theme' function. This is the default: -(setq doom-theme 'doom-laserwave) +(setq doom-theme 'doom-oksolar-light) ;; This determines the style of line numbers in effect. If set to `nil', line ;; numbers are disabled. For relative line numbers, set this to `relative'. diff --git a/modules/home/vic/dots/config/doom/custom.el b/modules/vic/dots/config/doom/custom.el similarity index 100% rename from modules/home/vic/dots/config/doom/custom.el rename to modules/vic/dots/config/doom/custom.el diff --git a/modules/home/vic/dots/config/doom/ee-jj-fzf.bash b/modules/vic/dots/config/doom/ee-jj-fzf.bash similarity index 100% rename from modules/home/vic/dots/config/doom/ee-jj-fzf.bash rename to modules/vic/dots/config/doom/ee-jj-fzf.bash diff --git a/modules/home/vic/dots/config/doom/ee-lazyjj.bash b/modules/vic/dots/config/doom/ee-lazyjj.bash similarity index 100% rename from modules/home/vic/dots/config/doom/ee-lazyjj.bash rename to modules/vic/dots/config/doom/ee-lazyjj.bash diff --git a/modules/home/vic/dots/config/doom/init.el b/modules/vic/dots/config/doom/init.el similarity index 100% rename from modules/home/vic/dots/config/doom/init.el rename to modules/vic/dots/config/doom/init.el diff --git a/modules/home/vic/dots/config/doom/packages.el b/modules/vic/dots/config/doom/packages.el similarity index 100% rename from modules/home/vic/dots/config/doom/packages.el rename to modules/vic/dots/config/doom/packages.el diff --git a/modules/home/vic/dots/config/ghostty/config b/modules/vic/dots/config/ghostty/config similarity index 100% rename from modules/home/vic/dots/config/ghostty/config rename to modules/vic/dots/config/ghostty/config diff --git a/modules/home/vic/dots/config/ghostty/flake.lock b/modules/vic/dots/config/ghostty/flake.lock similarity index 100% rename from modules/home/vic/dots/config/ghostty/flake.lock rename to modules/vic/dots/config/ghostty/flake.lock diff --git a/modules/home/vic/dots/config/nvim/.gitignore b/modules/vic/dots/config/nvim/.gitignore similarity index 100% rename from modules/home/vic/dots/config/nvim/.gitignore rename to modules/vic/dots/config/nvim/.gitignore diff --git a/modules/home/vic/dots/config/nvim/.neoconf.json b/modules/vic/dots/config/nvim/.neoconf.json similarity index 100% rename from modules/home/vic/dots/config/nvim/.neoconf.json rename to modules/vic/dots/config/nvim/.neoconf.json diff --git a/modules/home/vic/dots/config/nvim/LICENSE b/modules/vic/dots/config/nvim/LICENSE similarity index 100% rename from modules/home/vic/dots/config/nvim/LICENSE rename to modules/vic/dots/config/nvim/LICENSE diff --git a/modules/home/vic/dots/config/nvim/README.md b/modules/vic/dots/config/nvim/README.md similarity index 100% rename from modules/home/vic/dots/config/nvim/README.md rename to modules/vic/dots/config/nvim/README.md diff --git a/modules/home/vic/dots/config/nvim/init.lua b/modules/vic/dots/config/nvim/init.lua similarity index 100% rename from modules/home/vic/dots/config/nvim/init.lua rename to modules/vic/dots/config/nvim/init.lua diff --git a/modules/home/vic/dots/config/nvim/lazy-lock.json b/modules/vic/dots/config/nvim/lazy-lock.json similarity index 73% rename from modules/home/vic/dots/config/nvim/lazy-lock.json rename to modules/vic/dots/config/nvim/lazy-lock.json index 2468b62c..d0e10553 100644 --- a/modules/home/vic/dots/config/nvim/lazy-lock.json +++ b/modules/vic/dots/config/nvim/lazy-lock.json @@ -3,14 +3,14 @@ "blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, - "conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" }, + "conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, - "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "gitsigns.nvim": { "branch": "main", "commit": "17ab794b6fce6fce768430ebc925347e349e1d60" }, - "grug-far.nvim": { "branch": "main", "commit": "082f97122dd59d816a9a7b676d2b2f86a8ab6ed9" }, + "friendly-snippets": { "branch": "main", "commit": "fc8f183479a472df60aa86f00e295462f2308178" }, + "gitsigns.nvim": { "branch": "main", "commit": "b79047e81f645875e500b4f433d8133bc421446c" }, + "grug-far.nvim": { "branch": "main", "commit": "f66017591ffa611344b3b2b490df73464c33113e" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "lualine.nvim": { "branch": "master", "commit": "1ba400068bc178eb698b96ecfde82db59e7a7b8f" }, + "lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, "mini.ai": { "branch": "main", "commit": "e139eb1101beb0250fea322f8c07a42f0f175688" }, @@ -18,10 +18,10 @@ "mini.pairs": { "branch": "main", "commit": "69864a2efb36c030877421634487fd90db1e4298" }, "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, - "nvim-lint": { "branch": "master", "commit": "e7b4ffa6ab763af012e38b21af2c9159f10d2d33" }, - "nvim-lspconfig": { "branch": "master", "commit": "9ae789e7450995e4c06ed9f8f74629992d5d28a6" }, - "nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "698b5f805722254bca3c509591c1806d268b6c2f" }, + "nvim-lint": { "branch": "master", "commit": "d698d3b6fd7b1b85657d05a2a31d843ddb682c63" }, + "nvim-lspconfig": { "branch": "master", "commit": "5af60bbb835d5b6efdc64cdff2a5b27cde4120de" }, + "nvim-treesitter": { "branch": "master", "commit": "684eeac91ed8e297685a97ef70031d19ac1de25a" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "205e3369bc83d8cb83f7409c36120e24611f8c5c" }, "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, "persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, diff --git a/modules/home/vic/dots/config/nvim/lazyvim.json b/modules/vic/dots/config/nvim/lazyvim.json similarity index 100% rename from modules/home/vic/dots/config/nvim/lazyvim.json rename to modules/vic/dots/config/nvim/lazyvim.json diff --git a/modules/home/vic/dots/config/nvim/lua/config/autocmds.lua b/modules/vic/dots/config/nvim/lua/config/autocmds.lua similarity index 100% rename from modules/home/vic/dots/config/nvim/lua/config/autocmds.lua rename to modules/vic/dots/config/nvim/lua/config/autocmds.lua diff --git a/modules/home/vic/dots/config/nvim/lua/config/keymaps.lua b/modules/vic/dots/config/nvim/lua/config/keymaps.lua similarity index 100% rename from modules/home/vic/dots/config/nvim/lua/config/keymaps.lua rename to modules/vic/dots/config/nvim/lua/config/keymaps.lua diff --git a/modules/home/vic/dots/config/nvim/lua/config/lazy.lua b/modules/vic/dots/config/nvim/lua/config/lazy.lua similarity index 100% rename from modules/home/vic/dots/config/nvim/lua/config/lazy.lua rename to modules/vic/dots/config/nvim/lua/config/lazy.lua diff --git a/modules/home/vic/dots/config/nvim/lua/config/options.lua b/modules/vic/dots/config/nvim/lua/config/options.lua similarity index 100% rename from modules/home/vic/dots/config/nvim/lua/config/options.lua rename to modules/vic/dots/config/nvim/lua/config/options.lua diff --git a/modules/home/vic/dots/config/nvim/lua/plugins/example.lua b/modules/vic/dots/config/nvim/lua/plugins/example.lua similarity index 100% rename from modules/home/vic/dots/config/nvim/lua/plugins/example.lua rename to modules/vic/dots/config/nvim/lua/plugins/example.lua diff --git a/modules/home/vic/dots/config/nvim/stylua.toml b/modules/vic/dots/config/nvim/stylua.toml similarity index 100% rename from modules/home/vic/dots/config/nvim/stylua.toml rename to modules/vic/dots/config/nvim/stylua.toml diff --git a/modules/home/vic/dots/config/wezterm/wezterm.lua b/modules/vic/dots/config/wezterm/wezterm.lua similarity index 100% rename from modules/home/vic/dots/config/wezterm/wezterm.lua rename to modules/vic/dots/config/wezterm/wezterm.lua diff --git a/modules/home/vic/dots/config/zed/keymap.json b/modules/vic/dots/config/zed/keymap.json similarity index 100% rename from modules/home/vic/dots/config/zed/keymap.json rename to modules/vic/dots/config/zed/keymap.json diff --git a/modules/home/vic/dots/config/zed/settings.json b/modules/vic/dots/config/zed/settings.json similarity index 100% rename from modules/home/vic/dots/config/zed/settings.json rename to modules/vic/dots/config/zed/settings.json diff --git a/modules/home/vic/dots/cursor/extensions/extensions-Linux.json b/modules/vic/dots/cursor/extensions/extensions-Linux.json similarity index 100% rename from modules/home/vic/dots/cursor/extensions/extensions-Linux.json rename to modules/vic/dots/cursor/extensions/extensions-Linux.json diff --git a/modules/home/vic/dots/ssh/authorized_keys b/modules/vic/dots/ssh/authorized_keys similarity index 100% rename from modules/home/vic/dots/ssh/authorized_keys rename to modules/vic/dots/ssh/authorized_keys diff --git a/modules/home/vic/dots/ssh/id_ed25519.pub b/modules/vic/dots/ssh/id_ed25519.pub similarity index 100% rename from modules/home/vic/dots/ssh/id_ed25519.pub rename to modules/vic/dots/ssh/id_ed25519.pub diff --git a/modules/home/vic/dots/ssh/nix_versions_ed25519.pub b/modules/vic/dots/ssh/nix_versions_ed25519.pub similarity index 100% rename from modules/home/vic/dots/ssh/nix_versions_ed25519.pub rename to modules/vic/dots/ssh/nix_versions_ed25519.pub diff --git a/modules/home/vic/dots/ssh/vix_ed25519.pub b/modules/vic/dots/ssh/vix_ed25519.pub similarity index 100% rename from modules/home/vic/dots/ssh/vix_ed25519.pub rename to modules/vic/dots/ssh/vix_ed25519.pub diff --git a/modules/home/vic/dots/vscode/extension-pack/package.json b/modules/vic/dots/vscode/extension-pack/package.json similarity index 100% rename from modules/home/vic/dots/vscode/extension-pack/package.json rename to modules/vic/dots/vscode/extension-pack/package.json diff --git a/modules/vic/dots/vscode/extensions/extensions-Linux.json b/modules/vic/dots/vscode/extensions/extensions-Linux.json new file mode 100644 index 00000000..6ee4e4e2 --- /dev/null +++ b/modules/vic/dots/vscode/extensions/extensions-Linux.json @@ -0,0 +1 @@ +[{"identifier":{"id":"cybersamurai.midnight-purple-2077","uuid":"093e3b44-8c4f-461b-8aa8-ba46f938aae3"},"version":"1.1.9","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/cybersamurai.midnight-purple-2077-1.1.9","scheme":"file"},"relativeLocation":"cybersamurai.midnight-purple-2077-1.1.9","metadata":{"installedTimestamp":1742623962707,"pinned":false,"source":"gallery","id":"093e3b44-8c4f-461b-8aa8-ba46f938aae3","publisherId":"716a7a71-9c4e-490a-ba29-0780f389e5e8","publisherDisplayName":"cyber samurai","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"github.vscode-github-actions","uuid":"04f49bfc-8330-4eee-8237-ea938fb755ef"},"version":"0.27.1","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/github.vscode-github-actions-0.27.1","scheme":"file"},"relativeLocation":"github.vscode-github-actions-0.27.1","metadata":{"installedTimestamp":1742624155234,"pinned":false,"source":"gallery","id":"04f49bfc-8330-4eee-8237-ea938fb755ef","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"chaitanyashahare.lazygit","uuid":"e370d573-0664-4b89-b241-5d3cfeb9a427"},"version":"1.0.7","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/chaitanyashahare.lazygit-1.0.7","scheme":"file"},"relativeLocation":"chaitanyashahare.lazygit-1.0.7","metadata":{"installedTimestamp":1742624175976,"pinned":false,"source":"gallery","id":"e370d573-0664-4b89-b241-5d3cfeb9a427","publisherId":"dce96627-2e0f-4f44-8cd1-a081a4b4e98e","publisherDisplayName":"Chaitanya Shahare","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"tomrijndorp.find-it-faster","uuid":"d5eafbee-176a-421a-b74d-fbc51bd86a21"},"version":"0.0.39","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/tomrijndorp.find-it-faster-0.0.39","scheme":"file"},"relativeLocation":"tomrijndorp.find-it-faster-0.0.39","metadata":{"installedTimestamp":1742624662955,"pinned":false,"source":"gallery","id":"d5eafbee-176a-421a-b74d-fbc51bd86a21","publisherId":"f002c5e6-5db9-4df2-8791-8800b44272a4","publisherDisplayName":"Tom Rijndorp","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-vscode.cpptools-themes","uuid":"99b17261-8f6e-45f0-9ad5-a69c6f509a4f"},"version":"2.0.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode.cpptools-themes-2.0.0","scheme":"file"},"relativeLocation":"ms-vscode.cpptools-themes-2.0.0","metadata":{"installedTimestamp":1743618545498,"source":"gallery","id":"99b17261-8f6e-45f0-9ad5-a69c6f509a4f","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"github.github-vscode-theme","uuid":"7328a705-91fc-49e6-8293-da6f112e482d"},"version":"6.3.5","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/github.github-vscode-theme-6.3.5","scheme":"file"},"relativeLocation":"github.github-vscode-theme-6.3.5","metadata":{"installedTimestamp":1743618590147,"source":"gallery","id":"7328a705-91fc-49e6-8293-da6f112e482d","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-vscode-remote.remote-containers","uuid":"93ce222b-5f6f-49b7-9ab1-a0463c6238df"},"version":"0.409.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode-remote.remote-containers-0.409.0","scheme":"file"},"relativeLocation":"ms-vscode-remote.remote-containers-0.409.0","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1744177988353,"pinned":false,"source":"gallery","id":"93ce222b-5f6f-49b7-9ab1-a0463c6238df","publisherId":"ac9410a2-0d75-40ec-90de-b59bb705801d","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"rust-lang.rust-analyzer","uuid":"06574cb4-e5dc-4631-8174-a543a4533621"},"version":"0.3.2370","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/rust-lang.rust-analyzer-0.3.2370-linux-x64","scheme":"file"},"relativeLocation":"rust-lang.rust-analyzer-0.3.2370-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1744177988356,"pinned":false,"source":"gallery","id":"06574cb4-e5dc-4631-8174-a543a4533621","publisherId":"cb14a7a7-a188-40bd-a953-e0a20757c5dd","publisherDisplayName":"The Rust Programming Language ","targetPlatform":"linux-x64","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-vscode.remote-explorer","uuid":"11858313-52cc-4e57-b3e4-d7b65281e34b"},"version":"0.4.3","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode.remote-explorer-0.4.3","scheme":"file"},"relativeLocation":"ms-vscode.remote-explorer-0.4.3","metadata":{"installedTimestamp":1744178019887,"pinned":false,"source":"gallery","id":"11858313-52cc-4e57-b3e4-d7b65281e34b","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-vscode-remote.remote-ssh-edit","uuid":"bfeaf631-bcff-4908-93ed-fda4ef9a0c5c"},"version":"0.87.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode-remote.remote-ssh-edit-0.87.0","scheme":"file"},"relativeLocation":"ms-vscode-remote.remote-ssh-edit-0.87.0","metadata":{"installedTimestamp":1744178019886,"pinned":false,"source":"gallery","id":"bfeaf631-bcff-4908-93ed-fda4ef9a0c5c","publisherId":"ac9410a2-0d75-40ec-90de-b59bb705801d","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-vscode-remote.remote-ssh","uuid":"607fd052-be03-4363-b657-2bd62b83d28a"},"version":"0.119.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0","scheme":"file"},"relativeLocation":"ms-vscode-remote.remote-ssh-0.119.0","metadata":{"installedTimestamp":1744178019884,"pinned":false,"source":"gallery","id":"607fd052-be03-4363-b657-2bd62b83d28a","publisherId":"ac9410a2-0d75-40ec-90de-b59bb705801d","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-vscode.remote-server","uuid":"105c0b3c-07a9-4156-a4fc-4141040eb07e"},"version":"1.5.2","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/ms-vscode.remote-server-1.5.2","scheme":"file"},"relativeLocation":"ms-vscode.remote-server-1.5.2","metadata":{"installedTimestamp":1744222972457,"pinned":false,"source":"gallery","id":"105c0b3c-07a9-4156-a4fc-4141040eb07e","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"dracula-theme.theme-dracula","uuid":"4e44877c-1c8d-4f9c-ba86-1372d0fbeeb1"},"version":"2.25.1","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/dracula-theme.theme-dracula-2.25.1","scheme":"file"},"relativeLocation":"dracula-theme.theme-dracula-2.25.1","metadata":{"installedTimestamp":1744233970240,"source":"gallery","id":"4e44877c-1c8d-4f9c-ba86-1372d0fbeeb1","publisherId":"fbb3d024-f8f2-460c-bdb5-99552f6d8c4b","publisherDisplayName":"Dracula Theme","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"hyzeta.vscode-theme-github-light","uuid":"b84ed643-ec7d-49cc-a514-3ce104ed777f"},"version":"7.14.2","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/hyzeta.vscode-theme-github-light-7.14.2","scheme":"file"},"relativeLocation":"hyzeta.vscode-theme-github-light-7.14.2","metadata":{"installedTimestamp":1744238749461,"source":"gallery","id":"b84ed643-ec7d-49cc-a514-3ce104ed777f","publisherId":"18f3a989-6d93-420d-a045-baf7651c8552","publisherDisplayName":"Hyzeta","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"mkhl.direnv","uuid":"e365e970-aeef-4dcd-8e4a-17306a27ab62"},"version":"0.17.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/mkhl.direnv-0.17.0","scheme":"file"},"relativeLocation":"mkhl.direnv-0.17.0","metadata":{"installedTimestamp":1746581315466,"pinned":false,"source":"gallery","id":"e365e970-aeef-4dcd-8e4a-17306a27ab62","publisherId":"577d6c37-7054-4ca5-b4ce-9250409f3903","publisherDisplayName":"Martin Kühl","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"golang.go","uuid":"d6f6cfea-4b6f-41f4-b571-6ad2ab7918da"},"version":"0.46.1","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/golang.go-0.46.1","scheme":"file"},"relativeLocation":"golang.go-0.46.1","metadata":{"installedTimestamp":1746581324035,"pinned":false,"source":"gallery","id":"d6f6cfea-4b6f-41f4-b571-6ad2ab7918da","publisherId":"dbf6ae0a-da75-4167-ac8b-75b4512f2153","publisherDisplayName":"Go Team at Google","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"vspacecode.whichkey","uuid":"47ddeb9c-b4bb-4594-906b-412886e20e47"},"version":"0.11.4","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/vspacecode.whichkey-0.11.4","scheme":"file"},"relativeLocation":"vspacecode.whichkey-0.11.4","metadata":{"installedTimestamp":1746581341954,"pinned":false,"source":"gallery","id":"47ddeb9c-b4bb-4594-906b-412886e20e47","publisherId":"60415ab6-4581-4e73-a7e0-6fc6b3369f12","publisherDisplayName":"VSpaceCode","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"vspacecode.vspacecode","uuid":"1c81ab96-0424-43c4-b356-fe408a1bd1cf"},"version":"0.10.19","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/vspacecode.vspacecode-0.10.19","scheme":"file"},"relativeLocation":"vspacecode.vspacecode-0.10.19","metadata":{"installedTimestamp":1746581346578,"pinned":false,"source":"gallery","id":"1c81ab96-0424-43c4-b356-fe408a1bd1cf","publisherId":"60415ab6-4581-4e73-a7e0-6fc6b3369f12","publisherDisplayName":"VSpaceCode","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"vscodevim.vim","uuid":"d96e79c6-8b25-4be3-8545-0e0ecefcae03"},"version":"1.29.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/vscodevim.vim-1.29.0","scheme":"file"},"relativeLocation":"vscodevim.vim-1.29.0","metadata":{"installedTimestamp":1746581346579,"pinned":false,"source":"gallery","id":"d96e79c6-8b25-4be3-8545-0e0ecefcae03","publisherId":"5d63889b-1b67-4b1f-8350-4f1dce041a26","publisherDisplayName":"vscodevim","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"bodil.file-browser","uuid":"97a82b1e-e6f7-4519-b1fc-f6be103e3824"},"version":"0.2.11","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/bodil.file-browser-0.2.11","scheme":"file"},"relativeLocation":"bodil.file-browser-0.2.11","metadata":{"installedTimestamp":1746581346580,"pinned":false,"source":"gallery","id":"97a82b1e-e6f7-4519-b1fc-f6be103e3824","publisherId":"e5c9456a-b78b-41ec-95c2-0cc218272ab9","publisherDisplayName":"Bodil Stokke","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"jacobdufault.fuzzy-search","uuid":"c2ebe7f7-8974-4ceb-a4a5-aea798305313"},"version":"0.0.3","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/jacobdufault.fuzzy-search-0.0.3","scheme":"file"},"relativeLocation":"jacobdufault.fuzzy-search-0.0.3","metadata":{"installedTimestamp":1746581346581,"pinned":false,"source":"gallery","id":"c2ebe7f7-8974-4ceb-a4a5-aea798305313","publisherId":"e7902c39-c8b4-4fb0-b245-6241b490a67b","publisherDisplayName":"jacobdufault","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"kahole.magit","uuid":"4d965b97-6bfd-43d8-882c-d4dfce310168"},"version":"0.6.66","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/kahole.magit-0.6.66","scheme":"file"},"relativeLocation":"kahole.magit-0.6.66","metadata":{"installedTimestamp":1746581346580,"pinned":false,"source":"gallery","id":"4d965b97-6bfd-43d8-882c-d4dfce310168","publisherId":"74af81ef-7bda-475b-bfe0-ccf6aa9b34dc","publisherDisplayName":"Kristian Andersen Hole","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"github.copilot-chat","uuid":"7ec7d6e6-b89e-4cc5-a59b-d6c4d238246f"},"version":"0.26.7","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/github.copilot-chat-0.26.7","scheme":"file"},"relativeLocation":"github.copilot-chat-0.26.7","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1746581379868,"pinned":false,"source":"gallery","id":"7ec7d6e6-b89e-4cc5-a59b-d6c4d238246f","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"github.copilot","uuid":"23c4aeee-f844-43cd-b53e-1113e483f1a6"},"version":"1.314.0","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/github.copilot-1.314.0","scheme":"file"},"relativeLocation":"github.copilot-1.314.0","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1746581384122,"pinned":false,"source":"gallery","id":"23c4aeee-f844-43cd-b53e-1113e483f1a6","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"jnoortheen.nix-ide","uuid":"0ffebccd-4265-4f2d-a855-db1adcf278c7"},"version":"0.4.16","location":{"$mid":1,"path":"/home/vic/.vscode/extensions/jnoortheen.nix-ide-0.4.16","scheme":"file"},"relativeLocation":"jnoortheen.nix-ide-0.4.16","metadata":{"installedTimestamp":1746581406789,"pinned":false,"source":"gallery","id":"0ffebccd-4265-4f2d-a855-db1adcf278c7","publisherId":"3a7c13d8-8768-454a-be53-290c25bd0f85","publisherDisplayName":"Noortheen","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"usernamehw.errorlens"},"version":"3.26.0","location":{"$mid":1,"fsPath":"/home/vic/.vscode/extensions/usernamehw.errorlens-3.26.0","external":"file:///home/vic/.vscode/extensions/usernamehw.errorlens-3.26.0","path":"/home/vic/.vscode/extensions/usernamehw.errorlens-3.26.0","scheme":"file"},"relativeLocation":"usernamehw.errorlens-3.26.0","metadata":{"installedTimestamp":1746581420935,"pinned":false,"source":"gallery","id":"9d8c32ab-354c-4daf-a9bf-20b633734435","publisherId":"151820df-5dc5-4c97-8751-eb84643203fa","publisherDisplayName":"Alexander","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}}] \ No newline at end of file diff --git a/modules/vic/fish.nix b/modules/vic/fish.nix new file mode 100644 index 00000000..c6413cb8 --- /dev/null +++ b/modules/vic/fish.nix @@ -0,0 +1,27 @@ +{ inputs, ... }: +{ + flake.modules.homeManager.vic = + { pkgs, ... }: + let + inherit (pkgs) lib; + in + { + + #home.file.".config/fish/conf.d/init-leader.fish".source = + # "${inputs.cli-leader.outPath}/assets/leader.fish.sh"; + + programs.fzf.enable = true; + programs.fzf.enableFishIntegration = true; + + programs.fish = { + enable = true; + + functions = import ./_fish/functions.nix { inherit inputs lib; }; + shellAliases = import ./_fish/aliases.nix; + shellAbbrs = import ./_fish/abbrs.nix; + + plugins = [ ]; # pure done fzf.fish pisces z + }; + + }; +} diff --git a/modules/vic/git.nix b/modules/vic/git.nix new file mode 100644 index 00000000..5537ecac --- /dev/null +++ b/modules/vic/git.nix @@ -0,0 +1,64 @@ +{ + flake.modules.homeManager.vic = + { pkgs, ... }: + { + + home.packages = [ pkgs.difftastic ]; + + programs.git = { + enable = true; + userName = "Victor Borja"; + userEmail = "vborja@apache.org"; + signing.format = "ssh"; + + extraConfig = { + init.defaultBranch = "main"; + pull.rebase = true; + pager.difftool = true; + diff.tool = "difftastic"; + difftool.prompt = false; + difftool.difftastic.cmd = "${pkgs.difftastic}/bin/difft $LOCAL $REMOTE"; + + github.user = "vic"; + gitlab.user = "vic"; + + core.editor = "vim"; + }; + aliases = { + "dff" = "difftool"; + "fap" = "fetch --all -p"; + "rm-merged" = + "for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D"; + "recents" = + "for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'"; + }; + ignores = [ + ".DS_Store" + "*.swp" + ".direnv" + ".envrc" + ".envrc.local" + ".env" + ".env.local" + ".jj" + "/devshell.toml" + "/.tool-versions" + "*.key" + "/vic" + "*~" + ]; + includes = [ ]; + # { path = "${DOTS}/git/something"; } + + lfs.enable = true; + + delta.enable = true; + delta.options = { + line-numbers = true; + side-by-side = false; + }; + }; + + }; + +} diff --git a/modules/vic/home.nix b/modules/vic/home.nix new file mode 100644 index 00000000..c0b3b362 --- /dev/null +++ b/modules/vic/home.nix @@ -0,0 +1,29 @@ +{ inputs, lib, ... }: +let + flake.homeConfigurations.vic = vic_at "mordor"; + flake.homeConfigurations."vic@mordor" = vic_at "mordor"; + + vic_at = + host: + inputs.home-manager.lib.homeManagerConfiguration { + pkgs = inputs.self.nixosConfigurations.${host}.pkgs; + modules = [ inputs.self.homeModules.vic ]; + extraSpecialArgs.osConfig = inputs.self.nixosConfigurations.${host}.config; + }; + + flake.homeModules.vic.imports = [ + inputs.self.modules.homeManager.vic + ]; + + flake.modules.homeManager.vic = + { pkgs, lib, ... }: + { + home.username = lib.mkDefault "vic"; + home.homeDirectory = lib.mkDefault (if pkgs.stdenvNoCC.isDarwin then "/Users/vic" else "/home/vic"); + home.stateVersion = lib.mkDefault "25.05"; + }; + +in +{ + inherit flake; +} diff --git a/modules/vic/imports.nix b/modules/vic/imports.nix new file mode 100644 index 00000000..06628df8 --- /dev/null +++ b/modules/vic/imports.nix @@ -0,0 +1,9 @@ +{ inputs, ... }: +{ + # home.file.".nix-flake".source = inputs.self.outPath; + flake.modules.homeManager.vic.imports = [ + inputs.self.modules.homeManager.nix-index + inputs.self.modules.homeManager.nix-registry + inputs.self.modules.homeManager.vscode-server + ]; +} diff --git a/modules/vic/jujutsu.nix b/modules/vic/jujutsu.nix new file mode 100644 index 00000000..da43446e --- /dev/null +++ b/modules/vic/jujutsu.nix @@ -0,0 +1,148 @@ +{ inputs, ... }: +{ + flake.modules.homeManager.vic = + { pkgs, ... }: + { + + home.packages = + let + jj-for-tui = pkgs.stdenvNoCC.mkDerivation { + inherit (pkgs.jujutsu) name version meta; + nativeBuildInputs = [ pkgs.makeWrapper ]; + phases = "wrap"; + wrap = '' + makeWrapper ${pkgs.jujutsu}/bin/jj $out/bin/jj \ + --add-flags --config-file \ + --add-flags "~/.config/jj/tui.toml" + ''; + }; + + jj-tui-wrap = + main: drv: extra: + pkgs.stdenvNoCC.mkDerivation { + inherit (drv) name meta; + nativeBuildInputs = [ pkgs.makeWrapper ]; + phases = "wrap"; + wrap = '' + makeWrapper \ + "${drv}/bin/${main}" \ + "$out/bin/${main}" \ + --prefix PATH : ${jj-for-tui}/bin \ + ${extra} + ''; + }; + in + [ + (jj-tui-wrap "lazyjj" pkgs.lazyjj "--add-flags --jj-bin --add-flags ${jj-for-tui}/bin/jj") + (jj-tui-wrap "jj-fzf" pkgs.jj-fzf "--add-flags --key-bindings") + (jj-tui-wrap "jjui" inputs.jjui.packages.${pkgs.system}.default "") + ]; + + programs.jujutsu = { + enable = true; + + # See https://jj-vcs.github.io/jj/v0.17.0/config + settings = { + user.name = "Victor Borja"; + user.email = "vborja@apache.org"; + + revset-aliases = { + "trunk()" = "main@origin"; + + # commits on working-copy compared to `trunk` + "compared_to_trunk()" = "(trunk()..@):: | (trunk()..@)-"; + + # immutable heads: + # main and not mine commits. + "immutable_heads()" = "trunk() | (trunk().. & ~mine())"; + + "default_log()" = "present(@) | ancestors(immutable_heads().., 2) | present(trunk())"; + }; + + template-aliases = { + "format_short_id(id)" = "id.shortest().upper()"; # default is shortest(12) + "format_short_change_id(id)" = "format_short_id(id)"; + "format_short_signature(signature)" = "signature.email()"; + }; + + ui = { + default-command = [ + "status" + "--no-pager" + ]; + diff.tool = [ + (pkgs.lib.getExe pkgs.difftastic) + "--color=always" + "$left" + "$right" + ]; + # pager = ":builtin"; + # editor = "nvim"; + merge-editor = "vscode"; # meld + }; + + signing = { + behaviour = "own"; + backend = "ssh"; + key = "~/.ssh/id_ed25519.pub"; + }; + + git = { + push-bookmark-prefix = "vic/jj-change-"; + }; + + aliases = { + l = [ + "log" + "-r" + "compared_to_trunk()" + "--config" + "template-aliases.'format_short_id(id)'='id.shortest().upper()'" + "--config" + "template-aliases.'format_short_change_id(id)'='id.shortest().upper()'" + "--config" + "template-aliases.'format_timestamp(timestamp)'='timestamp.ago()'" + ]; + + # like git log, all visible commits in the repo + ll = [ + "log" + "-r" + ".." + ]; + }; + + }; + }; + + home.file.".config/jj/tui.toml".source = + let + toml = { + ui.editor = "vim"; + jj-fzf = { + show-keys = "true"; + revsets.log = ".."; + diff-mode = "jj-diff"; + }; + template-aliases = { + "format_short_id(id)" = "id.shortest().upper()"; # default is shortest(12) + "format_short_change_id(id)" = "format_short_id(id)"; + "format_short_signature(signature)" = "signature.email()"; + "format_timestamp(timestamp)" = "timestamp.ago()"; + }; + }; + fmt = pkgs.formats.toml { }; + in + fmt.generate "tui.toml" toml; + + home.file.".config/jjui/config.toml".source = + let + # https://github.com/idursun/jjui/wiki/Configuration + toml = { + + }; + fmt = pkgs.formats.toml { }; + in + fmt.generate "config.toml" toml; + }; +} diff --git a/modules/vic/nvim.nix b/modules/vic/nvim.nix new file mode 100644 index 00000000..013f264f --- /dev/null +++ b/modules/vic/nvim.nix @@ -0,0 +1,18 @@ +{ + flake.modules.homeManager.vic = + { pkgs, ... }: + { + home.sessionVariables.EDITOR = "vim"; + programs.neovim.enable = true; + programs.neovim.viAlias = true; + programs.neovim.vimAlias = true; + programs.neovim.withNodeJs = true; + programs.neovim.extraPackages = with pkgs; [ + zig + sqlite + treefmt + ]; + + }; + +} diff --git a/modules/vic/rdesk.nix b/modules/vic/rdesk.nix new file mode 100644 index 00000000..0623bc70 --- /dev/null +++ b/modules/vic/rdesk.nix @@ -0,0 +1,11 @@ +{ inputs, ... }: +let + flake.modules.nixos.vic.imports = [ + inputs.self.modules.nixos.rdesk + ]; + + flake.modules.homeManager.vic.imports = [ inputs.self.modules.homeManager.rdesk ]; +in +{ + inherit flake; +} diff --git a/modules/vic/secrets.nix b/modules/vic/secrets.nix new file mode 100644 index 00000000..186cfb54 --- /dev/null +++ b/modules/vic/secrets.nix @@ -0,0 +1,45 @@ +{ inputs, ... }: +{ + + flake.modules.homeManager.vic = + { + config, + pkgs, + ... + }: + { + + imports = [ + inputs.sops-nix.homeManagerModules.sops + ]; + + home.packages = [ pkgs.sops ]; + + sops = { + age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt"; + age.sshKeyPaths = [ ]; + age.generateKey = false; + defaultSopsFile = ./secrets.yaml; + validateSopsFiles = true; + + secrets = { + "hello" = { }; + "ssh/id_ed25519" = { + format = "binary"; + sopsFile = ./secrets/mordor; + }; + "ssh/sops_ssh_config" = { + format = "binary"; + sopsFile = ./secrets/ssh-conf; + }; + }; + + templates = { + "hello.toml".content = '' + hello = "Wooo ${config.sops.placeholder.hello} Hoo"; + ''; + }; + }; + + }; +} diff --git a/modules/vic/secrets.yaml b/modules/vic/secrets.yaml new file mode 100644 index 00000000..0a9ddafe --- /dev/null +++ b/modules/vic/secrets.yaml @@ -0,0 +1,27 @@ +hello: ENC[AES256_GCM,data:AN4uGKrELLaCr67iBMZA5imhZX34PqNqMPcwxNgwR39s5zl1AHbC4tHX8TC8Rg==,iv:f8cgbppFfeESlcEwAxBQFVNVJP2EVib2uCiUw0zfwP8=,tag:ZM8g8Ol7bpeDg4HOpyDepw==,type:str] +gh_actions_pat: ENC[AES256_GCM,data:8Y/XaUCMqk4tJlP3cAGZyBiATMuiSkyhedhVGCaTvA7WZ6r9GL6A4vKPw57aQW4jXh9fNIwjqezjyITcyqUAxzyS/mULgJCbO3W0k+YfJsr6OGMvyChsEaAR+gvU,iv:NONHWFikaQCiTz+gzrJ5dn9bKgo1NjbustcsNCRDUXI=,tag:pQiOl1YWAMbxdAhrS2wjNw==,type:str] +cachix_personal: ENC[AES256_GCM,data:l25AEmy2igW+Dh7jAlytPdNQwguUXsq1dwWpt9MSx8t+NSEMXLf9XUxUvsRMC15BPkQydnHRp0t2ndhhcKl2ws4mlF3cIeIEMyn5D2hOgyKNGvc2zILykrfpCA73H8axq3Jt2p/iVWPGOha42JAIPo2fI3yi5t1dBK76pH1VkgxpqGAxyTQWQaMksT6bu8BqJQ==,iv:mymYXDiM7gheeCWR5vYJI3plVSIbT9g6l6oZGrB8k0Y=,tag:5LLFd3n7kVSeYzj6GElqew==,type:str] +cachix_gleam_nix: ENC[AES256_GCM,data:VQaew65aPMhKDHlJuPloUpiAXF7cKSn9jSBbi+CIZ6INV6oyVvHSv6s/RfM6DUL1dkZRZZC3Qq/3gFCKW+5eRcLOa3F0TZ2FIGW8VcqHG+gp5RKGWZ2Jl+Auphg++/ra2dX5Mrm95cLQRi4/MPXfdRoTuX2tfYC3EqqAiuDoWsi87CG0DoYo/bFGsCMVhX+ZdrJlZVI=,iv:ylE+G++jSOEto2pipGxHZBb8doYR2gGiZ8ZcaD6sdq4=,tag:SDX/NIbX77iDRDsV3jnZyg==,type:str] +cachix_vix: ENC[AES256_GCM,data:eMogJzuHslqWoRg689GKhwZL+A5cvcYradGiSH8kS8TpKzT/+ux6D1ZKKExNBUmiI9YXRo1KMrdkD16urk9KxAdCRwbzhEaUEdKdfAlZuXcnvcR7t1RUmRzuBFrEqW2zFLY0uF361GcVay1zDMEDnA1fajoj0COBQvNcuEmsbchBNmTFgFSNBqSd4eYB/7+vRgKUVaY=,iv:8xnWPN7l+5dg5NQhYMkqytQDHl+JKIBdM13HmmnlyEQ=,tag:HNGXe9B3E2OgK0ep9sTdqw==,type:str] +alwaysdata_vic: ENC[AES256_GCM,data:6cEmxqbir07GsiIr63B2qwvUqPlS6WsMXxqXLJMS3RA=,iv:WevxrLrFeDe7T4b/t0+ETP1h0K8AXOmuASlszaaTdhE=,tag:b+JYA3sUktM853xPxybhWg==,type:str] +alwaysdata_vix: ENC[AES256_GCM,data:6BoyXwOH72NN9YgM5kXshFD3HRycV/ixoFc=,iv:MPAh+oPqfgbYiZhLPq2YkxI2A0YevI6tQ63A4errBss=,tag:ywbr0h8yWN9GUmm5/cARKg==,type:str] +alwaysdata_nix_versions: ENC[AES256_GCM,data:qMuKnCcNtqEFY4zkTtLhhpiaSTkFAM8=,iv:JblAEGt7rRmSkuIo4IJYfV2zFVIEVofThJcRb9dORv0=,tag:V6YHml/XRd2h6zgSqyy9RQ==,type:str] +alwaysdata_nix_versions_api_key: ENC[AES256_GCM,data:HIDF+vskF37wevW21+4sc9cmSPeJZ+nAZY9/tCqcnJA=,iv:EcRH91F8r4FVonyy16ys+mOf2E4tx8qmZttU1CXEVr4=,tag:lKOKMIeP96KXFF+sLhxJmw==,type:str] +alwaysdata_nix_versions_totp: ENC[AES256_GCM,data:BgdGKCyTAPvJRvA/Y5uHUOegJxfdmvRzX6N56FbDcew=,iv:5akqwLvFLePU0zs3LhLAE5pxWrdGwQdSZtMSWTI4XYY=,tag:WxqcaB2msM8SSexBQ4/iYQ==,type:str] +nix_versions_ssh: ENC[AES256_GCM,data:2+n696Tm5CtHLmuOICWhGrwR1crTMQD6lYw=,iv:Xbe5TQhadHKtgJjDb2ncew4XfhLsD9pl4YVnkdv7na4=,tag:wQ1a+5Z0qHbvsjdad2emgA==,type:str] +gemini_api_key: ENC[AES256_GCM,data:/9U1o9DBF3uE4hT0KnOUqOmLyrknI/MxgZ6HWwpGmVorLw0F4hfC,iv:3zsX3cvbnz1+PDSwGGjN9nX9gDC9hrzgFhG3VPzXb/E=,tag:v31KszmAZODyOJ5eo8/Vjg==,type:str] +sops: + age: + - recipient: age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwb3hUS1NyNlpvL0kycWhK + V0lQR1dvZC9vNmFnSFB2T3laZ2E5VnpJN25nCm9TcjNaYVBOWVFBRE9XYkY5ZmVX + aDNBcE01L0QrS0xaU2dFT2ptdEtsMEEKLS0tIHZyblRwNXpiYkhUZGs5dUw3ajZa + TTJuZnhuaUU3bXZ6SmU5R1IzcWlqSmsK0Kxqki9294isfdxcB51BOGcZrlvOXVLa + 2nfhZ+Dq5hby+o89JYVCVG/x/cZY73b+YMKISknD8TCF6MZLVJ8vzA== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2025-05-07T14:39:15Z" + mac: ENC[AES256_GCM,data:I5CBxmp8/HFuoSOcYF+Cq7qiITpYRXGkL6MJ5HRcP0weV06d61Hf7wtRJWQ92xl14AvQYAKIiXMDC3x2j0g8VmWqpa6hanRRljrlKsTCJ2BFjvlNo14aHazUAvlUTqTopPdUOh3/35Q2ocs5Gj3TpfOw35jjDE65ajs+HcSqjsE=,iv:A+D4Oh2iklXnWLy5qz6gOLL88OWTE2JrDQXoPayZPFI=,tag:B0ixmQBLZwtGTAaua8f0jw==,type:str] + unencrypted_suffix: _unencrypted + version: 3.10.1 diff --git a/modules/vic/secrets/gh-recover b/modules/vic/secrets/gh-recover new file mode 100644 index 00000000..3fc365dc --- /dev/null +++ b/modules/vic/secrets/gh-recover @@ -0,0 +1,15 @@ +{ + "data": "ENC[AES256_GCM,data:+Tt37NNb3HMuRgTseJUImp2DdaPpDOjGw2aUAKYqolF7R5PxfcuBo0m5Lpzu+h5/2u+fTefrfkl7uFGKyVBw5aCXtYLT0HnBOjjhdQSXNpMo1OeuTPV4O+UE7seI91rhKZYeP9DKHYPMqOyQ2J5YXHZc//cf+pXuIobeV1W8AzLg5oVWxBHBKt3BNf/Q3YzWQuPAJprmPT7UeMuz7xm5D0A7AhFbbOuogjiQRIV7TzV+PVvpk63jDPEW3vMtP/68b7Hf5kgOcFA8QUTbYs0=,iv:aCjlCntFSHeb8iuJ+DAEzBPY7pRXCpFGZSBuhJiM3/M=,tag:igm2lskoqFZVerQ+L3jMMA==,type:str]", + "sops": { + "age": [ + { + "recipient": "age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBucTNPUDhxZmViNkRMNng0\nRWMxMEtYdTdJaC9Oa1Flb3NKVzRtZ0NnOWcwCjJwbEZlU2htU2tFVlRJRXRvQ09j\nYUdwWlhhTWJ1d1dkMlNMczY5TjFUZG8KLS0tIFZlZU5Ra1ZlK3ZqdzhpM3RRN05L\nVUhqb1hZVEV3TktuU0J1VEc3RmI3QWcKJMf+nwcx+T+U7vExsvIoQBNiGCF+19xw\nbplzbF+ker4AoDzpMCgbIZDam+vbVqABlbdWLAoTJyI4C5Q/VUPUug==\n-----END AGE ENCRYPTED FILE-----\n" + } + ], + "lastmodified": "2025-05-07T14:39:15Z", + "mac": "ENC[AES256_GCM,data:ILFahJJXtfPhxom7Anwlvq17J6zETAHQW7C8AejT4ukPXmK8UZkO0nFy8l/TbRv9uejXSVxpW150piUxyDWdUgja/eWl/gn/tbXoJlGOb30GSxgrxH9imkcXaR7CRsr2O+PGX8/b5R3dG9MQwAZqds0wc6iHS6LnkPG47nVKeYE=,iv:VA0wCaQWBZXn31rSy3oG2eXWYsNvMMkhZoB6nGx8Grs=,tag:ePsFnMuv6nYvOuxL+67YuQ==,type:str]", + "unencrypted_suffix": "_unencrypted", + "version": "3.9.4" + } +} diff --git a/modules/vic/secrets/mordor b/modules/vic/secrets/mordor new file mode 100644 index 00000000..f6edae14 --- /dev/null +++ b/modules/vic/secrets/mordor @@ -0,0 +1,15 @@ +{ + "data": "ENC[AES256_GCM,data:zzR4fExHoMFm26gg4Lax9TZ+X45G256mFTLYeZCzZ5s7070jcBNnyNKyIZmtvWSUje7/FVFIPqRVeeelcXrGEeIE+O8muzUeyl0gYwjbkcI6d8GihkvaGG+XzyRn32fdrl3p1DMf5+3vTxBLCUfzmbra7QzW4R54WxSMFZVaX3SD59kO2PRliAeKMdi8qIzO9VTBJ3SElwvnFJ4kVPCZKWOiuMx/C03jIfBODixey+R7G7icEYazxBdAl8K39E+Wr9cJBoRYboVaeti/+a1EXqLEIbJPiOssnGFygVMo84sGaChrwgs87FOYd5LXRIll4FRLuqCHo/wV7n+GfNYI2JwxWkGOYFoxilh6H6ACH5/Oo+9IOFVKSoVtoOAdM4QxgFfv9mCYQ6fvSjuLRDyUn0uYaxgQ+jiQwvz+JrB0JLhjB8PrizlVyxErD9qK8oOZNBmRi1Egr0Iq27qlYVwY+PGCZCnXEoXdBP4Mq+xQe+ZMxsUv+Y92g7WECENctObBHAL/xfsoFuNw13VLCv9TaGOw1rlWBc/Ih0j8QPtBGzFIGuPJtjTeTTWxCrOGGIJ8j/S81EoEspZ5/fX8,iv:+Zm1AEglKHEH/TIzrZnFH+vDFQtQKrdFBGVzGx+IjlU=,tag:6xH+25TZk6XUGmVcTd8l9Q==,type:str]", + "sops": { + "age": [ + { + "recipient": "age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUaUIrNkVVZk1tdXRwNUdk\nc0k2NWN6Z0E0aVlXenp2dzlpQTEzRkxiZEU0CjdjRmI2bGlOQ2FvdTFSSW1YR01m\nWTQyZDBzcnp5Q3QrN2hZSUxTMlJNNFUKLS0tIDd5Slg0QmFydDYwbEVRZVVIdVpp\nc0swZjArcE5uWWNsRWhwUDc0eW5hUjAKovcZhM/Broc9XMhOE2Qv9t47AvMxxPAl\nJKFmHBoBP7JLu9G1mRhBxBDYAOFuvHnXM424YUx9wX47Ls6RojWOXQ==\n-----END AGE ENCRYPTED FILE-----\n" + } + ], + "lastmodified": "2025-05-07T14:39:15Z", + "mac": "ENC[AES256_GCM,data:uf27wYN570E/2AXaQmU8tu7kAenOMlS3r6cVepi+MADrsnYhLgHmMumcGmQWhjOhItrfOipRtxKgBV80F5SRVS5pHbKz30GTN1jj7LCFAH2VwF/RYCBijvwowrkzlI8V20PvxtDq5z/S6m2FLGmWSGxs2TiypShZta5oaSlZ0mg=,iv:UyEvUj2FT/CFydVJ2F14/y5Qmu4ZrodEiQ63LMBGlR8=,tag:PWc9FBcU0AsVCdZ5pyi9Bw==,type:str]", + "unencrypted_suffix": "_unencrypted", + "version": "3.9.4" + } +} diff --git a/modules/vic/secrets/nix-versions b/modules/vic/secrets/nix-versions new file mode 100644 index 00000000..f44a1cf4 --- /dev/null +++ b/modules/vic/secrets/nix-versions @@ -0,0 +1,15 @@ +{ + "data": "ENC[AES256_GCM,data:qEM69BVg0UPfIj1FYSR9vSU19bnD+QJRT+ZE8wKgfvuA9xGH4BlkL2LCk9iXCg/5cdq8Yg20sCosIHNIu1Op+AF63hl9uON8vPr2MIplKJOA/Dgtl3rO+J9rUrkNkkdaOypdMaC19955mJyepwny0jIxE05wRLvtZcxWVqmrRbdXmb3R9Xg1WjulumfPiaA6VtLSY6X06/ZHhgfjmca0Btj8ynJPgjLI/bHOEBV8BA3KOIbL9Exv+bOQsILjqRX9UrZR13WmdMuLAQseZeYeNSCjo1FUdRMU8MafnjXto+ruNrLRmRddH/a79hcAboRNr6JNd9INKT4jLx0IaXVwGephvf6yfgQMTxE/CmAHZ5PeA9lT5plMkOR11fiPvVD+03yzFemeYMnhbiYf1dVVOkThTNlkCSodle+oZesievafzBSJ1p/fpIIXchY2scoQ99Q8kgSq2K6FwzV6JhUOovOlIDVsIsnyAx4jPUk7S8Z+Vuat8uBUNvshB3iAwj3cqYCX9d0xehQc3K/+GXKv,iv:crVwb2Sr694f047Dg35t86/gOy5XVzCKR7eyPB1v3CQ=,tag:QXLQ7Ka06+vffrWIRlioUA==,type:str]", + "sops": { + "age": [ + { + "recipient": "age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBwNWpUQUM1SnVyZzIxVUxF\nSnVSUXdSNVEwamVSYVlkcWFLMXEzSHcrQjAwCmJyMVVyTWhHWE12MmNRZmYzeWlI\neDRNM0d6alF5bkJrdkdCR3JySDYyQzAKLS0tIFEzYWx1SzVCak1FYVZwY2ZuczBN\nTWRicXJESks3SjBIVVRIaVYwTzdlRUkKAV2PY4ztxXoK5M6RytO5c7JDBHVg3Hcl\ncp+HP/S7g+hZ27nfOojlTlbRQsTyo/StFHGx86wDqsHXCEXoF57VZw==\n-----END AGE ENCRYPTED FILE-----\n" + } + ], + "lastmodified": "2025-05-07T14:39:15Z", + "mac": "ENC[AES256_GCM,data:MrtGcNSsRPsodKfNOMlFeCFexytAAYGxwU1ZxSFYrNDaN/gDoUdCZaWjXmacNfy4tITSE91PHYXRMR6SBHf7xSrdgfAUxbobInc6gb7ixUPs35Mn0KlZDcPamK4qRZjCOvwntg4U6AqT0+o7N4XGU8SEVzOF6g3rMW+CEUf0OU4=,iv:a7WDImHF3bGcubHvIiV3tL6k29S6ZFnyUGYo/Sfr2e0=,tag:usZFYxWx8o5zReJXSTK4VQ==,type:str]", + "unencrypted_suffix": "_unencrypted", + "version": "3.9.4" + } +} diff --git a/modules/vic/secrets/ssh-conf b/modules/vic/secrets/ssh-conf new file mode 100644 index 00000000..9159f29c --- /dev/null +++ b/modules/vic/secrets/ssh-conf @@ -0,0 +1,15 @@ +{ + "data": "ENC[AES256_GCM,data:/lZBsD9WZP6/EDszAYFmUr+N3kBduOmh2d1xVS+vTNPT0ypiiZ4Buaj1IskJFhevXAW1FsgC6d+/7oj4i52sSW569WbWEFRrCOyYNV7+3jM2ukHz/zgmV55G09c4QYGKEbenYii4e3Y/WgNe5hmRAK6F3cW901ykt9QjUrcwZbzOGPAQIyeC2B7Rn8kjX86cvROxKMWTcgLIV9Ez8s7+YsnQeXeB7EWhMzH/+PsFFABvp2cXN1WD9cL8t9lVZDTETgJ+FajfvW8AdgD/bWl1EpoNLeoEpjo4nZENyA9t44r/t8K+YNBTmEjrznAvnlDoejm0r4LqQYqy/A==,iv:iSlNo/WSvc2G31qmwXxFECC+gOH9YK2gA7mzvsdVoU8=,tag:74rrY6pgODbrzuFtrkSH4w==,type:str]", + "sops": { + "age": [ + { + "recipient": "age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGTFlFWCtIcEdhR3BaUHNj\nY3JsK2tYc21McTRkQ2xRbjgrUndDbm5SM21BCmJta1hSNmJkdjJtRW9iWnU0YW00\ncG05TXNaTkxJcFlSZjgrR1FsNXdtNncKLS0tIHpaWEFqcUVhdmYrY0JnKy9JSlFi\nUEFjVHFZbzBsNHZrYWtBeGdNQ01adTQKotr3rNIOt8HdUdFQIZMAuM/F0lJjbvrb\n4iFoS/lURQiueVJgwNkO+rT9sgh7YJdYu3zxh1e0c4Y32dx0p3q8Zw==\n-----END AGE ENCRYPTED FILE-----\n" + } + ], + "lastmodified": "2025-05-07T14:39:15Z", + "mac": "ENC[AES256_GCM,data:Lm3vA7clmlFGVN+awwoEZQwjZ3PrV8gd7cQ9DArmOyuSA+AQtU4xm8U9rQLAt5YaL+ZB7SgU4ANT9tvRuPpge5nJkCB8bKEN1n6wtAmaxrLP2hfOynqwt/xqBOSG6YUuzRan900z0NXYUyCd164BwEQVxVBxbqpfG4oWEbM+3l4=,iv:iyZht8s7C94ZvFniNSEbqeNg6wt770URZkAuz2j3aeU=,tag:NEIgDz0WQiKf1u0J/YO29g==,type:str]", + "unencrypted_suffix": "_unencrypted", + "version": "3.9.4" + } +} diff --git a/modules/vic/secrets/vix b/modules/vic/secrets/vix new file mode 100644 index 00000000..831fe0d7 --- /dev/null +++ b/modules/vic/secrets/vix @@ -0,0 +1,15 @@ +{ + "data": "ENC[AES256_GCM,data:hyPnWSFKZ4sbBeGkFxm5iygScyIW/ZiQYV9maM/zzkyK6pMwj3VTicEAACBIbjxs+G4GhdmlRq24E6SzhlD6YOAlUtUwUxVir383+6LwtVKIugKQVhSNz7hjrktvZREleXaeOThOKUL/inwhTqmpkSDy15qh2C2l4KrtcTlzasGVWoLocyBEfMylslb8EsWqKBQAWxLtBCvgHCytTMEENIxFot9+xC+5uNTUug5ApVUqu5ZGDlsN9Br+RWEuyGa/m8zZN5k/tnb99cqa2aHXfzS1bT9YxYkYuLNuden+ViIY+Jhg/gy2/mZK0TCWcBIzD75XYkiEqTVVk6vl4MRuTbYqbQIXoPxp2iN0h3y+3oo9+UqgvvFG79tLwHuV8Ip3dvfcncKZT8Lmk5sGAnaGPbr9Lk8CL+xj9bwy5AIWcvP+XitbP1i3+lm0izT/lDLsxRjEAx0BchcJwzkP5jSQNxJ/qWnBgutHtXxMlXcS1dOWY1SqaVAvnwDSnYDk60l7dnwL,iv:A4LRsPwPU5uIkLFNE/tyqsTBJZmUa8FN3r7D7kS6hig=,tag:Yqyv0Yhd5juZS1jr26UYzQ==,type:str]", + "sops": { + "age": [ + { + "recipient": "age1wmg6gkfar8nl9tr2y409vac6zqwnfjvjh6rxh2fl6x3tx4rzwdxqwj2r9e", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB1c0lQbFNRZGk3ajBVd1o5\nU2FqazNVQ3hkQTVERmhRcXdUaUVXQ25ydzBVCnROZ3BFaEVET05mYTZpVi9hdGNJ\ncGNsbDBMOU04Ny9XOUI5MDg2eUhvbU0KLS0tIGVQaFlMUVdxeFBnWnJFZENxclFj\nZmtHWXdzSHlWS1dZbXpjMEdSbnJuTDAKnVBRo8yFYQ+qXooIssxzT8xv6pEANPq+\n2QN2dfD/nzJwHD8q3MltAv4X6eJxg7f4P+AcsqfqHQVB3ZvL0Wfmlw==\n-----END AGE ENCRYPTED FILE-----\n" + } + ], + "lastmodified": "2025-05-07T14:39:15Z", + "mac": "ENC[AES256_GCM,data:Qdnfi52EcIlQVPFHDaEEcIaz5/oarJgn+eD3Bj3G308LFQfxz3Phojufw5VI17+4y4m/Yzk/Ud56BwUA4hxVKGPFWP5vFelh9UE8nQhlLRtO2kcZJtdc5/2lBW7xeEZRule3zrZ9wqAKEcdNUQiwS7v25ql8nq9cVb6MwS3hkS8=,iv:nBUoeEycbCmQYk+NNNEcegu1FsQfynYH8wJxta4iprM=,tag:cgFWeZDXz5XF7qhtZmW8VA==,type:str]", + "unencrypted_suffix": "_unencrypted", + "version": "3.10.1" + } +} diff --git a/modules/home/vic/sops.yaml b/modules/vic/sops.yaml similarity index 100% rename from modules/home/vic/sops.yaml rename to modules/vic/sops.yaml diff --git a/modules/vic/ssh.nix b/modules/vic/ssh.nix new file mode 100644 index 00000000..a450dc03 --- /dev/null +++ b/modules/vic/ssh.nix @@ -0,0 +1,60 @@ +{ + flake.modules.homeManager.vic = + { + lib, + config, + pkgs, + ... + }: + { + programs.ssh = { + enable = true; + addKeysToAgent = "yes"; + controlMaster = "auto"; + controlPath = "~/.ssh/%r@%h:%p"; + controlPersist = "10m"; + includes = [ "~/.config/sops-nix/secrets/ssh/sops_ssh_config" ]; + + matchBlocks = { + "github.com" = { + identityFile = "~/.ssh/id_ed25519"; + extraOptions.ControlPersist = "no"; + }; + + "uptermd.upterm.dev" = { + forwardAgent = true; + serverAliveInterval = 10; + serverAliveCountMax = 6; + extraOptions.ControlPath = "~/.ssh/upterm-%C"; + setEnv.TERM = "xterm-256color"; + localForwards = [ + { + bind.port = 8000; # http + host.address = "127.0.0.1"; + host.port = 8000; + } + { + bind.port = 5900; # vnc + host.address = "127.0.0.1"; + host.port = 5900; + } + ]; + remoteForwards = [ + { + bind.port = 5000; # sops + host.address = "127.0.0.1"; + host.port = 5000; + } + ]; + }; + + }; + }; + + services.ssh-agent.enable = pkgs.stdenv.isLinux; + + home.activation.link-ssh-id = lib.hm.dag.entryAfter [ "link-flake" "sops-nix" "reloadSystemd" ] '' + run ln -sf "${config.sops.secrets."ssh/id_ed25519".path}" $HOME/.ssh/id_ed25519 + ''; + }; +} diff --git a/modules/vic/unfree.nix b/modules/vic/unfree.nix new file mode 100644 index 00000000..96a73079 --- /dev/null +++ b/modules/vic/unfree.nix @@ -0,0 +1,15 @@ +{ inputs, ... }: +let + flake.modules.homeManager.vic.imports = [ + unfree + ]; + + unfree = inputs.self.lib.unfree-module [ + "cursor" + "vscode" + "anydesk" + ]; +in +{ + inherit flake; +} diff --git a/modules/vic/user.nix b/modules/vic/user.nix new file mode 100644 index 00000000..66b2b631 --- /dev/null +++ b/modules/vic/user.nix @@ -0,0 +1,57 @@ +{ inputs, ... }: +let + flake.modules.nixos.vic.imports = [ + user + linux + autologin + home + ]; + + flake.modules.darwin.vic.imports = [ + user + home + ]; + + home.home-manager.users.vic.imports = [ + inputs.self.homeModules.vic + ]; + + autologin = + { config, lib, ... }: + lib.mkIf config.services.displayManager.enable { + services.displayManager.autoLogin.enable = true; + services.displayManager.autoLogin.user = "vic"; + }; + + linux = { + users.users.vic = { + isNormalUser = true; + extraGroups = [ + "networkmanager" + "wheel" + ]; + }; + }; + + user = + { pkgs, ... }: + { + home-manager.backupFileExtension = "backup"; + + programs.fish.enable = true; + + fonts.packages = with pkgs.nerd-fonts; [ + victor-mono + jetbrains-mono + inconsolata + ]; + + users.users.vic = { + description = "vic"; + shell = pkgs.fish; + }; + }; +in +{ + inherit flake; +} diff --git a/packages/copilot-language-server.nix b/packages/copilot-language-server.nix deleted file mode 100644 index 2854d9fe..00000000 --- a/packages/copilot-language-server.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ pname, pkgs, ... }: -let - p = pkgs.${pname}.overrideAttrs ( - _final: prev: { - meta = prev.meta // { - license = prev.meta.license // { - free = true; # lies! - }; - }; - } - ); - - pkg = pkgs.buildFHSEnv { - name = pname; - targetPkgs = pkgs: [ pkgs.stdenv.cc.cc.lib ]; - runScript = pkgs.lib.getExe p; - meta.platforms = pkgs.lib.platforms.linux; - }; - -in -pkg diff --git a/packages/default.nix b/packages/default.nix deleted file mode 100644 index e058ab7f..00000000 --- a/packages/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ pkgs, inputs, ... }: -pkgs.writeShellApplication { - name = "os-rebuild"; - text = '' - ${inputs.self.devShells.${pkgs.system}.default}/entrypoint os-rebuild "''${@}" - ''; -} diff --git a/packages/devicon-lookup.nix b/packages/devicon-lookup.nix deleted file mode 100644 index 93e52c25..00000000 --- a/packages/devicon-lookup.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - pname, - pkgs, - inputs, -}: -pkgs.rustPlatform.buildRustPackage { - name = pname; - src = inputs.devicon-lookup; - useFetchCargoVendor = true; - cargoHash = "sha256-FYXInaJZhbDmE9NJKJijHfNqqaYOb5xeaZfKP4BOflE="; -} diff --git a/packages/lazyjj.nix b/packages/lazyjj.nix deleted file mode 100644 index 0b906331..00000000 --- a/packages/lazyjj.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - pname, - pkgs, - inputs, -}: -pkgs.rustPlatform.buildRustPackage { - name = pname; - src = inputs.lazyjj; - useFetchCargoVendor = true; - cargoHash = "sha256-1gaOUL+7PjleKMoEQ8ioVjT0thhX5Qe99QXYbOmXFiQ="; - doCheck = false; # rust tests are failing - meta.mainProgram = pname; -} diff --git a/packages/leader.nix b/packages/leader.nix deleted file mode 100644 index 21615b51..00000000 --- a/packages/leader.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - pname, - pkgs, - inputs, -}: -pkgs.buildGoModule rec { - inherit pname; - version = "0.3.2"; - src = inputs.cli-leader; - vendorHash = "sha256-boMBnBXOKLs7W267xjWe5AM5QInvRugz7oAUagSLrHc="; - postPatch = '' - cp ${./leader}/go.* . - ''; -} diff --git a/packages/leader/go.mod b/packages/leader/go.mod deleted file mode 100644 index e5a50fc2..00000000 --- a/packages/leader/go.mod +++ /dev/null @@ -1,19 +0,0 @@ -module github.com/dhamidi/leader - -go 1.20 - -require ( - github.com/Nerdmaster/terminal v0.12.1 - github.com/gobuffalo/packr v1.30.1 - github.com/stretchr/testify v1.3.0 -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/gobuffalo/envy v1.7.0 // indirect - github.com/gobuffalo/packd v0.3.0 // indirect - github.com/joho/godotenv v1.3.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.3.0 // indirect - golang.org/x/sys v0.30.0 // indirect -) diff --git a/packages/leader/go.sum b/packages/leader/go.sum deleted file mode 100644 index e1c1134b..00000000 --- a/packages/leader/go.sum +++ /dev/null @@ -1,73 +0,0 @@ -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Nerdmaster/terminal v0.12.1 h1:DGb3ya55nZdqdBMjWQHNF5mHYHS2eJgYLqmw3KnE1cQ= -github.com/Nerdmaster/terminal v0.12.1/go.mod h1:Dg6++m3aF+P/l8RdYb/2N6zK3CqvUfzhBreUNEWuQ8M= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gobuffalo/envy v1.7.0 h1:GlXgaiBkmrYMHco6t4j7SacKO4XUjvh5pwXh0f4uxXU= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= -github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4= -github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= -github.com/gobuffalo/packr v1.30.1 h1:hu1fuVR3fXEZR7rXNW3h8rqSML8EVAf6KNm0NKO/wKg= -github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= -github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/packages/os-rebuild.nix b/packages/os-rebuild.nix deleted file mode 100644 index 513abb4e..00000000 --- a/packages/os-rebuild.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ pkgs, inputs }: -let - - inherit (pkgs) lib; - - same-system-oses = - let - has-same-system = _n: o: o.config.nixpkgs.hostPlatform.system == pkgs.system; - all-oses = (inputs.self.nixosConfigurations or { }) // (inputs.self.darwinConfigurations or { }); - in - lib.filterAttrs has-same-system all-oses; - - os-builder = - name: os: - let - platform = os.config.nixpkgs.hostPlatform; - darwin-rebuild = lib.getExe inputs.nix-darwin.packages.${platform.system}.darwin-rebuild; - nixos-rebuild = lib.getExe pkgs.nixos-rebuild; - flake-param = ''--flake "path:${inputs.self}#${name}" ''; - in - pkgs.writeShellApplication { - name = "${name}-os-rebuild"; - text = '' - ${if platform.isDarwin then darwin-rebuild else nixos-rebuild} ${flake-param} "''${@}" - ''; - }; - - os-builders = lib.mapAttrs os-builder same-system-oses; - - os-rebuild = pkgs.writeShellApplication { - name = "os-rebuild"; - text = '' - export PATH="${ - pkgs.lib.makeBinPath ( - (lib.attrValues os-builders) - ++ [ - pkgs.coreutils - ] - ++ (lib.optionals pkgs.stdenv.isLinux [ pkgs.systemd ]) - - ) - }" - - if [ "-h" = "''${1:-}" ] || [ "--help" = "''${1:-}" ]; then - echo Usage: "$0" [HOSTNAME] [${ - if pkgs.stdenv.isDarwin then "DARWIN" else "NIXOS" - }-REBUILD OPTIONS ...] - echo - echo Default hostname: "$(uname -n)" - echo Default ${if pkgs.stdenv.isDarwin then "darwin" else "nixos"}-rebuild options: switch - echo - echo Known hostnames on ${pkgs.system}: - echo "${lib.concatStringsSep "\n" (lib.attrNames same-system-oses)}" - exit 0 - fi - - if test "file" = "$(type -t "''${1:-_}-os-rebuild")"; then - hostname="$1" - shift - else - hostname="$(uname -n)" - fi - - if test "file" = "$(type -t "$hostname-os-rebuild")"; then - "$hostname-os-rebuild" "''${@:-switch}" - else - echo "No configuration found for host: $hostname" - exit 1 - fi - ''; - }; - -in -os-rebuild diff --git a/packages/shell.nix b/packages/shell.nix deleted file mode 100644 index cb10896c..00000000 --- a/packages/shell.nix +++ /dev/null @@ -1 +0,0 @@ -{ pkgs, inputs, ... }: inputs.self.devShells.${pkgs.system}.default diff --git a/packages/vic-sops-get.nix b/packages/vic-sops-get.nix deleted file mode 100644 index 20364fe6..00000000 --- a/packages/vic-sops-get.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ pname, pkgs, ... }: -pkgs.writeShellApplication { - name = pname; - text = '' - export PATH="${ - pkgs.lib.makeBinPath [ - pkgs.sops - pkgs.ssh-to-age - ] - }:$PATH" - declare -a args more - - file="" - dry="" - extract="" - server="" - setup="" - - while test -n "''${1:-}"; do - first="$1" - shift - case "$first" in - "--setup") - setup="$1" - shift - ;; - "--dry-run") - dry="true" - ;; - "-f" | "--file") - file="${./..}/modules/home/vic/secrets/$1" - shift - ;; - "-a" | "--attr") - file="${./..}/modules/home/vic/secrets.yaml" - extract="[\"$1\"]" - shift - ;; - "-s" | "--keyservice") - server="$1" - shift - ;; - *) - more+=("$first") - ;; - esac - done - - if test -n "$extract"; then - args+=("--extract" "$extract") - fi - - if test -n "$server"; then - args+=("--enable-local-service=false" "--keyservice" "$server") - fi - - args+=("''${more[@]}") - - if test -n "$file"; then - args+=("$file") - fi - - function perform_setup() { - echo -n "Password: " >&2 - local pass - read -r -s pass - sops decrypt "''${args[@]}" | SSH_TO_AGE_PASSPHRASE="$pass" ssh-to-age -private-key -o "$setup" 2>/dev/null - } - - if test -n "$dry"; then - echo "sops decrypt" "''${args[@]}" - exit 0 - elif test -n "$setup"; then - perform_setup - else - exec sops decrypt "''${args[@]}" - fi - ''; -}