diff --git a/.github/workflows/build-and-cache.yml b/.github/workflows/build-and-cache.yml index aca9d1e..520c77e 100644 --- a/.github/workflows/build-and-cache.yml +++ b/.github/workflows/build-and-cache.yml @@ -3,14 +3,14 @@ on: workflow_dispatch: push: jobs: - build: + build-packages: strategy: matrix: package: - github:cything/nixpkgs/fd06e41125350bc3db5628df49d3b84e4652a59d#lact os: - ubuntu-latest - - macos-latest + # - macos-latest runs-on: ${{ matrix.os }} continue-on-error: true steps: @@ -25,3 +25,82 @@ jobs: cache: ${{ vars.ATTIC_CACHE }} token: ${{ secrets.ATTIC_TOKEN }} - run: nix build -L '${{ matrix.package }}' + build-machines: + strategy: + matrix: + machine: + - chunk + - ytnix + - titan + os: + - ubuntu-latest + # - macos-latest + runs-on: ${{ matrix.os }} + continue-on-error: true + steps: + - name: Maximize build disk space + uses: easimon/maximize-build-space@v10 + with: + overprovision-lvm: true + swap-size-mb: 1024 + remove-dotnet: 'true' + remove-android: 'true' + remove-haskell: 'true' + remove-codeql: 'true' + remove-docker-images: 'true' + build-mount-path: /nix + build-mount-path-ownership: 'root:root' + - 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 }} + - name: Sync repository + uses: actions/checkout@v4 + with: + persist-credentials: false + - run: nix build -L --accept-flake-config .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel + build-homes: + strategy: + matrix: + home: + - yt@ytnix + - yt@chunk + os: + - ubuntu-latest + # - macos-latest + runs-on: ${{ matrix.os }} + continue-on-error: true + steps: + - name: Maximize build disk space + uses: easimon/maximize-build-space@v10 + with: + overprovision-lvm: true + swap-size-mb: 1024 + remove-dotnet: 'true' + remove-android: 'true' + remove-haskell: 'true' + remove-codeql: 'true' + remove-docker-images: 'true' + build-mount-path: /nix + build-mount-path-ownership: 'root:root' + - 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 }} + - name: Sync repository + uses: actions/checkout@v4 + with: + persist-credentials: false + - run: nix build -L --accept-flake-config .#homeConfigurations."${{ matrix.home }}".activationPackage diff --git a/flake.lock b/flake.lock index db6dff3..6ca2dbc 100644 --- a/flake.lock +++ b/flake.lock @@ -1,18 +1,12 @@ { "nodes": { "crane": { - "inputs": { - "nixpkgs": [ - "lanzaboote", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1717535930, - "narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=", + "lastModified": 1731098351, + "narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=", "owner": "ipetkov", "repo": "crane", - "rev": "55e7754ec31dac78980c8be45f8a28e80e370946", + "rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28", "type": "github" }, "original": { @@ -119,11 +113,11 @@ ] }, "locked": { - "lastModified": 1717285511, - "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "lastModified": 1730504689, + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "rev": "506278e768c2a08bec68eb62932193e341f55c90", "type": "github" }, "original": { @@ -157,24 +151,6 @@ "inputs": { "systems": "systems" }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "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=", @@ -266,11 +242,11 @@ ] }, "locked": { - "lastModified": 1737221749, - "narHash": "sha256-igllW0yG+UbetvhT11jnt9RppSHXYgMykYhZJeqfHs0=", + "lastModified": 1737299337, + "narHash": "sha256-0NBrY2A7buujKmeCbieopOMSbLxTu8TFcTLqAbTnQDw=", "owner": "nix-community", "repo": "home-manager", - "rev": "97d7946b5e107dd03cc82f21165251d4e0159655", + "rev": "f8ef4541bb8a54a8b52f19b52912119e689529b3", "type": "github" }, "original": { @@ -333,7 +309,6 @@ "crane": "crane", "flake-compat": "flake-compat", "flake-parts": "flake-parts_2", - "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" ], @@ -341,16 +316,16 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1718178907, - "narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=", + "lastModified": 1737299073, + "narHash": "sha256-hOydnO9trHDo3qURqLSDdmE/pHNWDzlhkmyZ/gcBX2s=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "b627ccd97d0159214cee5c7db1412b75e4be6086", + "rev": "64d20cb2afaad8b73f4e38de41d27fb30a782bb5", "type": "github" }, "original": { "owner": "nix-community", - "ref": "v0.4.1", + "ref": "master", "repo": "lanzaboote", "type": "github" } @@ -367,11 +342,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1737231928, - "narHash": "sha256-eOvFTgpFGP8hy6r3O8Ae5jOGc483l4BszwQsPcccbbs=", + "lastModified": 1737325400, + "narHash": "sha256-B8+1x5rDA9GtzX+LWlceIbLBwncKH5uDrGqEN0EoOQw=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "ca748d585a271a512807cd60e5353a9ddb4d1dee", + "rev": "aad9ae8e2b07ed5d37743f3ae87c42528e2d172c", "type": "github" }, "original": { @@ -436,16 +411,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1737241062, - "narHash": "sha256-GM4ZnlsuJWjk+tbespU/DWQsZ2V0u0CS3Hqg0JGMt5M=", + "lastModified": 1737341811, + "narHash": "sha256-a9UXiYA48ja0cvlHA4bqF0et8+4acJT4YVhLC4/tNag=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b681ff2c9c9163f24ca705d948bb0cee1b3e09f9", + "rev": "63dff148c56cc3168d78edefd1087cc5d6fdda16", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable-small", + "ref": "master", "repo": "nixpkgs", "type": "github" } @@ -480,27 +455,27 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "lastModified": 1730741070, + "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1737165118, - "narHash": "sha256-s40Kk/OulP3J/1JvC3VT16U4r/Xw6Qdi7SRw3LYkPWs=", + "lastModified": 1737299813, + "narHash": "sha256-Qw2PwmkXDK8sPQ5YQ/y/icbQ+TYgbxfjhgnkNJyT1X8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6a3ae7a5a12fb8cac2d59d7df7cbd95f9b2f0566", + "rev": "107d5ef05c0b1119749e381451389eded30fb0d5", "type": "github" }, "original": { @@ -525,11 +500,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1737200978, - "narHash": "sha256-QTUx/F8HVjrRIHQxHKrr72aPMj+cDk18WTbvBCCBBdI=", + "lastModified": 1737308837, + "narHash": "sha256-Sro74XNFgGgIIW4uo/YSVGafZhKnZwPLJNBvMsgpl4k=", "owner": "nix-community", "repo": "nixvim", - "rev": "cbf960e5659054b2ccf27b67218782e69016bef5", + "rev": "8fb2fe22c237b25b8af346870e126fdaeaff688b", "type": "github" }, "original": { @@ -540,7 +515,7 @@ }, "nuschtosSearch": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "ixx": "ixx", "nixpkgs": [ "nixvim", @@ -575,11 +550,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1717664902, - "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", + "lastModified": 1731363552, + "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", + "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", "type": "github" }, "original": { @@ -604,21 +579,17 @@ }, "rust-overlay": { "inputs": { - "flake-utils": [ - "lanzaboote", - "flake-utils" - ], "nixpkgs": [ "lanzaboote", "nixpkgs" ] }, "locked": { - "lastModified": 1717813066, - "narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=", + "lastModified": 1731897198, + "narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465", + "rev": "0be641045af6d8666c11c2c40e45ffc9667839b5", "type": "github" }, "original": { @@ -662,21 +633,6 @@ "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": [ diff --git a/flake.nix b/flake.nix index ca9fcf6..08c8f68 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "cy's flake"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; + nixpkgs.url = "github:nixos/nixpkgs/master"; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -20,7 +20,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; lanzaboote = { - url = "github:nix-community/lanzaboote/v0.4.1"; + url = "github:nix-community/lanzaboote/master"; inputs.nixpkgs.follows = "nixpkgs"; }; nixvim = { @@ -89,7 +89,10 @@ programs.typos.enable = true; programs.shellcheck.enable = true; - settings.global.excludes = [ "secrets/*" ]; + settings.global.excludes = [ + "secrets/*" + "**/*.png" # tries to format a png file?? + ]; }; }; diff --git a/home/niri/default.nix b/home/niri/default.nix index 5071256..22386df 100644 --- a/home/niri/default.nix +++ b/home/niri/default.nix @@ -1,8 +1,17 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let wallpaper = "${./nixos-c-book.png}"; terminal = "foot"; - menu = [ "fuzzel" "-w" "100" ]; + menu = [ + "fuzzel" + "-w" + "100" + ]; browser = "librewolf"; file-manager = "thunar"; clipboard = "cliphist list | ${lib.concatStringsSep " " menu} --dmenu | cliphist decode | wl-copy"; @@ -13,7 +22,15 @@ in input.keyboard.xkb.options = "ctrl:nocaps"; spawn-at-startup = [ { command = [ "${lib.getExe pkgs.waybar}" ]; } - { command = [ "${lib.getExe pkgs.swaybg}" "-m" "fill" "-i" wallpaper ]; } + { + command = [ + "${lib.getExe pkgs.swaybg}" + "-m" + "fill" + "-i" + wallpaper + ]; + } { command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; } ]; hotkey-overlay.skip-at-startup = true; @@ -36,10 +53,10 @@ in layout = { gaps = 4; focus-ring = { - width = 4; - active.color = "#00000055"; - inactive.color = "#505050"; - }; + width = 4; + active.color = "#00000055"; + inactive.color = "#505050"; + }; always-center-single-column = true; border.enable = false; }; @@ -47,25 +64,31 @@ in window-rules = [ { matches = [ - { app-id = "anki"; title = "Add"; } + { + app-id = "anki"; + title = "Add"; + } { app-id = "mpv"; } { app-id = "Bitwarden"; } ]; open-floating = true; } { - matches = [{ app-id = "anki"; }]; + matches = [ { app-id = "anki"; } ]; default-column-width.proportion = .25; } { matches = [ { app-id = "foot"; } - { app-id = "anki"; title = "^Browse"; } + { + app-id = "anki"; + title = "^Browse"; + } ]; default-column-width.proportion = .5; } { - matches = [{ app-id = "librewolf"; }]; + matches = [ { app-id = "librewolf"; } ]; default-column-width.proportion = .75; } ]; @@ -118,6 +141,14 @@ in cooldown-ms = 150; action = focus-column-left; }; + "Mod+Shift+WheelScrollDown" = { + cooldown-ms = 150; + action = focus-workspace-down; + }; + "Mod+Shift+WheelScrollUp" = { + cooldown-ms = 150; + action = focus-workspace-up; + }; "XF86AudioRaiseVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+"; "XF86AudioLowerVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-"; diff --git a/home/yt/ytnix.nix b/home/yt/ytnix.nix index a64bc73..6d34814 100644 --- a/home/yt/ytnix.nix +++ b/home/yt/ytnix.nix @@ -42,6 +42,7 @@ home.sessionVariables = { ANKI_WAYLAND = "1"; + DISPLAY = ":0"; }; home.packages = with pkgs; [