1
0
Fork 0
mirror of https://git.oat.zone/dark-firepit/dotfiles synced 2024-05-18 01:36:09 +02:00
git.oat.zone--dark-firepit-.../lib/nixos.nix

22 lines
437 B
Nix
Raw Normal View History

2022-01-11 18:44:40 +01:00
{ inputs, lib, pkgs, ... }:
with lib;
{
mkHost = path: attrs@{ system, ... }:
2022-01-11 18:44:40 +01:00
nixosSystem {
inherit system;
specialArgs = { inherit lib inputs system; };
modules = [
{
nixpkgs.pkgs = pkgs;
networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
2022-01-11 18:44:40 +01:00
}
(filterAttrs (n: v: !elem n [ "system" ]) attrs)
2022-01-11 18:44:40 +01:00
../.
2022-01-11 18:44:40 +01:00
(import path)
];
};
}