mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-19 21:49:52 -07:00
refactor: use flake-parts for configuration
This commit is contained in:
parent
67590e5cc6
commit
01b1b13b6a
2 changed files with 79 additions and 41 deletions
77
flake.nix
77
flake.nix
|
@ -45,6 +45,8 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
apple-silicon = {
|
||||
url = "github:tpwrules/nixos-apple-silicon";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -82,54 +84,59 @@
|
|||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
inputs@{
|
||||
nixpkgs,
|
||||
nix-darwin,
|
||||
flake-parts,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
in
|
||||
{
|
||||
formatter = with nixpkgs.legacyPackages; {
|
||||
x86_64-linux = x86_64-linux.nixfmt-rfc-style;
|
||||
aarch64-linux = aarch64-linux.nixfmt-rfc-style;
|
||||
aarch64-darwin = aarch64-darwin.nixfmt-rfc-style;
|
||||
};
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
flake = {
|
||||
nixosConfigurations = {
|
||||
demeter = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/demeter
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
demeter = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
callisto = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/callisto
|
||||
];
|
||||
};
|
||||
adrastea = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/adrastea
|
||||
];
|
||||
};
|
||||
modules = [
|
||||
./hosts/demeter
|
||||
];
|
||||
};
|
||||
|
||||
callisto = nixpkgs.lib.nixosSystem {
|
||||
darwinConfigurations.phobos = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/callisto
|
||||
];
|
||||
};
|
||||
adrastea = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/adrastea
|
||||
./hosts/phobos
|
||||
];
|
||||
};
|
||||
};
|
||||
darwinConfigurations.phobos = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
modules = [
|
||||
./hosts/phobos
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue