feat: drop flake-parts
All checks were successful
Build packages / Build derivations (push) Successful in 2m50s
All checks were successful
Build packages / Build derivations (push) Successful in 2m50s
This commit is contained in:
parent
1f638b9160
commit
c31b243a1f
2 changed files with 22 additions and 52 deletions
21
flake.lock
generated
21
flake.lock
generated
|
@ -1,25 +1,5 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-parts": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730504689,
|
|
||||||
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730531603,
|
"lastModified": 1730531603,
|
||||||
|
@ -38,7 +18,6 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
53
flake.nix
53
flake.nix
|
@ -3,44 +3,35 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
flake-parts = {
|
|
||||||
url = "github:hercules-ci/flake-parts";
|
|
||||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
flake-parts,
|
nixpkgs,
|
||||||
...
|
}: let
|
||||||
} @ inputs:
|
inherit (nixpkgs) lib;
|
||||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
|
||||||
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
|
|
||||||
|
|
||||||
perSystem = {
|
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
system,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# output packages only if they are available on the system
|
|
||||||
packages = let
|
|
||||||
isAvailable = name: drv: lib.meta.availableOn {inherit system;} drv;
|
|
||||||
flakePkgs = self.overlays.default {} pkgs;
|
|
||||||
in
|
|
||||||
lib.filterAttrs isAvailable flakePkgs;
|
|
||||||
|
|
||||||
formatter = pkgs.alejandra;
|
pkgsFor = system: import nixpkgs {inherit system;};
|
||||||
};
|
forEachSystem = lib.genAttrs systems;
|
||||||
|
in {
|
||||||
|
packages = forEachSystem (
|
||||||
|
system: let
|
||||||
|
pkgs = pkgsFor system;
|
||||||
|
isAvailable = name: drv: lib.meta.availableOn {inherit system;} drv;
|
||||||
|
flakePkgs = self.overlays.default {} pkgs;
|
||||||
|
in
|
||||||
|
lib.filterAttrs isAvailable flakePkgs
|
||||||
|
);
|
||||||
|
|
||||||
flake = {
|
overlays.default = import ./pkgs/all-packages.nix;
|
||||||
overlays.default = import ./pkgs/all-packages.nix;
|
|
||||||
|
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
reposilite = import ./modules/reposilite.nix;
|
reposilite = import ./modules/reposilite.nix;
|
||||||
asus-numpad = import ./modules/asus-numpad.nix self;
|
asus-numpad = import ./modules/asus-numpad.nix self;
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
formatter = forEachSystem (system: (pkgsFor system).alejandra);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue