From 0bb3b6d88452d20d01879ce1afca8f69deb59792 Mon Sep 17 00:00:00 2001 From: Martin Benonisen Date: Thu, 31 Oct 2024 13:14:45 +0100 Subject: [PATCH] lol --- flake.lock | 73 ++++++++++++++++++++++++++++++++++++ flake.nix | 4 ++ hosts/zedd/configuration.nix | 2 +- system/fonts.nix | 2 +- system/hardware.nix | 9 ++--- system/programs.nix | 21 ++++++++++- user/default.nix | 2 +- user/packages/default.nix | 10 ----- user/services/ssh-office.nix | 68 ++++++++++++++++----------------- user/zsh/default.nix | 2 +- 10 files changed, 137 insertions(+), 56 deletions(-) create mode 100644 flake.lock diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f02f0a4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,73 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1730016908, + "narHash": "sha256-bFCxJco7d8IgmjfNExNz9knP8wvwbXU4s/d53KOK6U0=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "e83414058edd339148dc142a8437edb9450574c8", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1730200266, + "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "umu": "umu" + } + }, + "umu": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "dir": "packaging/nix", + "lastModified": 1730219667, + "narHash": "sha256-vNvV7p4LTYfPUG46Dt8ubPVJid4l4gEQRqU/ZV/sQR0=", + "ref": "refs/heads/main", + "rev": "10a406962c27a5a7cf05eab4ae19072cfaa4f165", + "revCount": 829, + "submodules": true, + "type": "git", + "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" + }, + "original": { + "dir": "packaging/nix", + "submodules": true, + "type": "git", + "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 9fc9c6d..6207172 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,10 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + umu = { + url = "git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging\/nix&submodules=1"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # ... diff --git a/hosts/zedd/configuration.nix b/hosts/zedd/configuration.nix index bca5c49..5a071fc 100644 --- a/hosts/zedd/configuration.nix +++ b/hosts/zedd/configuration.nix @@ -15,7 +15,7 @@ kernelPackages = pkgs.linuxPackages_xanmod_latest; }; boot.kernel.sysctl = { - "vm.max_map_count" = 16777216; + "vm.max_map_count" = 2147483642; "fs.file-max" = 524288; }; diff --git a/system/fonts.nix b/system/fonts.nix index 5bfe305..ab6312a 100644 --- a/system/fonts.nix +++ b/system/fonts.nix @@ -5,7 +5,7 @@ fira-code-symbols nerdfonts noto-fonts - noto-fonts-cjk + noto-fonts-cjk-sans noto-fonts-emoji noto-fonts-monochrome-emoji source-sans-pro diff --git a/system/hardware.nix b/system/hardware.nix index 365b37d..26c694a 100644 --- a/system/hardware.nix +++ b/system/hardware.nix @@ -3,8 +3,8 @@ networking.wireless = { enable = true; networks = { - "bennynet" = { - pskRaw = "85e8f17e02f4b4df5ddc9b95d1a4256b3c2608fcc8dfa1860b693d06c2a0bf1f"; + "benny" = { + psk = "loloplop"; }; }; }; @@ -23,8 +23,6 @@ intel-media-driver intel-vaapi-driver libvdpau-va-gl - rocm-opencl-icd - rocm-opencl-runtime ]; extraPackages32 = with pkgs.pkgsi686Linux; [ intel-media-driver @@ -32,14 +30,13 @@ ]; }; - ckb-next.enable = true; nvidia = { modesetting.enable = true; powerManagement.enable = false; powerManagement.finegrained = false; open = true; nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.beta; + package = config.boot.kernelPackages.nvidiaPackages.production; }; pulseaudio.enable = false; }; diff --git a/system/programs.nix b/system/programs.nix index 57bf7d2..55ff033 100644 --- a/system/programs.nix +++ b/system/programs.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: { +{ config, pkgs, inputs, ... }: { services.flatpak.enable = true; programs.steam = { enable = true; @@ -23,6 +23,23 @@ magicOrExtension = ''\x7fELF....AI\x02''; }; environment.systemPackages = with pkgs; [ + (inputs.umu.packages.${pkgs.system}.umu.override { version = "${inputs.umu.shortRev}"; }) + gfxreconstruct + glslang + spirv-cross + spirv-headers + spirv-tools + vulkan-extension-layer + vulkan-headers + vulkan-loader + vulkan-tools + vulkan-tools-lunarg + vulkan-utility-libraries + vulkan-validation-layers + vkdisplayinfo + vkd3d + vkd3d-proton + vk-bootstrap sipcalc xdg-utils pass @@ -33,6 +50,8 @@ xdg-desktop-portal-gtk google-chrome zoom-us + # icu + # icu.dev neovim git gnupg diff --git a/user/default.nix b/user/default.nix index a986560..71c2d25 100644 --- a/user/default.nix +++ b/user/default.nix @@ -13,7 +13,7 @@ ./programs/rofi ./programs/obs-studio ./programs/vscode - ./programs/games + # ./programs/games ./scripts ./zsh ./ssh diff --git a/user/packages/default.nix b/user/packages/default.nix index 050711b..5aa0eb8 100644 --- a/user/packages/default.nix +++ b/user/packages/default.nix @@ -9,13 +9,9 @@ terminator openssl qpwgraph - mixxx imagemagick maim - sidequest - opera direnv - android-studio libpng p7zip lshw @@ -32,7 +28,6 @@ fd ffmpeg file - go-task glib jq kitty @@ -55,17 +50,13 @@ ripgrep sops spotify - spicetify-cli sshfs - ventoy expect # k8s tools talosctl k9s cilium-cli - kubernetes-helm cmctl - krew zenity protontricks winetricks @@ -73,7 +64,6 @@ tokei unzip - yt-dlp zoom-us vmware-horizon-client diff --git a/user/services/ssh-office.nix b/user/services/ssh-office.nix index 52f10c8..6573734 100644 --- a/user/services/ssh-office.nix +++ b/user/services/ssh-office.nix @@ -1,46 +1,44 @@ -{ pkgs, config, ...}: -let -sshotp = pkgs.writeScriptBin "sshotp" - '' - #!/usr/bin/env expect - set stty_init -echo - set timeout 300 - set totp [lindex $argv 0]; - puts "Our TOTP $totp" - spawn ssh -D 20000 dresden.uio.no - expect { - -re {.*(Verification_Code):} { - send -- "$totp\r" - exp_continue - } - -re {.*dresden.*} { - wait - } - } - ''; -ssh-dresden = pkgs.writeShellApplication { - name = "ssh-dresden"; - runtimeInputs = [ pkgs.rbw pkgs.expect ]; - text = '' - #!/usr/bin/env bash - totp=$(rbw get -f "TOTP" rlogin) - expect -f ${sshotp}/bin/sshotp "$totp" - ''; +{ pkgs, config, ... }: +let + sshotp = pkgs.writeScriptBin "sshotp" + '' + #!/usr/bin/env expect + set stty_init -echo + set timeout 300 + set totp [lindex $argv 0]; + puts "Our TOTP $totp" + spawn ssh -D 20000 dresden.uio.no + expect { + -re {.*(Verification_Code):} { + send -- "$totp\r" + exp_continue + } + -re {.*dresden.*} { + wait + } + } + ''; + ssh-dresden = pkgs.writeShellApplication { + name = "ssh-dresden"; + runtimeInputs = [ pkgs.rbw pkgs.expect ]; + text = '' + #!/usr/bin/env bash + totp=$(rbw get -f "TOTP" rlogin) + expect -f ${sshotp}/bin/sshotp "$totp" + ''; -}; + }; in { systemd.user.services.ssh-office = { - Unit = { + Unit = { Description = "Office ssh session"; }; Service = { Type = "simple"; ExecStart = "${ssh-dresden}/bin/ssh-dresden"; - Restart = "always"; - }; - Install = { - WantedBy = [ "default.target" ]; + Restart = "never"; }; }; -} \ No newline at end of file +} + diff --git a/user/zsh/default.nix b/user/zsh/default.nix index aedac6a..ccf68c9 100644 --- a/user/zsh/default.nix +++ b/user/zsh/default.nix @@ -13,7 +13,7 @@ sudo rm /nix/var/nix/gcroots/auto/* sudo nix-collect-garbage -d ''; - nrebuild = "nix flake update /home/mbeno/git/nixos && sudo nixos-rebuild switch --recreate-lock-file --flake /home/${user}/git/nixos && nvd diff $(ls -d1v /nix/var/nix/profiles/system-*-link|tail -n 2) && source ~/.zshrc"; + nrebuild = "nix flake update /home/mbeno/git/nixos && sudo nixos-rebuild switch --flake /home/mbeno/git/nixos && source ~/.zshrc"; nlog = '' revpath="/nix/var/nix/profiles"; lastrev=$(ls -d1v $revpath/system-*-link|cut -d "-" -f2 | tail -n1);