diff --git a/config/hosts/aspects/doloro-desktop/home.nix b/config/hosts/aspects/doloro-desktop/home.nix index 33073c3..b46b0f6 100644 --- a/config/hosts/aspects/doloro-desktop/home.nix +++ b/config/hosts/aspects/doloro-desktop/home.nix @@ -12,6 +12,10 @@ modules.sops modules.hyprland + (modules.obs { + virtual_audio_devices = true; + autostart = true; + }) ]; nixos = { config, pkgs, ... }: diff --git a/config/hosts/aspects/doloro-laptop/home.nix b/config/hosts/aspects/doloro-laptop/home.nix index 6f4e220..99e9a2e 100644 --- a/config/hosts/aspects/doloro-laptop/home.nix +++ b/config/hosts/aspects/doloro-laptop/home.nix @@ -16,6 +16,7 @@ modules.kitty modules.stylix + modules.quickshell ]; nixos = { config, pkgs, ... }: @@ -23,14 +24,13 @@ users.users.doloro = { isNormalUser = true; shell = pkgs.fish; - initialPassword = "sex"; hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path; }; }; homeManager = { pkgs, ... }: { - home.packages = with pkgs; [ teamviewer ]; + home.packages = with pkgs; [ ]; nixpkgs.config.allowUnfree = true; }; }; diff --git a/config/modules/gaming/common.nix b/config/modules/gaming/common.nix new file mode 100644 index 0000000..f697423 --- /dev/null +++ b/config/modules/gaming/common.nix @@ -0,0 +1,8 @@ +{ den, modules, ... }: +{ + modules.common.provides = { + gaming = { + includes = [ modules.steam ]; + }; + }; +} diff --git a/config/modules/gaming/steam.nix b/config/modules/gaming/steam.nix new file mode 100644 index 0000000..b217222 --- /dev/null +++ b/config/modules/gaming/steam.nix @@ -0,0 +1,39 @@ +{ den, modules, ... }: +{ + modules.steam = { + nixos = + { pkgs, ... }: + { + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + # Ensure gamescope is inside the steam "fhs" + package = pkgs.steam.override { + extraLibraries = pkgs: [ pkgs.xorg.libxcb ]; + extraPkgs = + pkgs: with pkgs; [ + attr + xorg.libXcursor + xorg.libXi + xorg.libXinerama + xorg.libXScrnSaver + libpng + libpulseaudio + libvorbis + stdenv.cc.cc.lib + libkrb5 + keyutils + mangohud + gamemode + lsof + (gamescope.overrideAttrs { + enableWsi = true; + }) + ]; + }; + }; + }; + }; +} diff --git a/config/modules/helium.nix b/config/modules/helium.nix new file mode 100644 index 0000000..d0aef24 --- /dev/null +++ b/config/modules/helium.nix @@ -0,0 +1,27 @@ +{ + den, + modules, + inputs, + ... +}: +{ + flake-file.inputs = { + heliumFlake = { + url = "github:vikingnope/helium-browser-nix-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + modules.helium = { + homeManager = + { pkgs, home, ... }: + { + home.packages = [ + inputs.heliumFlake.packages.x86_64-linux.helium + ]; + # Gives me widevine support. yay + xdg.configFile."net.imput.helium/WidevineCdm/latest-component-updated-widevine-cdm" = { + text = ''{"Path":"${pkgs.widevine-cdm}/share/google/chrome/WidevineCdm"}''; + }; + }; + }; +} diff --git a/config/modules/hyfetch.nix b/config/modules/hyfetch.nix new file mode 100644 index 0000000..5d7067e --- /dev/null +++ b/config/modules/hyfetch.nix @@ -0,0 +1,32 @@ +{ den, modules, ... }: +{ + modules.hyfetch = { + homeManager = + { home, pkgs, ... }: + { + home.packages = [ pkgs.fastfetch ]; + programs.hyfetch = { + enable = true; + settings = { + "preset" = "bisexual"; + "mode" = "rgb"; + "auto_detect_light_dark" = true; + "light_dark" = "dark"; + "lightness" = 0.5; + "color_align" = { + "mode" = "custom"; + "custom_colors" = { + "1" = 1; + "2" = 0; + }; + }; + "backend" = "fastfetch"; + "args" = null; + "distro" = null; + "pride_month_disable" = false; + "custom_ascii_path" = null; + }; + }; + }; + }; +} diff --git a/config/modules/obs.nix b/config/modules/obs.nix new file mode 100644 index 0000000..afbcc9a --- /dev/null +++ b/config/modules/obs.nix @@ -0,0 +1,65 @@ +{ den, modules, ... }: +{ + modules.obs = settings: { + homeManager = + { pkgs, config, ... }: + { + programs = { + obs-studio = { + enable = true; + package = ( + pkgs.obs-studio.override { + cudaSupport = true; + } + ); + plugins = with pkgs.obs-studio-plugins; [ + obs-pipewire-audio-capture + obs-vkcapture + ]; + }; + }; + systemd.user.services = + pkgs.lib.mkIf settings.virtual_audio_devices { + pw-discordaudio-virtual-device = { + Install = { + WantedBy = [ "hyprland-session.target" ]; + }; + Service = { + ExecStart = "${pkgs.writeShellScript "discord_audio_virt_device" '' + #!/run/current-system/sw/bin/bash + pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=DiscordSink' -n DiscordSink + ''}"; + }; + }; + pw-gameaudio-virtual-device = { + Install = { + WantedBy = [ "hyprland-session.target" ]; + }; + Service = { + ExecStart = "${pkgs.writeShellScript "game_audio_virt_device" '' + #!/run/current-system/sw/bin/bash + pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=GameAudioSink' -n GameAudioSink + ''}"; + }; + }; + } + // pkgs.lib.mkIf settings.autostart { + obs-autostart = { + Unit = { + Description = "OBS daemon"; + After = [ "hyprland-session.target" ]; + }; + Install = { + WantedBy = [ "default.target" ]; + }; + Service = { + # wait for hyprland to start + ExecStart = "${config.programs.obs-studio.finalPackage}/bin/obs --startreplaybuffer"; + Restart = "on-failure"; + RestartSec = "5s"; + }; + }; + }; + }; + }; +} diff --git a/config/modules/quickshell/quickshell.nix b/config/modules/quickshell/quickshell.nix new file mode 100644 index 0000000..bdc2059 --- /dev/null +++ b/config/modules/quickshell/quickshell.nix @@ -0,0 +1,27 @@ +{ den, modules, ... }: +{ + modules.quickshell = { + homeManager = + { pkgs, ... }: + { + xdg.configFile."quickshell" = { + recursive = true; + source = pkgs.lib.file.mkOutOfStoreSymlink ./quickshell; + }; + systemd.user.services.quickshell = { + Unit = { + Description = "Quickshell daemon"; + After = [ "hyprland-session.target" ]; + }; + Install = { + WantedBy = [ "default.target" ]; + }; + Service = { + ExecStart = "${pkgs.quickshell}/bin/quickshell"; + Restart = "on-failure"; + RestartSec = "5s"; + }; + }; + }; + }; +} diff --git a/flake.lock b/flake.lock index 682c5fb..b87e26f 100644 --- a/flake.lock +++ b/flake.lock @@ -333,6 +333,27 @@ "type": "gitlab" } }, + "heliumFlake": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1771325388, + "narHash": "sha256-rSSr7h/qbRwxEtcIUe3UlSvbQxPJ4eYI9J84ewGz60o=", + "owner": "vikingnope", + "repo": "helium-browser-nix-flake", + "rev": "99d0cecff6778a71be1f2e325e0e645fd749a397", + "type": "github" + }, + "original": { + "owner": "vikingnope", + "repo": "helium-browser-nix-flake", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -424,7 +445,7 @@ "hyprwire": "hyprwire", "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems", + "systems": "systems_2", "xdph": "xdph" }, "locked": { @@ -801,7 +822,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1771023756, @@ -900,6 +921,7 @@ "flake-file": "flake-file", "flake-parts": "flake-parts", "font-patcher": "font-patcher", + "heliumFlake": "heliumFlake", "home-manager": "home-manager", "hyprland": "hyprland", "import-tree": "import-tree", @@ -911,7 +933,7 @@ "raspberry-pi-nix": "raspberry-pi-nix", "sops-nix": "sops-nix", "stylix": "stylix", - "systems": "systems_4", + "systems": "systems_5", "zen-browser": "zen-browser" } }, @@ -1067,7 +1089,7 @@ "nixpkgs" ], "nur": "nur", - "systems": "systems_3", + "systems": "systems_4", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1089,21 +1111,6 @@ } }, "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_2": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1118,6 +1125,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "systems_3": { "locked": { "lastModified": 1681028828, @@ -1148,6 +1170,21 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -1229,6 +1266,24 @@ "type": "github" } }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": [ diff --git a/flake.nix b/flake.nix index fc8e4b4..8234391 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,10 @@ url = "github:hercules-ci/flake-parts"; }; font-patcher.url = "github:Doloro1978/nix-nerd-fonts-patcher"; + heliumFlake = { + inputs.nixpkgs.follows = "nixpkgs"; + url = "github:vikingnope/helium-browser-nix-flake"; + }; home-manager = { inputs.nixpkgs.follows = "nixpkgs"; url = "github:nix-community/home-manager";