diff --git a/.editorconfig b/.editorconfig index c305c0d..d73acff 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,8 +2,11 @@ root = true [*] charset = utf-8 +end_of_line = lf indent_size = 2 indent_style = space -end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true + +[justfile] +indent_size = 4 diff --git a/.envrc b/.envrc index 3550a30..a458238 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,4 @@ -use flake +# shellcheck shell=bash +if has nix_direnv_version; then + use flake +fi diff --git a/.github/FUNDING.yaml b/.github/FUNDING.yaml new file mode 100644 index 0000000..1515b22 --- /dev/null +++ b/.github/FUNDING.yaml @@ -0,0 +1,2 @@ +--- +github: HeitorAugustoLN diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..fa3112a --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,13 @@ +--- +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + labels: + - dependencies + - github-actions + commit-message: + prefix: ci + include: scope diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..cec238a --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,41 @@ +--- +name: Flake check +run-name: Flake check for ${{ github.ref_name }} by ${{ github.actor }} +"on": + pull_request: + push: + branches: + - main + workflow_dispatch: +jobs: + check: + timeout-minutes: 15 + name: Check flake on ${{ matrix.system }} + runs-on: ${{ matrix.runner }} + permissions: + contents: read + strategy: + matrix: + include: + - system: aarch64-linux + runner: ubuntu-24.04-arm + - system: x86_64-linux + runner: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 + with: + persist-credentials: false + - name: Check flake inputs + uses: DeterminateSystems/flake-checker-action@3164002371bc90729c68af0e24d5aacf20d7c9f6 # v12 + with: + fail-mode: true + - name: Set up Nix + uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31 + - name: Set up Cachix + uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16 + with: + name: heitor + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - name: Run flake check + run: nix flake check --accept-flake-config diff --git a/.github/workflows/dependabot-auto-merge.yaml b/.github/workflows/dependabot-auto-merge.yaml new file mode 100644 index 0000000..9f0f6c1 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yaml @@ -0,0 +1,23 @@ +--- +name: Dependabot auto-merge +run-name: Dependabot auto-merge for ${{ github.event.pull_request.title }} +"on": pull_request +permissions: + contents: write + pull-requests: write +jobs: + dependabot: + timeout-minutes: 11 + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'dependabot[bot]' + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --squash --delete-branch "$PR_URL" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/flake-check.yaml b/.github/workflows/flake-check.yaml deleted file mode 100644 index b041b01..0000000 --- a/.github/workflows/flake-check.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Run flake checks - -on: - push: - branches: - - main - pull_request: - branches: - - main - workflow_dispatch: - -jobs: - check: - name: Run `nix flake check` - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v16 - with: - extra-conf: | - extra-experimental-features = pipe-operators - - name: Check flake - run: nix flake check diff --git a/.github/workflows/update-flake.yaml b/.github/workflows/update-flake.yaml new file mode 100644 index 0000000..9d0d549 --- /dev/null +++ b/.github/workflows/update-flake.yaml @@ -0,0 +1,67 @@ +--- +name: Update flake inputs +run-name: Update flake inputs by ${{ github.actor }} +"on": + schedule: + - cron: "0 0 */3 * *" # Every 3 days at midnight UTC + workflow_dispatch: +jobs: + update-flake: + timeout-minutes: 11 + name: Update flake inputs + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout repository + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 + with: + persist-credentials: false + - name: Set up Nix + uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31 + - name: Generate app token + id: app-token + uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2 + with: + app-id: ${{ vars.BOT_APP_ID }} + private-key: ${{ secrets.BOT_PRIVATE_KEY }} + - name: Configure Git + run: | + git config user.name "heitor-bot[bot]" + git config user.email "246902415+heitor-bot[bot]@users.noreply.github.com" + - name: Update flake.lock + run: | + nix flake update --accept-flake-config --commit-lock-file --option commit-lockfile-summary "chore(deps): update flake" + - name: Get commit message for PR body + id: pr-body + run: | + COMMIT_BODY=$(git log -1 --pretty=%b) + { + echo "pr-body<> "$GITHUB_OUTPUT" + - name: Create Pull Request + id: pull-request + uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7 + with: + body: ${{ steps.pr-body.outputs.pr-body }} + branch: update-flake-lock + delete-branch: true + labels: | + dependencies + nix + sign-commits: true + title: "chore(deps): update flake" + token: ${{ steps.app-token.outputs.token }} + - name: Enable auto-merge + if: steps.pull-request.outputs.pull-request-number + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + PR_URL: ${{ steps.pull-request.outputs.pull-request-url }} + run: gh pr merge --auto --squash --delete-branch "$PR_URL" diff --git a/.gitignore b/.gitignore index 1e92638..1e6d35f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -.direnv +.direnv/ result* -/.pre-commit-config.yaml +.pre-commit-config.yaml diff --git a/.sops.yaml b/.sops.yaml deleted file mode 100644 index ae61358..0000000 --- a/.sops.yaml +++ /dev/null @@ -1,17 +0,0 @@ -keys: - - &axolotl age1k0qg6ah5cs36l2n5vaxymymxws8e4n4c0gv3wqgwkfq95h3vd9ysl33mee - - &heitor_at_axolotl age1md83kpt80rp0p03fvcutelmvjgavaefjlcq5nn6kjg5zjgp94ydsks4tn8 - -creation_rules: - - path_regex: ^secrets/users/heitor/[^/]+\.ya?ml$ - key_groups: - - age: - - *heitor_at_axolotl - - path_regex: ^secrets/hosts/common/[^/]+\.ya?ml$ - key_groups: - - age: - - *axolotl - - path_regex: ^secrets/hosts/axolotl/[^/]+\.ya?ml$ - key_groups: - - age: - - *axolotl diff --git a/.yamlfmt.yaml b/.yamlfmt.yaml new file mode 100644 index 0000000..710853a --- /dev/null +++ b/.yamlfmt.yaml @@ -0,0 +1,6 @@ +--- +formatter: + type: basic + include_document_start: true + max_line_length: 80 + pad_line_comments: 2 diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..5183a88 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,5 @@ +--- +rules: + line-length: + max: 80 + level: warning diff --git a/README.md b/README.md deleted file mode 100644 index 3d36504..0000000 --- a/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# HeitorAugustoLN's NixOS Configurations - -This repository contains my personal NixOS configurations, including system and -home environment setups. It leverages Nix flakes for reproducibility and ease of -management. - -**Highlights**: - -- Extensively configured and fully declarative **KDE Plasma 6** environment -- Declarative **encrypted BTRFS** partitions using - [disko](https://github.com/nix-community/disko) -- Deployment **secrets** using **sops-nix** - -## Structure - -My configuration structure is based on -[misterio77's nix config](https://github.com/Misterio77/nix-config), with some -adjustments for my use. - -- `.sops.yaml`: Configuration for `sops` and `sops-nix`. -- `shell.nix`: devShell configuration. -- `flake.nix`: Entrypoint for hosts and home configurations. Also exposes a - devShell for bootstrapping (`nix develop` or `nix-shell`). -- `home/`: Home environment configurations. -- `hosts/`: Host-specific configurations. -- `modules/`: NixOS and home-manager modules, that I haven't upstreamed yet. -- `overlays/`: Patches and version overrides for some packages. Accessible via - `nix build`. -- `pkgs/`: My custom packages. Also accessible via `nix build`. - -## How to bootstrap - -All you need is nix (any version). Run: - -``` -nix-shell -``` - -If you already have nix 2.4+, git, and have already enabled `flakes` and -`nix-command`, you can also use the non-legacy command: - -``` -nix develop -``` - -`nixos-rebuild --flake .` To build system and user configurations - -`nix build` (or shell or run) To build and use packages - -`sops` To manage secrets - -## Secrets - -For deployment secrets (such as user passwords and server service secrets), I'm -using the awesome [`sops-nix`](https://github.com/Mic92/sops-nix). All secrets -are encrypted with relevant systems's SSH host keys. - -## Tooling and applications I use - -Most relevant user apps daily drivers: - -- KDE Plasma 6 + - [plasma-manager](https://github.com/nix-community/plasma-manager) -- Neovim -- Konsole -- Firefox + - [betterfox user.js](https://github.com/HeitorAugustoLN/betterfox-nix) -- Fish -- KDE Connect - -## License - -This repository is licensed under the MIT License. See the [LICENSE](./LICENSE) -file for details. diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..c03ddc4 --- /dev/null +++ b/default.nix @@ -0,0 +1,12 @@ +(import ( + let + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + nodeName = lock.nodes.root.inputs.flake-compat; + in + fetchTarball { + url = + lock.nodes.${nodeName}.locked.url + or "https://github.com/NixOS/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz"; + sha256 = lock.nodes.${nodeName}.locked.narHash; + } +) { src = ./.; }).defaultNix diff --git a/flake.lock b/flake.lock index 526e902..746c287 100644 --- a/flake.lock +++ b/flake.lock @@ -1,49 +1,18 @@ { "nodes": { - "catppuccin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, + "den": { "locked": { - "lastModified": 1764250936, - "narHash": "sha256-fwwd6/j9QsL++TiNHZy2258NDkJiTi9B5cUyOntlR2g=", - "owner": "catppuccin", - "repo": "nix", - "rev": "c11bfcf5671358a12fa2d906e7c859d0644d9b2d", - "type": "github" + "lastModified": 1764187768, + "narHash": "sha256-YjRXIG6K7iYbgWRG4/tqJIXFEW/fX2Tck8RwF+NEHlc=", + "ref": "refs/heads/main", + "rev": "3ec43279b5afea898737238a75178079bf91d606", + "revCount": 164, + "type": "git", + "url": "https://tangled.org/oeiuwq.com/den" }, "original": { - "owner": "catppuccin", - "repo": "nix", - "type": "github" - } - }, - "cosmic-manager": { - "inputs": { - "flake-parts": [ - "flake-parts" - ], - "home-manager": [ - "home-manager" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1762776565, - "narHash": "sha256-Trd4uVhg9OggkxBMn3qUv74z9rNZE/s7iT7llTYQ0ZU=", - "owner": "HeitorAugustoLN", - "repo": "cosmic-manager", - "rev": "f26cdfef90b8db37db913f7c72a609c997700e59", - "type": "github" - }, - "original": { - "owner": "HeitorAugustoLN", - "repo": "cosmic-manager", - "type": "github" + "type": "git", + "url": "https://tangled.org/oeiuwq.com/den" } }, "disko": { @@ -53,11 +22,11 @@ ] }, "locked": { - "lastModified": 1764110879, - "narHash": "sha256-xanUzIb0tf3kJ+PoOFmXEXV1jM3PjkDT/TQ5DYeNYRc=", + "lastModified": 1764350888, + "narHash": "sha256-6Rp18zavTlnlZzcoLoBTJMBahL2FycVkw2rAEs3cQvo=", "owner": "nix-community", "repo": "disko", - "rev": "aecba248f9a7d68c5d1ed15de2d1c8a4c994a3c5", + "rev": "2055a08fd0e2fd41318279a5355eb8a161accf26", "type": "github" }, "original": { @@ -67,21 +36,6 @@ } }, "flake-compat": { - "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { "locked": { "lastModified": 1761588595, "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", @@ -116,78 +70,43 @@ "type": "github" } }, - "flake-parts_2": { + "gen-luarc": { "inputs": { - "nixpkgs-lib": [ + "flake-parts": [ "neovim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1763759067, - "narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "flake-compat" + "flake-parts" ], - "gitignore": "gitignore", + "git-hooks": [ + "neovim", + "git-hooks" + ], + "luvit-meta": "luvit-meta", "nixpkgs": [ + "neovim", "nixpkgs" ] }, "locked": { - "lastModified": 1763988335, - "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", + "lastModified": 1755304025, + "narHash": "sha256-xVKfjFwc0zMbLMjLTiHz+0llggkjs93SmHkhaa9S3M4=", + "owner": "mrcjkb", + "repo": "nix-gen-luarc-json", + "rev": "1865b0ebb753ae5324d7381b1fa8c98c04ec7509", "type": "github" }, "original": { - "owner": "cachix", - "repo": "git-hooks.nix", + "owner": "mrcjkb", + "repo": "nix-gen-luarc-json", "type": "github" } }, - "git-hooks_2": { + "git-hooks": { "inputs": { "flake-compat": [ - "neovim", "flake-compat" ], - "gitignore": "gitignore_2", + "gitignore": "gitignore", "nixpkgs": [ - "neovim", "nixpkgs" ] }, @@ -226,45 +145,47 @@ "type": "github" } }, - "gitignore_2": { + "home-manager": { "inputs": { "nixpkgs": [ - "neovim", - "git-hooks", "nixpkgs" ] }, "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "lastModified": 1764544324, + "narHash": "sha256-GVBGjO7UsmzLrlOJV8NlKSxukHaHencrJqWkCA6FkqI=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "e4e25a8c310fa45f2a8339c7972dc43d2845a612", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", + "owner": "nix-community", + "repo": "home-manager", "type": "github" } }, - "home-manager": { + "impermanence": { "inputs": { + "home-manager": [ + "home-manager" + ], "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1764194569, - "narHash": "sha256-iUM9ktarEzThkayyZrzQ7oycPshAY2XRQqVKz0xX/L0=", + "lastModified": 1758373069, + "narHash": "sha256-Xs31egErULAbSYdAPdoj/YCNH4+3B9l7D/V4ApewEw8=", "owner": "nix-community", - "repo": "home-manager", - "rev": "9651819d75f6c7ffaf8a9227490ac704f29659f0", + "repo": "impermanence", + "rev": "5274a00212a0437f9f1c1375d4437fc25aa57280", "type": "github" }, "original": { "owner": "nix-community", - "repo": "home-manager", + "ref": "home-manager-v2", + "repo": "impermanence", "type": "github" } }, @@ -272,65 +193,66 @@ "locked": { "lastModified": 1763762820, "narHash": "sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0=", - "owner": "vic", - "repo": "import-tree", + "ref": "refs/heads/main", "rev": "3c23749d8013ec6daa1d7255057590e9ca726646", - "type": "github" + "revCount": 87, + "type": "git", + "url": "https://tangled.org/oeiuwq.com/import-tree" }, "original": { - "owner": "vic", - "repo": "import-tree", - "type": "github" + "type": "git", + "url": "https://tangled.org/oeiuwq.com/import-tree" } }, - "ixx": { - "inputs": { - "flake-utils": [ - "neovim", - "nixvim", - "nuschtosSearch", - "flake-utils" - ], - "nixpkgs": [ - "neovim", - "nixvim", - "nuschtosSearch", - "nixpkgs" - ] - }, + "luvit-meta": { + "flake": false, "locked": { - "lastModified": 1754860581, - "narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=", - "owner": "NuschtOS", - "repo": "ixx", - "rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281", + "lastModified": 1705776742, + "narHash": "sha256-zAAptV/oLuLAAsa2zSB/6fxlElk4+jNZd/cPr9oxFig=", + "owner": "Bilal2453", + "repo": "luvit-meta", + "rev": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60", "type": "github" }, "original": { - "owner": "NuschtOS", - "ref": "v0.1.1", - "repo": "ixx", + "owner": "Bilal2453", + "repo": "luvit-meta", "type": "github" } }, "neovim": { "inputs": { - "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks_2", - "import-tree": "import-tree", + "flake-compat": [ + "flake-compat" + ], + "flake-parts": [ + "flake-parts" + ], + "gen-luarc": "gen-luarc", + "git-hooks": [ + "git-hooks" + ], + "import-tree": [ + "import-tree" + ], "neovim-nightly-overlay": "neovim-nightly-overlay", - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "nixpkgs" + ], "nixvim": "nixvim", - "systems": "systems_2", - "treefmt-nix": "treefmt-nix" + "systems": [ + "systems" + ], + "treefmt-nix": [ + "treefmt-nix" + ] }, "locked": { - "lastModified": 1764236548, - "narHash": "sha256-nMW61JvP1IPb9Un871uoW5oZYNc3x5qp+wldA+Iogqg=", + "lastModified": 1764595910, + "narHash": "sha256-LM4vsjb0V/4ye5xLad86FZg7yiYJSCZE7Zkj2FDikwk=", "owner": "HeitorAugustoLN", "repo": "nvim-config", - "rev": "48cacfa7ecf646b6b06d53e8bb6d3e76b681f75a", + "rev": "fe246fa67a9ccb94331bddab00c7866b20876d99", "type": "github" }, "original": { @@ -352,11 +274,11 @@ ] }, "locked": { - "lastModified": 1764115497, - "narHash": "sha256-O76AgT1qySSmdLU+20p0L6L4CLl+L/BFn6Hn+v3lZb0=", + "lastModified": 1764547590, + "narHash": "sha256-PDVKI5QCPfzVCPY/ZYAQTHGwC9ksT8ISNVaVZDVzb54=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "531a6afb65033ff28663e83efcb5d8b94c339aeb", + "rev": "71ba04d8a26327031fd58284af4a4891d7b3c842", "type": "github" }, "original": { @@ -368,11 +290,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1764103112, - "narHash": "sha256-tnxXyr4eqFft9gm8elxB91maZ8FkvKrI14duvNJW6aw=", + "lastModified": 1764519732, + "narHash": "sha256-R0UspjBwPi5St0Dxq9Ej9ejJ34K8ivF5WeCS9dMvvVQ=", "owner": "neovim", "repo": "neovim", - "rev": "87bd16e470b2d7a45f38c7402037ad1bcf91ded9", + "rev": "d62bbe24cbe5311ce595d73a0c40dc87af989666", "type": "github" }, "original": { @@ -403,11 +325,11 @@ ] }, "locked": { - "lastModified": 1763870992, - "narHash": "sha256-NPyc76Wxmv/vAsXJ8F+/8fXECHYcv2YGSqdiSHp/F/A=", + "lastModified": 1764475780, + "narHash": "sha256-77jL5H5x51ksLiOUDjY0ZK8e2T4ZXLhj3ap8ETvknWI=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "d7423982c7a26586aa237d130b14c8b302c7a367", + "rev": "5a3ff8c1a09003f399f43d5742d893c0b1ab8af0", "type": "github" }, "original": { @@ -416,44 +338,28 @@ "type": "github" } }, - "nixos-hardware": { + "nixos-facter-modules": { "locked": { - "lastModified": 1764269296, - "narHash": "sha256-lXAKymcMNIvuw3WLHBhdNWUs1bXl/BYWBtYNhhK+D1s=", - "owner": "NixOS", - "repo": "nixos-hardware", - "rev": "00e9525fb65da500852aae7bef666071eedf1b3e", + "lastModified": 1764252389, + "narHash": "sha256-3bbuneTKZBkYXlm0bE36kUjiDsasoIC1GWBw/UEJ9T4=", + "owner": "nix-community", + "repo": "nixos-facter-modules", + "rev": "5ea68886d95218646d11d3551a476d458df00778", "type": "github" }, "original": { - "owner": "NixOS", - "repo": "nixos-hardware", + "owner": "nix-community", + "repo": "nixos-facter-modules", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1764138170, - "narHash": "sha256-2bCmfCUZyi2yj9FFXYKwsDiaZmizN75cLhI/eWmf3tk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "bb813de6d2241bcb1b5af2d3059f560c66329967", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1763966396, - "narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=", + "lastModified": 1764517877, + "narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", + "rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c", "type": "github" }, "original": { @@ -473,18 +379,20 @@ "neovim", "nixpkgs" ], - "nuschtosSearch": "nuschtosSearch", + "nuschtosSearch": [ + "neovim" + ], "systems": [ "neovim", "systems" ] }, "locked": { - "lastModified": 1764148348, - "narHash": "sha256-C9UobzCvMaLwNtRaFrt26TA/SkQtcDhJFmlVQ6DPHyA=", + "lastModified": 1764581424, + "narHash": "sha256-ij6QCIm8EeXGG1F2Aj/mTwVF4U80MtxsJ4krW0I0U2E=", "owner": "nix-community", "repo": "nixvim", - "rev": "7fe6951bf8c2719f437f74224adf3a2e875d6781", + "rev": "027c96a16116588dd28728b757a24e2d43d19187", "type": "github" }, "original": { @@ -493,71 +401,24 @@ "type": "github" } }, - "nur": { - "inputs": { - "flake-parts": [ - "flake-parts" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1764272538, - "narHash": "sha256-dGWf/sa4u53X7XAZ2Wv9RvKnArox6e7EH/vR5TLdM3c=", - "owner": "nix-community", - "repo": "NUR", - "rev": "89d07c667ef365a37fdb5d93cffe077a9d27c556", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, - "nuschtosSearch": { - "inputs": { - "flake-utils": "flake-utils", - "ixx": "ixx", - "nixpkgs": [ - "neovim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1761730856, - "narHash": "sha256-t1i5p/vSWwueZSC0Z2BImxx3BjoUDNKyC2mk24krcMY=", - "owner": "NuschtOS", - "repo": "search", - "rev": "e29de6db0cb3182e9aee75a3b1fd1919d995d85b", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "repo": "search", - "type": "github" - } - }, "root": { "inputs": { - "catppuccin": "catppuccin", - "cosmic-manager": "cosmic-manager", + "den": "den", "disko": "disko", "flake-compat": "flake-compat", "flake-parts": "flake-parts", "git-hooks": "git-hooks", "home-manager": "home-manager", + "impermanence": "impermanence", + "import-tree": "import-tree", "neovim": "neovim", "nix-flatpak": "nix-flatpak", "nix-index-database": "nix-index-database", - "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", - "nur": "nur", + "nixos-facter-modules": "nixos-facter-modules", + "nixpkgs": "nixpkgs", "sops-nix": "sops-nix", - "treefmt-nix": "treefmt-nix_2", - "wallpapers": "wallpapers" + "systems": "systems", + "treefmt-nix": "treefmt-nix" } }, "sops-nix": { @@ -567,11 +428,11 @@ ] }, "locked": { - "lastModified": 1764021963, - "narHash": "sha256-1m84V2ROwNEbqeS9t37/mkry23GBhfMt8qb6aHHmjuc=", + "lastModified": 1764483358, + "narHash": "sha256-EyyvCzXoHrbL467YSsQBTWWg4sR96MH1sPpKoSOelB4=", "owner": "Mic92", "repo": "sops-nix", - "rev": "c482a1c1bbe030be6688ed7dc84f7213f304f1ec", + "rev": "5aca6ff67264321d47856a2ed183729271107c9c", "type": "github" }, "original": { @@ -582,38 +443,22 @@ }, "systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, "treefmt-nix": { "inputs": { "nixpkgs": [ - "neovim", "nixpkgs" ] }, @@ -630,46 +475,6 @@ "repo": "treefmt-nix", "type": "github" } - }, - "treefmt-nix_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1762938485, - "narHash": "sha256-AlEObg0syDl+Spi4LsZIBrjw+snSVU4T8MOeuZJUJjM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "wallpapers": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1728832775, - "narHash": "sha256-UezjLvBYkl1xsqrMv+ILTGXf8i17ASbuNiT2eZX3Q+g=", - "owner": "HeitorAugustoLN", - "repo": "wallpapers", - "rev": "95b35117ad823f2e64eeda02c0f907e88dee6afe", - "type": "github" - }, - "original": { - "owner": "HeitorAugustoLN", - "repo": "wallpapers", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index fa0dac6..faf67fb 100644 --- a/flake.nix +++ b/flake.nix @@ -1,36 +1,45 @@ { - description = "HeitorAugustoLN's personal Nix configuration flake"; + description = "HeitorAugustoLN's personal Nix configuration"; - inputs = { - catppuccin = { - url = "github:catppuccin/nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./flake); - cosmic-manager = { - url = "github:HeitorAugustoLN/cosmic-manager"; + nixConfig = { + extra-experimental-features = [ "pipe-operators" ]; + extra-substituters = [ "https://heitor.cachix.org" ]; + extra-trusted-public-keys = [ "heitor.cachix.org-1:IZ1ydLh73kFtdv+KfcsR4WGPkn+/I926nTGhk9O9AxI=" ]; + }; - inputs = { - flake-parts.follows = "flake-parts"; - home-manager.follows = "home-manager"; - nixpkgs.follows = "nixpkgs"; - }; + inputs = { + # keep-sorted start block=yes newline_separated=yes + den = { + type = "git"; + url = "https://tangled.org/oeiuwq.com/den"; }; disko = { - url = "github:nix-community/disko"; + type = "github"; + owner = "nix-community"; + repo = "disko"; inputs.nixpkgs.follows = "nixpkgs"; }; - flake-compat.url = "github:edolstra/flake-compat"; + flake-compat = { + type = "github"; + owner = "NixOS"; + repo = "flake-compat"; + }; flake-parts = { - url = "github:hercules-ci/flake-parts"; + type = "github"; + owner = "hercules-ci"; + repo = "flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; }; git-hooks = { - url = "github:cachix/git-hooks.nix"; + type = "github"; + owner = "cachix"; + repo = "git-hooks.nix"; inputs = { flake-compat.follows = "flake-compat"; @@ -39,53 +48,90 @@ }; home-manager = { - url = "github:nix-community/home-manager"; + type = "github"; + owner = "nix-community"; + repo = "home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - neovim = { - url = "github:HeitorAugustoLN/nvim-config"; - }; + impermanence = { + type = "github"; + owner = "nix-community"; + repo = "impermanence"; + ref = "home-manager-v2"; - nix-flatpak.url = "github:gmodena/nix-flatpak"; - - nix-index-database = { - url = "github:nix-community/nix-index-database"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs = { + home-manager.follows = "home-manager"; + nixpkgs.follows = "nixpkgs"; + }; }; - nixos-hardware.url = "github:NixOS/nixos-hardware"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + import-tree = { + type = "git"; + url = "https://tangled.org/oeiuwq.com/import-tree"; + }; - nur = { - url = "github:nix-community/NUR"; + neovim = { + type = "github"; + owner = "HeitorAugustoLN"; + repo = "nvim-config"; inputs = { + flake-compat.follows = "flake-compat"; flake-parts.follows = "flake-parts"; + git-hooks.follows = "git-hooks"; + import-tree.follows = "import-tree"; nixpkgs.follows = "nixpkgs"; + systems.follows = "systems"; + treefmt-nix.follows = "treefmt-nix"; }; }; - sops-nix = { - url = "github:Mic92/sops-nix"; - inputs.nixpkgs.follows = "nixpkgs"; + nix-flatpak = { + type = "github"; + owner = "gmodena"; + repo = "nix-flatpak"; }; - treefmt-nix = { - url = "github:numtide/treefmt-nix"; + nix-index-database = { + type = "github"; + owner = "nix-community"; + repo = "nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; - wallpapers = { - url = "github:HeitorAugustoLN/wallpapers"; + nixos-facter-modules = { + type = "github"; + owner = "nix-community"; + repo = "nixos-facter-modules"; + }; + + nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "nixos-unstable"; + }; + + sops-nix = { + type = "github"; + owner = "Mic92"; + repo = "sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - }; - outputs = - inputs: - inputs.flake-parts.lib.mkFlake { inherit inputs; } { - systems = [ "x86_64-linux" ]; - imports = [ ./flake ]; + systems = { + type = "github"; + owner = "nix-systems"; + repo = "default-linux"; }; + + treefmt-nix = { + type = "github"; + owner = "numtide"; + repo = "treefmt-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # keep-sorted end + }; } diff --git a/flake/configurations.nix b/flake/configurations.nix deleted file mode 100644 index 9a5b881..0000000 --- a/flake/configurations.nix +++ /dev/null @@ -1,170 +0,0 @@ -{ - config, - inputs, - lib, - self, - withSystem, - ... -}: -let - inherit (builtins) - attrValues - hashString - mapAttrs - removeAttrs - substring - ; - inherit (lib) - foldlAttrs - mkDefault - mkIf - mkMerge - mkOption - recursiveUpdate - types - ; -in -{ - options.nexus.configurations = - let - configurationSubmodule = types.submodule ( - { name, ... }: - { - options = { - modules = mkOption { - type = with types; listOf deferredModule; - example = [ - { - nix.gc.automatic = true; - system.stateVersion = "25.05"; - } - ]; - description = '' - List of modules for the configuration. - ''; - }; - - name = mkOption { - type = types.str; - default = name; - example = "my-configuration"; - description = '' - Name of the configuration. - ''; - }; - - system = mkOption { - type = types.enum lib.systems.flakeExposed; - example = "x86_64-linux"; - description = '' - System of the configuration. - ''; - }; - - type = mkOption { - type = types.enum [ - "home-manager" - "nixos" - ]; - example = "nixos"; - description = '' - Type of the configuration. - ''; - }; - }; - } - ); - in - mkOption { - type = types.attrsOf configurationSubmodule; - default = { }; - example.my-configuration = { - modules = [ - { - nix.gc.automatic = true; - system.stateVersion = "25.05"; - } - ]; - system = "x86_64-linux"; - type = "nixos"; - }; - description = '' - List of configurations. - ''; - apply = foldlAttrs ( - acc: _: value: - recursiveUpdate acc { - ${value.type}.${value.name} = removeAttrs value [ - "name" - "type" - ]; - } - ) { }; - }; - - config.flake = - let - cfg = config.nexus; - in - mkIf (cfg.configurations != { }) (mkMerge [ - (mkIf (cfg.configurations ? home-manager) { - homeConfigurations = mapAttrs ( - _: value: - withSystem value.system ( - { inputs', self', ... }: - inputs.home-manager.lib.homeManagerConfiguration { - extraSpecialArgs = { - inherit - inputs - inputs' - self - self' - ; - }; - - modules = attrValues self.homeManagerModules ++ value.modules; - - pkgs = import inputs.nixpkgs { - inherit (value) system; - config.allowUnfree = true; - }; - } - ) - ) cfg.configurations.home-manager; - }) - - (mkIf (cfg.configurations ? nixos) { - nixosConfigurations = mapAttrs ( - name: value: - withSystem value.system ( - { inputs', self', ... }: - inputs.nixpkgs.lib.nixosSystem { - modules = - [ - ../hosts/common/core - { - networking = { - hostName = mkDefault name; - hostId = mkDefault (substring 0 8 (hashString "md5" name)); - }; - - nixpkgs.hostPlatform = value.system; - } - ] - ++ attrValues self.nixosModules - ++ value.modules; - - specialArgs = { - inherit - inputs - inputs' - self - self' - ; - }; - } - ) - ) cfg.configurations.nixos; - }) - ]); -} diff --git a/flake/debug.nix b/flake/debug.nix new file mode 100644 index 0000000..bf38cee --- /dev/null +++ b/flake/debug.nix @@ -0,0 +1 @@ +{ debug = builtins.getEnv "NIX_DEBUG_REPL" == "1"; } diff --git a/flake/default.nix b/flake/default.nix deleted file mode 100644 index ba3f686..0000000 --- a/flake/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - imports = [ - ./configurations.nix - ./dev-shells.nix - ./formatters.nix - ./git-hooks.nix - ../hosts - ../modules - ]; -} diff --git a/flake/dev-shells.nix b/flake/dev-shells.nix deleted file mode 100644 index fe0ddc1..0000000 --- a/flake/dev-shells.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - perSystem = - { - config, - pkgs, - self', - ... - }: - { - devShells = { - default = self'.devShells.configure; - - configure = pkgs.mkShell { - packages = with pkgs; [ - git - sops - ssh-to-age - ]; - - shellHook = config.pre-commit.installationScript; - strictDeps = true; - }; - }; - }; -} diff --git a/flake/dev-shells/default.nix b/flake/dev-shells/default.nix new file mode 100644 index 0000000..266b13e --- /dev/null +++ b/flake/dev-shells/default.nix @@ -0,0 +1,15 @@ +{ + perSystem = + { config, pkgs, ... }: + { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + just + nixos-facter + sops + ]; + + shellHook = config.pre-commit.installationScript; + }; + }; +} diff --git a/flake/dev-shells/git-hooks.nix b/flake/dev-shells/git-hooks.nix new file mode 100644 index 0000000..73de591 --- /dev/null +++ b/flake/dev-shells/git-hooks.nix @@ -0,0 +1,19 @@ +{ inputs, ... }: +{ + imports = [ inputs.git-hooks.flakeModule ]; + + perSystem.pre-commit.settings.hooks = { + actionlint.enable = true; + editorconfig-checker.enable = true; + treefmt.enable = true; + + yamllint = { + enable = true; + + settings = { + configPath = "${../../.yamllint.yaml}"; + strict = false; + }; + }; + }; +} diff --git a/flake/formatter.nix b/flake/formatter.nix new file mode 100644 index 0000000..23dcb4a --- /dev/null +++ b/flake/formatter.nix @@ -0,0 +1,48 @@ +{ inputs, lib, ... }: +{ + imports = [ inputs.treefmt-nix.flakeModule ]; + + perSystem = + { pkgs, ... }: + { + treefmt = { + projectRootFile = "flake.nix"; + + programs = { + deadnix.enable = true; + just.enable = true; + keep-sorted.enable = true; + nixfmt.enable = true; + + prettier = { + enable = true; + includes = [ "*.md" ]; + }; + + shellcheck.enable = true; + shfmt.enable = true; + statix.enable = true; + + yamlfmt = + let + importYAML = + file: + let + json = pkgs.runCommand "converted.json" { nativeBuildInputs = [ pkgs.yj ]; } '' + # shellcheck disable=SC2154,SC2188 + set -e + yj < ${file} > "$out" + ''; + in + lib.importJSON json; + in + { + enable = true; + settings = importYAML ../.yamlfmt.yaml; + }; + }; + + settings.on-unmatched = "info"; + }; + }; +} diff --git a/flake/formatters.nix b/flake/formatters.nix deleted file mode 100644 index df8d2f0..0000000 --- a/flake/formatters.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ inputs, ... }: -{ - imports = [ inputs.treefmt-nix.flakeModule ]; - - perSystem.treefmt = { - flakeCheck = true; - - programs = { - deadnix.enable = true; - deno.enable = true; - nixfmt.enable = true; - statix.enable = true; - typos.enable = true; - }; - - projectRootFile = "flake.nix"; - }; -} diff --git a/flake/git-hooks.nix b/flake/git-hooks.nix deleted file mode 100644 index 929fd61..0000000 --- a/flake/git-hooks.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ inputs, ... }: -{ - imports = [ inputs.git-hooks.flakeModule ]; - - perSystem.pre-commit = { - check.enable = true; - settings.hooks.treefmt.enable = true; - }; -} diff --git a/flake/systems.nix b/flake/systems.nix new file mode 100644 index 0000000..aa9cd58 --- /dev/null +++ b/flake/systems.nix @@ -0,0 +1,4 @@ +{ inputs, ... }: +{ + systems = import inputs.systems; +} diff --git a/home/heitor/axolotl/default.nix b/home/heitor/axolotl/default.nix deleted file mode 100644 index a4f26e8..0000000 --- a/home/heitor/axolotl/default.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ - cosmicLib, - inputs, - pkgs, - ... -}: -let - inherit (cosmicLib.cosmic) mkRON; -in -{ - home = { - packages = with pkgs; [ - spotify - amberol - fractal - newsflash - dialect - mousai - eartag - eyedropper - fragments - # gaphor - gnome-podcasts - shortwave - wike - resources - gimp - godot-mono - libresprite - ]; - stateVersion = "25.11"; - }; - - programs.obs-studio.enable = true; - - # qt = { - # enable = true; - # platformTheme.name = "adwaita"; - # style.name = "adwaita-dark"; - # }; - - wayland.desktopManager.cosmic = { - # compositor.input_default = { - # scroll_config = mkRON "optional" { - # method = mkRON "optional" (mkRON "enum" "TwoFinger"); - # natural_scroll = mkRON "optional" true; - # scroll_button = mkRON "optional" null; - # scroll_factor = mkRON "optional" null; - # }; - # }; - - idle = { - screen_off_time = mkRON "optional" null; - suspend_on_ac_time = mkRON "optional" null; - suspend_on_battery_time = mkRON "optional" null; - }; - - wallpapers = [ - { - filter_by_theme = false; - filter_method = mkRON "enum" "Lanczos"; - output = "HDMI-A-1"; - rotation_frequency = 300; - sampling_method = mkRON "enum" "Alphanumeric"; - scaling_mode = mkRON "enum" "Zoom"; - - source = mkRON "enum" { - variant = "Path"; - value = [ inputs.wallpapers.desktop.by-theme.catppuccin.mocha.digital-art.eclipse ]; - }; - } - ]; - }; -} diff --git a/home/heitor/common/core/brave.nix b/home/heitor/common/core/brave.nix deleted file mode 100644 index 1cf8059..0000000 --- a/home/heitor/common/core/brave.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - catppuccin.brave.enable = true; - - programs.brave = { - enable = true; - - extensions = [ - # Bitwarden - { id = "nngceckbapebfimnlniiiahkandclblb"; } - # Catppuccin for GitHub File Explorer Icons - { id = "lnjaiaapbakfhlbjenjkhffcdpoompki"; } - # Dark Reader - { id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; } - # FrankerFaceZ - { id = "fadndhdgpmmaapbmfcknlfgcflmmmieb"; } - # LanguageTool - { id = "oldceeleldhonbafppcapldpdifcinji"; } - # Return YouTube dislike - { id = "gebbhagfogifgggkldgodflihgfeippi"; } - # Skip redirect - { id = "jaoafjdoijdconemdmodhbfpianehlon"; } - # Sponsorblock for YouTube - { id = "mnjggcdmjocbbbhaepdhchncahnbgone"; } - # Stylus - { id = "clngdbkpkpeebahjckkjfobafhncgmne"; } - # Violentmonkey - { id = "jinjaccalgkegednnccohejagnlnfdag"; } - ]; - }; -} diff --git a/home/heitor/common/core/catppuccin.nix b/home/heitor/common/core/catppuccin.nix deleted file mode 100644 index fd50e11..0000000 --- a/home/heitor/common/core/catppuccin.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ inputs, ... }: -{ - imports = [ inputs.catppuccin.homeModules.catppuccin ]; - - catppuccin = { - accent = "mauve"; - flavor = "mocha"; - }; -} diff --git a/home/heitor/common/core/cosmic/applets.nix b/home/heitor/common/core/cosmic/applets.nix deleted file mode 100644 index 46b435e..0000000 --- a/home/heitor/common/core/cosmic/applets.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ cosmicLib, ... }: -let - inherit (cosmicLib.cosmic) mkRON; -in -{ - wayland.desktopManager.cosmic.applets = { - app-list.settings = { - enable_drag_source = false; - - favorites = [ - "com.system76.CosmicFiles" - "com.mitchellh.ghostty" - "Brave-browser" - "spotify" - ]; - - filter_top_levels = mkRON "optional" null; - }; - - audio.settings.show_media_controls_in_top_panel = false; - - time.settings = { - first_day_of_week = 6; # Sunday - military_time = true; - show_date_in_top_panel = true; - show_seconds = false; - show_weekday = true; - }; - }; -} diff --git a/home/heitor/common/core/cosmic/apps/cosmic-edit.nix b/home/heitor/common/core/cosmic/apps/cosmic-edit.nix deleted file mode 100644 index 28c195b..0000000 --- a/home/heitor/common/core/cosmic/apps/cosmic-edit.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ cosmicLib, ... }: -let - inherit (cosmicLib.cosmic) mkRON; -in -{ - programs.cosmic-edit = { - enable = true; - - settings = { - app_theme = mkRON "enum" "System"; - auto_indent = true; - find_case_sensitive = false; - find_use_regex = false; - find_wrap_around = true; - font_name = "JetBrains Mono"; - font_size = 14; - highlight_current_line = true; - line_numbers = true; - tab_width = 2; - vim_bindings = true; - word_wrap = true; - }; - }; -} diff --git a/home/heitor/common/core/cosmic/apps/cosmic-files.nix b/home/heitor/common/core/cosmic/apps/cosmic-files.nix deleted file mode 100644 index 952793d..0000000 --- a/home/heitor/common/core/cosmic/apps/cosmic-files.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ config, cosmicLib, ... }: -let - inherit (cosmicLib.cosmic) mkRON; -in -{ - programs.cosmic-files = { - enable = true; - package = null; - - settings = { - app_theme = mkRON "enum" "System"; - - desktop = { - grid_spacing = 100; - icon_size = 100; - show_content = false; - show_mounted_drives = false; - show_trash = false; - }; - - favorites = [ - (mkRON "enum" "Home") - (mkRON "enum" "Documents") - (mkRON "enum" "Downloads") - (mkRON "enum" "Music") - (mkRON "enum" "Pictures") - (mkRON "enum" "Videos") - (mkRON "enum" { - variant = "Path"; - value = [ "${config.home.homeDirectory}/Projects" ]; - }) - ]; - - show_details = false; - - tab = { - folders_first = true; - - icon_sizes = { - grid = 100; - list = 100; - }; - - show_hidden = true; - view = mkRON "enum" "List"; - }; - }; - }; -} diff --git a/home/heitor/common/core/cosmic/compositor.nix b/home/heitor/common/core/cosmic/compositor.nix deleted file mode 100644 index 4e09049..0000000 --- a/home/heitor/common/core/cosmic/compositor.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ cosmicLib, ... }: -let - inherit (cosmicLib) mkDefault; - inherit (cosmicLib.cosmic) mkRON; -in -{ - wayland.desktopManager.cosmic.compositor = { - active_hint = true; - autotile = true; - autotile_behavior = mkRON "enum" "PerWorkspace"; - descale_xwayland = false; - focus_follows_cursor = false; - - input_default = { - acceleration = mkRON "optional" { - profile = mkRON "optional" (mkRON "enum" "Flat"); - speed = 0.0; - }; - - state = mkRON "enum" "Enabled"; - }; - - workspaces = { - workspace_layout = mkRON "enum" "Horizontal"; - workspace_mode = mkRON "enum" "OutputBound"; - }; - - xkb_config = { - layout = mkDefault "br"; - model = mkDefault "pc104"; - options = mkDefault (mkRON "optional" "terminate:ctrl_alt_bksp"); - repeat_delay = 600; - repeat_rate = 25; - rules = ""; - variant = mkDefault ""; - }; - }; -} diff --git a/home/heitor/common/core/cosmic/default.nix b/home/heitor/common/core/cosmic/default.nix deleted file mode 100644 index a4cea54..0000000 --- a/home/heitor/common/core/cosmic/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ inputs, ... }: -{ - imports = [ - inputs.cosmic-manager.homeManagerModules.cosmic-manager - - ./apps/cosmic-edit.nix - ./apps/cosmic-files.nix - ./applets.nix - ./compositor.nix - ./panels.nix - ./shortcuts.nix - ./theme - ]; - - wayland.desktopManager.cosmic = { - enable = true; - resetFiles = false; - }; -} diff --git a/home/heitor/common/core/cosmic/panels.nix b/home/heitor/common/core/cosmic/panels.nix deleted file mode 100644 index d667090..0000000 --- a/home/heitor/common/core/cosmic/panels.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ cosmicLib, ... }: -let - inherit (cosmicLib.cosmic) mkRON; -in -{ - wayland.desktopManager.cosmic.panels = [ - { - anchor = mkRON "enum" "Top"; - anchor_gap = true; - autohide = mkRON "optional" null; - background = mkRON "enum" "ThemeDefault"; - expand_to_edges = true; - name = "Panel"; - opacity = 1.0; - output = mkRON "enum" "All"; - margin = 4; - plugins_center = mkRON "optional" [ "com.system76.CosmicAppletTime" ]; - - plugins_wings = mkRON "optional" ( - mkRON "tuple" [ - [ "com.system76.CosmicAppletWorkspaces" ] - [ - "com.system76.CosmicAppletInputSources" - "com.system76.CosmicAppletStatusArea" - "com.system76.CosmicAppletTiling" - "com.system76.CosmicAppletAudio" - "com.system76.CosmicAppletNetwork" - "com.system76.CosmicAppletNotifications" - "com.system76.CosmicAppletPower" - ] - ] - ); - - size = mkRON "enum" "XS"; - } - { - anchor = mkRON "enum" "Bottom"; - anchor_gap = true; - autohide = mkRON "optional" null; - background = mkRON "enum" "ThemeDefault"; - expand_to_edges = false; - margin = 4; - name = "Dock"; - opacity = 1.0; - output = mkRON "enum" "All"; - - plugins_center = mkRON "optional" [ - "com.system76.CosmicPanelLauncherButton" - "com.system76.CosmicPanelWorkspacesButton" - "com.system76.CosmicPanelAppButton" - "com.system76.CosmicAppList" - "com.system76.CosmicAppletMinimize" - ]; - - plugins_wings = mkRON "optional" null; - size = mkRON "enum" "L"; - } - ]; -} diff --git a/home/heitor/common/core/cosmic/shortcuts.nix b/home/heitor/common/core/cosmic/shortcuts.nix deleted file mode 100644 index f5987c8..0000000 --- a/home/heitor/common/core/cosmic/shortcuts.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, cosmicLib, ... }: -let - inherit (cosmicLib) getExe optionals; - inherit (cosmicLib.cosmic) mkRON; -in -{ - wayland.desktopManager.cosmic.systemActions = mkRON "map" ( - optionals config.programs.ghostty.enable [ - { - key = mkRON "enum" "Terminal"; - value = getExe config.programs.ghostty.package; - } - ] - ); -} diff --git a/home/heitor/common/core/cosmic/theme/catppuccin-mocha-mauve-round.ron b/home/heitor/common/core/cosmic/theme/catppuccin-mocha-mauve-round.ron deleted file mode 100644 index 0d412c1..0000000 --- a/home/heitor/common/core/cosmic/theme/catppuccin-mocha-mauve-round.ron +++ /dev/null @@ -1,303 +0,0 @@ -( - palette: Dark(( - name: "Catppuccin-Mocha-Mauve", - blue: ( - red: 0.53725490, - green: 0.70588235, - blue: 0.98039216, - alpha: 1.0, - ), - red: ( - red: 0.95294118, - green: 0.54509804, - blue: 0.65882353, - alpha: 1.0, - ), - green: ( - red: 0.65098039, - green: 0.89019608, - blue: 0.63137255, - alpha: 1.0, - ), - yellow: ( - red: 0.97647059, - green: 0.88627451, - blue: 0.68627451, - alpha: 1.0, - ), - gray_1: ( - red: 0.09411765, - green: 0.09411765, - blue: 0.14509804, - alpha: 1.0, - ), - gray_2: ( - red: 0.11764706, - green: 0.11764706, - blue: 0.18039216, - alpha: 1.0, - ), - gray_3: ( - red: 0.19215686, - green: 0.19607843, - blue: 0.26666667, - alpha: 1.0, - ), - neutral_0: ( - red: 0.06666667, - green: 0.06666667, - blue: 0.10588235, - alpha: 1.0, - ), - neutral_1: ( - red: 0.09411765, - green: 0.09411765, - blue: 0.14509804, - alpha: 1.0, - ), - neutral_2: ( - red: 0.11764706, - green: 0.11764706, - blue: 0.18039216, - alpha: 1.0, - ), - neutral_3: ( - red: 0.19215686, - green: 0.19607843, - blue: 0.26666667, - alpha: 1.0, - ), - neutral_4: ( - red: 0.27058824, - green: 0.27843137, - blue: 0.35294118, - alpha: 1.0, - ), - neutral_5: ( - red: 0.34509804, - green: 0.35686275, - blue: 0.43921569, - alpha: 1.0, - ), - neutral_6: ( - red: 0.42352941, - green: 0.43921569, - blue: 0.52549020, - alpha: 1.0, - ), - neutral_7: ( - red: 0.49803922, - green: 0.51764706, - blue: 0.61176471, - alpha: 1.0, - ), - neutral_8: ( - red: 0.57647059, - green: 0.60000000, - blue: 0.69803922, - alpha: 1.0, - ), - neutral_9: ( - red: 0.65098039, - green: 0.67843137, - blue: 0.78431373, - alpha: 1.0, - ), - neutral_10: ( - red: 0.72941176, - green: 0.76078431, - blue: 0.87058824, - alpha: 1.0, - ), - bright_green: ( - red: 0.65098039, - green: 0.89019608, - blue: 0.63137255, - alpha: 1.0, - ), - bright_red: ( - red: 0.95294118, - green: 0.54509804, - blue: 0.65882353, - alpha: 1.0, - ), - bright_orange: ( - red: 0.98039216, - green: 0.70196078, - blue: 0.52941176, - alpha: 1.0, - ), - ext_warm_grey: ( - red: 0.57647059, - green: 0.60000000, - blue: 0.69803922, - alpha: 1.0, - ), - ext_orange: ( - red: 0.98039216, - green: 0.70196078, - blue: 0.52941176, - alpha: 1.0, - ), - ext_yellow: ( - red: 0.97647059, - green: 0.88627451, - blue: 0.68627451, - alpha: 1.0, - ), - ext_blue: ( - red: 0.53725490, - green: 0.70588235, - blue: 0.98039216, - alpha: 1.0, - ), - ext_purple: ( - red: 0.70588235, - green: 0.74509804, - blue: 0.99607843, - alpha: 1.0, - ), - ext_pink: ( - red: 0.96078431, - green: 0.76078431, - blue: 0.90588235, - alpha: 1.0, - ), - ext_indigo: ( - red: 0.79607843, - green: 0.65098039, - blue: 0.96862745, - alpha: 1.0, - ), - accent_blue: ( - red: 0.53725490, - green: 0.70588235, - blue: 0.98039216, - alpha: 1.0, - ), - accent_red: ( - red: 0.95294118, - green: 0.54509804, - blue: 0.65882353, - alpha: 1.0, - ), - accent_green: ( - red: 0.65098039, - green: 0.89019608, - blue: 0.63137255, - alpha: 1.0, - ), - accent_warm_grey: ( - red: 0.57647059, - green: 0.60000000, - blue: 0.69803922, - alpha: 1.0, - ), - accent_orange: ( - red: 0.98039216, - green: 0.70196078, - blue: 0.52941176, - alpha: 1.0, - ), - accent_yellow: ( - red: 0.97647059, - green: 0.88627451, - blue: 0.68627451, - alpha: 1.0, - ), - accent_purple: ( - red: 0.70588235, - green: 0.74509804, - blue: 0.99607843, - alpha: 1.0, - ), - accent_pink: ( - red: 0.96078431, - green: 0.76078431, - blue: 0.90588235, - alpha: 1.0, - ), - accent_indigo: ( - red: 0.79607843, - green: 0.65098039, - blue: 0.96862745, - alpha: 1.0, - ), - )), - spacing: ( - space_none: 0, - space_xxxs: 4, - space_xxs: 8, - space_xs: 12, - space_s: 16, - space_m: 24, - space_l: 32, - space_xl: 48, - space_xxl: 64, - space_xxxl: 128, - ), - corner_radii: ( - radius_0: (0.0, 0.0, 0.0, 0.0), - radius_xs: (4.0, 4.0, 4.0, 4.0), - radius_s: (8.0, 8.0, 8.0, 8.0), - radius_m: (16.0, 16.0, 16.0, 16.0), - radius_l: (32.0, 32.0, 32.0, 32.0), - radius_xl: (160.0, 160.0, 160.0, 160.0), - ), - bg_color: Some(( - red: 0.11764706, - green: 0.11764706, - blue: 0.18039216, - alpha: 1.00000000, - )), - text_tint: Some(( - red: 0.80392157, - green: 0.83921569, - blue: 0.95686275, - )), - accent: Some(( - red: 0.79607843, - green: 0.65098039, - blue: 0.96862745, - )), - success: Some(( - red: 0.65098039, - green: 0.89019608, - blue: 0.63137255, - )), - warning: Some(( - red: 0.97647059, - green: 0.88627451, - blue: 0.68627451, - )), - destructive: Some(( - red: 0.95294118, - green: 0.54509804, - blue: 0.65882353, - )), - window_hint: Some(( - red: 0.79607843, - green: 0.65098039, - blue: 0.96862745, - )), - neutral_tint: Some(( - red: 0.49803922, - green: 0.51764706, - blue: 0.61176471, - )), - primary_container_bg: Some(( - red: 0.19215686, - green: 0.19607843, - blue: 0.26666667, - alpha: 1.00000000, - )), - secondary_container_bg: Some(( - red: 0.27058824, - green: 0.27843137, - blue: 0.35294118, - alpha: 1.00000000, - )), - is_frosted: false, - gaps: (0, 8), - active_hint: 3, -) diff --git a/home/heitor/common/core/cosmic/theme/default.nix b/home/heitor/common/core/cosmic/theme/default.nix deleted file mode 100644 index bd1f86b..0000000 --- a/home/heitor/common/core/cosmic/theme/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - config, - cosmicLib, - pkgs, - ... -}: -let - inherit (cosmicLib.cosmic) importRON mkRON; -in -{ - home.packages = with pkgs; [ - (catppuccin-papirus-folders.override { inherit (config.catppuccin) flavor accent; }) - inter - jetbrains-mono - ]; - - wayland.desktopManager.cosmic.appearance = { - theme = { - dark = importRON ./catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}-round.ron; - mode = "dark"; - }; - - toolkit = { - apply_theme_global = true; - icon_theme = "Papirus-Dark"; - - interface_font = { - family = "Inter"; - stretch = mkRON "enum" "Normal"; - style = mkRON "enum" "Normal"; - weight = mkRON "enum" "Normal"; - }; - - monospace_font = { - family = "JetBrains Mono"; - stretch = mkRON "enum" "Normal"; - style = mkRON "enum" "Normal"; - weight = mkRON "enum" "Normal"; - }; - }; - }; -} diff --git a/home/heitor/common/core/default.nix b/home/heitor/common/core/default.nix deleted file mode 100644 index d76405e..0000000 --- a/home/heitor/common/core/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, ... }: -{ - imports = [ - ./brave.nix - ./catppuccin.nix - ./cosmic - ./flatpak.nix - ./ghostty.nix - ./mpv.nix - ./shell - ./sops.nix - ./ssh.nix - ./xdg.nix - ]; - - home = { - username = "heitor"; - homeDirectory = "/home/${config.home.username}"; - }; - - manual = { - html.enable = false; - json.enable = false; - manpages.enable = false; - }; - - programs.home-manager.enable = true; - systemd.user.startServices = "sd-switch"; -} diff --git a/home/heitor/common/core/flatpak.nix b/home/heitor/common/core/flatpak.nix deleted file mode 100644 index d17c21a..0000000 --- a/home/heitor/common/core/flatpak.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ inputs, ... }: -{ - imports = [ inputs.nix-flatpak.homeManagerModules.nix-flatpak ]; - - services.flatpak = { - remotes = [ - { - name = "flathub"; - location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; - } - ]; - - packages = [ "com.discordapp.Discord" ]; - - uninstallUnmanaged = true; - uninstallUnused = true; - - update = { - auto.enable = false; - onActivation = true; - }; - }; -} diff --git a/home/heitor/common/core/ghostty.nix b/home/heitor/common/core/ghostty.nix deleted file mode 100644 index cb56c61..0000000 --- a/home/heitor/common/core/ghostty.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, pkgs, ... }: -{ - catppuccin.ghostty.enable = true; - - home.packages = [ - pkgs.nerd-fonts.commit-mono - pkgs.protonvpn-gui - ]; - - programs = { - ghostty = { - enable = true; - enableBashIntegration = config.programs.bash.enable; - enableFishIntegration = config.programs.fish.enable; - enableZshIntegration = config.programs.zsh.enable; - - settings = { - font-family = "CommitMono Nerd Font"; - font-size = 13; - mouse-hide-while-typing = true; - window-theme = "ghostty"; - }; - }; - }; -} diff --git a/home/heitor/common/core/mpv.nix b/home/heitor/common/core/mpv.nix deleted file mode 100644 index a09cc61..0000000 --- a/home/heitor/common/core/mpv.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ - catppuccin.mpv.enable = true; - programs.mpv.enable = true; -} diff --git a/home/heitor/common/core/shell/bat.nix b/home/heitor/common/core/shell/bat.nix deleted file mode 100644 index 983aeec..0000000 --- a/home/heitor/common/core/shell/bat.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ - catppuccin.bat.enable = true; - programs.bat.enable = true; -} diff --git a/home/heitor/common/core/shell/default.nix b/home/heitor/common/core/shell/default.nix deleted file mode 100644 index 4d89f7d..0000000 --- a/home/heitor/common/core/shell/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - imports = [ - ./bat.nix - ./direnv.nix - ./eza.nix - ./fish.nix - ./gh.nix - ./git.nix - ./gpg.nix - ./helix.nix - ./nix.nix - ./starship.nix - ./zoxide.nix - ]; -} diff --git a/home/heitor/common/core/shell/direnv.nix b/home/heitor/common/core/shell/direnv.nix deleted file mode 100644 index 2b51c9d..0000000 --- a/home/heitor/common/core/shell/direnv.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; -} diff --git a/home/heitor/common/core/shell/eza.nix b/home/heitor/common/core/shell/eza.nix deleted file mode 100644 index 7ff9107..0000000 --- a/home/heitor/common/core/shell/eza.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - programs = { - eza = { - enable = true; - enableFishIntegration = false; - }; - - fish.shellAbbrs = - let - ls = "eza --icons --git"; - in - { - la = "${ls} --all"; - ll = "${ls} --long"; - lla = "${ls} --long --all"; - inherit ls; - lt = "${ls} --tree"; - }; - }; -} diff --git a/home/heitor/common/core/shell/fish.nix b/home/heitor/common/core/shell/fish.nix deleted file mode 100644 index ebf6fd1..0000000 --- a/home/heitor/common/core/shell/fish.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - catppuccin.fish.enable = true; - - programs.fish = { - enable = true; - preferAbbrs = true; - functions.fish_greeting = ""; - - interactiveShellInit = # fish - '' - fish_vi_key_bindings - ''; - }; -} diff --git a/home/heitor/common/core/shell/gh.nix b/home/heitor/common/core/shell/gh.nix deleted file mode 100644 index 0978c91..0000000 --- a/home/heitor/common/core/shell/gh.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, ... }: -{ - programs.gh = { - enable = true; - extensions = [ pkgs.gh-copilot ]; - - settings = { - editor = "nvim"; - git_protocol = "ssh"; - }; - }; -} diff --git a/home/heitor/common/core/shell/git.nix b/home/heitor/common/core/shell/git.nix deleted file mode 100644 index 3f02d93..0000000 --- a/home/heitor/common/core/shell/git.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - programs.git = { - enable = true; - - extraConfig = { - color.ui = true; - core.editor = "nvim"; - init.defaultBranch = "main"; - }; - - signing = { - format = "openpgp"; - key = "3EEC05B0024AF8A4"; - signByDefault = true; - }; - - includes = - let - githubEmail = "44377258+HeitorAugustoLN@users.noreply.github.com"; - in - [ - { - condition = "hasconfig:remote.*.url:git@github.com:*/**"; - contents.user.email = githubEmail; - } - ]; - - userName = "Heitor Augusto"; - }; -} diff --git a/home/heitor/common/core/shell/gpg.nix b/home/heitor/common/core/shell/gpg.nix deleted file mode 100644 index 668864c..0000000 --- a/home/heitor/common/core/shell/gpg.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ pkgs, ... }: -{ - services.gpg-agent = { - enable = true; - pinentryPackage = pkgs.pinentry-gnome3; - }; - - programs.gpg = { - enable = true; - - publicKeys = [ - { - source = ../../../pgp.asc; - trust = 5; - } - ]; - }; -} diff --git a/home/heitor/common/core/shell/helix.nix b/home/heitor/common/core/shell/helix.nix deleted file mode 100644 index e848646..0000000 --- a/home/heitor/common/core/shell/helix.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ inputs', ... }: -{ - home.packages = [ inputs'.neovim.packages.default ]; -} diff --git a/home/heitor/common/core/shell/nix.nix b/home/heitor/common/core/shell/nix.nix deleted file mode 100644 index 9ab1006..0000000 --- a/home/heitor/common/core/shell/nix.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - config, - inputs, - pkgs, - ... -}: -{ - imports = [ inputs.nix-index-database.hmModules.nix-index ]; - - home = { - packages = with pkgs; [ - nix-init - nix-output-monitor - nix-tree - nix-update - nixpkgs-review - ]; - - sessionVariables.NIXPKGS_ALLOW_UNFREE = 1; - }; - - programs = { - nix-index = { - enable = true; - enableBashIntegration = config.programs.bash.enable; - enableFishIntegration = config.programs.fish.enable; - enableZshIntegration = config.programs.zsh.enable; - }; - - nix-index-database.comma.enable = true; - }; -} diff --git a/home/heitor/common/core/shell/starship.nix b/home/heitor/common/core/shell/starship.nix deleted file mode 100644 index 7a597a3..0000000 --- a/home/heitor/common/core/shell/starship.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, ... }: -let - inherit (lib) concatStrings; -in -{ - programs.starship = { - enable = true; - enableTransience = config.programs.fish.enable; - - # TODO: Expand this configuration further, it is not nearly complete. - # But it currently works just similar to typewritten, which is my objective. - settings = { - add_newline = false; - format = concatStrings [ "$character" ]; - git_branch.format = "-> [$branch]($style) "; - git_status.format = "[$all_status$ahead_behind]($style) "; - - right_format = concatStrings [ - "$directory" - "$git_branch" - "$git_status" - ]; - }; - }; -} diff --git a/home/heitor/common/core/shell/zoxide.nix b/home/heitor/common/core/shell/zoxide.nix deleted file mode 100644 index d548416..0000000 --- a/home/heitor/common/core/shell/zoxide.nix +++ /dev/null @@ -1 +0,0 @@ -{ programs.zoxide.enable = true; } diff --git a/home/heitor/common/core/sops.nix b/home/heitor/common/core/sops.nix deleted file mode 100644 index 63a178c..0000000 --- a/home/heitor/common/core/sops.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, inputs, ... }: -{ - imports = [ inputs.sops-nix.homeManagerModules.sops ]; - - sops.age = { - generateKey = true; - keyFile = "${config.xdg.configHome}/sops/keys.txt"; - sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id-ed25519-sops" ]; - }; -} diff --git a/home/heitor/common/core/ssh.nix b/home/heitor/common/core/ssh.nix deleted file mode 100644 index 0a91001..0000000 --- a/home/heitor/common/core/ssh.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, ... }: -{ - programs.ssh = { - enable = true; - addKeysToAgent = "yes"; - matchBlocks."*".identityFile = "${config.home.homeDirectory}/.ssh/id-ed25519"; - }; - - services.ssh-agent.enable = true; -} diff --git a/home/heitor/common/core/xdg.nix b/home/heitor/common/core/xdg.nix deleted file mode 100644 index a6468bb..0000000 --- a/home/heitor/common/core/xdg.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, lib, ... }: -let - inherit (builtins) mapAttrs; - inherit (lib) mkForce; -in -{ - xdg = { - enable = true; - - userDirs = - { - enable = true; - createDirectories = true; - } - // mapAttrs (_: value: mkForce "${config.home.homeDirectory}/${value}") { - desktop = "Desktop"; - documents = "Documents"; - download = "Downloads"; - music = "Music"; - pictures = "Pictures"; - publicShare = "Public"; - templates = "Templates"; - videos = "Videos"; - }; - }; -} diff --git a/home/heitor/pgp.asc b/home/heitor/pgp.asc deleted file mode 100644 index 2cb6893..0000000 --- a/home/heitor/pgp.asc +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mDMEZ8vclBYJKwYBBAHaRw8BAQdAnxLRgOkGUkJ5iQmNh2Iy8/vmFnPR4JTDXJ/s -2Uz8nDa0KEhlaXRvciBBdWd1c3RvIDxJQW0uSGVpdG9yQUxOQHByb3Rvbi5tZT6I -lAQTFgoAPBYhBP51R8t0K/+R1bcZglPAT49GoaNEBQJny9yUAhsDBQkDwmcABAsJ -CAcEFQoJCAUWAgMBAAIeBQIXgAAKCRBTwE+PRqGjRPvsAQCsaUYhuAP1d7UMIWWf -V7bwZ1hwFIGUghZrD+dJNIwoHQD9Fft/J4QKpUWWhmSEvwDIhU/oVq4+53pRIb2l -whXP9Qu4OARny9yUEgorBgEEAZdVAQUBAQdAoF3M5hCTKhRsu53Sjw4RkmMFPsU1 -23cei1ZwmMtLzmoDAQgHiH4EGBYKACYWIQT+dUfLdCv/kdW3GYJTwE+PRqGjRAUC -Z8vclAIbDAUJA8JnAAAKCRBTwE+PRqGjRN6HAQDIe+cNMT9kO2wHMUnk/rWDllZy -ZR1qI/Dp0kYnvWgdIwD+LmwH11Ssxpq+OmvQq4sCHpSPYrH1IOFnsGVI/0/FUgE= -=WUON ------END PGP PUBLIC KEY BLOCK----- diff --git a/hosts/axolotl/default.nix b/hosts/axolotl/default.nix deleted file mode 100644 index 02d7f50..0000000 --- a/hosts/axolotl/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ inputs, pkgs, ... }: -{ - imports = [ - ./disk-configuration.nix - ./hardware-configuration.nix - ../common/users/heitor - - inputs.disko.nixosModules.disko - inputs.nixos-hardware.nixosModules.common-cpu-intel-cpu-only - inputs.nixos-hardware.nixosModules.common-gpu-amd - inputs.nixos-hardware.nixosModules.common-pc - inputs.nixos-hardware.nixosModules.common-pc-ssd - ]; - - networking.firewall.checkReversePath = false; - services.desktopManager.gnome.enable = true; - services.displayManager.gdm.enable = true; - i18n.inputMethod.enable = true; - i18n.inputMethod.type = "ibus"; - - environment.systemPackages = [ pkgs.davinci-resolve ]; - - hardware.graphics = { - enable = true; - extraPackages = [ pkgs.rocmPackages.clr.icd ]; - }; - - system.stateVersion = "25.11"; -} diff --git a/hosts/axolotl/disk-configuration.nix b/hosts/axolotl/disk-configuration.nix deleted file mode 100644 index 5425e81..0000000 --- a/hosts/axolotl/disk-configuration.nix +++ /dev/null @@ -1,92 +0,0 @@ -{ - disko.devices.disk = { - ssd = { - type = "disk"; - device = "/dev/sda"; - - content = { - type = "gpt"; - - partitions = { - boot = { - size = "1G"; - type = "EF00"; - priority = 1; - - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - - root = { - size = "100%"; - - content = { - type = "luks"; - name = "root"; - settings.allowDiscards = true; - - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - - subvolumes = { - "/root" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd" ]; - }; - "/nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" ]; - }; - "/var" = { - mountpoint = "/var"; - mountOptions = [ "compress=zstd" ]; - }; - "/tmp" = { - mountpoint = "/tmp"; - mountOptions = [ "compress=zstd" ]; - }; - }; - }; - }; - }; - }; - }; - }; - - hdd = { - type = "disk"; - device = "/dev/sdb"; - - content = { - type = "gpt"; - - partitions.home = { - size = "100%"; - - content = { - type = "luks"; - name = "home"; - settings.allowDiscards = true; - - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - - subvolumes = { - "/home" = { - mountpoint = "/home"; - mountOptions = [ "compress=zstd" ]; - }; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/hosts/axolotl/hardware-configuration.nix b/hosts/axolotl/hardware-configuration.nix deleted file mode 100644 index 1e14587..0000000 --- a/hosts/axolotl/hardware-configuration.nix +++ /dev/null @@ -1,36 +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. -{ - config, - lib, - modulesPath, - ... -}: -{ - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/common/core/builders.nix b/hosts/common/core/builders.nix deleted file mode 100644 index 11d064d..0000000 --- a/hosts/common/core/builders.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ config, ... }: -{ - nix = { - buildMachines = - let - common = { - protocol = "ssh-ng"; - sshKey = config.sops.secrets."heitor/nixos-builders-key".path; - sshUser = "heitor"; - - supportedFeatures = [ - "benchmark" - "big-parallel" - "kvm" - "nixos-test" - ]; - }; - in - map (builder: common // builder) [ - { - hostName = "build-box.nix-community.org"; - maxJobs = 8; - publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUVsSVE1NHFBeTdEaDYzckJ1ZFlLZGJ6SkhycmJyck1YTFlsN1BrbWs4OEgK"; - - systems = [ - "i686-linux" - "riscv64-linux" - "x86_64-linux" - ]; - } - { - hostName = "aarch64-build-box.nix-community.org"; - maxJobs = 16; - publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUc5dXlmaHlsaStCUnRrNjR5K25pcXRiK3NLcXVSR0daODdmNFlSYzhFRTEK"; - - systems = [ - "aarch64-linux" - "armv7l-linux" - ]; - } - { - hostName = "darwin-build-box.nix-community.org"; - maxJobs = 4; - publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUtNSGhsY243ZlVwVXVpT0ZlSWhEcUJ6Qk5Gc2JOcXErTnB6dUdYM2U2enYgCg=="; - sshKey = config.sops.secrets."heitor/darwin-builders-key".path; - supportedFeatures = [ "big-parallel" ]; - - systems = [ - "aarch64-darwin" - "x86_64-darwin" - ]; - } - ]; - - distributedBuilds = true; - }; - - sops.secrets = { - "heitor/nixos-builders-key" = { - inherit (config.users.users.heitor) group; - mode = "0400"; - owner = config.users.users.heitor.name; - sopsFile = ../../../secrets/hosts/common/default.yaml; - }; - - "heitor/darwin-builders-key" = { - inherit (config.users.users.heitor) group; - mode = "0400"; - owner = config.users.users.heitor.name; - sopsFile = ../../../secrets/hosts/common/default.yaml; - }; - }; -} diff --git a/hosts/common/core/catppuccin.nix b/hosts/common/core/catppuccin.nix deleted file mode 100644 index 4a6d472..0000000 --- a/hosts/common/core/catppuccin.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ inputs, ... }: -{ - imports = [ inputs.catppuccin.nixosModules.catppuccin ]; - - catppuccin = { - accent = "mauve"; - flavor = "mocha"; - }; -} diff --git a/hosts/common/core/console.nix b/hosts/common/core/console.nix deleted file mode 100644 index 88bd379..0000000 --- a/hosts/common/core/console.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ lib, ... }: -let - inherit (lib) mkDefault; -in -{ - catppuccin.tty.enable = true; - console.keyMap = mkDefault "br-abnt2"; -} diff --git a/hosts/common/core/cosmic.nix b/hosts/common/core/cosmic.nix deleted file mode 100644 index 0e5dc5a..0000000 --- a/hosts/common/core/cosmic.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - networking.networkmanager.enable = true; - - services = { - # desktopManager.cosmic.enable = true; - # displayManager.cosmic-greeter.enable = true; - }; -} diff --git a/hosts/common/core/default.nix b/hosts/common/core/default.nix deleted file mode 100644 index d6950e0..0000000 --- a/hosts/common/core/default.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ - inputs, - inputs', - lib, - pkgs, - self, - self', - ... -}: -let - inherit (lib) mkDefault mkForce; -in -{ - imports = [ - inputs.home-manager.nixosModules.home-manager - - ./builders.nix - ./catppuccin.nix - ./console.nix - ./cosmic.nix - ./fish.nix - ./flatpak.nix - ./locale.nix - ./nh.nix - ./nix.nix - ./nix-ld.nix - ./openssh.nix - ./pipewire.nix - ./security.nix - ./sops.nix - ./steam.nix - ./stevenblack.nix - ./systemd-boot.nix - ./xdg.nix - ./zram.nix - ]; - - boot = { - initrd.systemd.enable = true; - kernelPackages = pkgs.linuxPackages_latest; - }; - - documentation = { - # Whether to install documentation of packages from environment.systemPackages into the generated system path. See "Multiple-output packages" chapter in the nixpkgs manual for more info. - enable = mkDefault true; - # Whether to install manual pages and the man command. This also includes "man" outputs. - man.enable = mkDefault true; - # Whether to install documentation distributed in packages' /share/doc. Usually plain text and/or HTML. This also includes "doc" outputs. - doc.enable = mkForce false; - # Installs man and doc pages if they are enabled - # Takes too much time and are not cached - nixos.enable = mkForce false; - # Whether to install info pages and the info command. This also includes "info" outputs. - info.enable = mkForce false; - }; - - home-manager = { - backupFileExtension = "old"; - - extraSpecialArgs = { - inherit - inputs - inputs' - self - self' - ; - }; - - useGlobalPkgs = true; - useUserPackages = true; - verbose = true; - }; - - programs.command-not-found.enable = false; -} diff --git a/hosts/common/core/fish.nix b/hosts/common/core/fish.nix deleted file mode 100644 index 7242bd9..0000000 --- a/hosts/common/core/fish.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - programs.fish = { - enable = true; - - vendor = { - completions.enable = true; - config.enable = true; - functions.enable = true; - }; - }; -} diff --git a/hosts/common/core/flatpak.nix b/hosts/common/core/flatpak.nix deleted file mode 100644 index 72ccfa4..0000000 --- a/hosts/common/core/flatpak.nix +++ /dev/null @@ -1 +0,0 @@ -{ services.flatpak.enable = true; } diff --git a/hosts/common/core/locale.nix b/hosts/common/core/locale.nix deleted file mode 100644 index 28cfae8..0000000 --- a/hosts/common/core/locale.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, ... }: -let - inherit (lib) mkDefault; -in -{ - i18n = { - defaultLocale = mkDefault "pt_BR.UTF-8"; - - extraLocaleSettings = { - LC_ADDRESS = mkDefault "pt_BR.UTF-8"; - LC_IDENTIFICATION = mkDefault "pt_BR.UTF-8"; - LC_MEASUREMENT = mkDefault "pt_BR.UTF-8"; - LC_MONETARY = mkDefault "pt_BR.UTF-8"; - LC_NAME = mkDefault "pt_BR.UTF-8"; - LC_NUMERIC = mkDefault "pt_BR.UTF-8"; - LC_PAPER = mkDefault "pt_BR.UTF-8"; - LC_TELEPHONE = mkDefault "pt_BR.UTF-8"; - LC_TIME = mkDefault "pt_BR.UTF-8"; - }; - }; - - location.provider = "geoclue2"; - - time = { - hardwareClockInLocalTime = true; - timeZone = mkDefault "America/Sao_Paulo"; - }; -} diff --git a/hosts/common/core/nh.nix b/hosts/common/core/nh.nix deleted file mode 100644 index 1f8de5e..0000000 --- a/hosts/common/core/nh.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, ... }: -{ - programs.nh = { - enable = true; - flake = "${config.users.users.heitor.home}/Projects/nix-config"; - - clean = { - enable = true; - dates = "weekly"; - extraArgs = "--keep-since 7d"; - }; - }; -} diff --git a/hosts/common/core/nix-ld.nix b/hosts/common/core/nix-ld.nix deleted file mode 100644 index a4308d7..0000000 --- a/hosts/common/core/nix-ld.nix +++ /dev/null @@ -1 +0,0 @@ -{ programs.nix-ld.enable = true; } diff --git a/hosts/common/core/nix.nix b/hosts/common/core/nix.nix deleted file mode 100644 index 082968b..0000000 --- a/hosts/common/core/nix.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ inputs, lib, ... }: -let - inherit (builtins) mapAttrs; - inherit (lib) - filterAttrs - isType - mapAttrsToList - mkDefault - ; -in -{ - nix = - let - flakeInputs = filterAttrs (_: isType "flake") inputs; - in - { - channel.enable = false; - daemonCPUSchedPolicy = mkDefault "batch"; - daemonIOSchedClass = mkDefault "idle"; - daemonIOSchedPriority = mkDefault 7; - nixPath = mapAttrsToList (name: _: "${name}=flake:${name}") flakeInputs; - registry = mapAttrs (_: flake: { inherit flake; }) flakeInputs; - - settings = - let - kb = 1024; - mb = 1024 * kb; - gb = 1024 * mb; - in - { - auto-optimise-store = true; - builders-use-substitutes = true; - connect-timeout = 5; - - experimental-features = [ - "flakes" - "nix-command" - "pipe-operators" - ]; - - fallback = true; - flake-registry = "/etc/nix/registry.json"; - http-connections = 128; - log-lines = 25; - max-free = 30 * gb; - max-jobs = "auto"; - max-substitution-jobs = 128; - min-free = 5 * gb; - - substituters = [ - "https://cache.nixos.org" - "https://heitor.cachix.org" - ]; - - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "heitor.cachix.org-1:IZ1ydLh73kFtdv+KfcsR4WGPkn+/I926nTGhk9O9AxI=" - ]; - - trusted-users = [ - "heitor" - "root" - ]; - - use-xdg-base-directories = true; - warn-dirty = false; - }; - }; - - nixpkgs.config.allowUnfree = true; -} diff --git a/hosts/common/core/openssh.nix b/hosts/common/core/openssh.nix deleted file mode 100644 index d896a71..0000000 --- a/hosts/common/core/openssh.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ config, ... }: -{ - services.openssh = { - enable = true; - ports = [ 1337 ]; - - hostKeys = [ - { - type = "ed25519"; - path = "/etc/ssh/host-ed25519-sops"; - } - ]; - - settings = { - PasswordAuthentication = false; - PermitRootLogin = "no"; - StreamLocalBindUnlink = "yes"; - X11Forwarding = false; - }; - }; - - programs.ssh.knownHosts = - let - cfg = config.programs.ssh.knownHosts; - in - { - aarch64-build-box = { - hostNames = [ "aarch64-build-box.nix-community.org" ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG9uyfhyli+BRtk64y+niqtb+sKquRGGZ87f4YRc8EE1"; - }; - - build-box = { - hostNames = [ "build-box.nix-community.org" ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIElIQ54qAy7Dh63rBudYKdbzJHrrbrrMXLYl7Pkmk88H"; - }; - - codeberg-ed25519 = { - inherit (cfg.codeberg-rsa) hostNames; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIVIC02vnjFyL+I4RHfvIGNtOgJMe769VTF1VR4EB3ZB"; - }; - - codeberg-rsa = { - hostNames = [ "codeberg.org" ]; - publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8hZi7K1/2E2uBX8gwPRJAHvRAob+3Sn+y2hxiEhN0buv1igjYFTgFO2qQD8vLfU/HT/P/rqvEeTvaDfY1y/vcvQ8+YuUYyTwE2UaVU5aJv89y6PEZBYycaJCPdGIfZlLMmjilh/Sk8IWSEK6dQr+g686lu5cSWrFW60ixWpHpEVB26eRWin3lKYWSQGMwwKv4LwmW3ouqqs4Z4vsqRFqXJ/eCi3yhpT+nOjljXvZKiYTpYajqUC48IHAxTWugrKe1vXWOPxVXXMQEPsaIRc2hpK+v1LmfB7GnEGvF1UAKnEZbUuiD9PBEeD5a1MZQIzcoPWCrTxipEpuXQ5Tni4mN"; - }; - - darwin-build-box = { - hostNames = [ "darwin-build-box.nix-community.org" ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKMHhlcn7fUpUuiOFeIhDqBzBNFsbNqq+NpzuGX3e6zv"; - }; - - github-ed25519 = { - inherit (cfg.github-rsa) hostNames; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl"; - }; - - github-rsa = { - hostNames = [ "github.com" ]; - publicKey = "AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk="; - }; - - gitlab-ed25519 = { - inherit (cfg.gitlab-rsa) hostNames; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf"; - }; - - gitlab-rsa = { - hostNames = [ "gitlab.com" ]; - publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsj2bNKTBSpIYDEGk9KxsGh3mySTRgMtXL583qmBpzeQ+jqCMRgBqB98u3z++J1sKlXHWfM9dyhSevkMwSbhoR8XIq/U0tCNyokEi/ueaBMCvbcTHhO7FcwzY92WK4Yt0aGROY5qX2UKSeOvuP4D6TPqKF1onrSzH9bx9XUf2lEdWT/ia1NEKjunUqu1xOB/StKDHMoX4/OKyIzuS0q/T1zOATthvasJFoPrAjkohTyaDUz2LN5JoH839hViyEG82yB+MjcFV5MU3N1l1QL3cVUCh93xSaua1N85qivl+siMkPGbO5xR/En4iEY6K2XPASUEMaieWVNTRCtJ4S8H+9"; - }; - - sourcehut-ed25519 = { - inherit (cfg.sourcehut-rsa) hostNames; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMZvRd4EtM7R+IHVMWmDkVU3VLQTSwQDSAvW0t2Tkj60"; - }; - - sourcehut-rsa = { - hostNames = [ "git.sr.ht" ]; - publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZ+l/lvYmaeOAPeijHL8d4794Am0MOvmXPyvHTtrqvgmvCJB8pen/qkQX2S1fgl9VkMGSNxbp7NF7HmKgs5ajTGV9mB5A5zq+161lcp5+f1qmn3Dp1MWKp/AzejWXKW+dwPBd3kkudDBA1fa3uK6g1gK5nLw3qcuv/V4emX9zv3P2ZNlq9XRvBxGY2KzaCyCXVkL48RVTTJJnYbVdRuq8/jQkDRA8lHvGvKI+jqnljmZi2aIrK9OGT2gkCtfyTw2GvNDV6aZ0bEza7nDLU/I+xmByAOO79R1Uk4EYCvSc1WXDZqhiuO2sZRmVxa0pQSBDn1DB3rpvqPYW+UvKB3SOz"; - }; - }; -} diff --git a/hosts/common/core/pipewire.nix b/hosts/common/core/pipewire.nix deleted file mode 100644 index e9ff289..0000000 --- a/hosts/common/core/pipewire.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - security.rtkit.enable = true; - - services = { - pipewire = { - enable = true; - - alsa = { - enable = true; - support32Bit = true; - }; - - jack.enable = true; - pulse.enable = true; - }; - - pulseaudio.enable = false; - }; -} diff --git a/hosts/common/core/security.nix b/hosts/common/core/security.nix deleted file mode 100644 index 6c41fe6..0000000 --- a/hosts/common/core/security.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, ... }: -let - inherit (lib) mkDefault; -in -{ - boot = { - # Fix a security hole in place for backwards compatibility. See desc in - # nixpkgs/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix - loader.systemd-boot.editor = mkDefault false; - tmp.cleanOnBoot = true; - }; - - security = { - protectKernelImage = true; - - sudo.extraConfig = '' - Defaults pwfeedback - ''; - }; -} diff --git a/hosts/common/core/sops.nix b/hosts/common/core/sops.nix deleted file mode 100644 index 5eb7e5c..0000000 --- a/hosts/common/core/sops.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, inputs, ... }: -let - inherit (builtins) filter; -in -{ - imports = [ inputs.sops-nix.nixosModules.sops ]; - - sops.age = { - generateKey = true; - keyFile = "/var/lib/sops-nix/keys.txt"; - sshKeyPaths = - config.services.openssh.hostKeys |> filter (key: key.type == "ed25519") |> map (key: key.path); - }; -} diff --git a/hosts/common/core/steam.nix b/hosts/common/core/steam.nix deleted file mode 100644 index d7d25d0..0000000 --- a/hosts/common/core/steam.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs, ... }: -{ - programs.steam = { - enable = true; - extraCompatPackages = [ pkgs.proton-ge-bin ]; - localNetworkGameTransfers.openFirewall = true; - protontricks.enable = true; - }; -} diff --git a/hosts/common/core/stevenblack.nix b/hosts/common/core/stevenblack.nix deleted file mode 100644 index b27f10d..0000000 --- a/hosts/common/core/stevenblack.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - networking.stevenblack = { - enable = true; - - block = [ - "fakenews" - "gambling" - "porn" - ]; - }; -} diff --git a/hosts/common/core/systemd-boot.nix b/hosts/common/core/systemd-boot.nix deleted file mode 100644 index fdd5e14..0000000 --- a/hosts/common/core/systemd-boot.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - boot.loader = { - efi.canTouchEfiVariables = true; - systemd-boot.enable = true; - }; -} diff --git a/hosts/common/core/xdg.nix b/hosts/common/core/xdg.nix deleted file mode 100644 index ee4d271..0000000 --- a/hosts/common/core/xdg.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - environment.etc."xdg/user-dirs.defaults".text = '' - DESKTOP=Desktop - DOCUMENTS=Documents - DOWNLOAD=Downloads - MUSIC=Music - PICTURES=Pictures - PUBLICSHARE=Public - TEMPLATES=Templates - VIDEOS=Videos - ''; -} diff --git a/hosts/common/core/zram.nix b/hosts/common/core/zram.nix deleted file mode 100644 index bcf848b..0000000 --- a/hosts/common/core/zram.nix +++ /dev/null @@ -1 +0,0 @@ -{ zramSwap.enable = true; } diff --git a/hosts/common/users/heitor/default.nix b/hosts/common/users/heitor/default.nix deleted file mode 100644 index f2b2d19..0000000 --- a/hosts/common/users/heitor/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - config, - lib, - pkgs, - self, - ... -}: -let - inherit (builtins) attrValues filter hasAttr; - inherit (lib) mkDefault; -in -{ - home-manager.users.heitor.imports = [ - ../../../../home/heitor/${config.networking.hostName} - ../../../../home/heitor/common/core - ] - ++ attrValues self.homeManagerModules; - - sops.secrets."heitor/password" = { - neededForUsers = true; - sopsFile = ../../../../secrets/hosts/common/default.yaml; - }; - - systemd.tmpfiles.rules = [ - "L+ /var/lib/AccountsService/icons/heitor - - - - ${./icon.jpg}" - ]; - - users = { - mutableUsers = false; - - users = { - heitor = { - description = "Heitor Augusto"; - - extraGroups = filter (group: hasAttr group config.users.groups) [ - "networkmanager" - "wheel" - ]; - - group = "users"; - hashedPasswordFile = config.sops.secrets."heitor/password".path; - isNormalUser = true; - shell = pkgs.fish; - }; - - root.hashedPasswordFile = mkDefault config.sops.secrets."heitor/password".path; - }; - }; -} diff --git a/hosts/common/users/heitor/icon.jpg b/hosts/common/users/heitor/icon.jpg deleted file mode 100644 index 3bfd338..0000000 Binary files a/hosts/common/users/heitor/icon.jpg and /dev/null differ diff --git a/hosts/default.nix b/hosts/default.nix deleted file mode 100644 index 0ccafc9..0000000 --- a/hosts/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - nexus.configurations.axolotl = { - modules = [ ./axolotl ]; - system = "x86_64-linux"; - type = "nixos"; - }; -} diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index a57fad6..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ inputs, ... }: -{ - imports = [ inputs.home-manager.flakeModules.home-manager ]; - - flake = { - homeManagerModules = { }; - nixosModules = { }; - }; -} diff --git a/secrets/hosts/common/default.yaml b/secrets/hosts/common/default.yaml deleted file mode 100644 index 01832f5..0000000 --- a/secrets/hosts/common/default.yaml +++ /dev/null @@ -1,24 +0,0 @@ -heitor: - nixos-builders-key: ENC[AES256_GCM,data:a9xD883ydPnIlFYyZaPjuKv9gkZLvZY/RP3OcWLnnn4Hmmtu3V2shyDUuYaLR13L1PRRrm1h20VNKCdNeypZXaT+wUdWBhJ5ctcRXkvhs8vcKixRw92DK5W5wAIX6SUCeA+8X7q0gQ7Ckrfu/QIP7M3mWozKtsM6jJk/vLh3hU2804X5EgsoSsQNZRQRxiExwab382mM4rWm32l67h5F9uuZmQIiUlW7a9h8Tev+6zNEeYw3ZTdr/mDGWBFQ0A2ptRxBLqhSpU7cbXMGtdyWksQDlMkESThPlAJj2iFpHxM5nDcUgIrX4/dpHf5Syyvg5OlGHjcrNvQvZ9P7ci0bF2HsczvEFPfxGJHZQqvVy47Rse/5XRN9iIafehFH6pGmnzWcmMKYOsxu1AqEsxBh5E0WM5yxzRIFJbiRxIj5VgPDStLWg6veryy5dCE5zvE/IQXSU9ywJvBP1ysxQyWpYmcIfbWSwricWclQn0WNJkhnjhU7xMgxN08pzRYoJgj03L/Mg4in4nKuUYZ24FQy,iv:OeYaJz/9r5ltRaV/twQNVGBruNPGw42qmw0KVv7iZGg=,tag:Bs54uhqQuAqczKVvkXaU2g==,type:str] - darwin-builders-key: ENC[AES256_GCM,data:dx6yfDFu5x4hPnRgcz3NkUTMjMhOXiIh0kskYwTEPDF+vnGrRVhBYyJQlNs27eD00cThX+F3YzAICXBYELxSh8M9CL3PU54a9GDMErhthuk87hrUs9Dzs3zcuE0E2l6ZoX/5s1GsvCJPzz8lsM2v3qOMCh46hcIunXM3JkBGfK+5KHq6Akb1B3NXNM7QWkdhQrk4z/zgGK79dueNuLVmJ/RPkWDbcv7pPhNp+3f/ljgaBjn+lGfF3iyF/YN1Q478OU7zhAbJ7u+xfMSXFYqlVONH6Ri/jWaLIWQrlte2xuFHxvdtEVec20RRSxW/s4M7m/jGdIuZIiktUD0T5hkzph0JGWZ9ATWjQHeJIiEw93Uc/GOFSa1QLsNg7DSWSbxxtXqbhmmQ/bxJua1k6yQO2zaYVWv5wBZgs4u6bJg+pt9L81xa47UugaAU4XL0V7mr4F1fLB3kY2K3NjMi++OyFfM9SHjyQt0eg70cWpcOcZDEfddiyR8nxT3Qt8/eLfJhEkmGfANX5jUZadWUU+NC,iv:FV8IY3V5reGlqRsrXXgk44d+zwWALI+lqWkCfCyGZEU=,tag:4JZYI0/m3fpUo24+pdLABw==,type:str] - password: ENC[AES256_GCM,data:FYTZZt0A+3iSNJi+koMN+d8AtzzCDecGuxtxGqqQdIjqpaQ0ZLW86TjEN9ZDgypMbOOU+YPylKzV9+AU6uprpEu+U9JV6sECgg==,iv:494j9CvsrrH4sXiZDjIP+uIde1QUFRKhy+C6icKmfkw=,tag:f6W3ijKuPRwc80htXyQhVg==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1k0qg6ah5cs36l2n5vaxymymxws8e4n4c0gv3wqgwkfq95h3vd9ysl33mee - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByc2t3ZE4zM25pZ1VZeU05 - eVk2NWkrM0JtZ0FhalE5blFVY0hvWEREZTA4CjhQb1J4YWMwZTB1UFFBTVQvRjVD - ZnlYR0J6WXZBQTBKSG56U0RudWNmRzgKLS0tIFhCUDFHc0xwMGdrYVV1MXI5MGxt - OE5lL1NCRkNDN24rc3FTMm5mZUEvUDgK95kRjoct0VTg/PkpuyRUvmPAXLtjU+p0 - YctQdS3myQtDWGXuvOXiMxuewMHL+0+IyuTWuQoinqEZtvQg4kJobA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-03-10T21:49:17Z" - mac: ENC[AES256_GCM,data:OLd10/wslJhV9GMAhlrkHG4eYJY8cPPS7XA7x91b2iezSwZglG6zPy74zUs0aVJ3d0huy45froDf8j3Vl3/gckYv1G8TF9U0Jr/Hjv8BmCy23WiQbskCRanHJmWdtK6hPPZeHGRpi9bP0R8v5o7vATDjFz6y4YroGUiAtRrk2UM=,iv:/Meb6PoXIJSPJoG280DQMuC5Il2twm3OhzOXRza3lMA=,tag:NerVngeZNHCUhxrGFKT73g==,type:str] - pgp: [] - unencrypted_suffix: _unencrypted - version: 3.9.4 diff --git a/shell.nix b/shell.nix index 81594f6..692cd4d 100644 --- a/shell.nix +++ b/shell.nix @@ -3,10 +3,10 @@ lock = builtins.fromJSON (builtins.readFile ./flake.lock); nodeName = lock.nodes.root.inputs.flake-compat; in - builtins.fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/${ - lock.nodes.${nodeName}.locked.rev - }.tar.gz"; + fetchTarball { + url = + lock.nodes.${nodeName}.locked.url + or "https://github.com/NixOS/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz"; sha256 = lock.nodes.${nodeName}.locked.narHash; } ) { src = ./.; }).shellNix