diff --git a/.envrc b/.envrc index ac13960..0ce331b 100644 --- a/.envrc +++ b/.envrc @@ -4,17 +4,21 @@ git config --local core.hooksPath "$PWD"/.githooks test -d .direnv || mkdir -p .direnv now="$(date +%Y-%m-%d)" if ! test -s .direnv/pull-date || test "$now" != "$(cat .direnv/pull-date)"; then - git pull --rebase --autostash - nix flake update - echo "$now" > .direnv/pull-date + git pull --rebase --autostash + nix flake update + echo "$now" > .direnv/pull-date +fi + +if command -v nixos-rebuild >/dev/null; then + use flake .#nomos-rebuild +elif ! command -v nixos-rebuild >/dev/null; then + use flake .#non-nixos fi if test -s .remote.toml; then - use flake .#remote - echo - echo "Current remote: $(remote-host)" - tomlq <.remote.toml '.hosts | to_entries[] | "remote-set \(.key+1) # -> \(.value.host)"' -r - echo -elif ! command -v nixos-rebuild >/dev/null; then - use flake .#non-nixos + use flake .#remote + echo + echo "Current remote: $(remote-host)" + tomlq <.remote.toml '.hosts | to_entries[] | "remote-set \(.key+1) # -> \(.value.host)"' -r + echo fi diff --git a/README.md b/README.md index 677356f..a340840 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ * [x] Make a flake * [x] merge hosted docs into a single subdomain * [x] Setup some remote-development and deploy flow +* [ ] xclip +* [ ] xforwarding over ssh * [ ] autogenerate ssh keys * [ ] switch to systemd networkd * [ ] pre-commit hook with 'nix eval ...outPath' diff --git a/flake.nix b/flake.nix index 93a13b9..56aeb66 100644 --- a/flake.nix +++ b/flake.nix @@ -115,14 +115,15 @@ }; non-nixos = nixpkgs.legacyPackages.${system}.mkShell { packages = with nixpkgs.legacyPackages.${system}; [ + (writeScriptBin "nixos-rebuild" '' + exec ${nixos-rebuild}/bin/nixos-rebuild "$@" |& ${nix-output-monitor}/bin/nom + '') nix-output-monitor - nixos-rebuild home-manager ]; }; remote = nixpkgs.legacyPackages.${system}.mkShell { packages = with nixpkgs.legacyPackages.${system}; [ - nix-output-monitor self.packages.${system}.remote-exec yq ]; diff --git a/hosts/nord/default.nix b/hosts/nord/default.nix index f34b1fa..2b9db87 100644 --- a/hosts/nord/default.nix +++ b/hosts/nord/default.nix @@ -24,8 +24,8 @@ ../../users/pbsds ../../profiles/desktop/gnome # with gdm - ../../profiles/desktop/sound/pulseaudio.nix - #../../profiles/desktop/sound/pipewire.nix + #../../profiles/desktop/sound/pulseaudio.nix + ../../profiles/desktop/sound/pipewire.nix #../../profiles/desktop/sound/alsa.nix ../../profiles/desktop/steam.nix diff --git a/profiles/desktop/gnome/default.nix b/profiles/desktop/gnome/default.nix index 48ba0d6..ac111b0 100644 --- a/profiles/desktop/gnome/default.nix +++ b/profiles/desktop/gnome/default.nix @@ -17,6 +17,7 @@ environment.systemPackages = with pkgs; [ lxterminal + ffmpegthumbnailer gnomeExtensions.appindicator ]; diff --git a/profiles/desktop/sound/pipewire.nix b/profiles/desktop/sound/pipewire.nix index efc2190..db93a55 100644 --- a/profiles/desktop/sound/pipewire.nix +++ b/profiles/desktop/sound/pipewire.nix @@ -1,3 +1,4 @@ +{ pkgs, ... }: { hardware.pulseaudio.enable = false; # gnome defaults it to true @@ -12,5 +13,9 @@ # no need to redefine it in your config for now) #services.pipewire.media-session.enable = true; + environment.systemPackages = with pkgs; [ + easyeffects + ]; + security.rtkit.enable = true; # optional } diff --git a/profiles/desktop/sound/pulseaudio.nix b/profiles/desktop/sound/pulseaudio.nix index c1cd897..c912bdd 100644 --- a/profiles/desktop/sound/pulseaudio.nix +++ b/profiles/desktop/sound/pulseaudio.nix @@ -7,5 +7,9 @@ #hardware.pulseaudio.support32Bit = true; nixpkgs.config.pulseaudio = true; + environment.systemPackages = with pkgs; [ + pulseeffects-legacy + ]; + security.rtkit.enable = true; # optional } diff --git a/profiles/domeneshop-dyndns/default.nix b/profiles/domeneshop-dyndns/default.nix index 61acc75..84545c8 100644 --- a/profiles/domeneshop-dyndns/default.nix +++ b/profiles/domeneshop-dyndns/default.nix @@ -7,7 +7,7 @@ in options = with lib; { services.domeneshop-updater.target = mkOption { - type = types.string; + type = types.str; #default = config.networking.fqdn; }; }; diff --git a/profiles/nfs/reidun.nix b/profiles/nfs/reidun.nix index b8068b4..6fa6a1b 100644 --- a/profiles/nfs/reidun.nix +++ b/profiles/nfs/reidun.nix @@ -1,6 +1,7 @@ { config, pkgs, lib, ... }: - { + # TODO: wireguard + #boot.kernelParams = [ "nfs.nfs4_disable_idmapping=0" "nfsd.nfs4_disable_idmapping=0" ]; fileSystems = let mkMount = mountpoint: server: subdir: { diff --git a/profiles/remote-builders/default.nix b/profiles/remote-builders/default.nix index e684369..f00effe 100644 --- a/profiles/remote-builders/default.nix +++ b/profiles/remote-builders/default.nix @@ -9,18 +9,6 @@ let # find 'publicKey' with `ssh-keyscan` remotes = [ - /** / - { - systems = [ "x86_64-linux" "wasm32-wasi" "wasm64-wasi" "x86_64-windows" "aarch64-linux" "riscv64-linux" ]; - hostName = "nord.pbsds.net"; # TODO: port 24 - sshUser = "pbsds"; - maxJobs = 2; # 4 cores - #maxJobs = 1; # at least for big-parallel - speedFactor = 2; - supportedFeatures = [ "kvm" "big-parallel" "nixos-test" ]; - #mandatoryFeatures = [ ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBSdIUtUfAxnVbPDmDDFdP2S3Wd3+CC8IfZAANJ76oh"; - } /**/ { systems = [ "x86_64-linux" "wasm32-wasi" "wasm64-wasi" "x86_64-windows" "aarch64-linux" "riscv64-linux" ]; @@ -65,6 +53,18 @@ let proxy.publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGurF7rdnrDP/VgIK2Tx38of+bX/QGCGL+alrWnZ1Ca5llGneMulUt1RB9xZzNLHiaWIE+HOP0i4spEaeZhilfU="; } /**/ + { + systems = [ "x86_64-linux" "wasm32-wasi" "wasm64-wasi" "x86_64-windows" "aarch64-linux" "riscv64-linux" ]; + hostName = "nord.pbsds.net"; # TODO: port 24 + sshUser = "pbsds"; + maxJobs = 2; # 4 cores + #maxJobs = 1; # at least for big-parallel + speedFactor = 2; + supportedFeatures = [ "kvm" "big-parallel" "nixos-test" ]; + #mandatoryFeatures = [ ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBSdIUtUfAxnVbPDmDDFdP2S3Wd3+CC8IfZAANJ76oh"; + } + /**/ { systems = ["x86_64-linux"]; hostName = "isvegg.pvv.ntnu.no"; diff --git a/users/pbsds/home/gnome.nix b/users/pbsds/home/gnome.nix index 1a682eb..a682b5c 100644 --- a/users/pbsds/home/gnome.nix +++ b/users/pbsds/home/gnome.nix @@ -7,9 +7,4 @@ ./profiles/mpv.nix ./profiles/desktop.nix ]; - - home.packages = with pkgs; [ - gnome.eog - ]; - } diff --git a/users/pbsds/home/profiles/desktop.nix b/users/pbsds/home/profiles/desktop.nix index adf70e4..482e320 100644 --- a/users/pbsds/home/profiles/desktop.nix +++ b/users/pbsds/home/profiles/desktop.nix @@ -10,7 +10,8 @@ scrcpy slack #spotify - transmission-remote-gtk + transgui #transmission-remote-gtk + gnome.eog ]; # flatpak diff --git a/users/pbsds/home/profiles/gnome/default.nix b/users/pbsds/home/profiles/gnome/default.nix index 1e88565..6502122 100644 --- a/users/pbsds/home/profiles/gnome/default.nix +++ b/users/pbsds/home/profiles/gnome/default.nix @@ -25,6 +25,7 @@ gnomeExtensions.vertical-overview gnomeExtensions.appindicator gnomeExtensions.removable-drive-menu + gnomeExtensions.always-show-titles-in-overview /* TODO: gnomeExtensions.night-light-slider gnomeExtensions.tray-icons-reloaded @@ -50,6 +51,7 @@ "vertical-overview@RensAlthuis.github.com" "appindicatorsupport@rgcjonas.gmail.com" "drive-menu@gnome-shell-extensions.gcampax.github.com" + "Always-Show-Titles-In-Overview@gmail.com" ]; }; diff --git a/users/pbsds/home/profiles/mpv.nix b/users/pbsds/home/profiles/mpv.nix index a90c9eb..fe51e73 100644 --- a/users/pbsds/home/profiles/mpv.nix +++ b/users/pbsds/home/profiles/mpv.nix @@ -6,6 +6,6 @@ programs.mpv.bindings."n" = "sub-seek 1"; programs.mpv.bindings."SHIFT+n" = "sub-seek -1"; programs.mpv.bindings."b" = ''cycle-values audio-channels 2 "auto"''; - #programs.mpv.config + programs.mpv.config.osc = "no"; # likely a thumbnail requirement programs.mpv.scripts = with pkgs.mpvScripts; [ thumbnail ]; }