s0meMiniPC-nix -> viola: rename

Signed-off-by: s0me1newithhand7s <git+me@hand7s.org>
This commit is contained in:
s0me1newithhand7s 2026-02-08 22:18:49 +03:00
parent 91d145fc9b
commit d3588098ee
72 changed files with 101 additions and 98 deletions

123
viola/services/forgejo.nix Normal file
View file

@ -0,0 +1,123 @@
{...}: {
services = {
forgejo = {
enable = true;
database = {
type = "postgres";
port = "${dbport}";
};
settings = {
DEFAULT = {
APP_NAME = "Forgejo";
APP_SLOGAN = "hand7s'es instance";
APP_DISPLAY_NAME_FORMAT = "{APP_NAME}: {APP_SLOGAN}.";
RUN_MODE = "prod";
};
repository = {
DEFAULT_PRIVATE = "last";
PREFERRED_LICENSES = "MIT";
DISABLE_HTTP_GIT = true;
USE_COMPAT_SSH_URI = true;
GO_GET_CLONE_URL_PROTOCOL = "ssh";
DEFAULT_BRANCH = "master";
};
"repository.pull-request" = {
WORK_IN_PROGRESS_PREFIXES = "[WIP]:";
};
"repository.issue" = {
MAX_PINNED = 2;
};
"repository.upload" = {
ENABLED = true;
FILE_MAX_SIZE = 25;
MAX_FILES = 10;
};
"repository.signing" = {
FORMAT = "openssh";
INITIAL_COMMIT = "always";
WIKI = "always";
CRUD_ACTIONS = "always";
MERGES = "always";
};
badges = {
ENABLED = false;
};
cors = {
ENABLED = false;
};
actions = {
ENABLED = false;
};
mailer = {
ENABLED = false;
};
cron = {
ENABLED = false;
};
metrics = {
ENABLED = false;
};
federation = {
ENABLED = false;
};
ui = {
DEFAULT_THEME = "forgejo-auto-tritanopia";
};
"ui.meta" = {
AUTHOR = "hand7s'es Forgejo instance";
DESCRIPTION = "Forgejo - by Codeberg.";
};
log = {
LEVEL = "Warn";
};
service = {
DISABLE_REGISTRATION = true;
};
"service.explore" = {
DISABLE_ORGANIZATIONS_PAGE = true;
};
server = {
DOMAIN = "git.hand7s.org";
ROOT_URL = "https://git.hand7s.org";
HTTP_PORT = 53350;
START_SSH_SERVER = false;
LFS_START_SERVER = false;
};
openid = {
ENABLE_OPENID_SIGNIN = true;
ENABLE_OPENID_SIGNUP = true;
};
cache = {
ADAPTER = "redis";
INTERVAL = "900";
HOST = "";
ITEM_TTL = "1h";
};
};
};
};
}

18
viola/services/greetd.nix Normal file
View file

@ -0,0 +1,18 @@
{
pkgs,
lib,
...
}: {
services = {
greetd = {
enable = true;
restart = false;
settings = {
default_session = {
command = "${lib.getExe pkgs.tuigreet} -r -t -c ${lib.getExe pkgs.fish}";
user = "greeter";
};
};
};
};
}

View file

@ -0,0 +1,91 @@
{...}: {
services = {
homepage-dashboard = {
enable = true;
listenPort = 8080;
settings = {
title = "hand7s homepage";
description = "duh";
theme = "dark";
background = "https://w.wallhaven.cc/full/1q/wallhaven-1q87xv.png";
color = "violet";
headerStyle = "boxed";
layout = [
{
Dev = {
iconsOnly = true;
};
}
];
};
bookmarks = [
{
Dev = [
{
GitHub = [
{
abbr = "GH";
href = "https://github.com/";
}
];
}
{
Forgejo = [
{
abbr = "Forge";
href = "https://git.hand7s.org/";
}
];
}
{
PivateBin = [
{
abbr = "PB";
href = "https://bin.hand7s.org/";
}
];
}
];
}
];
services = [
];
widgets = [
{
greeting = {
text_size = "xl";
text = "Hi, hand7s.";
};
}
{
search = {
provider = "google";
target = "_blank";
focus = true;
};
}
{
resources = {
cpu = true;
memory = true;
disk = "/";
cputemp = true;
uptime = true;
units = "metric";
refresh = 3000;
network = true;
};
}
];
};
};
}

View file

