From 73f1fd051b61c2fe36fee87dabbad5b54da23283 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sun, 25 Feb 2024 21:26:02 +0100 Subject: [PATCH] lkdsalkjdsalkj --- hardware/gpu/cuda.nix | 11 +++++------ hosts/hasselknippe/default.nix | 2 +- hosts/sopp/default.nix | 2 +- justfile | 5 +++++ pkgs/mk-nspawn-deployer/setup-nspawn.sh | 2 +- users/pbsds/home/default.nix | 1 + users/pbsds/home/profiles/git.nix | 1 + users/pbsds/home/profiles/xdg-ninja.nix | 22 ++++++++++++++++++++++ 8 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 users/pbsds/home/profiles/xdg-ninja.nix diff --git a/hardware/gpu/cuda.nix b/hardware/gpu/cuda.nix index f9483c9..bfeb56a 100644 --- a/hardware/gpu/cuda.nix +++ b/hardware/gpu/cuda.nix @@ -43,11 +43,10 @@ #}; - environment.systemPackages = with pkgs; ([ - nvtop-nvidia - + environment.systemPackages = [ + pkgs.nvtop-nvidia ] ++ lib.optionals config.hardware.nvidia.prime.offload.enable [ - (writeShellScriptBin "prime-run" '' + (pkgs.writeShellScriptBin "prime-run" '' export __NV_PRIME_RENDER_OFFLOAD=1 export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 export __GLX_VENDOR_LIBRARY_NAME=nvidia @@ -55,14 +54,14 @@ exec "$@" '') # already added by nixos-hardware.common-gpu-nvidia - #(writeShellScriptBin "nvidia-offload" '' + #(pkgs.writeShellScriptBin "nvidia-offload" '' # export __NV_PRIME_RENDER_OFFLOAD=1 # export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 # export __GLX_VENDOR_LIBRARY_NAME=nvidia # export __VK_LAYER_NV_optimus=NVIDIA_only # exec "$@" #'') - ]); + ]; # nvidia bad nixpkgs.config.packageOverrides = (pkgs: { diff --git a/hosts/hasselknippe/default.nix b/hosts/hasselknippe/default.nix index 67eb486..78e1b31 100644 --- a/hosts/hasselknippe/default.nix +++ b/hosts/hasselknippe/default.nix @@ -11,7 +11,7 @@ systemd.services."autovt@tty1".enable = false; imports = [ - ./hardware-configuration.nix + #./hardware-configuration.nix ../../profiles/auto-upgrade.nix ../../profiles/upgrade-diff.nix #../../profiles/sshd.nix diff --git a/hosts/sopp/default.nix b/hosts/sopp/default.nix index 75524d7..bc660f8 100644 --- a/hosts/sopp/default.nix +++ b/hosts/sopp/default.nix @@ -27,7 +27,7 @@ ../../profiles/sshd.nix ../../profiles/no-suspend.nix ../../profiles/podman.nix - ../../profiles/docker.nix + #../../profiles/docker.nix ../../users/pbsds diff --git a/justfile b/justfile index 124cacf..86bb995 100644 --- a/justfile +++ b/justfile @@ -51,3 +51,8 @@ boot: remote-set {{remote}} # nixos-rebuild --flake .# --target-host root@.nixos.org --use-substitutes switch + +@gorgon: + # https://codeberg.org/gorgon/gorgon/src/branch/main/nix-web + # https://discourse.nixos.org/t/a-web-ui-for-the-nix-store-early-beta/35762 + nix run 'git+https://codeberg.org/gorgon/gorgon#nix-web' diff --git a/pkgs/mk-nspawn-deployer/setup-nspawn.sh b/pkgs/mk-nspawn-deployer/setup-nspawn.sh index 2b18dd0..9c1d7a9 100644 --- a/pkgs/mk-nspawn-deployer/setup-nspawn.sh +++ b/pkgs/mk-nspawn-deployer/setup-nspawn.sh @@ -27,7 +27,7 @@ if ! >/dev/null command -v systemd-nspawn; then fi machinectl remove "$NSPAWN" || true # TODO: interactive? -#machinectl pull-tar "$TARBALL" "$NSPAWN" --verify=no +#machinectl pull-tar "https://github.com/tfc/nspawn-nixos/releases/download/v1.0/nixos-system-x86_64-linux.tar.xz" "$NSPAWN" --verify=no machinectl import-tar "$TARBALL" "$NSPAWN" # use host network diff --git a/users/pbsds/home/default.nix b/users/pbsds/home/default.nix index c3d7417..fffba06 100644 --- a/users/pbsds/home/default.nix +++ b/users/pbsds/home/default.nix @@ -7,6 +7,7 @@ imports = [ ./profiles/sops.nix ./profiles/bat.nix + #./profiles/xdg-ninja.nix ./profiles/git.nix ./profiles/gtk.nix ./profiles/micro.nix diff --git a/users/pbsds/home/profiles/git.nix b/users/pbsds/home/profiles/git.nix index 8b3915f..705f729 100644 --- a/users/pbsds/home/profiles/git.nix +++ b/users/pbsds/home/profiles/git.nix @@ -11,6 +11,7 @@ #programs.git.gitui.enable = true; programs.git.enable = true; + programs.git.lfs.enable = true; programs.git.delta.enable = true; #programs.git.lfs.enable = true; #programs.git.signing diff --git a/users/pbsds/home/profiles/xdg-ninja.nix b/users/pbsds/home/profiles/xdg-ninja.nix new file mode 100644 index 0000000..63ec6b7 --- /dev/null +++ b/users/pbsds/home/profiles/xdg-ninja.nix @@ -0,0 +1,22 @@ +{ + # found by running `nix run nixpkgs#xdg-ninja` + + # TODO: + export ANDROID_HOME="$XDG_DATA_HOME"/android + export HISTFILE="${XDG_STATE_HOME}"/bash/history + export CARGO_HOME="$XDG_DATA_HOME"/cargo + export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv + export GNUPGHOME="$XDG_DATA_HOME"/gnupg + export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc + export XCOMPOSECACHE="$XDG_CACHE_HOME"/X11/xcompose + export KERAS_HOME="${XDG_STATE_HOME}/keras" + export WINEPREFIX="$XDG_DATA_HOME"/wine + export XCOMPOSECACHE="${XDG_CACHE_HOME}"/X11/xcompose + export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority + export SSB_HOME="$XDG_DATA_HOME"/zoom + + export LESSHISTFILE="$XDG_CACHE_HOME"/less/history + export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java + export VAGRANT_HOME="$XDG_DATA_HOME"/vagrant + +}