diff --git a/flake.nix b/flake.nix index ac340ec..78b2691 100644 --- a/flake.nix +++ b/flake.nix @@ -202,7 +202,7 @@ nixpkgs.overlays = [ self.overlays.pbsdspkgs - inputs.system-manager-edge.overlays.packages + inputs.system-manager-edge.overlays.default (final: prev: { unstable = import inputs.unstable { inherit system; @@ -347,7 +347,7 @@ ]; nixpkgs.overlays = [ self.overlays.pbsdspkgs - inputs.system-manager-edge.overlays.packages + inputs.system-manager-edge.overlays.default (final: prev: { unstable = import inputs.unstable { inherit system; diff --git a/hardware/gpu/cuda.nix b/hardware/gpu/cuda.nix index d451959..1b68b16 100644 --- a/hardware/gpu/cuda.nix +++ b/hardware/gpu/cuda.nix @@ -16,7 +16,7 @@ lib.mkMerge [ hardware.graphics.enable32Bit = true; # does not work on pascal - # hardware.nvidia.open = true; + # hardware.nvidia.open = lib.mkDefault true; # Experimental and only works on modern Nvidia GPUs (Turing or newer). /* powerManagement.finegrained = true; */ @@ -24,7 +24,7 @@ lib.mkMerge [ { nixpkgs.config.openglSupport = true; # why is this not set by hardware.opengl.enable ? - nixpkgs.config.cudaSupport = true; + nixpkgs.config.cudaSupport = true; nixpkgs.config.vdpauSupport = true; nixpkgs.config.vaapiSupport = true; nixpkgs.config.nvidiaSupport = true; @@ -78,6 +78,7 @@ lib.mkMerge [ #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest; #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta; + #hardware.nvidia.prime = { # offload.enable = true; # # Bus IDs. You can find them using lspci, grepping for "3D" or "VGA" diff --git a/justfile b/justfile index fdcf7d6..1003188 100644 --- a/justfile +++ b/justfile @@ -54,32 +54,27 @@ update: # todo: support system-manager # todo: support home-manager? -build hostname="": - nixos-rebuild build --accept-flake-config --show-trace --flake .#"{{hostname}}" +build hostname="" *_: + nixos-rebuild build --accept-flake-config --show-trace --flake .#"{{hostname}}" "${@:2}" -# todo: support system-manager -# todo: support home-manager? -build-no-config hostname="": - nixos-rebuild build --accept-flake-config --show-trace --flake .#"{{hostname}}" --builders "" --option access-tokens "" +build-vm hostname=`just _a_host` *_: + nixos-rebuild build-vm --accept-flake-config --show-trace --flake .#"{{hostname}}" "${@:2}" -build-vm hostname=`just _a_host`: - nixos-rebuild build-vm --accept-flake-config --show-trace --flake .#"{{hostname}}" - -build-vm-and-run $hostname=`just _a_host`: - @just build-vm "$hostname" +build-vm-and-run $hostname=`just _a_host` *_: + @just build-vm "$hostname" "${@:2}" ./result/bin/run-"$hostname"-vm -test: - sudo nixos-rebuild test --accept-flake-config --show-trace --flake . +test *_: + sudo nixos-rebuild test --accept-flake-config --show-trace --flake . "$@" -switch: - sudo nixos-rebuild switch --accept-flake-config --show-trace --flake . +switch *_: + sudo nixos-rebuild switch --accept-flake-config --show-trace --flake . "$@" -boot: - sudo nixos-rebuild boot --accept-flake-config --show-trace --flake . +boot *_: + sudo nixos-rebuild boot --accept-flake-config --show-trace --flake . "$@" -boot-and-reboot: - sudo nixos-rebuild boot --accept-flake-config --show-trace --flake . +boot-and-reboot *_: + sudo nixos-rebuild boot --accept-flake-config --show-trace --flake . "$@" sudo reboot push hostname=`just _a_host` cmd=`gum choose test switch boot --header "Select mode..."`: diff --git a/profiles/locale-no.nix b/profiles/locale-no.nix index 3698b0a..2596cfc 100644 --- a/profiles/locale-no.nix +++ b/profiles/locale-no.nix @@ -2,16 +2,16 @@ { # Time zone and internationalisation properties. time.timeZone = lib.mkDefault "Europe/Oslo"; - i18n.defaultLocale = "en_US.utf8"; - i18n.extraLocaleSettings.LC_ADDRESS = "nb_NO.utf8"; - i18n.extraLocaleSettings.LC_IDENTIFICATION = "nb_NO.utf8"; - i18n.extraLocaleSettings.LC_MEASUREMENT = "nb_NO.utf8"; - i18n.extraLocaleSettings.LC_MONETARY = "nb_NO.utf8"; - i18n.extraLocaleSettings.LC_NAME = "nb_NO.utf8"; - i18n.extraLocaleSettings.LC_NUMERIC = "nb_NO.utf8"; - i18n.extraLocaleSettings.LC_PAPER = "nb_NO.utf8"; - i18n.extraLocaleSettings.LC_TELEPHONE = "nb_NO.utf8"; - i18n.extraLocaleSettings.LC_TIME = "nb_NO.utf8"; + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings.LC_ADDRESS = "nb_NO.UTF-8"; + i18n.extraLocaleSettings.LC_IDENTIFICATION = "nb_NO.UTF-8"; + i18n.extraLocaleSettings.LC_MEASUREMENT = "nb_NO.UTF-8"; + i18n.extraLocaleSettings.LC_MONETARY = "nb_NO.UTF-8"; + i18n.extraLocaleSettings.LC_NAME = "nb_NO.UTF-8"; + i18n.extraLocaleSettings.LC_NUMERIC = "nb_NO.UTF-8"; + i18n.extraLocaleSettings.LC_PAPER = "nb_NO.UTF-8"; + i18n.extraLocaleSettings.LC_TELEPHONE = "nb_NO.UTF-8"; + i18n.extraLocaleSettings.LC_TIME = "nb_NO.UTF-8"; console.keyMap = "no"; } (lib.mkIf (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05") { diff --git a/users/pbsds/home/profiles/bat.nix b/users/pbsds/home/profiles/bat.nix index c3e9cd3..d219573 100644 --- a/users/pbsds/home/profiles/bat.nix +++ b/users/pbsds/home/profiles/bat.nix @@ -36,9 +36,8 @@ in hash = "sha256-1Ml5vqP9r6oCfLhaNGPQJXS8e7utxQQycIm3Hk9wE3w="; }; config.map-syntax = [ - "poetry.toml:toml" - "flake.lock:json" - "*.jsonl:json" + "poetry.toml:TOML" + "flake.lock:JSON" ]; # only in unstable as of 22.11: #extraPackages = with pkgs.bat-extras; [ batdiff batman batgrep batwatch ]; diff --git a/users/pbsds/home/profiles/shell.nix b/users/pbsds/home/profiles/shell.nix index f1620c4..878b61d 100644 --- a/users/pbsds/home/profiles/shell.nix +++ b/users/pbsds/home/profiles/shell.nix @@ -127,9 +127,9 @@ in home.shellAliases.dushd = "du -shc * .[!.]?* | sort -h"; home.shellAliases.open = "xdg-open"; - home.shellAliases.rwhich = mkArgsAlias ''which "$@" | xargs realpath --''; + home.shellAliases.rwhich = mkArgsAlias ''which "$@" | xargs -d"\n" realpath --''; home.shellAliases.rwhichcd = mkArgsAlias '' - local dir=$(which "$@" | xargs realpath -- | cut -d/ -f-4 | grep ^/nix/store/ | fzf --height=15) + local dir=$(which "$@" | xargs -d"\n" realpath -- | cut -d/ -f-4 | grep ^/nix/store/ | fzf --height=15 ||:) if [[ -n "$dir" && -d "$dir" ]]; then # history -s "$(printf "cd %q\n" "$dir")" # history -a @@ -171,6 +171,7 @@ in home.shellAliases.kaomoji = "curl -s 'https://kaomoji.ru/en/' | htmlq tr td span --text | grep . | shuf | head -n1"; + home.shellAliases.swgl = "env LIBGL_ALWAYS_SOFTWARE=true GALLIUM_DRIVER=llvmpipe __GLX_VENDOR_LIBRARY_NAME=mesa "; home.packages = lib.filter (x: x != null) (with pkgs; [ rsync diff --git a/users/pbsds/syncthing.nix b/users/pbsds/syncthing.nix index 609533e..2e424e1 100644 --- a/users/pbsds/syncthing.nix +++ b/users/pbsds/syncthing.nix @@ -58,6 +58,7 @@ "mihon".devices = [ "eple" "pjudduzen" "bjarte" "nord" ]; "ewesticker".devices = [ "eple" "pjudduzen" "bjarte" "sopp" "rocm" "nord" ]; "pjudduzen-documents".devices= [ "eple" "pjudduzen" "sopp" ]; + "pjudduzen-downloads".devices= [ "eple" "pjudduzen" "sopp" ]; "pjudduzen-clover".devices = [ "eple" "pjudduzen" "sopp" ]; "pjudduzen-movies".devices = [ "eple" "pjudduzen" "sopp" ]; "pjudduzen-music".devices = [ "eple" "pjudduzen" "sopp" ];