summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-04-04 10:11:06 +0200
committerRory& <root@rory.gay>2025-04-04 10:11:06 +0200
commitc84f36538cb4bd71a3591e3416766d032dc406b9 (patch)
tree0e433122cb2d656bbe554fff23e810539a75383a
parentServer changes (diff)
downloadRory-Open-Architecture-c84f36538cb4bd71a3591e3416766d032dc406b9.tar.xz
Laptop updates
-rw-r--r--flake.lock110
-rw-r--r--host/Rory-laptop/configuration.nix93
-rw-r--r--host/Rory-ovh/services/wireguard/wireguard.nix39
-rw-r--r--modules/software-templates/steam.nix15
-rwxr-xr-xmodules/users/Rory.nix3
5 files changed, 185 insertions, 75 deletions
diff --git a/flake.lock b/flake.lock

index b55cf0e..acd9d0f 100644 --- a/flake.lock +++ b/flake.lock
@@ -33,11 +33,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1731270564, - "narHash": "sha256-6KMC/NH/VWP5Eb+hA56hz0urel3jP6Y6cF2PX6xaTkk=", + "lastModified": 1738524606, + "narHash": "sha256-hPYEJ4juK3ph7kbjbvv7PlU1D9pAkkhl+pwx8fZY53U=", "owner": "zhaofengli", "repo": "attic", - "rev": "47752427561f1c34debb16728a210d378f0ece36", + "rev": "ff8a897d1f4408ebbf4d45fa9049c06b3e1e3f4e", "type": "github" }, "original": { @@ -182,11 +182,11 @@ }, "crane_4": { "locked": { - "lastModified": 1731098351, - "narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=", + "lastModified": 1742394900, + "narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=", "owner": "ipetkov", "repo": "crane", - "rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28", + "rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd", "type": "github" }, "original": { @@ -199,11 +199,11 @@ "draupnirSrc": { "flake": false, "locked": { - "lastModified": 1742845950, - "narHash": "sha256-hf+IdRnfUO9hfZ7HGkG/MnBQEdGNOj/pgaR0idUiBLU=", + "lastModified": 1743353573, + "narHash": "sha256-3I5vpIYUlIH+I9/GhTVLddrrk2O0Lpqy3dKcIws6TM0=", "owner": "the-draupnir-project", "repo": "Draupnir", - "rev": "a086768b01e294363225ea7edf3ea1c63f0d01f5", + "rev": "d73d0fc4c27aa44b5afefc189c1cb87796c2ffa9", "type": "github" }, "original": { @@ -244,11 +244,11 @@ "rust-analyzer-src": "rust-analyzer-src_2" }, "locked": { - "lastModified": 1731738660, - "narHash": "sha256-tIXhc9lX1b030v812yVJanSR37OnpTb/OY5rU3TbShA=", + "lastModified": 1742452566, + "narHash": "sha256-sVuLDQ2UIWfXUBbctzrZrXM2X05YjX08K7XHMztt36E=", "owner": "nix-community", "repo": "fenix", - "rev": "e10ba121773f754a30d31b6163919a3e404a434f", + "rev": "7d9ba794daf5e8cc7ee728859bc688d8e26d5f06", "type": "github" }, "original": { @@ -309,11 +309,11 @@ "flake-compat_4": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "type": "github" }, "original": { @@ -495,11 +495,11 @@ }, "locked": { "host": "gitlab.computer.surgery", - "lastModified": 1742600936, - "narHash": "sha256-+H3oAiyYkU2zPHKMNaB1JL3Mem4ZVyttSUZBLnQ4QVY=", + "lastModified": 1743378486, + "narHash": "sha256-OX4sPrEDoTO/qZklcBMhqwjMpUWjPmSFW5LWoYSJezE=", "owner": "matrix", "repo": "grapevine-fork", - "rev": "d6475eee6df6de00d3fd631705a13b36c7ce3d42", + "rev": "6bcc4e310e26f742dd2e8508271b93bb9b61edce", "type": "gitlab" }, "original": { @@ -533,11 +533,11 @@ "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1742871411, - "narHash": "sha256-F3xBdOs5m0SE6Gq3jz+JxDOPvsLs22vbGfD05uF6xEc=", + "lastModified": 1743717835, + "narHash": "sha256-LJm6FoIcUoBw3w25ty12/sBfut4zZuNGdN0phYj/ekU=", "owner": "nix-community", "repo": "home-manager", - "rev": "869f2ec2add75ce2a70a6dbbf585b8399abec625", + "rev": "66a6ec65f84255b3defb67ff45af86c844dd451b", "type": "github" }, "original": { @@ -585,11 +585,11 @@ "matrixSpecSrc": { "flake": false, "locked": { - "lastModified": 1742585606, - "narHash": "sha256-7mYpcARvlNXeq8uULVK0RYOHnEwArI2OXPtwUy12CLY=", + "lastModified": 1743171197, + "narHash": "sha256-woy3YJk9pE01KASv1F6jU6wElG/mYJA73Lw2eP6WIWI=", "owner": "matrix-org", "repo": "matrix-spec", - "rev": "c7581356bf65607939877e37c17b28a220e0310b", + "rev": "8a2c58b1b17b26f742be2e1b0aeafdd41bb5f9fc", "type": "github" }, "original": { @@ -692,11 +692,11 @@ "nixpkgs": "nixpkgs_9" }, "locked": { - "lastModified": 1742481215, - "narHash": "sha256-m7I/2UaGEFOI+Cy0RoADBi10NZt1WD5N3q2jUwPprE4=", + "lastModified": 1743125458, + "narHash": "sha256-0z+5AMacL2Eqo92fAd0eCWeKVecWrxPJwd5/BIfcdJ8=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "96d7df91cce0d7cd30d1958fe1aefcb5f9bfced7", + "rev": "394c77f61ac76399290bfc2ef9d47b1fba31b215", "type": "github" }, "original": { @@ -739,11 +739,11 @@ }, "nixpkgs-RoryNix": { "locked": { - "lastModified": 1742925639, - "narHash": "sha256-MM9vNHYqiaZdILJpuCAcejjtRHGmcVSEKkalKbrKhY4=", + "lastModified": 1743752946, + "narHash": "sha256-WC///XSw6QHRn/RKddJqbuB4nNdM4eu0RT8hAZ+zJa0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "db6ea9d70bffd1041e9fea643d725d48a568ba3c", + "rev": "7d5cd42fece2ae9b065b00c08696b439a864401f", "type": "github" }, "original": { @@ -771,11 +771,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1743026715, - "narHash": "sha256-XrAZFrltjXJbfAp185Yf5aSj1ZctwQQvz5HiWI8m9p8=", + "lastModified": 1743752946, + "narHash": "sha256-WC///XSw6QHRn/RKddJqbuB4nNdM4eu0RT8hAZ+zJa0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "975c58d2cea3e42b1e82b2bd16e6a9bddf2a4377", + "rev": "7d5cd42fece2ae9b065b00c08696b439a864401f", "type": "github" }, "original": { @@ -835,11 +835,11 @@ }, "nixpkgs_10": { "locked": { - "lastModified": 1742669843, - "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", + "lastModified": 1743583204, + "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1e5b653dff12029333a6546c11e108ede13052eb", + "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434", "type": "github" }, "original": { @@ -867,11 +867,11 @@ }, "nixpkgs_12": { "locked": { - "lastModified": 1742578646, - "narHash": "sha256-GiQ40ndXRnmmbDZvuv762vS+gew1uDpFwOfgJ8tLiEs=", + "lastModified": 1743441817, + "narHash": "sha256-+OE03P3u0FRwhS+Ah6EYiwxdS1rcIYlXheuXGM3wP3Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "94c4dbe77c0740ebba36c173672ca15a7926c993", + "rev": "3eeaa42ef4c19447b48d1c676fe59077dfd0846e", "type": "github" }, "original": { @@ -963,11 +963,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1731676054, - "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", + "lastModified": 1742889210, + "narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", + "rev": "698214a32beb4f4c8e3942372c694f40848b360d", "type": "github" }, "original": { @@ -979,11 +979,11 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1742422364, - "narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=", + "lastModified": 1743583204, + "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc", + "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434", "type": "github" }, "original": { @@ -1030,16 +1030,16 @@ "rocksdb": { "flake": false, "locked": { - "lastModified": 1730475155, - "narHash": "sha256-u5uuShM2SxHc9/zL4UU56IhCcR/ZQbzde0LgOYS44bM=", + "lastModified": 1734381914, + "narHash": "sha256-G+DlQwEUyd7JOCjS1Hg1cKWmA/qAiK8UpUIKcP+riGQ=", "owner": "facebook", "repo": "rocksdb", - "rev": "3c27a3dde0993210c5cc30d99717093f7537916f", + "rev": "ae8fb3e5000e46d8d4c9dbf3a36019c0aaceebff", "type": "github" }, "original": { "owner": "facebook", - "ref": "v9.7.4", + "ref": "v9.10.0", "repo": "rocksdb", "type": "github" } @@ -1088,11 +1088,11 @@ "rust-analyzer-src_2": { "flake": false, "locked": { - "lastModified": 1731693936, - "narHash": "sha256-uHUUS1WPyW6ohp5Bt3dAZczUlQ22vOn7YZF8vaPKIEw=", + "lastModified": 1742296961, + "narHash": "sha256-gCpvEQOrugHWLimD1wTFOJHagnSEP6VYBDspq96Idu0=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "1b90e979aeee8d1db7fe14603a00834052505497", + "rev": "15d87419f1a123d8f888d608129c3ce3ff8f13d4", "type": "github" }, "original": { @@ -1125,11 +1125,11 @@ "nixpkgs": "nixpkgs_12" }, "locked": { - "lastModified": 1742700801, - "narHash": "sha256-ZGlpUDsuBdeZeTNgoMv+aw0ByXT2J3wkYw9kJwkAS4M=", + "lastModified": 1743750430, + "narHash": "sha256-ZwEpd2ZqimTaFUNkapLWVsNvSEBTIPOq2W2z2aMFC+k=", "owner": "Mic92", "repo": "sops-nix", - "rev": "67566fe68a8bed2a7b1175fdfb0697ed22ae8852", + "rev": "9bc9b59644585aa2f6c96a1abf50d937b433be83", "type": "github" }, "original": { diff --git a/host/Rory-laptop/configuration.nix b/host/Rory-laptop/configuration.nix
index ad060f3..39a73e4 100644 --- a/host/Rory-laptop/configuration.nix +++ b/host/Rory-laptop/configuration.nix
@@ -20,7 +20,7 @@ args@{ #./postgres.nix ./nginx.nix - #./edu/vmware.nix + ./edu/vmware.nix #./edu/nodejs-dev.nix # hardware-specific imports @@ -77,6 +77,7 @@ args@{ i18n.defaultLocale = "en_US.UTF-8"; services = { + blueman.enable = true; resolved.enable = true; mullvad-vpn = { enable = true; @@ -125,7 +126,13 @@ args@{ (jetbrains.plugins.addPlugins jetbrains.webstorm [ "github-copilot" ]) (jetbrains.plugins.addPlugins jetbrains.idea-ultimate [ "github-copilot" ]) - (jetbrains.plugins.addPlugins jetbrains.clion [ "github-copilot" ]) + (jetbrains.plugins.addPlugins jetbrains.clion [ + "github-copilot" + "string-manipulation" + "nixidea" + "visual-studio-keymap" + ]) + binutils dbeaver-bin vscode @@ -140,9 +147,6 @@ args@{ #games osu-lazer-bin - #steam - steam-run - steam-acf # extra packages dmenu @@ -177,26 +181,74 @@ args@{ thunderbird - p11-kit - opensc - eid-mw jitsi-meet-electron - nixd + # nixd # broken 24/03/2025 mullvad-vpn + blueman + ft2-clone ]; environment.etc."pkcs11/modules/opensc-pkcs11".text = '' module: ${pkgs.opensc}/lib/opensc-pkcs11.so ''; + boot.initrd.systemd.emergencyAccess = true; + + # Speed up boot + boot.initrd.systemd.network.wait-online.enable = false; + systemd.network.wait-online.enable = false; services.power-profiles-daemon.enable = true; - programs.steam = { - enable = true; - gamescopeSession.enable = true; - extraCompatPackages = with pkgs; [ - steam-play-none - proton-ge-bin - ]; - }; + systemd.services."NetworkManager-wait-online".enable = false; + virtualisation.libvirtd.onBoot = "ignore"; + +# systemd.services."systemd-rfkill".serviceConfig.Type = "simple"; # maybe exec? + systemd.services."NetworkManager".serviceConfig.Type = "exec"; # maybe exec? +# systemd.services."home-manager-Rory".serviceConfig.Type = lib.mkForce "exec"; +# systemd.services."systemd-backlight@backlight:intel_backlight".serviceConfig.Type = "exec"; +# systemd.services."wpa_supplicant".serviceConfig.Type = "exec"; +# systemd.services."libvirtd".serviceConfig.Type = lib.mkForce "exec"; +# systemd.services."nginx".serviceConfig.Type = "exec"; +# systemd.services."grafana".serviceConfig.Type = "exec"; +# systemd.services."prometheus".serviceConfig.Type = "exec"; +# systemd.services."bluetooth".serviceConfig.Type = "exec"; +# systemd.services."vmware-usbarbitrator".enable = false; +# systemd.services."vmware-authdlauncher".enable = false; +# systemd.services."waydroid-container".enable = false; +# systemd.services."NetworkManager".serviceConfig.TimeoutStartSec = 10; + boot.kernelParams = [ + #"quiet" + "loglevel=8" #3 + #"systemd.show_status=auto" + #"rd.udev.log_level=3" + #"libahci.ignore_sss=1" + ]; + + # Simplfy initrd + #boot.bcache.enable = false; + #boot.initrd.services.bcache.enable = false; + #services.lvm.enable = false; + #boot.initrd.services.resolved.enable = false; + #boot.initrd.network.udhcpc.enable = false; + #boot.initrd.network.enable = false; + #boot.initrd.services.lvm.enable = false; + #boot.initrd.compressor = "cat"; +# + #boot.initrd.systemd.units."systemd-backlight@.service".enable = false; + #boot.initrd.systemd.units."dev-ttyS0.device".enable = false; + #boot.initrd.systemd.units."dev-ttyS1.device".enable = false; + #boot.initrd.systemd.units."dev-ttyS2.device".enable = false; + #boot.initrd.systemd.units."dev-ttyS3.device".enable = false; + #boot.initrd.systemd.units."dev-ttyS4.device".enable = false; + #boot.initrd.systemd.units."dev-sda.device".enable = false; + #boot.initrd.systemd.units."dev-sda1.device".enable = false; + #boot.initrd.systemd.units."dev-sda2.device".enable = false; + # + #boot.initrd.includeDefaultModules = false; + #boot.initrd.availableKernelModules = [ + # "nvme" + #]; +# + #services.orca.enable = true; + virtualisation.waydroid.enable = true; xdg = { @@ -222,7 +274,6 @@ args@{ }; fonts = { packages = with pkgs; [ - #(nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) nerd-fonts.jetbrains-mono noto-fonts-monochrome-emoji ]; @@ -258,6 +309,10 @@ args@{ hardware = { pulseaudio.enable = false; + bluetooth = { + enable = true; + powerOnBoot = true; + }; }; programs.dconf.enable = true; @@ -272,6 +327,7 @@ args@{ enable = true; qemu = { swtpm.enable = true; + ovmf.enable = true; }; }; programs.virt-manager.enable = true; @@ -292,7 +348,6 @@ args@{ enable = true; memoryPercent = 200; }; - services.pcscd.enable = true; virtualisation.vmVariant = { users = { diff --git a/host/Rory-ovh/services/wireguard/wireguard.nix b/host/Rory-ovh/services/wireguard/wireguard.nix new file mode 100644
index 0000000..d2f7025 --- /dev/null +++ b/host/Rory-ovh/services/wireguard/wireguard.nix
@@ -0,0 +1,39 @@ +{ pkgs, ... }: +{ + # enable NAT + networking.nat.enable = true; + networking.nat.externalInterface = "eth0"; + networking.nat.internalInterfaces = [ "wg0" ]; + networking.firewall = { + allowedUDPPorts = [ 51820 ]; + }; + + networking.wireguard.enable = true; + networking.wireguard.interfaces = { + wg0 = { + ips = [ "10.100.0.1/24" ]; + listenPort = 51820; + + postSetup = '' + ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE + ''; + + postShutdown = '' + ${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE + ''; + + privateKeyFile = "path to private key file"; + + peers = [ + { + publicKey = "{client public key}"; + allowedIPs = [ "10.100.0.2/32" ]; + } + { + publicKey = "{john doe's public key}"; + allowedIPs = [ "10.100.0.3/32" ]; + } + ]; + }; + }; +} diff --git a/modules/software-templates/steam.nix b/modules/software-templates/steam.nix new file mode 100644
index 0000000..ac548a7 --- /dev/null +++ b/modules/software-templates/steam.nix
@@ -0,0 +1,15 @@ +{ pkgs, ... }: { + programs.steam = { + enable = true; + gamescopeSession.enable = true; + extraCompatPackages = with pkgs; [ + steam-play-none + proton-ge-bin + ]; + }; + + environment.systemPackages = with pkgs; [ + steam-run + steam-acf + ]; +} \ No newline at end of file diff --git a/modules/users/Rory.nix b/modules/users/Rory.nix
index b7814ad..756c722 100755 --- a/modules/users/Rory.nix +++ b/modules/users/Rory.nix
@@ -125,6 +125,8 @@ alias drun='dotnet watch run --no-hot-reload --property WarningLevel=0' alias dbuild='dotnet watch build --no-hot-reload --property WarningLevel=0' alias ls='lsd -lAhF --color=always --icon=always' + alias tree='lsd --tree' + alias lstree='ls --tree --total-size --sort=size' alias transfetch='neofetch --kitty ~/trans_witch.jpg' alias gc='git-commit' [ -f "$HOME/.profile" ] && . $HOME/.profile @@ -202,7 +204,6 @@ vimdiffAlias = true; coc = { enable = true; - }; }; };