Implemented custom system for creating and distributing color schemes based on wallpapers, and also cycling through wallpapers.
nixfmt'd the codebase
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ inputs, pkgs, username, ... }:
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
shed = inputs.shed.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
@@ -33,8 +38,14 @@ in
|
||||
};
|
||||
|
||||
environment = {
|
||||
variables = { PATH = "${pkgs.clang-tools}/bin:$PATH"; };
|
||||
shells = [ pkgs.myPkgs.slash pkgs.zsh pkgs.bash ];
|
||||
variables = {
|
||||
PATH = "${pkgs.clang-tools}/bin:$PATH";
|
||||
};
|
||||
shells = [
|
||||
pkgs.myPkgs.slash
|
||||
pkgs.zsh
|
||||
pkgs.bash
|
||||
];
|
||||
};
|
||||
|
||||
programs.shed.enable = true;
|
||||
@@ -52,7 +63,13 @@ in
|
||||
isNormalUser = true;
|
||||
initialPassword = "1234";
|
||||
shell = pkgs.shed;
|
||||
extraGroups = [ "davfs2" "input" "wheel" "persist" "libvirtd" ];
|
||||
extraGroups = [
|
||||
"davfs2"
|
||||
"input"
|
||||
"wheel"
|
||||
"persist"
|
||||
"libvirtd"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ slash, pkgs, username, ... }:
|
||||
{
|
||||
slash,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
kickstartServer =
|
||||
@@ -17,30 +22,31 @@ let
|
||||
'';
|
||||
};
|
||||
startTf2Server = pkgs.writeShellScript "start-srv.sh" ''
|
||||
set -euo pipefail
|
||||
export HOME=/home/tf2
|
||||
export LD_LIBRARY_PATH=/usr/lib:/usr/lib32
|
||||
mkdir -p "$HOME/tf2server"
|
||||
mkdir -p "$HOME/tf2server"
|
||||
set -euo pipefail
|
||||
export HOME=/home/tf2
|
||||
export LD_LIBRARY_PATH=/usr/lib:/usr/lib32
|
||||
mkdir -p "$HOME/tf2server"
|
||||
mkdir -p "$HOME/tf2server"
|
||||
|
||||
steamcmd +force_install_dir "$HOME/tf2server" \
|
||||
+login anonymous \
|
||||
+app_update 232250 validate \
|
||||
+quit
|
||||
steamcmd +force_install_dir "$HOME/tf2server" \
|
||||
+login anonymous \
|
||||
+app_update 232250 validate \
|
||||
+quit
|
||||
|
||||
cd "$HOME/tf2server"
|
||||
cd "$HOME/tf2server"
|
||||
|
||||
ln -sf "$HOME/.steam/steam/linux64" "$HOME/.steam/sdk64"
|
||||
ln -sf "$HOME/.steam/steam/linux32" "$HOME/.steam/sdk32"
|
||||
ln -sf "$HOME/.steam/steam/linux64" "$HOME/.steam/sdk64"
|
||||
ln -sf "$HOME/.steam/steam/linux32" "$HOME/.steam/sdk32"
|
||||
|
||||
exec ./srcds_run -game tf -console -port 25565 +map cp_dustbowl \
|
||||
+ip 10.233.1.2 -norestart \
|
||||
+sv_setsteamaccount 8862FD4B30F401036B8AAC6A7FE6B123
|
||||
exec ./srcds_run -game tf -console -port 25565 +map cp_dustbowl \
|
||||
+ip 10.233.1.2 -norestart \
|
||||
+sv_setsteamaccount 8862FD4B30F401036B8AAC6A7FE6B123
|
||||
'';
|
||||
in
|
||||
pkgs.buildFHSEnv {
|
||||
name = "srcds-env";
|
||||
targetPkgs = pkgs: with pkgs; [
|
||||
pkgs.buildFHSEnv {
|
||||
name = "srcds-env";
|
||||
targetPkgs =
|
||||
pkgs: with pkgs; [
|
||||
steamcmd
|
||||
glibc
|
||||
zlib
|
||||
@@ -50,29 +56,30 @@ let
|
||||
libnl
|
||||
libsrcds
|
||||
|
||||
# Optional: link compat
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
multiPkgs = pkgs: with pkgs.pkgsi686Linux; [
|
||||
glibc
|
||||
zlib
|
||||
ncurses5
|
||||
libuuid
|
||||
alsa-lib
|
||||
libxcrypt-legacy
|
||||
gcc
|
||||
];
|
||||
multiArch = true;
|
||||
runScript = "${startTf2Server}";
|
||||
# Optional: link compat
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
multiPkgs =
|
||||
pkgs: with pkgs.pkgsi686Linux; [
|
||||
glibc
|
||||
zlib
|
||||
ncurses5
|
||||
libuuid
|
||||
alsa-lib
|
||||
libxcrypt-legacy
|
||||
gcc
|
||||
];
|
||||
multiArch = true;
|
||||
runScript = "${startTf2Server}";
|
||||
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
nat = {
|
||||
enable = true;
|
||||
internalInterfaces = ["ve-+"];
|
||||
externalInterface = "enp8s0";
|
||||
internalInterfaces = [ "ve-+" ];
|
||||
externalInterface = "enp8s0";
|
||||
};
|
||||
};
|
||||
containers.tf2server = {
|
||||
@@ -84,7 +91,6 @@ in
|
||||
imports = [ ];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
||||
services.openssh.enable = true;
|
||||
users.users.root.password = "root"; # For quick login, remove in prod
|
||||
|
||||
@@ -114,11 +120,19 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# Optional: open ports on the container
|
||||
networking.firewall.allowedTCPPorts = [ 25565 ];
|
||||
networking.firewall.allowedUDPPorts = [ 25565 27005 27015 27020 ];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
25565
|
||||
27005
|
||||
27015
|
||||
27020
|
||||
];
|
||||
|
||||
system.stateVersion = "25.11"; # or your NixOS version
|
||||
};
|
||||
|
||||
@@ -1,41 +1,68 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "uas" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"ahci"
|
||||
"uas"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/9a98748d-1953-4316-9788-07d11c5d0af6";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" "compress=zstd:3" "noatime" ];
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/9a98748d-1953-4316-9788-07d11c5d0af6";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=root"
|
||||
"compress=zstd:3"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/5BA1-A9F8";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/5BA1-A9F8";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/00fd7a7c-d916-4a61-abc1-8dde26b4413b";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd:3" "noatime" ];
|
||||
};
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/00fd7a7c-d916-4a61-abc1-8dde26b4413b";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd:3"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/7c03499c-e2a7-4352-8797-a21f094ef90b";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd:3" "noatime" ];
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/7c03499c-e2a7-4352-8797-a21f094ef90b";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd:3"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ username, ... }: {
|
||||
{ username, ... }:
|
||||
{
|
||||
home.username = "${username}";
|
||||
home.homeDirectory =
|
||||
"/home/${username}";
|
||||
home.homeDirectory = "/home/${username}";
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
@@ -14,7 +14,10 @@
|
||||
envConfig = {
|
||||
hyprlandConfig = {
|
||||
enable = true;
|
||||
monitorNames = [ "DP-3" "DP-1" ];
|
||||
monitorNames = [
|
||||
"DP-3"
|
||||
"DP-1"
|
||||
];
|
||||
workspaceLayout = "dualmonitor";
|
||||
};
|
||||
userPkgs.enable = true;
|
||||
|
||||
Reference in New Issue
Block a user