diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-09-21 17:22:11 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-09-22 00:18:59 +0200 |
commit | fcf6b18857fa8cfe618aac31c502576fa9475309 (patch) | |
tree | 2dce8e5702d98256f61391f31488fc71db1a22f8 /hosts | |
parent | mkHost: Add extraOverlays argument (diff) | |
download | nixos-config-fcf6b18857fa8cfe618aac31c502576fa9475309.tar.gz nixos-config-fcf6b18857fa8cfe618aac31c502576fa9475309.tar.bz2 nixos-config-fcf6b18857fa8cfe618aac31c502576fa9475309.zip |
Move hosts declaration to flake.nix
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/default.nix | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/hosts/default.nix b/hosts/default.nix index 7ddb3ad..6be70b0 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,20 +1,5 @@ -{ lib, inputs, extraModules, isNixOS, isIso, isHardware, user, nixpkgs, home-manager, ... }: +{ lib, inputs, secrets, dotfiles, hosts, hardwares, extraModules, isNixOS, isIso, isHardware, user, nixpkgs, home-manager, ... }: let - secrets = import ../secrets; - - dotfiles = ../dotfiles; - - hosts = [ - { host = "phobos"; system = "x86_64-linux"; extraOverlays = [ ]; timezone = secrets.main_timezone; location = secrets.main_location; } - { host = "luna"; system = "x86_64-linux"; extraOverlays = [ ]; timezone = secrets.main_timezone; location = secrets.main_location; } - ]; - - hardwares = [ - { hardware = "laptop"; } - { hardware = "chromebook"; } - { hardware = "virtualbox"; } - ]; - mkHost = { host, hardware, system, timezone, location, extraOverlays }: extraModules: isNixOS: isIso: isHardware: let pkgs = import nixpkgs { @@ -29,7 +14,9 @@ let (import ../overlays) ] ++ extraOverlays; }; + extraArgs = { inherit pkgs inputs isIso isHardware user secrets dotfiles timezone location; hostname = host; }; + extraSpecialModules = extraModules ++ lib.optional isHardware ../hardware/${hardware} ++ lib.optional isIso "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"; in if isNixOS |