more modules

This commit is contained in:
2026-02-17 22:24:41 +00:00
parent 5f063d825e
commit 07e47f87e6
10 changed files with 282 additions and 21 deletions

View File

@@ -12,6 +12,10 @@
modules.sops modules.sops
modules.hyprland modules.hyprland
<modules/hyprland/doloro-settings> <modules/hyprland/doloro-settings>
(modules.obs {
virtual_audio_devices = true;
autostart = true;
})
]; ];
nixos = nixos =
{ config, pkgs, ... }: { config, pkgs, ... }:

View File

@@ -16,6 +16,7 @@
<modules/zen-browser> <modules/zen-browser>
modules.kitty modules.kitty
modules.stylix modules.stylix
modules.quickshell
]; ];
nixos = nixos =
{ config, pkgs, ... }: { config, pkgs, ... }:
@@ -23,14 +24,13 @@
users.users.doloro = { users.users.doloro = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.fish; shell = pkgs.fish;
initialPassword = "sex";
hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path; hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
}; };
}; };
homeManager = homeManager =
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [ teamviewer ]; home.packages = with pkgs; [ ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
}; };
}; };

View File

@@ -0,0 +1,8 @@
{ den, modules, ... }:
{
modules.common.provides = {
gaming = {
includes = [ modules.steam ];
};
};
}

View File

@@ -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;
})
];
};
};
};
};
}

27
config/modules/helium.nix Normal file
View File

@@ -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"}'';
};
};
};
}

View File

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

65
config/modules/obs.nix Normal file
View File

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

View File

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

93
flake.lock generated
View File

@@ -333,6 +333,27 @@
"type": "gitlab" "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": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -424,7 +445,7 @@
"hyprwire": "hyprwire", "hyprwire": "hyprwire",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"systems": "systems", "systems": "systems_2",
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
@@ -801,7 +822,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_2" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1771023756, "lastModified": 1771023756,
@@ -900,6 +921,7 @@
"flake-file": "flake-file", "flake-file": "flake-file",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"font-patcher": "font-patcher", "font-patcher": "font-patcher",
"heliumFlake": "heliumFlake",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"import-tree": "import-tree", "import-tree": "import-tree",
@@ -911,7 +933,7 @@
"raspberry-pi-nix": "raspberry-pi-nix", "raspberry-pi-nix": "raspberry-pi-nix",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix", "stylix": "stylix",
"systems": "systems_4", "systems": "systems_5",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
} }
}, },
@@ -1067,7 +1089,7 @@
"nixpkgs" "nixpkgs"
], ],
"nur": "nur", "nur": "nur",
"systems": "systems_3", "systems": "systems_4",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@@ -1089,21 +1111,6 @@
} }
}, },
"systems": { "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": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -1118,6 +1125,21 @@
"type": "github" "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": { "systems_3": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@@ -1148,6 +1170,21 @@
"type": "github" "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": { "tinted-foot": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -1229,6 +1266,24 @@
"type": "github" "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": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": [ "hyprland-protocols": [

View File

@@ -13,6 +13,10 @@
url = "github:hercules-ci/flake-parts"; url = "github:hercules-ci/flake-parts";
}; };
font-patcher.url = "github:Doloro1978/nix-nerd-fonts-patcher"; font-patcher.url = "github:Doloro1978/nix-nerd-fonts-patcher";
heliumFlake = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:vikingnope/helium-browser-nix-flake";
};
home-manager = { home-manager = {
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";