1
0
mirror of https://git.oat.zone/dark-firepit/dotfiles synced 2024-10-05 14:21:51 +02:00
git.oat.zone--dark-firepit-.../lib/nixos.nix
System administrator 9da0a143ae some refactoring
Co-authored-by: Jill Monoids <oatmealine@disroot.org>
2022-09-05 18:27:22 +02:00

22 lines
437 B
Nix

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