Compare commits
2
Commits
21dbf8d779
...
523aeb3651
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
523aeb3651
|
||
|
|
5fb1b6204a
|
@@ -0,0 +1,35 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
flake:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
accept-flake-config = true
|
||||||
|
|
||||||
|
- name: format
|
||||||
|
run: nix fmt -- --check
|
||||||
|
|
||||||
|
- name: statix
|
||||||
|
run: nix run nixpkgs#statix -- check .
|
||||||
|
|
||||||
|
- name: evaluate all configurations
|
||||||
|
run: nix flake check --no-build --all-systems
|
||||||
|
|
||||||
|
- name: build packages
|
||||||
|
run: nix build --no-link .#heidisql .#aseprite-thumbnailer-kde
|
||||||
|
|
||||||
|
- name: sops manifests
|
||||||
|
run: |
|
||||||
|
for host in nero vergil pdw-frankiel; do
|
||||||
|
nix build --no-link ".#nixosConfigurations.${host}.config.system.build.sops-nix-manifest"
|
||||||
|
done
|
||||||
Generated
+1
-99
@@ -190,22 +190,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_3": {
|
"flake-compat_3": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767039857,
|
|
||||||
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_4": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733328505,
|
"lastModified": 1733328505,
|
||||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||||
@@ -237,24 +221,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1790898470,
|
|
||||||
"narHash": "sha256-zTwuwezD0w3hpga6a6P8emidzAZFyWqlNeRBlpWOOl8=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "024633cd702b10285db5cb19b40ad48d2399ba60",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
@@ -332,31 +298,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"git-hooks_2": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": [
|
|
||||||
"nix-gaming",
|
|
||||||
"flake-compat"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nix-gaming",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1790500375,
|
|
||||||
"narHash": "sha256-XN3sDtn8TU9hAc9xqZ+SqRB/HHm2wjxM6aSWYLJU+oo=",
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "git-hooks.nix",
|
|
||||||
"rev": "a0e4241b51206fbcbf52fd322eb5f0cd80f153c4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "git-hooks.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gitignore": {
|
"gitignore": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -496,29 +437,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-gaming": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat_3",
|
|
||||||
"flake-parts": "flake-parts_2",
|
|
||||||
"git-hooks": "git-hooks_2",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1792469825,
|
|
||||||
"narHash": "sha256-yZzRSNogTrbYjLNHiRMphZGIVcTHbXWSID37oPBbrEw=",
|
|
||||||
"owner": "fufexan",
|
|
||||||
"repo": "nix-gaming",
|
|
||||||
"rev": "0405c59de63e8b74d11dcc420f65ead938ea6ec6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "fufexan",
|
|
||||||
"repo": "nix-gaming",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770073757,
|
"lastModified": 1770073757,
|
||||||
@@ -582,21 +500,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1790477367,
|
|
||||||
"narHash": "sha256-oujbxmVKDhci2E4EM3KyAbRUgp5/IsCoiA/LfEF7OOk=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"rev": "f7cd230690d9fc982d06129f9189b101fddcfa3b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-wine": {
|
"nixpkgs-wine": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735834308,
|
"lastModified": 1735834308,
|
||||||
@@ -615,7 +518,7 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-xr": {
|
"nixpkgs-xr": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_4",
|
"flake-compat": "flake-compat_3",
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@@ -796,7 +699,6 @@
|
|||||||
"millennium": "millennium",
|
"millennium": "millennium",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nix-gaming": "nix-gaming",
|
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"nixpkgs-xr": "nixpkgs-xr",
|
"nixpkgs-xr": "nixpkgs-xr",
|
||||||
"pi": "pi",
|
"pi": "pi",
|
||||||
|
|||||||
@@ -26,11 +26,6 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-gaming = {
|
|
||||||
url = "github:fufexan/nix-gaming";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs-xr = {
|
nixpkgs-xr = {
|
||||||
url = "github:nix-community/nixpkgs-xr";
|
url = "github:nix-community/nixpkgs-xr";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -104,8 +99,56 @@
|
|||||||
trusted-users-configuration = { nix, config, ... }: {
|
trusted-users-configuration = { nix, config, ... }: {
|
||||||
nix.settings.trusted-users = [ config.users.users.frank.name ];
|
nix.settings.trusted-users = [ config.users.users.frank.name ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
|
|
||||||
|
packagesFor =
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
nixpkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||||
|
heidisql = pkgs.callPackage ./packages/heidisql/package.nix { };
|
||||||
|
aseprite-thumbnailer-kde = pkgs.callPackage ./packages/aseprite-thumbnailer-kde/package.nix { };
|
||||||
|
};
|
||||||
|
|
||||||
|
formatterFor =
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
pkgs.writeShellApplication {
|
||||||
|
name = "nixfmt";
|
||||||
|
runtimeInputs = [ pkgs.nixfmt ];
|
||||||
|
text = ''
|
||||||
|
flags=()
|
||||||
|
paths=()
|
||||||
|
for arg in "$@"; do
|
||||||
|
case "$arg" in
|
||||||
|
-*) flags+=("$arg") ;;
|
||||||
|
*) paths+=("$arg") ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [ "''${#paths[@]}" -eq 0 ]; then
|
||||||
|
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||||
|
mapfile -t paths < <(git ls-files '*.nix')
|
||||||
|
else
|
||||||
|
mapfile -t paths < <(find . -name '*.nix' -not -path './.devenv/*')
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
nixfmt "''${flags[@]}" "''${paths[@]}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
packages = forAllSystems packagesFor;
|
||||||
|
|
||||||
|
formatter = forAllSystems formatterFor;
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
nero = nixpkgs.lib.nixosSystem {
|
nero = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
|
|||||||
Reference in New Issue
Block a user