From 7f6fc20a8a84eae65189c4000795f4f20ae0bd5d Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 28 Sep 2024 11:03:56 -0400 Subject: [PATCH] nixos/common/ --- nixos/{ => common}/caches/default.nix | 0 nixos/{ => common}/caches/oss.nix | 0 nixos/common/default.nix | 7 +++++++ nixos/{ => common}/nix.nix | 5 ++++- nixos/{self => common}/primary-as-admin.nix | 0 nixos/default.nix | 8 ++------ nixos/{self => }/self-ide.nix | 0 systems/ax41.nix | 3 +-- 8 files changed, 14 insertions(+), 9 deletions(-) rename nixos/{ => common}/caches/default.nix (100%) rename nixos/{ => common}/caches/oss.nix (100%) create mode 100644 nixos/common/default.nix rename nixos/{ => common}/nix.nix (89%) rename nixos/{self => common}/primary-as-admin.nix (100%) rename nixos/{self => }/self-ide.nix (100%) diff --git a/nixos/caches/default.nix b/nixos/common/caches/default.nix similarity index 100% rename from nixos/caches/default.nix rename to nixos/common/caches/default.nix diff --git a/nixos/caches/oss.nix b/nixos/common/caches/oss.nix similarity index 100% rename from nixos/caches/oss.nix rename to nixos/common/caches/oss.nix diff --git a/nixos/common/default.nix b/nixos/common/default.nix new file mode 100644 index 00000000..577a629f --- /dev/null +++ b/nixos/common/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./nix.nix + ./primary-as-admin.nix + ./caches + ]; +} diff --git a/nixos/nix.nix b/nixos/common/nix.nix similarity index 89% rename from nixos/nix.nix rename to nixos/common/nix.nix index f2c091ac..ad3deac5 100644 --- a/nixos/nix.nix +++ b/nixos/common/nix.nix @@ -1,5 +1,8 @@ { flake, pkgs, lib, ... }: +let + inherit (flake.inputs) self; +in { nixpkgs = { config = { @@ -9,7 +12,7 @@ }; overlays = [ flake.inputs.nuenv.overlays.default - (import ../packages/overlay.nix { inherit flake; inherit (pkgs) system; }) + (import "${self}/packages/overlay.nix" { inherit flake; inherit (pkgs) system; }) ]; }; diff --git a/nixos/self/primary-as-admin.nix b/nixos/common/primary-as-admin.nix similarity index 100% rename from nixos/self/primary-as-admin.nix rename to nixos/common/primary-as-admin.nix diff --git a/nixos/default.nix b/nixos/default.nix index 79940c6c..70ddad73 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -6,11 +6,7 @@ nixosModules = { # NixOS modules that are known to work on nix-darwin. # Thsi is shared with nix-darwin/default.nix - common.imports = [ - ./nix.nix - ./caches - ./self/primary-as-admin.nix - ]; + common = ./common; default.imports = [ { @@ -24,7 +20,7 @@ self.nixosModules.common inputs.ragenix.nixosModules.default inputs.github-nix-ci.nixosModules.default - ./self/self-ide.nix + ./self-ide.nix ./current-location.nix ]; }; diff --git a/nixos/self/self-ide.nix b/nixos/self-ide.nix similarity index 100% rename from nixos/self/self-ide.nix rename to nixos/self-ide.nix diff --git a/systems/ax41.nix b/systems/ax41.nix index 65f387eb..9c01a45c 100644 --- a/systems/ax41.nix +++ b/systems/ax41.nix @@ -9,8 +9,7 @@ in inputs.disko.nixosModules.disko self.nixosModules.default "${self}/nixos/disko/trivial.nix" - "${self}/nixos/nix.nix" - "${self}/nixos/self/primary-as-admin.nix" + "${self}/nixos/common/primary-as-admin.nix" "${self}/nixos/docker.nix" "${self}/nixos/actualism-app.nix" "${self}/nixos/hedgedoc.nix"