Adjust the nixPath to better work with nix- tools

This commit is contained in:
Andreas Zweili 2024-04-15 18:55:48 +02:00
parent ab5a4e34c5
commit 9e2e0fbca1
3 changed files with 8 additions and 10 deletions

View File

@ -1,9 +1,4 @@
{ { config, pkgs, ... }:
config,
inputs,
pkgs,
...
}:
{ {
imports = [ ./headless.nix ]; imports = [ ./headless.nix ];
@ -18,7 +13,7 @@
''; '';
sessionPath = [ "$HOME/node_modules/.bin" ]; sessionPath = [ "$HOME/node_modules/.bin" ];
sessionVariables = { sessionVariables = {
NIX_PATH = "nixpkgs=${inputs.nixpkgs}"; NIX_PATH = "nixpkgs=${pkgs.path}";
PATH = "$PATH:$HOME/.local/bin"; PATH = "$PATH:$HOME/.local/bin";
}; };
packages = with pkgs; [ packages = with pkgs; [

View File

@ -5,6 +5,9 @@
pkgs, pkgs,
... ...
}: }:
let
nixPath = "/etc/nixPath";
in
{ {
# The rough location # The rough location
location = { location = {
@ -112,10 +115,10 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHcFlnVRZEjvblLMbQX0W644Rf6oRz9ibUv1uHIZyqNQ andreas@ipad" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHcFlnVRZEjvblLMbQX0W644Rf6oRz9ibUv1uHIZyqNQ andreas@ipad"
]; ];
}; };
systemd.tmpfiles.rules = [ "L+ ${nixPath} - - - - ${pkgs.path}" ];
nix = { nix = {
daemonCPUSchedPolicy = "idle"; daemonCPUSchedPolicy = "idle";
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; nixPath = [ "nixpkgs=${nixPath}" ];
registry = { registry = {
nixpkgs.flake = inputs.nixpkgs; nixpkgs.flake = inputs.nixpkgs;
nix-config.flake = inputs.self; nix-config.flake = inputs.self;

View File

@ -39,7 +39,7 @@ in
credentialsFile = config.age.secrets.atticEnv.path; credentialsFile = config.age.secrets.atticEnv.path;
settings = { settings = {
listen = "[::]:${toString atticPort}"; listen = "[::]:${toString atticPort}";
api-endpoint = "http://management.2li.local/"; api-endpoint = "http://management.2li.local:${toString atticPort}/";
allowed-hosts = [ ]; allowed-hosts = [ ];
storage = { storage = {
type = "local"; type = "local";