summaryrefslogtreecommitdiff
path: root/util/host.nix
diff options
context:
space:
mode:
Diffstat (limited to 'util/host.nix')
-rw-r--r--util/host.nix48
1 files changed, 0 insertions, 48 deletions
diff --git a/util/host.nix b/util/host.nix
deleted file mode 100644
index a8af69f..0000000
--- a/util/host.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- inputs,
- mapFilterDirs,
-}: rec {
- mkHost = {
- name,
- modules,
- specialArgs ? {},
- system ? "x86_64-linux",
- stateVersion ? "22.11",
- pkgs,
- }:
- with pkgs.lib;
- nixosSystem {
- inherit system specialArgs;
- modules =
- [
- ../profiles/base
- ../profiles/nixos
- ../hosts/${name}
-
- {
- system.stateVersion = stateVersion;
- networking.hostName = mkDefault name;
- nixpkgs = {
- overlays = with inputs; [nur.overlay getchoo.overlays.default];
- config = {
- allowUnfree = true;
- allowUnsupportedSystem = true;
- };
- };
- nix.registry.getchoo.flake = inputs.getchoo;
- }
- ]
- ++ modules;
- };
-
- mapHosts = hosts:
- mapFilterDirs ../hosts (n: v: v == "directory" && n != "turret") (name: _:
- mkHost {
- inherit name;
- inherit (hosts.${name}) modules system stateVersion pkgs;
- specialArgs =
- if builtins.hasAttr "specialArgs" hosts.${name}
- then hosts.${name}.specialArgs
- else {};
- });
-}