initial commit

This commit is contained in:
Ranomier 2024-09-21 17:10:45 +02:00 committed by Ranomier
commit 2597fc7fb8
27 changed files with 1051 additions and 0 deletions

View file

@ -0,0 +1,56 @@
{ pkgs, ... }:
{
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
# If you want to use JACK applications, uncomment this
jack.enable = true;
extraConfig.pipewire."99-input-denoise" = {
"context.modules" = [
{
"name" = "libpipewire-module-filter-chain";
"args" = {
"node.description" = "Noise Canceling source";
"media.name" = "Noise Canceling source";
"filter.graph" = {
"nodes" = [
{
"type" = "ladspa";
"name" = "rnnoise";
"plugin" = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so";
"label" = "noise_suppressor_stereo";
"control" = {
"VAD Threshold (%)" = 50.0;
};
}
];
};
"audio.position" = [
"FL"
"FR"
];
"capture.props" = {
"node.name" = "effect_input.rnnoise";
"node.passive" = true;
};
"playback.props" = {
"node.name" = "effect_output.rnnoise";
"media.class" = "Audio/Source";
};
};
}
];
};
};
environment.systemPackages = with pkgs; [
helvum
easyeffects
];
}

View file

@ -0,0 +1,5 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
brave
];
}

View file

@ -0,0 +1,13 @@
{ pkgs, ... }: {
# The logical browser of choice
programs.firefox.enable = true;
xdg.mime.defaultApplications = let
browser_desktop_file = "firefox.desktop";
in {
"text/html" = browser_desktop_file;
"x-scheme-handler/http" = browser_desktop_file;
"x-scheme-handler/https" = browser_desktop_file;
};
environment.sessionVariables.DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
}

37
modules/software/game.nix Normal file
View file

@ -0,0 +1,37 @@
{ pkgs, ... }: {
#environment.systemPackages = with pkgs; [ ];
# hardware.steam-hardware.enable = true; # Note that this is already enabled with programs.steam.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall =
true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall =
true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall =
true; # Open ports in the firewall for Steam Local Network Game Transfers
};
programs.steam.gamescopeSession.enable = true;
#### FHS environment only
# This will only make partial installation - provide the script, which creates the typical environment expected by proprietary games and software on regular Linux, allowing to run such software without patching. Useful if you plan to run games downloaded from the internet.
# Note that this is not necessary for clients installed from Nixpkgs (like Minigalaxy or Itch), which already use the FHS environment.
# There are two options to install the FHS environment. The first is to install steam-run.
#Example snippet of configuration.nix:
# environment.systemPackages = with pkgs; [
# steam-run
# ];
# Another option, in case you need more flexibility, is to directly reference the part of steam metapackage.
# Example snippet of configuration.nix:
# environment.systemPackages = with pkgs; [
# (steam.override { /* Your overrides here */ }).run
# ];
# Install the game by setting the executable attribute on the installer and then running it via steam-run ./your_installer.sh. After installation, edit the "~/.local/share/applications/your_game.desktop" and replace the exec line from Exec="/home/user/game/start.sh" "" with Exec="steam-run" "/home/user/game/start.sh".
environment.systemPackages = with pkgs; [ steam-run ];
programs.steam.extraCompatPackages = with pkgs; [ proton-ge-bin ];
}

View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
nix.extraOptions = ''
plugin-files = ${pkgs.nix-doc}/lib/libnix_doc_plugin.so
'';
environment.systemPackages = with pkgs; [
nix-doc
];
}

View file

@ -0,0 +1,11 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
nix-index
];
programs.command-not-found.enable = false;
# for home-manager, use programs.bash.initExtra instead
programs.bash.interactiveShellInit = ''
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
'';
}

View file

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
# to run normal external binaries
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
# Add any missing dynamic libraries for unpackaged
# programs here, NOT in environment.systemPackages
];
}

View file

@ -0,0 +1,20 @@
{ pkgs, config, ... }:
{
environment.systemPackages = [
(pkgs.wrapOBS {
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-backgroundremoval
obs-pipewire-audio-capture
];
})
];
boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
boot.kernelModules = [ "v4l2loopback" ];
boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
security.polkit.enable = true;
}

View file

@ -0,0 +1,95 @@
{ pkgs, ... }: {
# Allow unfree packages
#unstable.config.allowUnfree = true;
nixpkgs.config.allowUnfree = true;
# also opens the TCP and UDP port from 1714 to 1764
programs.kdeconnect.enable = true;
# for running android apps
virtualisation.waydroid.enable =
true; # also starts the systemd service waydroid-container
# virt manager, for running VM's
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
environment.pathsToLink = [ "/share/foot" ];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = let
amberol_wrapper = pkgs.writeShellScriptBin "amberol" ''
export GDK_BACKEND='x11'
exec "${pkgs.amberol}/bin/amberol" "$@"
'';
in with pkgs; [
# low level stuff
efibootmgr
#exfat
exfatprogs
greetd.greetd
greetd.tuigreet
killall
vulnix
# hardware
brightnessctl
usbutils
lm_sensors
# neovim
unstable.neovim
git
gnumake
gcc
nodePackages.npm
nodejs-slim
python3
fd
nodejs-slim
cargo
rustc
# tooling
htop
ncdu
wget
miniserve
file
unzip
tmux
qemu
home-manager
# move to homemanager?
lxqt.pavucontrol-qt
mumble
amberol_wrapper
amberol
mpv
zathura
feh
#unstable.obsidian
keepassxc
#minecraft
element-desktop
];
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
dina-font
proggyfonts
font-awesome
jetbrains-mono
fira-code
fira-code-symbols
#droid-sans-mono
(nerdfonts.override {
fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ];
})
];
}