diff --git a/.github/workflows/flake-check-action.yaml b/.github/workflows/flake-check-action.yaml deleted file mode 100644 index 6517804..0000000 --- a/.github/workflows/flake-check-action.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: "Flake Check Action" -run-name: "nfc" -on: - workflow_dispatch: - push: - pull_request: - types: [ - opened, - edited, - synchronize, - reopened - ] - -jobs: - checker: - runs-on: "ubuntu-latest" - steps: - - name: "Repo checkout" - uses: "actions/checkout@v5" - - name: "Nix Package Manager install" - uses: "DeterminateSystems/nix-installer-action@v16" - - name: "Flake.lock checking" - uses: "DeterminateSystems/flake-checker-action@v5" - - name: "Formatter run" - run: "nix fmt" diff --git a/.github/workflows/flake-update-action.yaml b/.github/workflows/flake-update-action.yaml deleted file mode 100644 index 37dfee4..0000000 --- a/.github/workflows/flake-update-action.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: "Flake Update Action" -run-name: "nfu" -on: - workflow_dispatch: - schedule: - - cron: '0 0 * * 0' - -jobs: - locker: - runs-on: "ubuntu-latest" - steps: - - name: "repo checkout" - uses: "actions/checkout@v4" - - name: "nix install" - uses: "DeterminateSystems/nix-installer-action@v16" - - name: "flake check" - uses: "DeterminateSystems/flake-checker-action@v5" - - name: "flake update" - uses: "DeterminateSystems/update-flake-lock@v24" - with: - pr-title: "Update flake.lock Action" - pr-labels: | - "CI/CD" - "automated" - git-author-name: "John Nix" - git-author-email: "github-actions[bot]@users.noreply.github.com" - git-committer-name: "John Nix" - git-committer-email: "github-actions[bot]@users.noreply.github.com" - pr-assignees: "s0me1newithhand7s" - pr-reviewers: "s0me1newithhand7s" \ No newline at end of file diff --git a/.github/workflows/flake_update.yml b/.github/workflows/flake_update.yml new file mode 100644 index 0000000..cb8bf20 --- /dev/null +++ b/.github/workflows/flake_update.yml @@ -0,0 +1,30 @@ +# This file is automatically generated from Nix configuration. Do not edit directly. + +jobs: + locking: + continue-on-error: false + name: flake.lock update + permissions: write-all + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v6 + - name: nix install + uses: DeterminateSystems/nix-installer-action@v21 + - name: flake.lock check + uses: DeterminateSystems/flake-checker-action@v12 + with: + fail-mode: true + - name: flake.lock update + uses: DeterminateSystems/update-flake-lock@v28 + with: + pr-assignees: s0me1newithhand7s + pr-lables: | + "CI/CD" + pr-reviewers: s0me1newithhand7s + pr-title: Update `flake.lock` GitHub Action +name: flake lock updater +"on": + schedule: + - cron: 0 0 * * * + workflow_dispatch: {} diff --git a/.github/workflows/fmt_run.yml b/.github/workflows/fmt_run.yml new file mode 100644 index 0000000..51cfdb8 --- /dev/null +++ b/.github/workflows/fmt_run.yml @@ -0,0 +1,23 @@ +# This file is automatically generated from Nix configuration. Do not edit directly. + +jobs: + fmt: + continue-on-error: false + permissions: write-all + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v6 + - name: nix install + uses: DeterminateSystems/nix-installer-action@v21 + - name: flake.lock check + uses: DeterminateSystems/flake-checker-action@v12 + with: + fail-mode: true + - name: formatter run + run: | + nix develop -c prek run -a +name: flake_format +"on": + push: {} + workflow_dispatch: {} diff --git a/flake.lock b/flake.lock index f33adfe..4a44f6d 100644 --- a/flake.lock +++ b/flake.lock @@ -695,6 +695,24 @@ } }, "flake-parts_5": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, + "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-parts_6": { "inputs": { "nixpkgs-lib": [ "lanzaboote", @@ -715,7 +733,7 @@ "type": "github" } }, - "flake-parts_6": { + "flake-parts_7": { "inputs": { "nixpkgs-lib": [ "nixos-anywhere", @@ -736,9 +754,9 @@ "type": "github" } }, - "flake-parts_7": { + "flake-parts_8": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_3" + "nixpkgs-lib": "nixpkgs-lib_4" }, "locked": { "lastModified": 1763759067, @@ -754,7 +772,7 @@ "type": "github" } }, - "flake-parts_8": { + "flake-parts_9": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -908,6 +926,25 @@ "type": "github" } }, + "github-actions-nix": { + "inputs": { + "flake-parts": "flake-parts_5", + "nixpkgs": "nixpkgs_9" + }, + "locked": { + "lastModified": 1763847365, + "narHash": "sha256-RVjSCZWzs1nn4k4jf3hj9lhoRKI8S2xc0xMXAz+gTQ8=", + "owner": "synapdeck", + "repo": "github-actions-nix", + "rev": "e941d8dde765b1a860b757e68e814e73a4b1284c", + "type": "github" + }, + "original": { + "owner": "synapdeck", + "repo": "github-actions-nix", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -1216,7 +1253,7 @@ "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", "hyprwire": "hyprwire", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_10", "pre-commit-hooks": "pre-commit-hooks_2", "systems": "systems_4", "xdph": "xdph" @@ -1492,7 +1529,7 @@ "inputs": { "crane": "crane_2", "flake-compat": "flake-compat_7", - "flake-parts": "flake-parts_5", + "flake-parts": "flake-parts_6", "nixpkgs": [ "nixpkgs" ], @@ -1532,7 +1569,7 @@ }, "nekoflake": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1744631782, @@ -1776,11 +1813,11 @@ "nixos-anywhere": { "inputs": { "disko": "disko_2", - "flake-parts": "flake-parts_6", + "flake-parts": "flake-parts_7", "nix-vm-test": "nix-vm-test", "nixos-images": "nixos-images", "nixos-stable": "nixos-stable", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_12", "treefmt-nix": "treefmt-nix_2" }, "locked": { @@ -1800,8 +1837,8 @@ "nixos-cli": { "inputs": { "flake-compat": "flake-compat_8", - "flake-parts": "flake-parts_7", - "nixpkgs": "nixpkgs_12", + "flake-parts": "flake-parts_8", + "nixpkgs": "nixpkgs_13", "optnix": "optnix" }, "locked": { @@ -1883,7 +1920,7 @@ "nixos-wsl": { "inputs": { "flake-compat": "flake-compat_10", - "nixpkgs": "nixpkgs_14" + "nixpkgs": "nixpkgs_15" }, "locked": { "lastModified": 1765841014, @@ -1993,6 +2030,21 @@ "type": "github" } }, + "nixpkgs-lib_4": { + "locked": { + "lastModified": 1761765539, + "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1730741070, @@ -2010,6 +2062,22 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1766070988, + "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c6245e83d836d0433170a16eb185cefe0572f8b8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { "locked": { "lastModified": 1742283249, "narHash": "sha256-hYz59vIFHjPt3l4iaXwCGUPu85EVRomzZRONksMVmgY=", @@ -2024,7 +2092,7 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_12": { "locked": { "lastModified": 1749201760, "narHash": "sha256-LEZbj+VD/AR/dWL5ns1gMwzMvp4mLlv4WalxmZTKy5Y=", @@ -2040,7 +2108,7 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_13": { "locked": { "lastModified": 1764527385, "narHash": "sha256-nA5ywiGKl76atrbdZ5Aucd8SjF/v8ew9b9QsC+MKL14=", @@ -2056,7 +2124,7 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_14": { "locked": { "lastModified": 1759070547, "narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=", @@ -2072,7 +2140,7 @@ "type": "github" } }, - "nixpkgs_14": { + "nixpkgs_15": { "locked": { "lastModified": 1765472234, "narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=", @@ -2088,7 +2156,7 @@ "type": "github" } }, - "nixpkgs_15": { + "nixpkgs_16": { "locked": { "lastModified": 1766902085, "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=", @@ -2104,7 +2172,7 @@ "type": "github" } }, - "nixpkgs_16": { + "nixpkgs_17": { "locked": { "lastModified": 1766840161, "narHash": "sha256-Ss/LHpJJsng8vz1Pe33RSGIWUOcqM1fjrehjUkdrWio=", @@ -2120,7 +2188,7 @@ "type": "github" } }, - "nixpkgs_17": { + "nixpkgs_18": { "locked": { "lastModified": 1764517877, "narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=", @@ -2136,7 +2204,7 @@ "type": "github" } }, - "nixpkgs_18": { + "nixpkgs_19": { "locked": { "lastModified": 1761236834, "narHash": "sha256-+pthv6hrL5VLW2UqPdISGuLiUZ6SnAXdd2DdUE+fV2Q=", @@ -2152,20 +2220,6 @@ "type": "github" } }, - "nixpkgs_19": { - "locked": { - "lastModified": 1682134069, - "narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "fd901ef4bf93499374c5af385b2943f5801c0833", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1766651565, @@ -2182,6 +2236,20 @@ "type": "github" } }, + "nixpkgs_20": { + "locked": { + "lastModified": 1682134069, + "narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fd901ef4bf93499374c5af385b2943f5801c0833", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, "nixpkgs_3": { "locked": { "lastModified": 1764950072, @@ -2280,11 +2348,11 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1766070988, - "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", + "lastModified": 1763678758, + "narHash": "sha256-+hBiJ+kG5IoffUOdlANKFflTT5nO3FrrR2CA3178Y5s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c6245e83d836d0433170a16eb185cefe0572f8b8", + "rev": "117cc7f94e8072499b0a7aa4c52084fa4e11cc9b", "type": "github" }, "original": { @@ -2380,7 +2448,7 @@ "optnix": { "inputs": { "flake-compat": "flake-compat_9", - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_14" }, "locked": { "lastModified": 1765418479, @@ -2502,6 +2570,7 @@ "flake-parts": "flake-parts_4", "freesm": "freesm", "git-hooks-nix": "git-hooks-nix", + "github-actions-nix": "github-actions-nix", "home-manager": "home-manager_3", "homebrew-bundle": "homebrew-bundle", "homebrew-cask": "homebrew-cask", @@ -2517,7 +2586,7 @@ "nixos-cli": "nixos-cli", "nixos-generators": "nixos-generators", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_15", + "nixpkgs": "nixpkgs_16", "noctalia": "noctalia", "quickshell": "quickshell", "sops-nix": "sops-nix", @@ -2609,7 +2678,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_16" + "nixpkgs": "nixpkgs_17" }, "locked": { "lastModified": 1766894905, @@ -2653,9 +2722,9 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_8", + "flake-parts": "flake-parts_9", "gnome-shell": "gnome-shell", - "nixpkgs": "nixpkgs_17", + "nixpkgs": "nixpkgs_18", "nur": "nur", "systems": "systems_6", "tinted-foot": "tinted-foot", @@ -2928,7 +2997,7 @@ }, "treefmt-nix_3": { "inputs": { - "nixpkgs": "nixpkgs_18" + "nixpkgs": "nixpkgs_19" }, "locked": { "lastModified": 1766000401, @@ -2965,7 +3034,7 @@ "vscserver": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_19" + "nixpkgs": "nixpkgs_20" }, "locked": { "lastModified": 1753541826, diff --git a/flake.nix b/flake.nix index 6e35ed2..0ec409b 100644 --- a/flake.nix +++ b/flake.nix @@ -85,6 +85,13 @@ repo = "freesmlauncher"; }; + github-actions-nix = { + flake = true; + type = "github"; + owner = "synapdeck"; + repo = "github-actions-nix"; + }; + git-hooks-nix = { flake = true; type = "github"; @@ -356,6 +363,7 @@ inputs.devenv.flakeModule # i can't really deside between devenv, devshells and devShells they are equally good for me # for now, at least, i'm using numtide/devshells + inputs.github-actions-nix.flakeModule ]; flake = { @@ -637,6 +645,117 @@ ++ config.pre-commit.settings.enabledPackages; }; }; + + # synapdeck/github-actions-nix, declaretive gha + githubActions = { + enable = true; + + workflows = { + "flake_update" = { + name = "flake lock updater"; + on = { + workflowDispatch = {}; + schedule = [ + { + cron = "0 0 * * *"; + } + ]; + }; + + jobs = { + "locking" = { + name = "flake.lock update"; + runsOn = "ubuntu-latest"; + continueOnError = false; + permissions = "write-all"; + steps = [ + { + name = "checkout"; + uses = "actions/checkout@v6"; + } + + { + name = "nix install"; + uses = "DeterminateSystems/nix-installer-action@v21"; + } + + { + name = "flake.lock check"; + uses = "DeterminateSystems/flake-checker-action@v12"; + with_ = { + fail-mode = true; + }; + } + + { + name = "flake.lock update"; + uses = "DeterminateSystems/update-flake-lock@v28"; + with_ = { + pr-title = "Update `flake.lock` GitHub Action"; + pr-assignees = "s0me1newithhand7s"; + pr-reviewers = "s0me1newithhand7s"; + pr-lables = '' + "CI/CD" + ''; + }; + } + ]; + }; + }; + }; + + "fmt_run" = { + name = "flake_format"; + on = { + workflowDispatch = {}; + push = {}; + + workflowDispatch = { + types = [ + "opened" + "edited" + "synchronize" + "reopened" + ]; + }; + }; + + jobs = { + "fmt" = { + runsOn = "ubuntu-latest"; + continueOnError = false; + permissions = "write-all"; + steps = [ + { + name = "checkout"; + uses = "actions/checkout@v6"; + } + + { + name = "nix install"; + uses = "DeterminateSystems/nix-installer-action@v21"; + } + + { + name = "flake.lock check"; + uses = "DeterminateSystems/flake-checker-action@v12"; + with_ = { + fail-mode = true; + }; + } + + { + name = "formatter run"; + run = '' + nix develop -c prek run -a + ''; + } + ]; + }; + }; + }; + }; + }; }; }; }