This commit is contained in:
Martin Benonisen 2024-10-31 13:14:45 +01:00
parent d506427f01
commit 0bb3b6d884
Signed by: mbeno
SSH Key Fingerprint: SHA256:iAzOA1WUAxocdh/WRWXcSg5nw2dJ1aDCvPuT+3ZjkwI
10 changed files with 137 additions and 56 deletions

73
flake.lock Normal file
View File

@ -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
}

View File

@ -8,6 +8,10 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
umu = {
url = "git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging\/nix&submodules=1";
inputs.nixpkgs.follows = "nixpkgs";
};
# ... # ...

View File

@ -15,7 +15,7 @@
kernelPackages = pkgs.linuxPackages_xanmod_latest; kernelPackages = pkgs.linuxPackages_xanmod_latest;
}; };
boot.kernel.sysctl = { boot.kernel.sysctl = {
"vm.max_map_count" = 16777216; "vm.max_map_count" = 2147483642;
"fs.file-max" = 524288; "fs.file-max" = 524288;
}; };

View File

@ -5,7 +5,7 @@
fira-code-symbols fira-code-symbols
nerdfonts nerdfonts
noto-fonts noto-fonts
noto-fonts-cjk noto-fonts-cjk-sans
noto-fonts-emoji noto-fonts-emoji
noto-fonts-monochrome-emoji noto-fonts-monochrome-emoji
source-sans-pro source-sans-pro

View File

@ -3,8 +3,8 @@
networking.wireless = { networking.wireless = {
enable = true; enable = true;
networks = { networks = {
"bennynet" = { "benny" = {
pskRaw = "85e8f17e02f4b4df5ddc9b95d1a4256b3c2608fcc8dfa1860b693d06c2a0bf1f"; psk = "loloplop";
}; };
}; };
}; };
@ -23,8 +23,6 @@
intel-media-driver intel-media-driver
intel-vaapi-driver intel-vaapi-driver
libvdpau-va-gl libvdpau-va-gl
rocm-opencl-icd
rocm-opencl-runtime
]; ];
extraPackages32 = with pkgs.pkgsi686Linux; [ extraPackages32 = with pkgs.pkgsi686Linux; [
intel-media-driver intel-media-driver
@ -32,14 +30,13 @@
]; ];
}; };
ckb-next.enable = true;
nvidia = { nvidia = {
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = false; powerManagement.enable = false;
powerManagement.finegrained = false; powerManagement.finegrained = false;
open = true; open = true;
nvidiaSettings = true; nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta; package = config.boot.kernelPackages.nvidiaPackages.production;
}; };
pulseaudio.enable = false; pulseaudio.enable = false;
}; };

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { { config, pkgs, inputs, ... }: {
services.flatpak.enable = true; services.flatpak.enable = true;
programs.steam = { programs.steam = {
enable = true; enable = true;
@ -23,6 +23,23 @@
magicOrExtension = ''\x7fELF....AI\x02''; magicOrExtension = ''\x7fELF....AI\x02'';
}; };
environment.systemPackages = with pkgs; [ 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 sipcalc
xdg-utils xdg-utils
pass pass
@ -33,6 +50,8 @@
xdg-desktop-portal-gtk xdg-desktop-portal-gtk
google-chrome google-chrome
zoom-us zoom-us
# icu
# icu.dev
neovim neovim
git git
gnupg gnupg

View File

@ -13,7 +13,7 @@
./programs/rofi ./programs/rofi
./programs/obs-studio ./programs/obs-studio
./programs/vscode ./programs/vscode
./programs/games # ./programs/games
./scripts ./scripts
./zsh ./zsh
./ssh ./ssh

View File

@ -9,13 +9,9 @@
terminator terminator
openssl openssl
qpwgraph qpwgraph
mixxx
imagemagick imagemagick
maim maim
sidequest
opera
direnv direnv
android-studio
libpng libpng
p7zip p7zip
lshw lshw
@ -32,7 +28,6 @@
fd fd
ffmpeg ffmpeg
file file
go-task
glib glib
jq jq
kitty kitty
@ -55,17 +50,13 @@
ripgrep ripgrep
sops sops
spotify spotify
spicetify-cli
sshfs sshfs
ventoy
expect expect
# k8s tools # k8s tools
talosctl talosctl
k9s k9s
cilium-cli cilium-cli
kubernetes-helm
cmctl cmctl
krew
zenity zenity
protontricks protontricks
winetricks winetricks
@ -73,7 +64,6 @@
tokei tokei
unzip unzip
yt-dlp
zoom-us zoom-us
vmware-horizon-client vmware-horizon-client

View File

@ -1,46 +1,44 @@
{ pkgs, config, ...}: { pkgs, config, ... }:
let let
sshotp = pkgs.writeScriptBin "sshotp" sshotp = pkgs.writeScriptBin "sshotp"
'' ''
#!/usr/bin/env expect #!/usr/bin/env expect
set stty_init -echo set stty_init -echo
set timeout 300 set timeout 300
set totp [lindex $argv 0]; set totp [lindex $argv 0];
puts "Our TOTP $totp" puts "Our TOTP $totp"
spawn ssh -D 20000 dresden.uio.no spawn ssh -D 20000 dresden.uio.no
expect { expect {
-re {.*(Verification_Code):} { -re {.*(Verification_Code):} {
send -- "$totp\r" send -- "$totp\r"
exp_continue exp_continue
} }
-re {.*dresden.*} { -re {.*dresden.*} {
wait wait
} }
} }
''; '';
ssh-dresden = pkgs.writeShellApplication { ssh-dresden = pkgs.writeShellApplication {
name = "ssh-dresden"; name = "ssh-dresden";
runtimeInputs = [ pkgs.rbw pkgs.expect ]; runtimeInputs = [ pkgs.rbw pkgs.expect ];
text = '' text = ''
#!/usr/bin/env bash #!/usr/bin/env bash
totp=$(rbw get -f "TOTP" rlogin) totp=$(rbw get -f "TOTP" rlogin)
expect -f ${sshotp}/bin/sshotp "$totp" expect -f ${sshotp}/bin/sshotp "$totp"
''; '';
}; };
in in
{ {
systemd.user.services.ssh-office = { systemd.user.services.ssh-office = {
Unit = { Unit = {
Description = "Office ssh session"; Description = "Office ssh session";
}; };
Service = { Service = {
Type = "simple"; Type = "simple";
ExecStart = "${ssh-dresden}/bin/ssh-dresden"; ExecStart = "${ssh-dresden}/bin/ssh-dresden";
Restart = "always"; Restart = "never";
};
Install = {
WantedBy = [ "default.target" ];
}; };
}; };
} }

View File

@ -13,7 +13,7 @@
sudo rm /nix/var/nix/gcroots/auto/* sudo rm /nix/var/nix/gcroots/auto/*
sudo nix-collect-garbage -d 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 = '' nlog = ''
revpath="/nix/var/nix/profiles"; revpath="/nix/var/nix/profiles";
lastrev=$(ls -d1v $revpath/system-*-link|cut -d "-" -f2 | tail -n1); lastrev=$(ls -d1v $revpath/system-*-link|cut -d "-" -f2 | tail -n1);