diff --git a/.github/workflows/build-and-cache.yml b/.github/workflows/build-machines-and-homes.yml similarity index 53% rename from .github/workflows/build-and-cache.yml rename to .github/workflows/build-machines-and-homes.yml index 937167e..f5de126 100644 --- a/.github/workflows/build-and-cache.yml +++ b/.github/workflows/build-machines-and-homes.yml @@ -1,39 +1,9 @@ -name: build and cache random stuff +name: build and cache machines and homes on: workflow_dispatch: push: + pull_request: jobs: - build-packages: - strategy: - matrix: - package: - - github:cything/nixpkgs#hello - os: - - ubuntu-latest - - macos-latest - - runs-on: ${{ matrix.os }} - continue-on-error: true - steps: - - name: Install Nix - uses: cachix/install-nix-action@v30 - - - 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 }} - - - run: nix build -L '${{ matrix.package }}' - build-machines: strategy: matrix: @@ -43,8 +13,6 @@ jobs: - titan os: - ubuntu-latest - # - macos-latest - runs-on: ${{ matrix.os }} continue-on-error: true steps: @@ -59,32 +27,41 @@ jobs: remove-codeql: 'true' remove-docker-images: 'true' build-mount-path: /nix - build-mount-path-ownership: 'root:root' - - - name: Install Nix - uses: cachix/install-nix-action@v30 - - - name: Setup Attic cache - uses: ryanccn/attic-action@v0 + - uses: nixbuild/nix-quick-install-action@master + - name: Sync repository + uses: actions/checkout@v4 with: - endpoint: ${{ vars.ATTIC_ENDPOINT }} - cache: ${{ vars.ATTIC_CACHE }} - token: ${{ secrets.ATTIC_TOKEN }} - + 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: Sync repository - uses: actions/checkout@v4 + - name: Setup Attic cache + uses: ryanccn/attic-action@v0 with: - persist-credentials: false - - - run: nix build -L --accept-flake-config .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel - + 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 .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel build-homes: strategy: matrix: @@ -94,7 +71,6 @@ jobs: os: - ubuntu-latest # - macos-latest - runs-on: ${{ matrix.os }} continue-on-error: true steps: @@ -109,28 +85,38 @@ jobs: remove-codeql: 'true' remove-docker-images: 'true' build-mount-path: /nix - build-mount-path-ownership: 'root:root' - - - name: Install Nix - uses: cachix/install-nix-action@v30 - - - name: Setup Attic cache - uses: ryanccn/attic-action@v0 + - uses: nixbuild/nix-quick-install-action@master + - name: Sync repository + uses: actions/checkout@v4 with: - endpoint: ${{ vars.ATTIC_ENDPOINT }} - cache: ${{ vars.ATTIC_CACHE }} - token: ${{ secrets.ATTIC_TOKEN }} - + 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: Sync repository - uses: actions/checkout@v4 + - name: Setup Attic cache + uses: ryanccn/attic-action@v0 with: - persist-credentials: false - - - run: nix build -L --accept-flake-config .#homeConfigurations."${{ matrix.home }}".activationPackage + 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.home }}-${{ hashFiles('**/*.nix', 'flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.home }}- + # 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 diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml new file mode 100644 index 0000000..4408d30 --- /dev/null +++ b/.github/workflows/build-packages.yml @@ -0,0 +1,59 @@ +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/8929e1256ceec677dd57fce405cdaca23176399b#lact + - ${{ inputs.package }} + 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 }} diff --git a/flake.lock b/flake.lock index d0b4013..9950639 100644 --- a/flake.lock +++ b/flake.lock @@ -207,11 +207,11 @@ "zig": "zig" }, "locked": { - "lastModified": 1737085478, - "narHash": "sha256-EzdUQf1ljtGIWMmscVzoW3rUxxN3UKyNXOXbzUvz3BQ=", + "lastModified": 1737430029, + "narHash": "sha256-z55IQogW9z4HhVeT55LlCUFKbYD5O5aLMnU5cX1WTto=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "72d085525b22d66468c5969a4d507a0fa68d4a04", + "rev": "5cb2fa6f7594202b12a2603bf32094aa75b1bf0e", "type": "github" }, "original": { @@ -297,11 +297,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": { @@ -397,11 +397,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": { @@ -430,11 +430,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": { @@ -466,11 +466,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": { @@ -587,11 +587,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": { @@ -714,11 +714,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": { diff --git a/flake.nix b/flake.nix index f773137..be9d2a5 100644 --- a/flake.nix +++ b/flake.nix @@ -46,11 +46,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; }; @@ -111,7 +115,6 @@ overlays = [ inputs.niri.overlays.niri inputs.rust-overlay.overlays.default - inputs.ghostty.overlays.default ] ++ import ./overlay; }; in 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.*' 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 index f14fc01..801ca49 100644 --- a/home/ghostty.nix +++ b/home/ghostty.nix @@ -1,10 +1,12 @@ -{ ... }: { +{ 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 = 8; + font-size = "12"; window-decoration = false; }; }; 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/niri/default.nix b/home/niri/default.nix index 4e39606..af7b3ba 100644 --- a/home/niri/default.nix +++ b/home/niri/default.nix @@ -6,7 +6,7 @@ }: let wallpaper = "${./nixos-c-book.png}"; - terminal = "ghostty"; + terminal = "foot"; menu = [ "fuzzel" "-w" @@ -32,6 +32,14 @@ in ]; } { command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; } + { + command = [ + "wl-paste" + "--watch" + "cliphist" + "store" + ]; + } ]; hotkey-overlay.skip-at-startup = true; @@ -48,14 +56,15 @@ in environment = { DISPLAY = ":0"; # for xwayland-satellite + ANKI_WAYLAND = "1"; }; 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 f60bdcc..cb0e66d 100644 --- a/home/yt/ytnix.nix +++ b/home/yt/ytnix.nix @@ -7,6 +7,7 @@ ./common.nix ../foot.nix ../niri + ../irssi.nix ../ghostty.nix ]; home = { @@ -41,11 +42,6 @@ }; }; - home.sessionVariables = { - ANKI_WAYLAND = "1"; - DISPLAY = ":0"; - }; - home.packages = with pkgs; [ firefox ungoogled-chromium @@ -103,6 +99,7 @@ seahorse github-cli fuzzel + nixpkgs-review ]; programs.waybar.enable = true; 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 = { 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"; diff --git a/hosts/ytnix/default.nix b/hosts/ytnix/default.nix index 8912c19..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_latest; + kernelPackages = pkgs.linuxKernel.packages.linux_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..be2404e --- /dev/null +++ b/overlay/kernel.nix @@ -0,0 +1,11 @@ +final: prev: +let + inherit (prev) lib; +in +{ + linuxKernels.kernels.linux_zen = prev.linuxKernels.kernels.linux_zen.override (old: { + extraStructuredConfig = with lib.kernel; { + CONFIG_SCHED_MUQSS = yes; + }; + }); +}