1
0
Fork 0

Pallas: fixes

This commit is contained in:
Daniel Kempkens 2024-11-08 23:01:20 +01:00
parent cb87e84978
commit e95ac132b7
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
5 changed files with 12 additions and 6 deletions

View file

@ -1,8 +1,11 @@
{ pkgs, lib, config, ... }: args@{ pkgs, lib, config, ... }:
let
secret = import ../../secret/hosts/Pallas.nix;
in
{ {
imports = [ imports = [
#../config/fonts ../config/fonts
../programs/fish.nix ../programs/fish.nix
../programs/nushell.nix ../programs/nushell.nix
@ -29,7 +32,7 @@
../programs/jq.nix ../programs/jq.nix
#(import ../programs/firefox.nix (args // { inherit secret; })) (import ../programs/firefox.nix (args // { inherit secret; }))
../programs/scripts.nix ../programs/scripts.nix

View file

@ -84,8 +84,10 @@ in
switch $os switch $os
case Darwin case Darwin
set -f nix_hostname (scutil --get LocalHostName)
set -f config_dir "$HOME/.config/nixpkgs" set -f config_dir "$HOME/.config/nixpkgs"
case Linux case Linux
set -f nix_hostname (hostname -s)
set -f config_dir /etc/nixos set -f config_dir /etc/nixos
case '*' case '*'
echo "Unsupported OS" echo "Unsupported OS"
@ -100,7 +102,7 @@ in
end end
if test "$other_hostname" = "" if test "$other_hostname" = ""
just deploy-local-machine (hostname -s) just deploy-local-machine "$nix_hostname"
else else
just deploy-remote-machine "$other_hostname" just deploy-remote-machine "$other_hostname"
end end

View file

@ -1,13 +1,14 @@
#!/usr/bin/env fish #!/usr/bin/env fish
set -f nix_os (uname) set -f nix_os (uname)
set -f nix_hostname (hostname -s)
set -f other_hostname $argv[1] set -f other_hostname $argv[1]
switch $nix_os switch $nix_os
case Darwin case Darwin
set -f nix_hostname (scutil --get LocalHostName)
set -f config_dir "$HOME/.config/nixpkgs" set -f config_dir "$HOME/.config/nixpkgs"
case Linux case Linux
set -f nix_hostname (hostname -s)
set -f config_dir /etc/nixos set -f config_dir /etc/nixos
case '*' case '*'
echo "Unsupported OS" echo "Unsupported OS"

Binary file not shown.

View file

@ -7,7 +7,7 @@
current_user="$USER" current_user="$USER"
sudo -H mkdir -p /opt/homebrew/bin 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 sudo -H -u "$current_user" ln -sfn ${lib.getExe pkgs.python3} /opt/homebrew/bin/python3
''; '';