diff --git a/flake.nix b/flake.nix index 9c60a29..e00148d 100644 --- a/flake.nix +++ b/flake.nix @@ -42,13 +42,12 @@ ... } @ inputs: let - nixlib = nixpkgs.lib; systems = [ "x86_64-linux" "aarch64-linux" #"riscv64-linux" ]; - forAllSystems = f: nixlib.genAttrs systems (system: f { + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f { inherit system; pkgs = nixpkgs.legacyPackages.${system}; lib = nixpkgs.legacyPackages.${system}.lib; @@ -64,7 +63,7 @@ remote-exec = prev.python3Packages.callPackage "${inputs.pr-remote-exec}/pkgs/tools/misc/remote-exec" { }; })]; }; - mkConfig = hostname: domain: system: modules: nixlib.nixosSystem { + mkConfig = hostname: domain: system: modules: nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit inputs; diff --git a/hosts/nord/default.nix b/hosts/nord/default.nix index f14c3d6..4d86708 100644 --- a/hosts/nord/default.nix +++ b/hosts/nord/default.nix @@ -27,7 +27,7 @@ ../../profiles/shell/base.nix ../../profiles/shell/archives.nix ../../profiles/shell/nix-utils.nix - #../../profiles/shell/binfmt-emu.nix + ../../profiles/shell/binfmt-emu.nix ../../profiles/desktop/gnome # configures gdm #../../profiles/desktop/sound/alsa.nix diff --git a/hosts/sopp/default.nix b/hosts/sopp/default.nix index ea19b40..0b7b3b4 100644 --- a/hosts/sopp/default.nix +++ b/hosts/sopp/default.nix @@ -32,7 +32,7 @@ ../../profiles/shell/base.nix ../../profiles/shell/archives.nix ../../profiles/shell/nix-utils.nix - #../../profiles/shell/binfmt-emu.nix + ../../profiles/shell/binfmt-emu.nix ../../profiles/desktop/gnome # configures gdm #../../profiles/desktop/sound/alsa.nix @@ -117,6 +117,15 @@ noto-fonts-extra ]; + # nvidia bad + nixpkgs.config.packageOverrides = (pkgs: { + element-desktop = pkgs.element-desktop.overrideAttrs (old: { + desktopItem = old.desktopItem.override (old: { + exec = "element-desktop --in-process-gpu --disable-gpu %u"; + }); + }); + }); + # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; diff --git a/profiles/remote-builders/default.nix b/profiles/remote-builders/default.nix index afc7a47..b65da63 100644 --- a/profiles/remote-builders/default.nix +++ b/profiles/remote-builders/default.nix @@ -55,16 +55,30 @@ let /** / { systems = [ "x86_64-linux" "wasm32-wasi" "wasm64-wasi" "x86_64-windows" "aarch64-linux" "riscv64-linux" ]; - hostName = "nord.pbsds.net"; # TODO: port 24 + hostName = "sopp.pbsds.net"; + sshPort = 26; sshUser = "pbsds"; - maxJobs = 2; # 4 cores + maxJobs = 4; # 8 cores #maxJobs = 1; # at least for big-parallel speedFactor = 2; supportedFeatures = [ "kvm" "big-parallel" "nixos-test" ]; #mandatoryFeatures = [ ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBSdIUtUfAxnVbPDmDDFdP2S3Wd3+CC8IfZAANJ76oh"; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDYB9H1pHB1vTBiGhO/GCQjn70BtVdQuJyXx38zN2CDj"; } /**/ + { + systems = [ "x86_64-linux" "wasm32-wasi" "wasm64-wasi" "x86_64-windows" "aarch64-linux" "riscv64-linux" ]; + hostName = "nord.pbsds.net"; + sshPort = 24; + sshUser = "pbsds"; + maxJobs = 2; # 4 cores + #maxJobs = 1; # at least for big-parallel + speedFactor = 1; + supportedFeatures = [ "kvm" "big-parallel" "nixos-test" ]; + #mandatoryFeatures = [ ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBSdIUtUfAxnVbPDmDDFdP2S3Wd3+CC8IfZAANJ76oh"; + } + /** / { systems = ["x86_64-linux"]; hostName = "isvegg.pvv.ntnu.no"; @@ -95,10 +109,11 @@ let mkRemoteConfig = { publicKey,# fetch it with `ssh-keyscan` proxy ? null, # schema: { user, host, publicKey } + sshPort ? 22, ... # the rest follows nix.buildMachines. schema }@args: let - buildMachine = lib.filterAttrs (key: _: !builtins.elem key ["publicKey" "proxy"]) args; # this should have syntactic sugar: ...@buildMachine + buildMachine = lib.filterAttrs (key: _: !builtins.elem key ["publicKey" "proxy" "sshPort"]) args; # this should have syntactic sugar: ...@buildMachine filter = lib.mkIf (buildMachine.hostName != config.networking.fqdn); in filter { nix.buildMachines = [ buildMachine ]; @@ -108,6 +123,7 @@ let programs.ssh.extraConfig = '' Host ${buildMachine.hostName} ConnectTimeout 3 + Port ${builtins.toString sshPort} ${lib.optionalString (proxy != null) '' ProxyJump ${proxy.user}@${proxy.host} ''} diff --git a/users/pbsds/home/default.nix b/users/pbsds/home/default.nix index 04c1f35..2f0317f 100644 --- a/users/pbsds/home/default.nix +++ b/users/pbsds/home/default.nix @@ -25,7 +25,8 @@ # TODO: remove function atom_nix { #nix-shell -p atom --run "atom $(printf "%q " "$@") --in-process-gpu --no-sandbox" - nix-shell -p atom --run "atom $(printf "%q " "$@") --no-sandbox" + #nix-shell -p atom --run "atom $(printf "%q " "$@") --no-sandbox" + nix run nixpkgs#atom -- --disable-gpu --in-process-gpu --no-sandbox "$@" } ''; @@ -124,7 +125,8 @@ killall = "killall -v"; bin = "perl -pe 'chomp' | curl -is -X POST https://i.kuklef.se/upload -F content=@- -F expiration=10d | grep '^location:' | cut -d' ' -f2-"; - atom = "atom --no-sandbox"; + #atom = "atom --no-sandbox"; + atom = "atom --disable-gpu --in-process-gpu --no-sandbox"; }; programs.nix-index.enable = true; diff --git a/users/pbsds/home/modules/jump.nix b/users/pbsds/home/modules/jump.nix index 7c7bf7f..aed68d5 100644 --- a/users/pbsds/home/modules/jump.nix +++ b/users/pbsds/home/modules/jump.nix @@ -51,7 +51,7 @@ in { } function marks { #ls -l "$_JUMP_MARKPATH" | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo - ls --color=always -l "$_JUMP_MARKPATH" | tr -s ' ' | cut -d' ' -f9- | sed -e 's/ -> /§/g' | column -t -s '§' -o ' -> ' + command ls --color=always -l "$_JUMP_MARKPATH" | tr -s ' ' | cut -d' ' -f9- | sed -e 's/ -> /§/g' | column -t -s '§' -o ' -> ' } _complete_jump_marks() { local curw=''${COMP_WORDS[COMP_CWORD]}