From e95ac132b75115b8f00df76619e69da9f00576a8 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Fri, 8 Nov 2024 23:01:20 +0100 Subject: [PATCH] Pallas: fixes --- home/hosts/Pallas.nix | 9 ++++++--- home/programs/fish.nix | 4 +++- home/programs/scripts/nixpkgs-switch | 3 ++- secret/hosts/Pallas.nix | Bin 125 -> 125 bytes system/darwin/fake-homebrew.nix | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/home/hosts/Pallas.nix b/home/hosts/Pallas.nix index e950bc3..28bb1be 100644 --- a/home/hosts/Pallas.nix +++ b/home/hosts/Pallas.nix @@ -1,8 +1,11 @@ -{ pkgs, lib, config, ... }: +args@{ pkgs, lib, config, ... }: +let + secret = import ../../secret/hosts/Pallas.nix; +in { imports = [ - #../config/fonts + ../config/fonts ../programs/fish.nix ../programs/nushell.nix @@ -29,7 +32,7 @@ ../programs/jq.nix - #(import ../programs/firefox.nix (args // { inherit secret; })) + (import ../programs/firefox.nix (args // { inherit secret; })) ../programs/scripts.nix diff --git a/home/programs/fish.nix b/home/programs/fish.nix index 602c79a..dc32a26 100644 --- a/home/programs/fish.nix +++ b/home/programs/fish.nix @@ -84,8 +84,10 @@ in switch $os case Darwin + set -f nix_hostname (scutil --get LocalHostName) set -f config_dir "$HOME/.config/nixpkgs" case Linux + set -f nix_hostname (hostname -s) set -f config_dir /etc/nixos case '*' echo "Unsupported OS" @@ -100,7 +102,7 @@ in end if test "$other_hostname" = "" - just deploy-local-machine (hostname -s) + just deploy-local-machine "$nix_hostname" else just deploy-remote-machine "$other_hostname" end diff --git a/home/programs/scripts/nixpkgs-switch b/home/programs/scripts/nixpkgs-switch index a56e263..428f244 100755 --- a/home/programs/scripts/nixpkgs-switch +++ b/home/programs/scripts/nixpkgs-switch @@ -1,13 +1,14 @@ #!/usr/bin/env fish set -f nix_os (uname) -set -f nix_hostname (hostname -s) set -f other_hostname $argv[1] switch $nix_os case Darwin + set -f nix_hostname (scutil --get LocalHostName) set -f config_dir "$HOME/.config/nixpkgs" case Linux + set -f nix_hostname (hostname -s) set -f config_dir /etc/nixos case '*' echo "Unsupported OS" diff --git a/secret/hosts/Pallas.nix b/secret/hosts/Pallas.nix index e0bb4a20eafd791dfa3ff7c26e46c8b736f65328..743a2973379852390d7fb6c790ef8415745dd388 100644 GIT binary patch literal 125 zcmV-@0D}JjM@dveQdv+`0ROC<-g=K(#=lzTs|?GT0Dydur8E51h?|&orUH|zDHbZ{ zS(2f0{HcDx*!?wYWNAT2>#a7#ks`WEA@Syp?*}2{`s855`<4{n7$jp((GTqsV72*` fVt#tlGn(RNx+&x;^u51b5{L=ZHzDR})lR2cdWb+K literal 125 zcmV-@0D}JjM@dveQdv+`0JA>J@+@Kh6{qLl)h9<+;A(ld{fl|9#@rdL7t&RwcY~r5 zust6!kah*cI4uvy1&w*40L?T0pb8bzx&+aQHx=S@!|vqk#9x-zXS!I-Cg5(^G5X>F fxQDm3v4o3X1)35ye6*o#)sgG-CvWTG`Zp$h#793v diff --git a/system/darwin/fake-homebrew.nix b/system/darwin/fake-homebrew.nix index 813f833..fb54919 100644 --- a/system/darwin/fake-homebrew.nix +++ b/system/darwin/fake-homebrew.nix @@ -7,7 +7,7 @@ current_user="$USER" sudo -H mkdir -p /opt/homebrew/bin - sudo -H chown $current_user:staff /opt/homebrew/bin + sudo -H chown "$current_user:staff" /opt/homebrew/bin sudo -H -u "$current_user" ln -sfn ${lib.getExe pkgs.python3} /opt/homebrew/bin/python3 '';