chore: rename nixos to linux

This commit is contained in:
Youwen Wu 2024-08-24 03:52:45 -07:00
parent 26aa04552c
commit cbcb9467d6
Signed by: youwen
GPG key ID: 865658ED1FE61EC3
11 changed files with 18 additions and 20 deletions

17
modules/linux/audio/default.nix Executable file
View file

@ -0,0 +1,17 @@
{
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
}

18
modules/linux/fonts/default.nix Executable file
View file

@ -0,0 +1,18 @@
{pkgs, ...}: {
fonts = {
enableDefaultPackages = true;
fontconfig = {
defaultFonts = {
serif = ["Noto Serif"];
sansSerif = ["Noto Sans"];
};
};
packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
(nerdfonts.override {fonts = ["CascadiaCode"];})
(google-fonts.override {fonts = ["Lora"];})
];
};
}

View file

@ -0,0 +1,33 @@
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
gamescopeSession.enable = true;
};
programs.gamescope.enable = true;
nixpkgs.config.packageOverrides = pkgs: {
steam = pkgs.steam.override {
extraPkgs = pkgs:
with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
(writeShellScriptBin "launch-gamescope" ''
(sleep 1; pgrep gamescope| xargs renice -n -11 -p)&
exec gamescope "$@"
'')
keyutils
];
};
};
}

View file

@ -0,0 +1,22 @@
{pkgs, ...}: {
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland --remember --greeting 'Welcome to liminalOS. Access is restricted to authorized personnel only.'";
user = "greeter";
};
};
};
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal"; # Without this errors will spam on screen
# Without these bootlogs will spam on screen
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
}

View file

@ -0,0 +1,4 @@
{
services.logmein-hamachi.enable = true;
programs.haguichi.enable = true;
}

View file

@ -0,0 +1,19 @@
let
universalAllowedPorts = [27016 42805];
universalAllowedRanges = [
{
from = 42852;
to = 42872;
}
];
in {
services.openssh.enable = true;
networking.firewall = {
allowedTCPPorts = universalAllowedPorts;
allowedUDPPorts = universalAllowedPorts;
allowedUDPPortRanges = universalAllowedRanges;
allowedTCPPortRanges = universalAllowedRanges;
};
networking.firewall.enable = true;
networking.nameservers = ["1.1.1.1" "1.0.0.1"];
}

View file

@ -0,0 +1,9 @@
{pkgs, ...}: {
services.spotifyd = {
enable = true;
# settings = {global = 320;};
};
environment.systemPackages = [
pkgs.spotify-player
];
}