Nix Flakes configuration for MacOS, NixOS and WSL
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: screen recording with obs and nvidia gpu

cosmeak 59ad3c8c f99a8bfe

+40 -23
+8 -9
README.md
··· 25 25 26 26 - [x] NixOS 27 27 - [x] Nix Darwin 28 - - [ ] WSL (because not used anymore) 28 + - [ ] WSL (not used anymore) 29 29 - [ ] Nix BSD (in wait of a stable state to be used anywhere else than a vm) 30 - - [ ] MicroVM for servers 31 - - [ ] Secrets management 32 - - [ ] Secure Boot 33 - - [ ] Persistant storage 34 - - [ ] Disk configuration 35 - - [ ] Encrypted disks 36 - - [ ] Home management 37 - - [ ] Custom live ISO 30 + - [ ] MicroVM for servers (astro/microvm) 31 + - [ ] Secrets management (agenix) 32 + - [ ] Secure Boot (lanzaboot) 33 + - [ ] Persistant storage (impermanence) 34 + - [ ] Disk configuration (disko) 35 + - [ ] Encrypted disks (?) 36 + - [ ] Home management (hjem) 38 37 - [ ] Automatic updates 39 38 40 39 ## Installation
+12 -12
flake.lock
··· 7 7 ] 8 8 }, 9 9 "locked": { 10 - "lastModified": 1767634391, 11 - "narHash": "sha256-owcSz2ICqTSvhBbhPP+1eWzi88e54rRZtfCNE5E/wwg=", 10 + "lastModified": 1772129556, 11 + "narHash": "sha256-Utk0zd8STPsUJPyjabhzPc5BpPodLTXrwkpXBHYnpeg=", 12 12 "owner": "nix-darwin", 13 13 "repo": "nix-darwin", 14 - "rev": "08585aacc3d6d6c280a02da195fdbd4b9cf083c2", 14 + "rev": "ebec37af18215214173c98cf6356d0aca24a2585", 15 15 "type": "github" 16 16 }, 17 17 "original": { ··· 105 105 "systems": "systems_2" 106 106 }, 107 107 "locked": { 108 - "lastModified": 1771641457, 109 - "narHash": "sha256-TIekRGfeCwuEmYcWex40RTx0Gd46pqmyUtxdFKb5juI=", 108 + "lastModified": 1772334875, 109 + "narHash": "sha256-AveYVY2plEJ62Br6iAd4fB5PDYyjJoTEmgdWRV3m+Vo=", 110 110 "owner": "Infinidoge", 111 111 "repo": "nix-minecraft", 112 - "rev": "c4e2b8969e09067da9d44b6b5762e1e896418f40", 112 + "rev": "a852ac73a4f9bf8270bdac90a72a28fef5df846b", 113 113 "type": "github" 114 114 }, 115 115 "original": { ··· 151 151 }, 152 152 "nixpkgs_2": { 153 153 "locked": { 154 - "lastModified": 1771714954, 155 - "narHash": "sha256-nhZJPnBavtu40/L2aqpljrfUNb2rxmWTmSjK2c9UKds=", 154 + "lastModified": 1772047000, 155 + "narHash": "sha256-7DaQVv4R97cii/Qdfy4tmDZMB2xxtyIvNGSwXBBhSmo=", 156 156 "owner": "nixos", 157 157 "repo": "nixpkgs", 158 - "rev": "afbbf774e2087c3d734266c22f96fca2e78d3620", 158 + "rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e", 159 159 "type": "github" 160 160 }, 161 161 "original": { ··· 252 252 }, 253 253 "unstable": { 254 254 "locked": { 255 - "lastModified": 1771369470, 256 - "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", 255 + "lastModified": 1772198003, 256 + "narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=", 257 257 "owner": "nixos", 258 258 "repo": "nixpkgs", 259 - "rev": "0182a361324364ae3f436a63005877674cf45efb", 259 + "rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61", 260 260 "type": "github" 261 261 }, 262 262 "original": {
+1 -1
modules/features/nvidia-gpu.nix
··· 3 3 allowedUnfreePackages = [ "nvidia-x11" "nvidia-settings" ]; 4 4 5 5 flake.nixosModules.nvidia-gpu = { config, ... }: { 6 + services.xserver.videoDrivers = [ "nvidia" ]; 6 7 hardware.nvidia = { 7 8 package = config.boot.kernelPackages.nvidiaPackages.latest; 8 9 modesetting.enable = true; ··· 11 12 open = false; 12 13 nvidiaSettings = true; 13 14 }; 14 - services.xserver.videoDrivers = [ "nvidia" ]; 15 15 }; 16 16 }
+17
modules/features/screen-recording.nix
··· 1 + { 2 + flake.nixosModules.screen-recording = { pkgs, lib, config, ... }: { 3 + programs.obs-studio = { 4 + enable = true; 5 + package = lib.mkIf (lib.elem "nvidia" config.services.xserver.videoDrivers) ( 6 + pkgs.obs-studio.override { 7 + cudaSupport = true; 8 + } 9 + ); 10 + plugins = with pkgs.obs-studio-plugins; [ 11 + obs-pipewire-audio-capture 12 + obs-vkcapture 13 + wlrobs 14 + ]; 15 + }; 16 + }; 17 + }
+1
modules/hosts/loki/configuration.nix
··· 12 12 nvidia-gpu 13 13 budgie-desktop 14 14 cosmeak 15 + screen-recording 15 16 (autoLogin "cosmeak") 16 17 ]; 17 18
+1 -1
modules/users/cosmeak.nix
··· 35 35 ghostty # Terminal emulator 36 36 heroic # Game Launcher (Epic Games, GOG) 37 37 krita # Photo editor 38 - obs-studio # Recording App 38 + # obs-studio # Recording App 39 39 prismlauncher # Minecraft launcher 40 40 vesktop # Discord client 41 41 (zed-editor.fhsWithPackages (pkg: [ zlib ])) # Code editor