From 9e2e0fbca14d2e1932187ec262084376cc309dde Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 15 Apr 2024 18:55:48 +0200 Subject: [PATCH] Adjust the nixPath to better work with nix- tools --- home-manager/profiles/work-wsl.nix | 9 ++------- modules/misc/common/default.nix | 7 +++++-- modules/services/attic/default.nix | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/home-manager/profiles/work-wsl.nix b/home-manager/profiles/work-wsl.nix index a1585f9..fec8d23 100644 --- a/home-manager/profiles/work-wsl.nix +++ b/home-manager/profiles/work-wsl.nix @@ -1,9 +1,4 @@ -{ - config, - inputs, - pkgs, - ... -}: +{ config, pkgs, ... }: { imports = [ ./headless.nix ]; @@ -18,7 +13,7 @@ ''; sessionPath = [ "$HOME/node_modules/.bin" ]; sessionVariables = { - NIX_PATH = "nixpkgs=${inputs.nixpkgs}"; + NIX_PATH = "nixpkgs=${pkgs.path}"; PATH = "$PATH:$HOME/.local/bin"; }; packages = with pkgs; [ diff --git a/modules/misc/common/default.nix b/modules/misc/common/default.nix index 41dad95..169151d 100644 --- a/modules/misc/common/default.nix +++ b/modules/misc/common/default.nix @@ -5,6 +5,9 @@ pkgs, ... }: +let + nixPath = "/etc/nixPath"; +in { # The rough location location = { @@ -112,10 +115,10 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHcFlnVRZEjvblLMbQX0W644Rf6oRz9ibUv1uHIZyqNQ andreas@ipad" ]; }; - + systemd.tmpfiles.rules = [ "L+ ${nixPath} - - - - ${pkgs.path}" ]; nix = { daemonCPUSchedPolicy = "idle"; - nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; + nixPath = [ "nixpkgs=${nixPath}" ]; registry = { nixpkgs.flake = inputs.nixpkgs; nix-config.flake = inputs.self; diff --git a/modules/services/attic/default.nix b/modules/services/attic/default.nix index 16725f0..294424d 100644 --- a/modules/services/attic/default.nix +++ b/modules/services/attic/default.nix @@ -39,7 +39,7 @@ in credentialsFile = config.age.secrets.atticEnv.path; settings = { listen = "[::]:${toString atticPort}"; - api-endpoint = "http://management.2li.local/"; + api-endpoint = "http://management.2li.local:${toString atticPort}/"; allowed-hosts = [ ]; storage = { type = "local";