mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Modularize flake outputs
This commit is contained in:
parent
9b76581f82
commit
63f79df82b
4 changed files with 64 additions and 45 deletions
52
flake.nix
52
flake.nix
|
|
@ -52,52 +52,14 @@
|
|||
};
|
||||
|
||||
outputs =
|
||||
inputs:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
{ flake-parts, ... }@inputs:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
flake = {
|
||||
nixosConfigurations = {
|
||||
north = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit (inputs) self;
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/north
|
||||
"${inputs.self}/users/seb/@north"
|
||||
];
|
||||
};
|
||||
inspiron = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit (inputs) self;
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/inspiron
|
||||
"${inputs.self}/users/seb/@inspiron"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
devShells.sops = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.sops
|
||||
pkgs.age
|
||||
pkgs.ssh-to-age
|
||||
];
|
||||
};
|
||||
|
||||
formatter =
|
||||
(inputs.treefmt-nix.lib.evalModule pkgs {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt.enable = true;
|
||||
programs.prettier.enable = true;
|
||||
}).config.build.wrapper;
|
||||
};
|
||||
imports = [
|
||||
./flake/nixosConfigurations.nix
|
||||
./flake/devShells.nix
|
||||
./flake/formatter.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue