From d7f51613fddddcfcd3b805c0cfa8e876c733589b Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 01:48:04 -0500 Subject: [PATCH 01/19] forgejo: enable repo indexer --- hosts/chunk/forgejo.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/chunk/forgejo.nix b/hosts/chunk/forgejo.nix index 0b644a2..07d0e69 100644 --- a/hosts/chunk/forgejo.nix +++ b/hosts/chunk/forgejo.nix @@ -20,6 +20,7 @@ }; actions.ENABLED = false; repository.ENABLE_PUSH_CREATE_USER = true; + indexer.REPO_INDEXER_ENABLED = true; }; database = { type = "postgres"; From 3a621723d1846e8d65ec7ffaed966f8a10e9f560 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 02:59:35 -0500 Subject: [PATCH 02/19] revamp workflow (https://git.cy7.sh/cy/infra/pulls/4) Reviewed-on: https://git.cy7.sh/cy/infra/pulls/4 Co-authored-by: cy Co-committed-by: cy --- .github/workflows/build-and-cache.yml | 108 ++++++++++++++++---------- 1 file changed, 69 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build-and-cache.yml b/.github/workflows/build-and-cache.yml index 0e2e1df..217fd43 100644 --- a/.github/workflows/build-and-cache.yml +++ b/.github/workflows/build-and-cache.yml @@ -3,28 +3,6 @@ on: workflow_dispatch: push: jobs: - build-packages: - strategy: - matrix: - package: - - github:cything/nixpkgs#hello - os: - - ubuntu-latest - - macos-latest - runs-on: ${{ matrix.os }} - continue-on-error: true - steps: - - uses: DeterminateSystems/nix-installer-action@main - with: - logger: pretty - - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Setup Attic cache - uses: ryanccn/attic-action@v0 - with: - endpoint: ${{ vars.ATTIC_ENDPOINT }} - cache: ${{ vars.ATTIC_CACHE }} - token: ${{ secrets.ATTIC_TOKEN }} - - run: nix build -L '${{ matrix.package }}' build-machines: strategy: matrix: @@ -34,7 +12,7 @@ jobs: - titan os: - ubuntu-latest - # - macos-latest + runs-on: ${{ matrix.os }} continue-on-error: true steps: @@ -49,22 +27,48 @@ jobs: remove-codeql: 'true' remove-docker-images: 'true' build-mount-path: /nix - build-mount-path-ownership: 'root:root' - - uses: DeterminateSystems/nix-installer-action@main + + - uses: nixbuild/nix-quick-install-action@master + + - name: Sync repository + uses: actions/checkout@v4 with: - logger: pretty - - uses: DeterminateSystems/magic-nix-cache-action@main + persist-credentials: false + + - uses: cachix/cachix-action@v14 + with: + name: cything + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + useDaemon: false + installCommand: nix profile install nixpkgs#cachix + - name: Setup Attic cache uses: ryanccn/attic-action@v0 with: endpoint: ${{ vars.ATTIC_ENDPOINT }} cache: ${{ vars.ATTIC_CACHE }} token: ${{ secrets.ATTIC_TOKEN }} - - name: Sync repository - uses: actions/checkout@v4 + + - name: Restore and cache Nix store + uses: nix-community/cache-nix-action@v5.1.0 with: - persist-credentials: false - - run: nix build -L --accept-flake-config .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ matrix.machine }}-${{ hashFiles('flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}- + # do purge caches + purge: true + # purge all versions of the cache + purge-prefixes: nix-${{ runner.os }}- + # created more than this number of seconds ago relative to the start of the `Post Restore` phase + purge-last-accessed: 86400 + # except the version with the `primary-key`, if it exists + purge-primary-key: never + # always save the cache + save-always: true + + - run: nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel + build-homes: strategy: matrix: @@ -74,6 +78,7 @@ jobs: os: - ubuntu-latest # - macos-latest + runs-on: ${{ matrix.os }} continue-on-error: true steps: @@ -88,19 +93,44 @@ jobs: remove-codeql: 'true' remove-docker-images: 'true' build-mount-path: /nix - build-mount-path-ownership: 'root:root' - - uses: DeterminateSystems/nix-installer-action@main + + - uses: nixbuild/nix-quick-install-action@master + + - name: Sync repository + uses: actions/checkout@v4 with: - logger: pretty - - uses: DeterminateSystems/magic-nix-cache-action@main + persist-credentials: false + + - uses: cachix/cachix-action@v14 + with: + name: cything + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + useDaemon: false + installCommand: nix profile install nixpkgs#cachix + - name: Setup Attic cache uses: ryanccn/attic-action@v0 with: endpoint: ${{ vars.ATTIC_ENDPOINT }} cache: ${{ vars.ATTIC_CACHE }} token: ${{ secrets.ATTIC_TOKEN }} - - name: Sync repository - uses: actions/checkout@v4 + + - name: Restore and cache Nix store + uses: nix-community/cache-nix-action@v5.1.0 with: - persist-credentials: false - - run: nix build -L --accept-flake-config .#homeConfigurations."${{ matrix.home }}".activationPackage + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ matrix.home }}-${{ hashFiles('flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}- + # do purge caches + purge: true + # purge all versions of the cache + purge-prefixes: nix-${{ runner.os }}- + # created more than this number of seconds ago relative to the start of the `Post Restore` phase + purge-last-accessed: 86400 + # except the version with the `primary-key`, if it exists + purge-primary-key: never + # always save the cache + save-always: true + + - run: nix build -L .#homeConfigurations."${{ matrix.home }}".activationPackage From 1d7b20d51d249edfc55422577b0ffbe623da1575 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 03:07:03 -0500 Subject: [PATCH 03/19] use more specific primary-key and prefix-match --- .github/workflows/build-and-cache.yml | 63 +++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-cache.yml b/.github/workflows/build-and-cache.yml index 217fd43..81a635d 100644 --- a/.github/workflows/build-and-cache.yml +++ b/.github/workflows/build-and-cache.yml @@ -3,6 +3,61 @@ on: workflow_dispatch: push: jobs: + build-packages: + strategy: + matrix: + package: + - github:cything/nixpkgs/928e0c6874ab3e759305e93f806a4cf559645677#alvr + os: + - ubuntu-latest + - macos-latest + - ubuntu-24.04-arm + + runs-on: ${{ matrix.os }} + continue-on-error: true + steps: + - name: Install Nix + uses: cachix/install-nix-action@v30 + + - name: Sync repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: cachix/cachix-action@v14 + with: + name: cything + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + useDaemon: false + installCommand: nix profile install nixpkgs#cachix + + - name: Setup Attic cache + uses: ryanccn/attic-action@v0 + with: + endpoint: ${{ vars.ATTIC_ENDPOINT }} + cache: ${{ vars.ATTIC_CACHE }} + token: ${{ secrets.ATTIC_TOKEN }} + + - name: Restore and cache Nix store + uses: nix-community/cache-nix-action@v5.1.0 + with: + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ matrix.machine }}-${{ hashFiles('**/*.nix', 'flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.machine }}- + # do purge caches + purge: true + # purge all versions of the cache + purge-prefixes: nix-${{ runner.os }}- + # created more than this number of seconds ago relative to the start of the `Post Restore` phase + purge-last-accessed: 86400 + # except the version with the `primary-key`, if it exists + purge-primary-key: never + # always save the cache + save-always: true + + - run: nix build -L ${{ matrix.package }} + build-machines: strategy: matrix: @@ -53,9 +108,9 @@ jobs: uses: nix-community/cache-nix-action@v5.1.0 with: # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ matrix.machine }}-${{ hashFiles('flake.lock') }} + primary-key: nix-${{ runner.os }}-${{ matrix.machine }}-${{ hashFiles('**/*.nix', 'flake.lock') }} # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- + restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.machine }}- # do purge caches purge: true # purge all versions of the cache @@ -119,9 +174,9 @@ jobs: uses: nix-community/cache-nix-action@v5.1.0 with: # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ matrix.home }}-${{ hashFiles('flake.lock') }} + primary-key: nix-${{ runner.os }}-${{ matrix.home }}-${{ hashFiles('**/*.nix', 'flake.lock') }} # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- + restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.home }}- # do purge caches purge: true # purge all versions of the cache From e78bda179ef93830f8553ba108d5cd766e053d5c Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 13:10:07 -0500 Subject: [PATCH 04/19] move packages to a separate workflow --- ...cache.yml => build-machines-and-homes.yml} | 57 +----------------- .github/workflows/build-packages.yml | 58 +++++++++++++++++++ 2 files changed, 59 insertions(+), 56 deletions(-) rename .github/workflows/{build-and-cache.yml => build-machines-and-homes.yml} (69%) create mode 100644 .github/workflows/build-packages.yml diff --git a/.github/workflows/build-and-cache.yml b/.github/workflows/build-machines-and-homes.yml similarity index 69% rename from .github/workflows/build-and-cache.yml rename to .github/workflows/build-machines-and-homes.yml index 81a635d..76fcb36 100644 --- a/.github/workflows/build-and-cache.yml +++ b/.github/workflows/build-machines-and-homes.yml @@ -1,63 +1,8 @@ -name: build and cache random stuff +name: build and cache machines and homes on: workflow_dispatch: push: jobs: - build-packages: - strategy: - matrix: - package: - - github:cything/nixpkgs/928e0c6874ab3e759305e93f806a4cf559645677#alvr - os: - - ubuntu-latest - - macos-latest - - ubuntu-24.04-arm - - runs-on: ${{ matrix.os }} - continue-on-error: true - steps: - - name: Install Nix - uses: cachix/install-nix-action@v30 - - - name: Sync repository - uses: actions/checkout@v4 - with: - persist-credentials: false - - - uses: cachix/cachix-action@v14 - with: - name: cything - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - useDaemon: false - installCommand: nix profile install nixpkgs#cachix - - - name: Setup Attic cache - uses: ryanccn/attic-action@v0 - with: - endpoint: ${{ vars.ATTIC_ENDPOINT }} - cache: ${{ vars.ATTIC_CACHE }} - token: ${{ secrets.ATTIC_TOKEN }} - - - name: Restore and cache Nix store - uses: nix-community/cache-nix-action@v5.1.0 - with: - # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ matrix.machine }}-${{ hashFiles('**/*.nix', 'flake.lock') }} - # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.machine }}- - # do purge caches - purge: true - # purge all versions of the cache - purge-prefixes: nix-${{ runner.os }}- - # created more than this number of seconds ago relative to the start of the `Post Restore` phase - purge-last-accessed: 86400 - # except the version with the `primary-key`, if it exists - purge-primary-key: never - # always save the cache - save-always: true - - - run: nix build -L ${{ matrix.package }} - build-machines: strategy: matrix: diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml new file mode 100644 index 0000000..7531f6e --- /dev/null +++ b/.github/workflows/build-packages.yml @@ -0,0 +1,58 @@ +name: build and cache packages +on: + workflow_dispatch: +jobs: + build-packages: + strategy: + matrix: + package: + - github:cything/nixpkgs/928e0c6874ab3e759305e93f806a4cf559645677#alvr + os: + - ubuntu-latest + - macos-latest + - ubuntu-24.04-arm + + runs-on: ${{ matrix.os }} + continue-on-error: true + steps: + - name: Install Nix + uses: cachix/install-nix-action@v30 + + - name: Sync repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: cachix/cachix-action@v14 + with: + name: cything + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + useDaemon: false + installCommand: nix profile install nixpkgs#cachix + + - name: Setup Attic cache + uses: ryanccn/attic-action@v0 + with: + endpoint: ${{ vars.ATTIC_ENDPOINT }} + cache: ${{ vars.ATTIC_CACHE }} + token: ${{ secrets.ATTIC_TOKEN }} + + - name: Restore and cache Nix store + uses: nix-community/cache-nix-action@v5.1.0 + with: + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ matrix.package }}-${{ hashFiles('**/*.nix', 'flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.package }}- + # do purge caches + purge: true + # purge all versions of the cache + purge-prefixes: nix-${{ runner.os }}- + # created more than this number of seconds ago relative to the start of the `Post Restore` phase + purge-last-accessed: 86400 + # except the version with the `primary-key`, if it exists + purge-primary-key: never + # always save the cache + save-always: true + + - run: nix build -L ${{ matrix.package }} From b2582a051d5068ad0d707ab9955a564150c5d9d4 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 13:36:28 -0500 Subject: [PATCH 05/19] also run workflow on PR --- .github/workflows/build-machines-and-homes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-machines-and-homes.yml b/.github/workflows/build-machines-and-homes.yml index 76fcb36..6ae6746 100644 --- a/.github/workflows/build-machines-and-homes.yml +++ b/.github/workflows/build-machines-and-homes.yml @@ -2,6 +2,7 @@ name: build and cache machines and homes on: workflow_dispatch: push: + pull_request: jobs: build-machines: strategy: From 240d8b2820cfe4409f3b2117650bf32a6ee42838 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 20:12:33 -0500 Subject: [PATCH 06/19] add lact package --- .github/workflows/build-packages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 7531f6e..203f95b 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -7,6 +7,7 @@ jobs: matrix: package: - github:cything/nixpkgs/928e0c6874ab3e759305e93f806a4cf559645677#alvr + - github:cything/nixpkgs/7a6df0d295e2477d88251bd6d80bf25d251e59d2#lact os: - ubuntu-latest - macos-latest From d29d23c3e8398384cfde748e6adae81aadbdc854 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 20:50:13 -0500 Subject: [PATCH 07/19] unbreak element --- hosts/chunk/element.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/chunk/element.nix b/hosts/chunk/element.nix index 958666e..81ab246 100644 --- a/hosts/chunk/element.nix +++ b/hosts/chunk/element.nix @@ -7,9 +7,12 @@ virtualisation.oci-containers.containers.element = { image = "vectorim/element-web"; autoStart = true; - ports = [ "127.0.0.1:8089:80" ]; + ports = [ "127.0.0.1:8089:8089" ]; pull = "newer"; networks = [ "element-net" ]; + environment = { + ELEMENT_WEB_PORT = "8089"; + }; }; systemd.services.create-element-net = { From 0cc8d4195fb6fd4164604177d3e0fb82c9dd2351 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 20:50:51 -0500 Subject: [PATCH 08/19] some niri changes --- home/niri/default.nix | 7 ++++--- home/yt/ytnix.nix | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/home/niri/default.nix b/home/niri/default.nix index 9aa8636..f74bcb3 100644 --- a/home/niri/default.nix +++ b/home/niri/default.nix @@ -32,6 +32,7 @@ in ]; } { command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; } + { command = [ "wl-paste" "--watch" "cliphist" "store"]; } ]; hotkey-overlay.skip-at-startup = true; @@ -51,11 +52,11 @@ in }; layout = { - gaps = 4; + gaps = 0; focus-ring = { width = 4; - active.color = "#00000055"; - inactive.color = "#505050"; + active.color = "#4c7899"; + inactive.color = "#333333"; }; always-center-single-column = true; border.enable = false; diff --git a/home/yt/ytnix.nix b/home/yt/ytnix.nix index 6d34814..8624bdf 100644 --- a/home/yt/ytnix.nix +++ b/home/yt/ytnix.nix @@ -102,6 +102,7 @@ seahorse github-cli fuzzel + nixpkgs-review ]; programs.waybar.enable = true; From 222fc459186b7daa30b79e9f53077634b1f6d9bc Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 20:51:57 -0500 Subject: [PATCH 09/19] flake update --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index b093702..8cd1162 100644 --- a/flake.lock +++ b/flake.lock @@ -242,11 +242,11 @@ ] }, "locked": { - "lastModified": 1737299337, - "narHash": "sha256-0NBrY2A7buujKmeCbieopOMSbLxTu8TFcTLqAbTnQDw=", + "lastModified": 1737394973, + "narHash": "sha256-EW4oXMfnfA5sNM9Jqm+y98horWVvN66Gu7YIcEpFYZc=", "owner": "nix-community", "repo": "home-manager", - "rev": "f8ef4541bb8a54a8b52f19b52912119e689529b3", + "rev": "9786661d57c476021c8a0c3e53bf9fa2b4f3328b", "type": "github" }, "original": { @@ -342,11 +342,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1737325400, - "narHash": "sha256-B8+1x5rDA9GtzX+LWlceIbLBwncKH5uDrGqEN0EoOQw=", + "lastModified": 1737373716, + "narHash": "sha256-GRI9WugYv8QlnhZlINfY8gHIR+xn/AsEXhQP3+FjUh0=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "aad9ae8e2b07ed5d37743f3ae87c42528e2d172c", + "rev": "5aa5e53601ff1d93ae6b4dc6f833c73fc8de6466", "type": "github" }, "original": { @@ -375,11 +375,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1737211438, - "narHash": "sha256-XPcV2rV7Vy7lLeZMhTOwd0t/sRwNquXI7CH7+3Aftt0=", + "lastModified": 1737370409, + "narHash": "sha256-khoHHrpP/yArGEm94H/GtZytGzfJECsAEGmB9DLWb7M=", "owner": "YaLTeR", "repo": "niri", - "rev": "818248457210f5101459ea7d7066d12c456c8a97", + "rev": "7f025da5b6edb1d77e785ba6a6450ab10788ad8f", "type": "github" }, "original": { @@ -411,11 +411,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1737274611, - "narHash": "sha256-tmD7875tu1P0UvhI3Q/fXvIe8neJo7H9ZrPQ+QF7Q3E=", + "lastModified": 1737401148, + "narHash": "sha256-8YfoGyE89rWpG6NjCmYrJeV8EPAKvnZf2lN402WbC/A=", "owner": "nixos", "repo": "nixpkgs", - "rev": "50165c4f7eb48ce82bd063e1fb8047a0f515f8ce", + "rev": "7ceed4f800bec4c12c9b21c54bb76cb28a80e259", "type": "github" }, "original": { @@ -500,11 +500,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1737308837, - "narHash": "sha256-Sro74XNFgGgIIW4uo/YSVGafZhKnZwPLJNBvMsgpl4k=", + "lastModified": 1737385899, + "narHash": "sha256-/zyvdstDpPhc5lhFMtKgyQdU2oXGXDb0cg4BY91NKvg=", "owner": "nix-community", "repo": "nixvim", - "rev": "8fb2fe22c237b25b8af346870e126fdaeaff688b", + "rev": "115994f18e439a1cca9cdaaf15c004870256814d", "type": "github" }, "original": { @@ -626,11 +626,11 @@ ] }, "locked": { - "lastModified": 1737107480, - "narHash": "sha256-GXUE9+FgxoZU8v0p6ilBJ8NH7k8nKmZjp/7dmMrCv3o=", + "lastModified": 1737411508, + "narHash": "sha256-j9IdflJwRtqo9WpM0OfAZml47eBblUHGNQTe62OUqTw=", "owner": "Mic92", "repo": "sops-nix", - "rev": "4c4fb93f18b9072c6fa1986221f9a3d7bf1fe4b6", + "rev": "015d461c16678fc02a2f405eb453abb509d4e1d4", "type": "github" }, "original": { From 21fdf27b6c7884613b97d98a64feb98a5b2eed62 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 21:00:49 -0500 Subject: [PATCH 10/19] use input to build packages --- .github/workflows/build-packages.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 203f95b..a177078 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -1,13 +1,20 @@ name: build and cache packages on: workflow_dispatch: + inputs: + package: + description: "package to build" + required: false + type: string + jobs: build-packages: strategy: matrix: package: - github:cything/nixpkgs/928e0c6874ab3e759305e93f806a4cf559645677#alvr - - github:cything/nixpkgs/7a6df0d295e2477d88251bd6d80bf25d251e59d2#lact + - github:cything/nixpkgs/8929e1256ceec677dd57fce405cdaca23176399b#lact + - ${{ inputs.package }} os: - ubuntu-latest - macos-latest From 3a415ccce91f91e24bf792fe61f3f6cab63d4926 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 20 Jan 2025 23:36:46 -0500 Subject: [PATCH 11/19] downgrade kernel to 6.12 --- hosts/ytnix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/ytnix/default.nix b/hosts/ytnix/default.nix index 8912c19..01a9c97 100644 --- a/hosts/ytnix/default.nix +++ b/hosts/ytnix/default.nix @@ -41,7 +41,7 @@ efi.canTouchEfiVariables = false; # toggle when installing }; tmp.cleanOnBoot = true; - kernelPackages = pkgs.linuxPackages_latest; + kernelPackages = pkgs.linuxPackages_6_12; extraModulePackages = with config.boot.kernelPackages; [ rtl8821ce ]; From 40addb8f906650939db5ebfdb2c4fab3563564ae Mon Sep 17 00:00:00 2001 From: cy Date: Tue, 21 Jan 2025 01:09:38 -0500 Subject: [PATCH 12/19] try zen kernel --- hosts/ytnix/default.nix | 2 +- overlay/default.nix | 1 + overlay/kernel.nix | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 overlay/kernel.nix diff --git a/hosts/ytnix/default.nix b/hosts/ytnix/default.nix index 01a9c97..2cac680 100644 --- a/hosts/ytnix/default.nix +++ b/hosts/ytnix/default.nix @@ -41,7 +41,7 @@ efi.canTouchEfiVariables = false; # toggle when installing }; tmp.cleanOnBoot = true; - kernelPackages = pkgs.linuxPackages_6_12; + kernelPackages = pkgs.linuxPackages_zen; extraModulePackages = with config.boot.kernelPackages; [ rtl8821ce ]; diff --git a/overlay/default.nix b/overlay/default.nix index 99fc17b..123e1f2 100644 --- a/overlay/default.nix +++ b/overlay/default.nix @@ -2,6 +2,7 @@ let overlays = [ ./conduwuit ./attic + ./kernel.nix ]; importedOverlays = map (m: import m) overlays; in diff --git a/overlay/kernel.nix b/overlay/kernel.nix new file mode 100644 index 0000000..b9a233b --- /dev/null +++ b/overlay/kernel.nix @@ -0,0 +1,9 @@ +final: prev: let + inherit (prev) lib; +in { + linux_zen = prev.linux_zen.override (old: { + extraStructuredConfig = with lib.kernel; { + CONFIG_SCHED_MUQSS = yes; + }; + }); +} From 38b90fd28e4c5623c2cbd198d8c84055468c59e6 Mon Sep 17 00:00:00 2001 From: cy Date: Tue, 21 Jan 2025 04:04:08 -0500 Subject: [PATCH 13/19] overlay zen --- hosts/ytnix/default.nix | 2 +- overlay/kernel.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/ytnix/default.nix b/hosts/ytnix/default.nix index 2cac680..0024c40 100644 --- a/hosts/ytnix/default.nix +++ b/hosts/ytnix/default.nix @@ -41,7 +41,7 @@ efi.canTouchEfiVariables = false; # toggle when installing }; tmp.cleanOnBoot = true; - kernelPackages = pkgs.linuxPackages_zen; + kernelPackages = pkgs.linuxKernel.packages.linux_zen; extraModulePackages = with config.boot.kernelPackages; [ rtl8821ce ]; diff --git a/overlay/kernel.nix b/overlay/kernel.nix index b9a233b..e845a1e 100644 --- a/overlay/kernel.nix +++ b/overlay/kernel.nix @@ -1,7 +1,7 @@ final: prev: let inherit (prev) lib; in { - linux_zen = prev.linux_zen.override (old: { + linuxKernels.kernels.linux_zen = prev.linuxKernels.kernels.linux_zen.override (old: { extraStructuredConfig = with lib.kernel; { CONFIG_SCHED_MUQSS = yes; }; From 2c2d5a4103f4484deae3eb2b2a0638dfe38732b4 Mon Sep 17 00:00:00 2001 From: cy Date: Tue, 21 Jan 2025 04:04:32 -0500 Subject: [PATCH 14/19] niri doesnt start if DISPLAY is set before --- home/niri/default.nix | 1 + home/yt/ytnix.nix | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/home/niri/default.nix b/home/niri/default.nix index f74bcb3..40c53d6 100644 --- a/home/niri/default.nix +++ b/home/niri/default.nix @@ -49,6 +49,7 @@ in environment = { DISPLAY = ":0"; # for xwayland-satellite + ANKI_WAYLAND = "1"; }; layout = { diff --git a/home/yt/ytnix.nix b/home/yt/ytnix.nix index 8624bdf..2fa8d16 100644 --- a/home/yt/ytnix.nix +++ b/home/yt/ytnix.nix @@ -40,11 +40,6 @@ }; }; - home.sessionVariables = { - ANKI_WAYLAND = "1"; - DISPLAY = ":0"; - }; - home.packages = with pkgs; [ firefox ungoogled-chromium From 4ceb7f78305e05da7dad175b805dbc9ac6d4780e Mon Sep 17 00:00:00 2001 From: cy Date: Tue, 21 Jan 2025 04:05:32 -0500 Subject: [PATCH 15/19] add garnix.yaml --- garnix.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 garnix.yaml diff --git a/garnix.yaml b/garnix.yaml new file mode 100644 index 0000000..c189664 --- /dev/null +++ b/garnix.yaml @@ -0,0 +1,6 @@ +builds: + include: + - 'nixosConfigurations.*' + - 'homeConfigurations.*' + - '*.aarch64-linux.*' + - '*.x86_64-linux.*' From ae71a8a7791b22b88030865d7fc05ec51a829752 Mon Sep 17 00:00:00 2001 From: cy Date: Tue, 21 Jan 2025 04:22:58 -0500 Subject: [PATCH 16/19] add garnix and cachix cache --- flake.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flake.nix b/flake.nix index f75fe1e..6942dfe 100644 --- a/flake.nix +++ b/flake.nix @@ -45,11 +45,15 @@ "https://cache.cything.io/central" "https://niri.cachix.org" "https://nix-community.cachix.org" + "https://cache.garnix.io" + "https://cything.cachix.org" ]; extra-trusted-public-keys = [ "central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg=" "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" + "cything.cachix.org-1:xqW1W5NNL+wrM9wfSELb0MLj/harD2ZyB4HbdaMyvPI=" ]; builders-use-substitutes = true; }; From bbcc1433dedd20b729be32f145ebdefb4f92dae0 Mon Sep 17 00:00:00 2001 From: cy Date: Tue, 21 Jan 2025 04:25:30 -0500 Subject: [PATCH 17/19] nix fmt --- .github/workflows/build-machines-and-homes.yml | 15 --------------- .github/workflows/build-packages.yml | 7 ------- home/niri/default.nix | 9 ++++++++- overlay/kernel.nix | 6 ++++-- 4 files changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-machines-and-homes.yml b/.github/workflows/build-machines-and-homes.yml index 6ae6746..f5de126 100644 --- a/.github/workflows/build-machines-and-homes.yml +++ b/.github/workflows/build-machines-and-homes.yml @@ -13,7 +13,6 @@ jobs: - titan os: - ubuntu-latest - runs-on: ${{ matrix.os }} continue-on-error: true steps: @@ -28,28 +27,23 @@ jobs: remove-codeql: 'true' remove-docker-images: 'true' build-mount-path: /nix - - uses: nixbuild/nix-quick-install-action@master - - name: Sync repository uses: actions/checkout@v4 with: persist-credentials: false - - uses: cachix/cachix-action@v14 with: name: cything authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' useDaemon: false installCommand: nix profile install nixpkgs#cachix - - name: Setup Attic cache uses: ryanccn/attic-action@v0 with: endpoint: ${{ vars.ATTIC_ENDPOINT }} cache: ${{ vars.ATTIC_CACHE }} token: ${{ secrets.ATTIC_TOKEN }} - - name: Restore and cache Nix store uses: nix-community/cache-nix-action@v5.1.0 with: @@ -67,9 +61,7 @@ jobs: purge-primary-key: never # always save the cache save-always: true - - run: nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel - build-homes: strategy: matrix: @@ -79,7 +71,6 @@ jobs: os: - ubuntu-latest # - macos-latest - runs-on: ${{ matrix.os }} continue-on-error: true steps: @@ -94,28 +85,23 @@ jobs: remove-codeql: 'true' remove-docker-images: 'true' build-mount-path: /nix - - uses: nixbuild/nix-quick-install-action@master - - name: Sync repository uses: actions/checkout@v4 with: persist-credentials: false - - uses: cachix/cachix-action@v14 with: name: cything authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' useDaemon: false installCommand: nix profile install nixpkgs#cachix - - name: Setup Attic cache uses: ryanccn/attic-action@v0 with: endpoint: ${{ vars.ATTIC_ENDPOINT }} cache: ${{ vars.ATTIC_CACHE }} token: ${{ secrets.ATTIC_TOKEN }} - - name: Restore and cache Nix store uses: nix-community/cache-nix-action@v5.1.0 with: @@ -133,5 +119,4 @@ jobs: purge-primary-key: never # always save the cache save-always: true - - run: nix build -L .#homeConfigurations."${{ matrix.home }}".activationPackage diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index a177078..4408d30 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -6,7 +6,6 @@ on: description: "package to build" required: false type: string - jobs: build-packages: strategy: @@ -19,32 +18,27 @@ jobs: - ubuntu-latest - macos-latest - ubuntu-24.04-arm - runs-on: ${{ matrix.os }} continue-on-error: true steps: - name: Install Nix uses: cachix/install-nix-action@v30 - - name: Sync repository uses: actions/checkout@v4 with: persist-credentials: false - - uses: cachix/cachix-action@v14 with: name: cything authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' useDaemon: false installCommand: nix profile install nixpkgs#cachix - - name: Setup Attic cache uses: ryanccn/attic-action@v0 with: endpoint: ${{ vars.ATTIC_ENDPOINT }} cache: ${{ vars.ATTIC_CACHE }} token: ${{ secrets.ATTIC_TOKEN }} - - name: Restore and cache Nix store uses: nix-community/cache-nix-action@v5.1.0 with: @@ -62,5 +56,4 @@ jobs: purge-primary-key: never # always save the cache save-always: true - - run: nix build -L ${{ matrix.package }} diff --git a/home/niri/default.nix b/home/niri/default.nix index 40c53d6..af7b3ba 100644 --- a/home/niri/default.nix +++ b/home/niri/default.nix @@ -32,7 +32,14 @@ in ]; } { command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; } - { command = [ "wl-paste" "--watch" "cliphist" "store"]; } + { + command = [ + "wl-paste" + "--watch" + "cliphist" + "store" + ]; + } ]; hotkey-overlay.skip-at-startup = true; diff --git a/overlay/kernel.nix b/overlay/kernel.nix index e845a1e..be2404e 100644 --- a/overlay/kernel.nix +++ b/overlay/kernel.nix @@ -1,6 +1,8 @@ -final: prev: let +final: prev: +let inherit (prev) lib; -in { +in +{ linuxKernels.kernels.linux_zen = prev.linuxKernels.kernels.linux_zen.override (old: { extraStructuredConfig = with lib.kernel; { CONFIG_SCHED_MUQSS = yes; From 6a2269f5917b86b8e34f8491710715696559aee1 Mon Sep 17 00:00:00 2001 From: cy Date: Tue, 21 Jan 2025 12:07:49 -0500 Subject: [PATCH 18/19] add irssi --- home/irssi.nix | 18 ++++++++++++++++++ home/yt/ytnix.nix | 1 + 2 files changed, 19 insertions(+) create mode 100644 home/irssi.nix diff --git a/home/irssi.nix b/home/irssi.nix new file mode 100644 index 0000000..65da469 --- /dev/null +++ b/home/irssi.nix @@ -0,0 +1,18 @@ +{...}: { + programs.irssi = { + enable = true; + networks.liberachat = { + nick = "cy7"; + server = { + address = "irc.libera.chat"; + port = 6697; + autoConnect = true; + }; + channels = { + nixos.autoJoin = true; + linux.autoJoin = true; + rust.autoJoin = true; + }; + }; + }; +} diff --git a/home/yt/ytnix.nix b/home/yt/ytnix.nix index 2fa8d16..33a4aed 100644 --- a/home/yt/ytnix.nix +++ b/home/yt/ytnix.nix @@ -7,6 +7,7 @@ ./common.nix ../foot.nix ../niri + ../irssi.nix ]; home = { username = "yt"; From 0bb3332db9df235344d3f7370ec97f0afc7cbe23 Mon Sep 17 00:00:00 2001 From: cy Date: Tue, 21 Jan 2025 12:23:16 -0500 Subject: [PATCH 19/19] ghostty: init --- flake.lock | 140 ++++++++++++++++++++++++++++++++++++++++++++-- flake.nix | 1 + home/foot.nix | 32 ++++------- home/ghostty.nix | 13 +++++ home/yt/ytnix.nix | 1 + 5 files changed, 161 insertions(+), 26 deletions(-) create mode 100644 home/ghostty.nix diff --git a/flake.lock b/flake.lock index 8cd1162..9950639 100644 --- a/flake.lock +++ b/flake.lock @@ -74,6 +74,22 @@ } }, "flake-compat_2": { + "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_3": { "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -151,6 +167,24 @@ "inputs": { "systems": "systems" }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, "locked": { "lastModified": 1731533236, "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", @@ -165,6 +199,27 @@ "type": "github" } }, + "ghostty": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-unstable": "nixpkgs-unstable", + "zig": "zig" + }, + "locked": { + "lastModified": 1737430029, + "narHash": "sha256-z55IQogW9z4HhVeT55LlCUFKbYD5O5aLMnU5cX1WTto=", + "owner": "ghostty-org", + "repo": "ghostty", + "rev": "5cb2fa6f7594202b12a2603bf32094aa75b1bf0e", + "type": "github" + }, + "original": { + "owner": "ghostty-org", + "repo": "ghostty", + "type": "github" + } + }, "git-hooks": { "inputs": { "flake-compat": [ @@ -307,7 +362,7 @@ "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_2", "nixpkgs": [ "nixpkgs" @@ -337,7 +392,7 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2", + "nixpkgs-stable": "nixpkgs-stable_3", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, @@ -454,6 +509,22 @@ } }, "nixpkgs-stable": { + "locked": { + "lastModified": 1733423277, + "narHash": "sha256-TxabjxEgkNbCGFRHgM/b9yZWlBj60gUOUnRT/wbVQR8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e36963a147267afc055f7cf65225958633e536bf", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "release-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { "locked": { "lastModified": 1730741070, "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", @@ -469,7 +540,7 @@ "type": "github" } }, - "nixpkgs-stable_2": { + "nixpkgs-stable_3": { "locked": { "lastModified": 1737299813, "narHash": "sha256-Qw2PwmkXDK8sPQ5YQ/y/icbQ+TYgbxfjhgnkNJyT1X8=", @@ -485,10 +556,26 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1733229606, + "narHash": "sha256-FLYY5M0rpa5C2QAE3CKLYAM6TwbKicdRK6qNrSHlNrE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "566e53c2ad750c84f6d31f9ccb9d00f823165550", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "devshell": "devshell", - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-parts": "flake-parts_3", "git-hooks": "git-hooks", "home-manager": "home-manager_2", @@ -515,7 +602,7 @@ }, "nuschtosSearch": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "ixx": "ixx", "nixpkgs": [ "nixvim", @@ -547,7 +634,7 @@ "lanzaboote", "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { "lastModified": 1731363552, @@ -567,6 +654,7 @@ "inputs": { "disko": "disko", "flake-parts": "flake-parts", + "ghostty": "ghostty", "home-manager": "home-manager", "lanzaboote": "lanzaboote", "niri": "niri", @@ -654,6 +742,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt": { "inputs": { "nixpkgs": [ @@ -727,6 +830,31 @@ "repo": "xwayland-satellite", "type": "github" } + }, + "zig": { + "inputs": { + "flake-compat": [ + "ghostty" + ], + "flake-utils": "flake-utils", + "nixpkgs": [ + "ghostty", + "nixpkgs-stable" + ] + }, + "locked": { + "lastModified": 1717848532, + "narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=", + "owner": "mitchellh", + "repo": "zig-overlay", + "rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43", + "type": "github" + }, + "original": { + "owner": "mitchellh", + "repo": "zig-overlay", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 6942dfe..be9d2a5 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,7 @@ url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; + ghostty.url = "github:ghostty-org/ghostty"; nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR }; diff --git a/home/foot.nix b/home/foot.nix index 2df77bc..ce7cb0c 100644 --- a/home/foot.nix +++ b/home/foot.nix @@ -17,40 +17,32 @@ blink = "yes"; blink-rate = 500; beam-thickness = 1.5; + color = "161821 c6c8d1"; }; mouse = { hide-when-typing = "yes"; }; colors = { - background = "161821"; foreground = "c6c8d1"; - - selection-background = "1e2132"; - selection-foreground = "c6c8d1"; - - regular0 = "161821"; - bright0 = "6b7089"; - + background = "161821"; + regular0 = "1e2132"; regular1 = "e27878"; - bright1 = "e98989"; - regular2 = "b4be82"; - bright2 = "c0ca8e"; - regular3 = "e2a478"; - bright3 = "e9b189"; - regular4 = "84a0c6"; - bright4 = "91acd1"; - regular5 = "a093c7"; - bright5 = "ada0d3"; - regular6 = "89b8c2"; - bright6 = "95c4ce"; - regular7 = "c6c8d1"; + bright0 = "6b7089"; + bright1 = "e98989"; + bright2 = "c0ca8e"; + bright3 = "e9b189"; + bright4 = "91acd1"; + bright5 = "ada0d3"; + bright6 = "95c4ce"; bright7 = "d2d4de"; + selection-foreground = "161821"; + selection-background = "c6c8d1"; }; key-bindings = { diff --git a/home/ghostty.nix b/home/ghostty.nix new file mode 100644 index 0000000..801ca49 --- /dev/null +++ b/home/ghostty.nix @@ -0,0 +1,13 @@ +{ inputs, ... }: { + programs.ghostty = { + enable = true; + package = inputs.ghostty.packages.x86_64-linux.ghostty; + enableZshIntegration = true; + settings = { + theme = "gruvbox-dark"; + font-family = "IBM Plex Mono"; + font-size = "12"; + window-decoration = false; + }; + }; +} diff --git a/home/yt/ytnix.nix b/home/yt/ytnix.nix index 33a4aed..cb0e66d 100644 --- a/home/yt/ytnix.nix +++ b/home/yt/ytnix.nix @@ -8,6 +8,7 @@ ../foot.nix ../niri ../irssi.nix + ../ghostty.nix ]; home = { username = "yt";