feat(flake): move to withSystem & implement defaults system input
This commit is contained in:
parent
2152c91101
commit
f9a2e83e74
4 changed files with 64 additions and 72 deletions
|
|
@ -1,64 +1,66 @@
|
|||
{ inputs, self, ... }:
|
||||
{ inputs, self, withSystem, ... }:
|
||||
|
||||
let
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
inherit (self) keys;
|
||||
|
||||
hm = inputs.home-manager.nixosModules.home-manager;
|
||||
nixarr = inputs.nixarr.nixosModules.default;
|
||||
agenix = inputs.agenix.nixosModules.default;
|
||||
|
||||
nixosModules = "${self}/nixos";
|
||||
hosts = "${self}/hosts";
|
||||
|
||||
specialArgs = {inherit inputs self;};
|
||||
specialArgs = {inherit withSystem keys inputs self;};
|
||||
in
|
||||
|
||||
{
|
||||
flake.nixosConfigurations = {
|
||||
ooksdesk = nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${hosts}/ooksdesk"
|
||||
hm
|
||||
nixosModules
|
||||
];
|
||||
};
|
||||
ookst480s = nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${hosts}/ookst480s"
|
||||
hm
|
||||
nixosModules
|
||||
];
|
||||
};
|
||||
ooksmedia = nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${hosts}/ooksmedia"
|
||||
hm
|
||||
nixosModules
|
||||
nixarr
|
||||
];
|
||||
};
|
||||
ooksmicro = nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${hosts}/ooksmicro"
|
||||
hm
|
||||
nixosModules
|
||||
];
|
||||
};
|
||||
ooksx1 = nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${hosts}/ooksx1"
|
||||
hm
|
||||
nixosModules
|
||||
];
|
||||
};
|
||||
ooksdesk = nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${hosts}/ooksdesk"
|
||||
hm
|
||||
agenix
|
||||
|
||||
nixosModules
|
||||
];
|
||||
};
|
||||
ookst480s = nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${hosts}/ookst480s"
|
||||
hm
|
||||
nixosModules
|
||||
];
|
||||
};
|
||||
ooksmedia = nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${hosts}/ooksmedia"
|
||||
hm
|
||||
nixosModules
|
||||
nixarr
|
||||
];
|
||||
};
|
||||
ooksmicro = nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${hosts}/ooksmicro"
|
||||
hm
|
||||
nixosModules
|
||||
];
|
||||
};
|
||||
ooksx1 = nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${hosts}/ooksx1"
|
||||
hm
|
||||
nixosModules
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
{ pkgs ? (import ./nixpkgs.nix) { } }: {
|
||||
default = pkgs.mkShell {
|
||||
# Enable experimental features without having to specify the argument
|
||||
NIX_CONFIG = "experimental-features = nix-command flakes";
|
||||
nativeBuildInputs = with pkgs; [ nix home-manager git neovim ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue