Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Migrate from niv to npnis #124

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: niv-update
name: npins-update
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
niv-update:
npins-update:
runs-on: ubuntu-latest
steps:
- name: Get date
run: echo "BRANCH_NAME=niv-update-$(date +'%Y-%m-%dT%H%M%S')" >> $GITHUB_ENV
run: echo "BRANCH_NAME=npins-update-$(date +'%Y-%m-%dT%H%M%S')" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
Expand All @@ -19,13 +19,13 @@ jobs:
with:
name: rosuavio-personal
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix-shell --run "niv update"
- run: nix-shell --run "npins update"
- run: |
git --version
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git checkout -b $BRANCH_NAME
git commit -am "niv update"
git commit -am "npins update"
git push -u origin $BRANCH_NAME
# Fallowing https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens
# I would like to not depend on anything here
Expand All @@ -41,7 +41,7 @@ jobs:
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
- name: create pull request
run: |
PR=$(gh pr create -B main -H $BRANCH_NAME --title "niv update" --body "Update nix dependencies with niv")
PR=$(gh pr create -B main -H $BRANCH_NAME --title "npins update" --body "Update nix dependencies with npins")
gh pr merge $PR -d --rebase --auto
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ nixos typically provides.

To use the modules import `./module/`

> NOTE: You can use this repo as a derivation using niv, nix-thunk and the like.
> NOTE: You can use this repo as a derivation using npins, nix-thunk and the like.
8 changes: 4 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ sources ? import ./nix/sources.nix
{ sources ? import ./npins
, nixpkgs ? sources."nixos-23.05"
, ...
}:
Expand Down Expand Up @@ -52,18 +52,18 @@ in
statix.enable = true;
deadnix = {
enable = true;
excludes = [ "^nix\\/.*$" ];
excludes = [ "^npnis\\/.*$" ];
};
nixpkgs-fmt = {
enable = true;
excludes = [ "^nix\\/.*$" ];
excludes = [ "^npnis\\/.*$" ];
};
markdownlint.enable = true;
typos.enable = true;
};

settings = {
statix.ignore = [ "nix/**" ];
statix.ignore = [ "npins/**" ];
};
};
}
2 changes: 1 addition & 1 deletion module/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
let
cfg = config;

sources = import ../nix/sources.nix;
sources = import ../npins;
lanzaboote = import sources.lanzaboote;

inherit (sources) impermanence;
Expand Down
2 changes: 1 addition & 1 deletion module/polaris.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ pkgs, ... }:
let
sources = import ../nix/sources.nix;
sources = import ../npins;

hostName = "polaris";

Expand Down
2 changes: 1 addition & 1 deletion module/pulsar.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ pkgs, ... }:
let
sources = import ../nix/sources.nix;
sources = import ../npins;

inherit (sources) nixos-hardware;
in
Expand Down
74 changes: 0 additions & 74 deletions nix/sources.json

This file was deleted.

198 changes: 0 additions & 198 deletions nix/sources.nix

This file was deleted.

Loading