From a1a485ceb6c42f704cada3a650e39cdb18248a92 Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Sun, 9 Jul 2023 14:48:03 -0400 Subject: [PATCH] Cleanup for macOS --- Makefile | 2 +- flake.lock | 24 ++++---- .../machines}/aether/configuration.nix | 0 .../machines}/aether/nix-ld-config.nix | 0 .../machines}/aether/nixos-wsl/.envrc | 0 .../nixos-wsl/.github/release-drafter.yml | 0 .../nixos-wsl/.github/workflows/main.yml | 0 .../.github/workflows/release-drafter.yml | 0 .../.github/workflows/update-flakes.yml | 0 .../machines}/aether/nixos-wsl/.gitignore | 0 .../machines}/aether/nixos-wsl/LICENSE | 0 .../machines}/aether/nixos-wsl/README.rst | 0 .../machines}/aether/nixos-wsl/default.nix | 0 .../machines}/aether/nixos-wsl/flake.lock | 0 .../machines}/aether/nixos-wsl/flake.nix | 0 .../nixos-wsl/modules/build-tarball.nix | 0 .../nixos-wsl/modules/docker-desktop.nix | 0 .../aether/nixos-wsl/modules/installer.nix | 0 .../aether/nixos-wsl/modules/tailscale.nix | 0 .../aether/nixos-wsl/modules/wsl-distro.nix | 0 .../machines}/aether/nixos-wsl/syschdemd.nix | 0 .../machines}/aether/nixos-wsl/syschdemd.sh | 0 .../machines}/hephaestus/configuration.nix | 0 .../machines}/hephaestus/hardware.nix | 0 .../machines}/zelus/configuration.nix | 0 .../services}/netdata/default.nix | 0 .../services}/netdata/netdata.conf | 0 outputs.nix | 55 +++++++++---------- 28 files changed, 40 insertions(+), 41 deletions(-) rename {machines => modules/machines}/aether/configuration.nix (100%) rename {machines => modules/machines}/aether/nix-ld-config.nix (100%) rename {machines => modules/machines}/aether/nixos-wsl/.envrc (100%) rename {machines => modules/machines}/aether/nixos-wsl/.github/release-drafter.yml (100%) rename {machines => modules/machines}/aether/nixos-wsl/.github/workflows/main.yml (100%) rename {machines => modules/machines}/aether/nixos-wsl/.github/workflows/release-drafter.yml (100%) rename {machines => modules/machines}/aether/nixos-wsl/.github/workflows/update-flakes.yml (100%) rename {machines => modules/machines}/aether/nixos-wsl/.gitignore (100%) rename {machines => modules/machines}/aether/nixos-wsl/LICENSE (100%) rename {machines => modules/machines}/aether/nixos-wsl/README.rst (100%) rename {machines => modules/machines}/aether/nixos-wsl/default.nix (100%) rename {machines => modules/machines}/aether/nixos-wsl/flake.lock (100%) rename {machines => modules/machines}/aether/nixos-wsl/flake.nix (100%) rename {machines => modules/machines}/aether/nixos-wsl/modules/build-tarball.nix (100%) rename {machines => modules/machines}/aether/nixos-wsl/modules/docker-desktop.nix (100%) rename {machines => modules/machines}/aether/nixos-wsl/modules/installer.nix (100%) rename {machines => modules/machines}/aether/nixos-wsl/modules/tailscale.nix (100%) rename {machines => modules/machines}/aether/nixos-wsl/modules/wsl-distro.nix (100%) rename {machines => modules/machines}/aether/nixos-wsl/syschdemd.nix (100%) rename {machines => modules/machines}/aether/nixos-wsl/syschdemd.sh (100%) rename {machines => modules/machines}/hephaestus/configuration.nix (100%) rename {machines => modules/machines}/hephaestus/hardware.nix (100%) rename {machines => modules/machines}/zelus/configuration.nix (100%) rename {services => modules/services}/netdata/default.nix (100%) rename {services => modules/services}/netdata/netdata.conf (100%) diff --git a/Makefile b/Makefile index 52e2626..cfd733c 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ HOSTNAME ?= $(shell hostname) UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) - SWITCH_CMD := nixos-rebuild --use-remote-sudo -I nixos-config="machines/$(HOSTNAME)/configuration.nix" switch --flake '.\#' \ + SWITCH_CMD := nixos-rebuild --use-remote-sudo -I nixos-config="modules/machines/$(HOSTNAME)/configuration.nix" switch --flake '.\#' \ --impure # Impure because of: https://discourse.nixos.org/t/vscode-remote-wsl-extension-works-on-nixos-without-patching-thanks-to-nix-ld/14615 endif ifeq ($(UNAME_S),Darwin) diff --git a/flake.lock b/flake.lock index 9d0492b..8f675c4 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1688898859, - "narHash": "sha256-NjvwXnMp8oMQ86FHVhzlmgGy2dVDMGVLpZ4+YVsJgMU=", + "lastModified": 1688999459, + "narHash": "sha256-b0rFzeHWXGq2rrx+W93I1Lpb0HFq0T5Pfx7QLVcZ/jE=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "66a3047fa88eb6aa5c5a2e675de91f0431fbe561", + "rev": "83620edf499ba8033ad43d4f5edc50fdf3eeee5f", "type": "github" }, "original": { @@ -61,11 +61,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1688798314, - "narHash": "sha256-MFG5rx7L756rtrPHsL662m64AZ4sKqUcApaiYgSKfNM=", + "lastModified": 1689060619, + "narHash": "sha256-vODUkZLWFVCvo1KPK3dC2CbXjxa9antEn5ozwlcTr48=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "47dca15d86fdd2eabcf434d7cc0b5baa8d1a463c", + "rev": "44bc025007e5fcc10dbc3d9f96dcbf06fc0e8c1c", "type": "github" }, "original": { @@ -91,11 +91,11 @@ }, "nixpkgs-latest": { "locked": { - "lastModified": 1688918189, - "narHash": "sha256-f8ZlJ67LgEUDnN7ZsAyd1/Fyby1VdOXWg4XY/irSGrQ=", + "lastModified": 1689063170, + "narHash": "sha256-3UZHKrY2WYFlHFRFzvajea4yGLmyWgNhXbAyA24eaMY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "408c0e8c15a1c9cf5c3226931b6f283c9867c484", + "rev": "065b7e7ba66d5822d7ddd94b5d9553bea93accef", "type": "github" }, "original": { @@ -107,11 +107,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1688868408, - "narHash": "sha256-RR9N5XTAxSBhK8MCvLq9uxfdkd7etC//seVXldy0k48=", + "lastModified": 1688939073, + "narHash": "sha256-jYhYjeK5s6k8QS3i+ovq9VZqBJaWbxm7awTKNhHL9d0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "510d721ce097150ae3b80f84b04b13b039186571", + "rev": "8df7a67abaf8aefc8a2839e0b48f92fdcf69a38b", "type": "github" }, "original": { diff --git a/machines/aether/configuration.nix b/modules/machines/aether/configuration.nix similarity index 100% rename from machines/aether/configuration.nix rename to modules/machines/aether/configuration.nix diff --git a/machines/aether/nix-ld-config.nix b/modules/machines/aether/nix-ld-config.nix similarity index 100% rename from machines/aether/nix-ld-config.nix rename to modules/machines/aether/nix-ld-config.nix diff --git a/machines/aether/nixos-wsl/.envrc b/modules/machines/aether/nixos-wsl/.envrc similarity index 100% rename from machines/aether/nixos-wsl/.envrc rename to modules/machines/aether/nixos-wsl/.envrc diff --git a/machines/aether/nixos-wsl/.github/release-drafter.yml b/modules/machines/aether/nixos-wsl/.github/release-drafter.yml similarity index 100% rename from machines/aether/nixos-wsl/.github/release-drafter.yml rename to modules/machines/aether/nixos-wsl/.github/release-drafter.yml diff --git a/machines/aether/nixos-wsl/.github/workflows/main.yml b/modules/machines/aether/nixos-wsl/.github/workflows/main.yml similarity index 100% rename from machines/aether/nixos-wsl/.github/workflows/main.yml rename to modules/machines/aether/nixos-wsl/.github/workflows/main.yml diff --git a/machines/aether/nixos-wsl/.github/workflows/release-drafter.yml b/modules/machines/aether/nixos-wsl/.github/workflows/release-drafter.yml similarity index 100% rename from machines/aether/nixos-wsl/.github/workflows/release-drafter.yml rename to modules/machines/aether/nixos-wsl/.github/workflows/release-drafter.yml diff --git a/machines/aether/nixos-wsl/.github/workflows/update-flakes.yml b/modules/machines/aether/nixos-wsl/.github/workflows/update-flakes.yml similarity index 100% rename from machines/aether/nixos-wsl/.github/workflows/update-flakes.yml rename to modules/machines/aether/nixos-wsl/.github/workflows/update-flakes.yml diff --git a/machines/aether/nixos-wsl/.gitignore b/modules/machines/aether/nixos-wsl/.gitignore similarity index 100% rename from machines/aether/nixos-wsl/.gitignore rename to modules/machines/aether/nixos-wsl/.gitignore diff --git a/machines/aether/nixos-wsl/LICENSE b/modules/machines/aether/nixos-wsl/LICENSE similarity index 100% rename from machines/aether/nixos-wsl/LICENSE rename to modules/machines/aether/nixos-wsl/LICENSE diff --git a/machines/aether/nixos-wsl/README.rst b/modules/machines/aether/nixos-wsl/README.rst similarity index 100% rename from machines/aether/nixos-wsl/README.rst rename to modules/machines/aether/nixos-wsl/README.rst diff --git a/machines/aether/nixos-wsl/default.nix b/modules/machines/aether/nixos-wsl/default.nix similarity index 100% rename from machines/aether/nixos-wsl/default.nix rename to modules/machines/aether/nixos-wsl/default.nix diff --git a/machines/aether/nixos-wsl/flake.lock b/modules/machines/aether/nixos-wsl/flake.lock similarity index 100% rename from machines/aether/nixos-wsl/flake.lock rename to modules/machines/aether/nixos-wsl/flake.lock diff --git a/machines/aether/nixos-wsl/flake.nix b/modules/machines/aether/nixos-wsl/flake.nix similarity index 100% rename from machines/aether/nixos-wsl/flake.nix rename to modules/machines/aether/nixos-wsl/flake.nix diff --git a/machines/aether/nixos-wsl/modules/build-tarball.nix b/modules/machines/aether/nixos-wsl/modules/build-tarball.nix similarity index 100% rename from machines/aether/nixos-wsl/modules/build-tarball.nix rename to modules/machines/aether/nixos-wsl/modules/build-tarball.nix diff --git a/machines/aether/nixos-wsl/modules/docker-desktop.nix b/modules/machines/aether/nixos-wsl/modules/docker-desktop.nix similarity index 100% rename from machines/aether/nixos-wsl/modules/docker-desktop.nix rename to modules/machines/aether/nixos-wsl/modules/docker-desktop.nix diff --git a/machines/aether/nixos-wsl/modules/installer.nix b/modules/machines/aether/nixos-wsl/modules/installer.nix similarity index 100% rename from machines/aether/nixos-wsl/modules/installer.nix rename to modules/machines/aether/nixos-wsl/modules/installer.nix diff --git a/machines/aether/nixos-wsl/modules/tailscale.nix b/modules/machines/aether/nixos-wsl/modules/tailscale.nix similarity index 100% rename from machines/aether/nixos-wsl/modules/tailscale.nix rename to modules/machines/aether/nixos-wsl/modules/tailscale.nix diff --git a/machines/aether/nixos-wsl/modules/wsl-distro.nix b/modules/machines/aether/nixos-wsl/modules/wsl-distro.nix similarity index 100% rename from machines/aether/nixos-wsl/modules/wsl-distro.nix rename to modules/machines/aether/nixos-wsl/modules/wsl-distro.nix diff --git a/machines/aether/nixos-wsl/syschdemd.nix b/modules/machines/aether/nixos-wsl/syschdemd.nix similarity index 100% rename from machines/aether/nixos-wsl/syschdemd.nix rename to modules/machines/aether/nixos-wsl/syschdemd.nix diff --git a/machines/aether/nixos-wsl/syschdemd.sh b/modules/machines/aether/nixos-wsl/syschdemd.sh similarity index 100% rename from machines/aether/nixos-wsl/syschdemd.sh rename to modules/machines/aether/nixos-wsl/syschdemd.sh diff --git a/machines/hephaestus/configuration.nix b/modules/machines/hephaestus/configuration.nix similarity index 100% rename from machines/hephaestus/configuration.nix rename to modules/machines/hephaestus/configuration.nix diff --git a/machines/hephaestus/hardware.nix b/modules/machines/hephaestus/hardware.nix similarity index 100% rename from machines/hephaestus/hardware.nix rename to modules/machines/hephaestus/hardware.nix diff --git a/machines/zelus/configuration.nix b/modules/machines/zelus/configuration.nix similarity index 100% rename from machines/zelus/configuration.nix rename to modules/machines/zelus/configuration.nix diff --git a/services/netdata/default.nix b/modules/services/netdata/default.nix similarity index 100% rename from services/netdata/default.nix rename to modules/services/netdata/default.nix diff --git a/services/netdata/netdata.conf b/modules/services/netdata/netdata.conf similarity index 100% rename from services/netdata/netdata.conf rename to modules/services/netdata/netdata.conf diff --git a/outputs.nix b/outputs.nix index b90544f..6c898d6 100644 --- a/outputs.nix +++ b/outputs.nix @@ -64,15 +64,15 @@ ./modules/common/printing.nix ./modules/packages/linux-desktop.nix ./modules/packages/linux.nix - ./services/netdata/default.nix + ./modules/services/netdata/default.nix ]; in { hephaestus = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./machines/hephaestus/configuration.nix - ./machines/hephaestus/hardware.nix + ./modules/machines/hephaestus/configuration.nix + ./modules/machines/hephaestus/hardware.nix ] ++ defaultModules ++ desktopLinuxModules; @@ -81,39 +81,38 @@ system = "x86_64-linux"; modules = [ - ./machines/aether/configuration.nix + ./modules/machines/aether/configuration.nix nix-ld.nixosModules.nix-ld ] ++ defaultModules; }; + }; - darwinConfigurations = { - zelus = darwin.lib.darwinSystem { - system = "aarch64-darwin"; + darwinConfigurations = { + zelus = darwin.lib.darwinSystem { + system = "aarch64-darwin"; - modules = [ - home-manager.darwinModules.home-manager - ./modules/common/darwin.nix - ./modules/packages/common.nix + modules = [ + home-manager.darwinModules.home-manager + ./modules/common/darwin.nix + ./modules/packages/common.nix + ./modules/machines/zelus/configuration.nix + ./modules/darwin/default.nix + ./modules/upgrade-diff.nix - ./machines/zelus/configuration.nix - - ./modules/darwin/default.nix - - ({config, ...}: { - config = { - nixpkgs.overlays = [ - (import ./modules/overlays) - ]; - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users."dave.gallant".imports = [./home/default.nix]; - }; + ({config, ...}: { + config = { + nixpkgs.overlays = [ + (import ./modules/overlays) + ]; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users."dave.gallant".imports = [./home/default.nix]; }; - }) - ]; - }; + }; + }) + ]; }; }; }