created a toggeable module
This commit is contained in:
239
hosts/workstation/configuration.nix
Normal file
239
hosts/workstation/configuration.nix
Normal file
@@ -0,0 +1,239 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
unstable = import
|
||||
(builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") {
|
||||
config = config.nixpkgs.config;
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
# <agenix/modules/age.nix>
|
||||
./hardware-configuration.nix
|
||||
../../base.nix
|
||||
../../gnome.nix
|
||||
../../jawz.nix
|
||||
../../home-manager/default.nix
|
||||
../../services/network.nix
|
||||
../../services/nvidia.nix
|
||||
../../services/printing.nix
|
||||
../../services/sound.nix
|
||||
../../services/systemd-user/tasks.nix
|
||||
../../bundles/art.nix
|
||||
../../bundles/dictionaries.nix
|
||||
../../bundles/fonts.nix
|
||||
../../bundles/gaming.nix
|
||||
../../bundles/internet.nix
|
||||
../../bundles/office.nix
|
||||
../../bundles/dev/haskell.nix
|
||||
../../bundles/dev/nix.nix
|
||||
../../bundles/dev/python.nix
|
||||
];
|
||||
gaming.enable = true;
|
||||
|
||||
networking = {
|
||||
hostName = "workstation";
|
||||
firewall = let
|
||||
openPorts = [
|
||||
7860 # chatgpt
|
||||
6674 # ns-usbloader
|
||||
];
|
||||
openPortRanges = [{
|
||||
from = 1714; # kdeconnect
|
||||
to = 1764; # kdeconnect
|
||||
}];
|
||||
in {
|
||||
allowedTCPPorts = openPorts;
|
||||
allowedUDPPorts = openPorts;
|
||||
allowedTCPPortRanges = openPortRanges;
|
||||
allowedUDPPortRanges = openPortRanges;
|
||||
};
|
||||
};
|
||||
nix = let
|
||||
featuresList = [
|
||||
"nixos-test"
|
||||
"benchmark"
|
||||
"big-parallel"
|
||||
"kvm"
|
||||
"gccarch-znver3"
|
||||
"gccarch-skylake"
|
||||
"gccarch-alderlake"
|
||||
];
|
||||
in {
|
||||
distributedBuilds = true;
|
||||
settings = {
|
||||
cores = 16;
|
||||
trusted-users = [ "nixremote" ];
|
||||
system-features = featuresList;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
groups.nixremote.gid = 555;
|
||||
users = {
|
||||
nixremote = {
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
group = "nixremote";
|
||||
home = "/var/nixremote/";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN6HsajaTL+nTJtSIu00M5WJwgt/7fyU59gBr2R7tbnv root@server"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGrC7sVvDT0is2oq/H1Do99LPaQKvyGMAsrF6/fuf1aP root@miniserver"
|
||||
];
|
||||
};
|
||||
jawz = {
|
||||
packages = (with pkgs; [
|
||||
|
||||
godot_4 # game development
|
||||
unstable.gdtoolkit # gdscript language server
|
||||
|
||||
blanket # background noise
|
||||
pika-backup # backups
|
||||
metadata-cleaner # remove any metadata and geolocation from files
|
||||
# sequeler # friendly SQL client
|
||||
# czkawka # duplicate finder
|
||||
# celeste # sync tool for any cloud provider
|
||||
|
||||
easyeffects # equalizer
|
||||
celluloid # video player
|
||||
# cozy # audiobooks player
|
||||
# hakuneko # manga & comic GUI downloader
|
||||
# gnome-podcasts # podcast player
|
||||
handbrake # video converter, may be unnecessary
|
||||
curtail # image compressor
|
||||
pitivi # video editor
|
||||
identity # compare images or videos
|
||||
gnome-obfuscate # censor private information
|
||||
mousai # poor man shazam
|
||||
tagger # tag music files
|
||||
obs-studio # screen recorder & streamer
|
||||
shortwave # listen to world radio
|
||||
|
||||
unstable.yt-dlp # downloads videos from most video websites
|
||||
unstable.gallery-dl # similar to yt-dlp but for most image gallery websites
|
||||
|
||||
fd # modern find, faster searches
|
||||
fzf # fuzzy finder! super cool and useful
|
||||
gdu # disk-space utility checker, somewhat useful
|
||||
du-dust # rusty du similar to gdu
|
||||
(ripgrep.override { withPCRE2 = true; }) # modern grep
|
||||
trash-cli # oop! did not meant to delete that
|
||||
eza # like ls but with colors
|
||||
gocryptfs # encrypted filesystem! shhh!!!
|
||||
rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS
|
||||
imagemagick # photoshop what??
|
||||
|
||||
ffmpeg_5-full # not ffmpreg, the coolest video conversion tool!
|
||||
torrenttools # create torrent files from the terminal!
|
||||
vcsi # video thumbnails for torrents, can I replace it with ^?
|
||||
|
||||
(writeScriptBin "tasks" (builtins.readFile ../../scripts/tasks.sh))
|
||||
(writeScriptBin "ffmpeg4discord"
|
||||
(builtins.readFile ../../scripts/ffmpeg4discord.py))
|
||||
(writeScriptBin "ffmpreg"
|
||||
(builtins.readFile ../../scripts/ffmpreg.sh))
|
||||
(writeScriptBin "split-dir"
|
||||
(builtins.readFile ../../scripts/split-dir.sh))
|
||||
(writeScriptBin "run" (builtins.readFile ../../scripts/run.sh))
|
||||
(writeScriptBin "pika-list"
|
||||
(builtins.readFile ../../scripts/pika-list.sh))
|
||||
|
||||
# required (optionally) by doom emacs, but still are rather useful
|
||||
tree-sitter # code parsing based on symbols and shit, I do not get it
|
||||
graphviz # graphs
|
||||
tetex
|
||||
languagetool # proofreader for English
|
||||
# these two are for doom everywhere
|
||||
xorg.xwininfo
|
||||
xdotool
|
||||
xclip
|
||||
|
||||
tldr # man for retards
|
||||
exercism # learn to code
|
||||
|
||||
# SH
|
||||
bats # testing system, required by Exercism
|
||||
bashdb # autocomplete
|
||||
shellcheck # linting
|
||||
shfmt # a shell parser and formatter
|
||||
|
||||
# C# & Rust
|
||||
# omnisharp-roslyn # c# linter and code formatter
|
||||
|
||||
# DOCKER
|
||||
dockfmt
|
||||
|
||||
# JS
|
||||
nodejs # not as bad as I thought
|
||||
jq # linting
|
||||
|
||||
]) ++ (with pkgs.python3Packages; [
|
||||
(buildPythonApplication rec {
|
||||
pname = "download";
|
||||
version = "1.5";
|
||||
src = ../../scripts/download/.;
|
||||
doCheck = false;
|
||||
buildInputs = [ setuptools ];
|
||||
propagatedBuildInputs = [ pyyaml types-pyyaml ];
|
||||
})
|
||||
(buildPythonApplication rec {
|
||||
pname = "ffpb";
|
||||
version = "0.4.1";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-7eVqbLpMHS1sBw2vYS4cTtyVdnnknGtEI8190VlXflk=";
|
||||
};
|
||||
doCheck = false;
|
||||
buildInputs = [ setuptools ];
|
||||
propagatedBuildInputs = [ tqdm ];
|
||||
})
|
||||
|
||||
]) ++ (with pkgs.nodePackages; [
|
||||
# Language servers
|
||||
dockerfile-language-server-nodejs
|
||||
yaml-language-server
|
||||
bash-language-server
|
||||
vscode-json-languageserver
|
||||
pyright
|
||||
|
||||
markdownlint-cli # Linter
|
||||
prettier # Linter
|
||||
pnpm # Package manager
|
||||
]);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||
bluez_monitor.properties = {
|
||||
["bluez5.enable-sbc-xq"] = true,
|
||||
["bluez5.enable-msbc"] = true,
|
||||
["bluez5.enable-hw-volume"] = true,
|
||||
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.gnomeExtensions.gsconnect;
|
||||
};
|
||||
|
||||
services.resilio = {
|
||||
deviceName = "chichis";
|
||||
enable = true;
|
||||
useUpnp = true;
|
||||
enableWebUI = true;
|
||||
httpPass = "528491";
|
||||
httpLogin = "chichis";
|
||||
httpListenPort = 9876;
|
||||
httpListenAddr = "0.0.0.0";
|
||||
directoryRoot = "/resilio";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user