From fa40015d45d721eba1b363fbca3e55881f296b87 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Thu, 28 Sep 2023 03:41:22 +0300 Subject: 2023-09-28 --- modules/common/common/nix/default.nix | 50 ++++++++++++++++-------------- modules/common/profiles/dev/containers.nix | 2 +- modules/common/profiles/dev/default.nix | 7 +++-- 3 files changed, 31 insertions(+), 28 deletions(-) (limited to 'modules/common') diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix index d6cd362..dc99434 100644 --- a/modules/common/common/nix/default.nix +++ b/modules/common/common/nix/default.nix @@ -37,6 +37,7 @@ with lib; { experimental-features = concatStringsSep " " [ "flakes" "nix-command" + "recursive-nix" "repl-flake" ]; @@ -123,30 +124,31 @@ with lib; { ) ]; - environment.systemPackages = with pkgs; - optionals this.isHeadful [ - nix-top - nix-tree - ]; + environment = { + systemPackages = with pkgs; + optionals this.isHeadful [ + nix-top + nix-tree + nixfiles + ]; + variables.NIXFILES = "${config.my.home}/src/nixfiles"; + }; - hm.home.file.".nix-defexpr/default.nix".text = - optionalString this.isHeadful - ( + hm.home.file.".nix-defexpr/default.nix".text = let + hostname = strings.escapeNixIdentifier this.hostname; + in + optionalString this.isHeadful '' let - hostname = strings.escapeNixIdentifier this.hostname; - in '' - let - self = builtins.getFlake "nixfiles"; - configurations = self.nixosConfigurations; - local = configurations.${hostname}; - in rec { - inherit self; - inherit (self) inputs lib; - inherit (lib) my; - this = my.configurations.${hostname}; - inherit (local) config; - inherit (local.config.system.build) toplevel vm vmWithBootLoader manual; - } // configurations // local._module.args - '' - ); + self = builtins.getFlake "nixfiles"; + configurations = self.nixosConfigurations; + local = configurations.${hostname}; + in rec { + inherit self; + inherit (self) inputs lib; + inherit (lib) my; + this = my.configurations.${hostname}; + inherit (local) config; + inherit (local.config.system.build) toplevel vm vmWithBootLoader manual; + } // configurations // local._module.args + ''; } diff --git a/modules/common/profiles/dev/containers.nix b/modules/common/profiles/dev/containers.nix index 06826f9..61a9f09 100644 --- a/modules/common/profiles/dev/containers.nix +++ b/modules/common/profiles/dev/containers.nix @@ -44,7 +44,7 @@ in { kubelogin-oidc kubent kubernetes-helm - kubescape + # kubescape kubeseal kubespy minikube diff --git a/modules/common/profiles/dev/default.nix b/modules/common/profiles/dev/default.nix index 442a03a..4f2a80f 100644 --- a/modules/common/profiles/dev/default.nix +++ b/modules/common/profiles/dev/default.nix @@ -79,13 +79,14 @@ in { }; packages = with pkgs; [ - htmlq - hydra-check - jq nix-index nix-update nixpkgs-review + hydra-check + jq yq + htmlq + sops ]; }; }; -- cgit v1.2.3