@ -0,0 +1,7 @@
{...}: {
services = {
irqbalance = {
enable = true;
};
};
}

View file

@ -0,0 +1,15 @@
{...}: {
services = {
libinput = {
enable = true;
mouse = {
accelProfile = "flat";
accelSpeed = "-1.0";
buttonMapping = "1 2 3 4 5 6 7 8 9";
horizontalScrolling = true;
leftHanded = false;
naturalScrolling = true;
};
};
};
}

View file

@ -0,0 +1,7 @@
{...}: {
services = {
netbird = {
enable = true;
};
};
}

View file

@ -0,0 +1,22 @@
{config, ...}: {
services = {
openssh = {
enable = true;
allowSFTP = true;
openFirewall = true;
ports = [
47345
];
settings = {
PrintMotd = false;
PermitRootLogin = "no";
PasswordAuthentication = false;
};
authorizedKeysFiles = [
config.sops.secrets.sshKey.path
];
};
};
}

View file

@ -0,0 +1,65 @@
{...}: {
services = {
pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
audio = {
enable = true;
};
pulse = {
enable = true;
};
jack = {
enable = true;
};
wireplumber = {
enable = true;
};
extraConfig = {
pipewire = {
"92-low-latency" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.allowed-rates" = [
44100
48000
88200
96000
];
"default.clock.min-quantum" = 512;
"default.clock.quantum" = 4096;
"default.clock.max-quantum" = 8192;
};
};
"93-no-resampling" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.allowed-rates" = [
44100
48000
96000
192000
];
};
};
"94-no-upmixing" = {
"stream.properties" = {
"channelmix.upmix" = false;
};
};
};
};
};
};
}

View file

@ -0,0 +1,43 @@
{...}: {
services = {
privatebin = {
enable = true;
enableNginx = true;
virtualHost = "bin.hand7s.org";
settings = {
main = {
name = "hand7s bin";
discussion = false;
qrcode = false;
compression = "none";
defaultformatter = "plaintext";
fileupload = false;
languageselection = false;
password = true;
sizelimit = 10 * 1000 * 1000;
template = "bootstrap5";
};
expire = {
default = "1week";
clone = false;
};
formatter_options = {
markdown = "Markdown";
plaintext = "Plain Text";
syntaxhighlighting = "Source Code";
};
traffic = {
limit = 5;
};
purge = {
limit = 0;
batchsize = 10;
};
};
};
};
}

9
viola/services/scx.nix Normal file
View file

@ -0,0 +1,9 @@
{...}: {
services = {
scx = {
enable = true;
# package = pkgs.scx_git.full;
scheduler = "scx_lavd";
};
};
}

View file

@ -0,0 +1,8 @@
{pkgs, ...}: {
services = {
usbmuxd = {
enable = true;
package = pkgs.usbmuxd2;
};
};
}

View file

@ -0,0 +1,26 @@
{
lib,
pkgs,
...
}: {
services = {
xserver = {
display = lib.mkForce 0;
enable = true;
excludePackages = with pkgs; [
xterm
];
videoDrivers = [
"modesetting"
];
xkb = {
layout = "us, ru";
variant = "";
options = "grp:caps_toggle";
};
};
};
}

145
viola/services/zapret.nix Normal file
View file

