From cb0499cb0941a9d1739393bb03e103b7265dfb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Sun, 13 Aug 2023 00:28:29 +0200 Subject: [PATCH] refactor: move host configs to hosts/ --- flake.nix | 6 +-- home-pc.nix => hosts/home-pc.nix | 34 ++++++++--------- home-server.nix => hosts/home-server.nix | 48 ++++++++++++------------ work-pc.nix => hosts/work-pc.nix | 16 ++++---- 4 files changed, 52 insertions(+), 52 deletions(-) rename home-pc.nix => hosts/home-pc.nix (67%) rename home-server.nix => hosts/home-server.nix (81%) rename work-pc.nix => hosts/work-pc.nix (76%) diff --git a/flake.nix b/flake.nix index b9b8da6..c923964 100644 --- a/flake.nix +++ b/flake.nix @@ -121,7 +121,7 @@ nixos-hardware.nixosModules.common-gpu-amd (lib.createSystem "home-pc" { hardwareConfig = ./hardware/home-pc.nix; - config = ./home-pc.nix; + config = ./hosts/home-pc.nix; }) lib.createMediaGroup (lib.createUser "felschr" { @@ -145,7 +145,7 @@ nixos-hardware.nixosModules.common-cpu-intel (lib.createSystem "pilot1" { hardwareConfig = ./hardware/pilot1.nix; - config = ./work-pc.nix; + config = ./hosts/work-pc.nix; }) (lib.createUser "felschr" { user.extraGroups = [ "wheel" "audio" "disk" ]; @@ -164,7 +164,7 @@ nixos-hardware.nixosModules.common-cpu-intel-kaby-lake (lib.createSystem "home-server" { hardwareConfig = ./hardware/lattepanda.nix; - config = ./home-server.nix; + config = ./hosts/home-server.nix; }) lib.createMediaGroup (lib.createUser "felschr" { diff --git a/home-pc.nix b/hosts/home-pc.nix similarity index 67% rename from home-pc.nix rename to hosts/home-pc.nix index 12bb9b2..cdad54e 100644 --- a/home-pc.nix +++ b/hosts/home-pc.nix @@ -1,23 +1,23 @@ -{ config, pkgs, ... }: +{ ... }: { imports = [ - ./hardware/base.nix - ./hardware/gpu-amd.nix - ./hardware/bluetooth.nix - ./hardware/xbox.nix - ./hardware/steam.nix - ./hardware/ledger.nix - ./system/desktop.nix - ./system/printing/home.nix - ./system/gaming.nix - ./desktop - ./virtualisation/libvirt.nix - ./virtualisation/podman.nix - ./modules/systemdNotify.nix - ./services/samba/home-pc.nix - ./services/restic/home-pc.nix - ./services/pcscd.nix + ../hardware/base.nix + ../hardware/gpu-amd.nix + ../hardware/bluetooth.nix + ../hardware/xbox.nix + ../hardware/steam.nix + ../hardware/ledger.nix + ../system/desktop.nix + ../system/printing/home.nix + ../system/gaming.nix + ../desktop + ../virtualisation/libvirt.nix + ../virtualisation/podman.nix + ../modules/systemdNotify.nix + ../services/samba/home-pc.nix + ../services/restic/home-pc.nix + ../services/pcscd.nix ]; nixpkgs.config.allowUnfree = true; diff --git a/home-server.nix b/hosts/home-server.nix similarity index 81% rename from home-server.nix rename to hosts/home-server.nix index 37adc8f..643c907 100644 --- a/home-server.nix +++ b/hosts/home-server.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, pkgs, ... }: let # mkdir /etc/secrets/initrd -p @@ -10,31 +10,31 @@ let }]; in with builtins; { imports = [ - ./hardware/base.nix - ./hardware/gpu-intel.nix - ./desktop/x11.nix - ./system/server.nix - ./modules/systemdNotify.nix - ./services/mail.nix - ./services/restic/home-server.nix - ./services/samba/home-server.nix - # ./services/kodi.nix - ./services/jellyfin.nix - ./services/etebase.nix - ./services/website.nix - ./services/wkd.nix - ./services/home-assistant - ./services/matrix - ./services/immich.nix - ./services/miniflux.nix - ./services/paperless.nix - ./services/nextcloud.nix - ./services/calibre-web.nix - ./services/focalboard.nix + ../hardware/base.nix + ../hardware/gpu-intel.nix + ../desktop/x11.nix + ../system/server.nix + ../modules/systemdNotify.nix + ../services/mail.nix + ../services/restic/home-server.nix + ../services/samba/home-server.nix + # ../services/kodi.nix + ../services/jellyfin.nix + ../services/etebase.nix + ../services/website.nix + ../services/wkd.nix + ../services/home-assistant + ../services/matrix + ../services/immich.nix + ../services/miniflux.nix + ../services/paperless.nix + ../services/nextcloud.nix + ../services/calibre-web.nix + ../services/focalboard.nix ]; - age.secrets.cloudflare.file = ./secrets/cloudflare.age; - age.secrets.hostKey.file = ./secrets/home-server/hostKey.age; + age.secrets.cloudflare.file = ../secrets/cloudflare.age; + age.secrets.hostKey.file = ../secrets/home-server/hostKey.age; nixpkgs.config.allowUnfree = true; diff --git a/work-pc.nix b/hosts/work-pc.nix similarity index 76% rename from work-pc.nix rename to hosts/work-pc.nix index 9e9b6d2..edf541a 100644 --- a/work-pc.nix +++ b/hosts/work-pc.nix @@ -1,14 +1,14 @@ -{ config, pkgs, ... }: +{ ... }: { imports = [ - ./hardware/base.nix - ./hardware/gpu-intel.nix - ./hardware/bluetooth.nix - ./system/desktop.nix - ./system/printing/home.nix - ./desktop - ./virtualisation/podman.nix + ../hardware/base.nix + ../hardware/gpu-intel.nix + ../hardware/bluetooth.nix + ../system/desktop.nix + ../system/printing/home.nix + ../desktop + ../virtualisation/podman.nix ]; # replace with regenerated hardware-configuration.nix