Compare commits
No commits in common. "c31b243a1f68eec5e2e4c176c73f2139503cc4b0" and "ac2d57b85cb9e8e54f2a43753e2032d6ce80ccc3" have entirely different histories.
c31b243a1f
...
ac2d57b85c
2 changed files with 55 additions and 25 deletions
27
flake.lock
generated
27
flake.lock
generated
|
@ -1,12 +1,32 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1727826117,
|
||||||
|
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730531603,
|
"lastModified": 1728492678,
|
||||||
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
|
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
|
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -18,6 +38,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
53
flake.nix
53
flake.nix
|
@ -3,35 +3,44 @@
|
||||||
|
|
||||||
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,
|
||||||
nixpkgs,
|
flake-parts,
|
||||||
}: let
|
...
|
||||||
inherit (nixpkgs) lib;
|
} @ inputs:
|
||||||
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
|
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
|
||||||
|
|
||||||
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
|
perSystem = {
|
||||||
|
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;
|
||||||
|
|
||||||
pkgsFor = system: import nixpkgs {inherit system;};
|
formatter = pkgs.alejandra;
|
||||||
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
|
|
||||||
);
|
|
||||||
|
|
||||||
overlays.default = import ./pkgs/all-packages.nix;
|
flake = {
|
||||||
|
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