@ -0,0 +1,145 @@
{...}: {
services = {
zapret = {
enable = true;
configureFirewall = true;
qnum = 350;
params = [
"--wssize 1:6"
"--filter-tcp=80"
"--dpi-desync=multisplit"
"--dpi-desync-split-pos=10"
"--dpi-desync-repeats=6"
"--new"
"--filter-tcp=443"
"--dpi-desync=multidisorder"
"--dpi-desync-split-pos=1,midsld"
"--new"
"--filter-tcp=443"
"--dpi-desync=syndata"
"--dpi-desync-fake-syndata=0x00000000"
"--dpi-desync-ttl=10"
"--new"
"--filter-udp=443"
"--dpi-desync=fake"
"--dpi-desync-repeats=6"
"--dpi-desync-fake-quic=0x00000000"
"--new"
"--filter-udp=443"
"--dpi-desync=fake,udplen"
"--dpi-desync-udplen-increment=5"
"--dpi-desync-fake-tls=0x00000000"
"--dpi-desync-cutoff=n3"
"--dpi-desync-repeats=2"
"--new"
"--filter-tcp=443"
"--dpi-desync=split"
"--dpi-desync-fooling=md5sig,badseq"
"--dpi-desync-fake-tls=0x00000000"
"--dpi-desync-split-pos=1"
"--dpi-desync-repeats=10"
"--new"
"--filter-tcp=443"
"--dpi-desync=fake,split2"
"--dpi-desync-fooling=md5sig"
"--dpi-desync-fake-tls=0x00000000"
"--dpi-desync-split-seqovl=2"
"--dpi-desync-split-pos=2"
"--dpi-desync-autottl"
"--new"
"--filter-tcp=443"
"--dpi-desync=fake,split2"
"--dpi-desync-fooling=md5sig"
"--dpi-desync-fake-tls=0x00000000"
"--dpi-desync-split-seqovl=2"
"--dpi-desync-split-pos=2"
"--dpi-desync-autottl"
"--new"
"--filter-tcp=80"
"--dpi-desync=fake,split2"
"--dpi-desync-fooling=md5sig"
"--dpi-desync-fake-tls=0x00000000"
"--dpi-desync-autottl"
"--new"
"--filter-tcp=80"
"--dpi-desync-ttl=1"
"--dpi-desync-autottl=2"
"--dpi-desync-fake-tls=0x00000000"
"--dpi-desync-split-pos=1"
"--dpi-desync=fake,split2"
"--dpi-desync-repeats=6"
"--dpi-desync-fooling=md5sig"
"--new"
];
whitelist = [
"googlevideo.com"
"youtu.be"
"youtube.com"
"youtubei.googleapis.com"
"googlevideo.com"
"youtu.be"
"youtube.com"
"youtubei.googleapis.com"
"youtubeembeddedplayer.googleapis.com"
"ytimg.l.google.com"
"ytimg.com"
"jnn-pa.googleapis.com"
"youtube-nocookie.com"
"youtube-ui.l.google.com"
"yt-video-upload.l.google.com"
"wide-youtube.l.google.com"
"youtubekids.com"
"ggpht.com"
"music.youtube.com"
"test.googlevideo.com"
"discord.com"
"gateway.discord.gg"
"cdn.discordapp.com"
"discordapp.net"
"discordapp.com"
"discord.gg"
"media.discordapp.net"
"images-ext-1.discordapp.net"
"discord.app"
"discord.media"
"discordcdn.com"
"discord.dev"
"discord.new"
"discord.gift"
"discordstatus.com"
"dis.gd"
"discord.co"
"discord-attachments-uploads-prd.storage.googleapis.com"
"7tv.app"
"7tv.io"
"10tv.app"
"x.com"
"t.co"
"ads-twitter.com"
"twimg.com"
"twitter.com"
"pscp.tv"
"twtrdns.net"
"twttr.com"
"periscope.tv"
"tweetdeck.com"
"twitpic.com"
"twitter.co"
"twitterinc.com"
"twitteroauth.com"
"twitterstat.us"
];
};
};
}

View file

@ -0,0 +1,10 @@
{...}: {
services = {
zerotierone = {
enable = false;
joinNetworks = [
# nope
];
};
};
}

View file

@ -0,0 +1,77 @@
{config, ...}: {
services = {
zitadel = {
enable = true;
tlsMode = "external";
masterKeyFile = config.sops.secrets.zitadelMasterKey;
steps = {
FirstInstance = {
InstanceName = "zitadel.hand7s.org";
DefaultLanguage = "en";
LoginPolicy = {
AllowRegister = false;
};
Org = {
Name = "ZITADEL";
Human = {
UserName = "admin";
FirstName = "Bogdan";
LastName = "Litvinov";
DisplayName = "hand7s";
PasswordChangeRequired = true;
PreferredLanguage = "en";
Email = {
Address = "me@hand7s.org";
Verified = true;
};
};
};
};
};
settings = {
Port = 8443;
ExternalPort = 8443;
ExternalDomain = "zitadel.hand7s.org";
ExternalSecure = true;
Log = {
Level = "debug";
};
Telemetry = {
Enabled = false;
};
Database = {
postgres = {
Host = "${dbhost}";
Port = "${dbport}";
Database = "zitadel";
User = {
Username = "zitadel";
SSL = {
Mode = "disable";
};
};
};
};
Caches = {
Connectors = {
Redis = {
Enabled = true;
Addr = "${cahceaddress}";
Password = "${cahcepass}";
PoolSize = "900";
PoolTimeout = "1800s";
};
};
};
};
};
};
}