mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-05-14 10:05:16 +00:00
ah shit
This commit is contained in:
parent
11a0efc709
commit
b5e6c4c991
18 changed files with 293 additions and 124 deletions
default.nixflake.lockflake.nix
machines/jetpure/host
modules
home
programs
themes
nixos
base
misc/users
services
xlib/builder
41
default.nix
Normal file
41
default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
lib,
|
||||
python3,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "spotify-to-ytmusic";
|
||||
version = "0.7.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sigma67";
|
||||
repo = "spotify_to_ytmusic";
|
||||
rev = version;
|
||||
hash = "sha256-LGvdh1ifd9/9M79Eakr/GRGs9devFDh1mEjpwoXt+EY=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
python3.pkgs.setuptools
|
||||
python3.pkgs.setuptools-scm
|
||||
];
|
||||
|
||||
dependencies = with python3.pkgs; [
|
||||
platformdirs
|
||||
spotipy
|
||||
ytmusicapi
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"spotify_to_ytmusic"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Clone a Spotify playlist to YouTube Music";
|
||||
homepage = "https://github.com/sigma67/spotify_to_ytmusic";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
mainProgram = "spotify-to-ytmusic";
|
||||
};
|
||||
}
|
82
flake.lock
generated
82
flake.lock
generated
|
@ -142,12 +142,12 @@
|
|||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"revCount": 57,
|
||||
"lastModified": 1733328505,
|
||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||
"revCount": 69,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
|
@ -308,11 +308,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741916615,
|
||||
"narHash": "sha256-SU6Q/IBGJ9a7u6WrVjZ+ShoIjK3To/lD3U37DgfX1Tw=",
|
||||
"lastModified": 1742521627,
|
||||
"narHash": "sha256-hMp13ZbQFVzT55LQJrJ9cX+T0XLsTf4mTRRIfQAPcrs=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "b2a32ef80ad0cc7f3dee928771791625ff9494c1",
|
||||
"rev": "6f0d1034a2ba574c57952d6c29666b0fdfc5693e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -388,11 +388,11 @@
|
|||
},
|
||||
"hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1741792691,
|
||||
"narHash": "sha256-f0BVt1/cvA0DQ/q3rB+HY4g4tKksd03ZkzI4xehC2Ew=",
|
||||
"lastModified": 1742376361,
|
||||
"narHash": "sha256-VFMgJkp/COvkt5dnkZB4D2szVdmF6DGm5ZdVvTUy61c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "e1f12151258b12c567f456d8248e4694e9390613",
|
||||
"rev": "daaae13dff0ecc692509a1332ff9003d9952d7a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -409,11 +409,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741914680,
|
||||
"narHash": "sha256-Vu4DIZvgfWMzhUyxbHUrJaQb5232S5vuwxQ2sBcBVHk=",
|
||||
"lastModified": 1742530487,
|
||||
"narHash": "sha256-yjBjRn294NpPagPAQCio20X5BzBXiOoz2+xF3/YmEkU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "30cce6848a5aa41ceb5fb33185b84868cc3e9bef",
|
||||
"rev": "d61711497be9ad6a6633aaf203b038b5a970621f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -472,11 +472,11 @@
|
|||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741915514,
|
||||
"narHash": "sha256-zpXOsXAk1x823REV4KRDetvWQp9ymRt79Avh9GVAQDo=",
|
||||
"lastModified": 1742547313,
|
||||
"narHash": "sha256-4P05jbOpNtC3sPnA8/2UFEh/4DcwgcEZN0Ha3aOMnjI=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "0c97d9ef5031198ed85bd0ce8ec75eaec7527927",
|
||||
"rev": "a084f11e00767313f92f3802a0907f1bca32a252",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -505,11 +505,11 @@
|
|||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1741891147,
|
||||
"narHash": "sha256-hCD/llnO/I0ARk6divzVG3a82nNgrcG58dIe0yhzNo8=",
|
||||
"lastModified": 1742542657,
|
||||
"narHash": "sha256-lUz/YftLDTZvsgbzC2bppHLbflsS/NuaNZXp3UvvYgw=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "ee0e2c7f1b4edae42d2f1b05466adbdffe156e61",
|
||||
"rev": "fd1f43673cf4d1e84d9da67e294c040934034eda",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -528,11 +528,11 @@
|
|||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741826393,
|
||||
"narHash": "sha256-deaIXY9Q5OpcSqWEaX5cB4pw0711q9+hRiiq6arqqoU=",
|
||||
"lastModified": 1742469527,
|
||||
"narHash": "sha256-4RYuXu2q+fgu+lDIAPEZW/C5+OMbfyOgoJ+S3OQMhcQ=",
|
||||
"owner": "kaylorben",
|
||||
"repo": "nixcord",
|
||||
"rev": "91abbf5736459beeacb1c3163a2236241cfc6c71",
|
||||
"rev": "f9797561bd3b0dbe13d56567dfd6f54c49b80d8f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -574,11 +574,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1741851582,
|
||||
"narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=",
|
||||
"lastModified": 1742422364,
|
||||
"narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6607cf789e541e7873d40d3a8f7815ea92204f32",
|
||||
"rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -613,11 +613,11 @@
|
|||
"treefmt-nix": "treefmt-nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741926946,
|
||||
"narHash": "sha256-Xn16jiSntu7N0NUNnCOKE5Eu1tm437HUPP+KPrnvMFQ=",
|
||||
"lastModified": 1742547066,
|
||||
"narHash": "sha256-J0jebTk/QkaKZp2pscRmqd7897GWTY8mnu3IKOw0EIc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "f95846104ae4d3178494fdccaff94796eb856e83",
|
||||
"rev": "a0e104c959c0df8d451967062d951ffd1fc6b0c6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -677,11 +677,11 @@
|
|||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741493656,
|
||||
"narHash": "sha256-1M2mf5pZTlhZXkSI8wKs9GfNb1hllND58zQUYSAe8EA=",
|
||||
"lastModified": 1742512598,
|
||||
"narHash": "sha256-nFPhSSxrPrpkmFR6vQq8OpUS+lGIAxDCUKg+5/qcnR8=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"rev": "a06e502c884307c33dbdf2017fd50ab3592ad868",
|
||||
"rev": "610654a0afe56766e639077d9d267148667a25e8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -712,11 +712,11 @@
|
|||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741880767,
|
||||
"narHash": "sha256-tXtop1zIJMyRt1LDERIWwMAMVKdfDtFp/g37YKy2Ke4=",
|
||||
"lastModified": 1742496983,
|
||||
"narHash": "sha256-UpJrU0DEhNLVZwL/RPVOEUHCG6iDOVDoYelkmgS4V38=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "5053a63c87fea3508439b7e9c1a66fa6979a4694",
|
||||
"rev": "7e9906679d384472849272e5a5eef7adbdb1d87f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -871,11 +871,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737103437,
|
||||
"narHash": "sha256-uPNWcYbhY2fjY3HOfRCR5jsfzdzemhfxLSxwjXYXqNc=",
|
||||
"lastModified": 1739829690,
|
||||
"narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "d1ed3b385f8130e392870cfb1dbfaff8a63a1899",
|
||||
"rev": "3d0579f5cc93436052d94b73925b48973a104204",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -964,11 +964,11 @@
|
|||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1741910413,
|
||||
"narHash": "sha256-z9bvteu0rf+xmUDj4VifN06XAFJZQGRSOvdN7rn/oDs=",
|
||||
"lastModified": 1742475924,
|
||||
"narHash": "sha256-xe3tfHp1aisnUVrCbn1axwpeJzcrSOvQNn1bZt6k5DM=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "0325cb1f48a292d873a6844772cca00251cbf945",
|
||||
"rev": "1d98ee089c8bad414a346028a7a0f539ad7cfb9d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -35,8 +35,10 @@
|
|||
};
|
||||
niri = {
|
||||
url = "github:sodiboo/niri-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs-stable.follows = "nixpkgs";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs-stable.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
yt-x = {
|
||||
url = "github:Benexl/yt-x";
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
inherit (lib.x) on off umport;
|
||||
inherit (lib.x) on umport;
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -22,46 +22,32 @@ in
|
|||
boot = on // {
|
||||
plymouth = on;
|
||||
};
|
||||
impermanence = off;
|
||||
network = on;
|
||||
power = off;
|
||||
sound = on;
|
||||
system76 = off;
|
||||
};
|
||||
services = {
|
||||
amneziawg = on // {
|
||||
service = off;
|
||||
config = ./warp.conf;
|
||||
};
|
||||
autocpu = off;
|
||||
dbus = on;
|
||||
deluge = off;
|
||||
flood = on;
|
||||
getty = on;
|
||||
gvfs = on;
|
||||
polkit = on;
|
||||
printing = off;
|
||||
qbittorrent = on;
|
||||
tailscale = on;
|
||||
tlp = off;
|
||||
torrentstream = off;
|
||||
torrserver = on;
|
||||
transmission = off;
|
||||
zram.algo = "zstd";
|
||||
};
|
||||
programs = {
|
||||
common = on;
|
||||
hamachi = off;
|
||||
hyprland = on;
|
||||
nh = on;
|
||||
steam = on;
|
||||
sway = off;
|
||||
};
|
||||
misc = {
|
||||
console = off;
|
||||
locales.zone = "Asia/Chita";
|
||||
protonmail = off;
|
||||
security = on;
|
||||
terraria = off;
|
||||
users.passwd = "$2a$05$yafhLZqwJZaPtcvo1alcQekxot7ef8m9rbYIbIH5AKCywCOZK3URy";
|
||||
variables = on;
|
||||
};
|
||||
|
|
|
@ -8,12 +8,12 @@ with pkgs;
|
|||
let
|
||||
inherit (lib) getExe getExe';
|
||||
inherit (nodePackages_latest) prettier;
|
||||
auto-format = true;
|
||||
vs = n: "vscode-${n}-language-server";
|
||||
indent = {
|
||||
tab-width = 2;
|
||||
unit = " ";
|
||||
};
|
||||
auto-format = true;
|
||||
vs = n: "vscode-${n}-language-server";
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -195,25 +195,7 @@ in
|
|||
yaml = yaml-language-server;
|
||||
in
|
||||
{
|
||||
nixd = {
|
||||
command = getExe nixd;
|
||||
config.nixd = {
|
||||
nixpkgs.expr = "import <nixpkgs> { }";
|
||||
options =
|
||||
let
|
||||
inherit (lib.x) sys path;
|
||||
get = ''(builtins.getFlake "${dir}")'';
|
||||
host = sys.hostName;
|
||||
user = sys.userName;
|
||||
dir = path.flake;
|
||||
in
|
||||
{
|
||||
libX.expr = "${get}.nixosConfigurations.${host}.lib.x";
|
||||
nixos.expr = "${get}.nixosConfigurations.${host}.options";
|
||||
home-manager.expr = "${get}.homeConfigurations.${user}.options";
|
||||
};
|
||||
};
|
||||
};
|
||||
nixd.command = getExe nixd;
|
||||
} # nix
|
||||
// {
|
||||
typescript.command = getExe typescript;
|
||||
|
|
|
@ -8,7 +8,16 @@
|
|||
with lib;
|
||||
with x;
|
||||
let
|
||||
inherit (pkgs) mpvScripts anime4k;
|
||||
inherit (pkgs)
|
||||
mpvScripts
|
||||
anime4k
|
||||
;
|
||||
theme = import ./theme.nix {
|
||||
inherit
|
||||
config
|
||||
lib
|
||||
;
|
||||
};
|
||||
cfg = config.module.programs.gui.mpv;
|
||||
in
|
||||
|
||||
|
@ -29,7 +38,10 @@ in
|
|||
scriptOpts = {
|
||||
sponsorblock-minimal = {
|
||||
sponsorblock_minimal-server = "https://sponsor.ajay.app/api/skipSegments";
|
||||
sponsorblock_minimal-categories = [ "sponsor" ];
|
||||
sponsorblock_minimal-categories = [
|
||||
"sponsor"
|
||||
"selfpromo"
|
||||
];
|
||||
};
|
||||
mpv_thumbnail_script = {
|
||||
autogenerate = "yes";
|
||||
|
@ -42,30 +54,37 @@ in
|
|||
thumbnail_network = "no";
|
||||
background_color = "282828";
|
||||
};
|
||||
};
|
||||
} // theme.uosc;
|
||||
config = {
|
||||
fs = "yes";
|
||||
osc = "no";
|
||||
background-color = mkForce "#000000";
|
||||
glsl-shaders =
|
||||
let
|
||||
mk =
|
||||
if x.sys.is == "laptop" then
|
||||
if (x.sys.is == "laptop") then
|
||||
"${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Restore_CNN_Soft_M.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl"
|
||||
else if x.sys.is == "desktop" then
|
||||
else if (x.sys.is == "desktop") then
|
||||
"${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Restore_CNN_VL.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${anime4k}/Anime4K_Restore_CNN_M.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"
|
||||
else
|
||||
null;
|
||||
in
|
||||
toString mk;
|
||||
};
|
||||
(toString mk);
|
||||
} // theme.conf;
|
||||
extraInput =
|
||||
let
|
||||
mk =
|
||||
if x.sys.is == "laptop" then
|
||||
(import ./anime4k/laptop.nix { inherit pkgs; })
|
||||
else if x.sys.is == "desktop" then
|
||||
(import ./anime4k/desktop.nix { inherit pkgs; })
|
||||
if (x.sys.is == "laptop") then
|
||||
(import ./anime4k/laptop.nix {
|
||||
inherit
|
||||
pkgs
|
||||
;
|
||||
})
|
||||
else if (x.sys.is == "desktop") then
|
||||
(import ./anime4k/desktop.nix {
|
||||
inherit
|
||||
pkgs
|
||||
;
|
||||
})
|
||||
else
|
||||
null;
|
||||
in
|
||||
|
|
30
modules/home/programs/gui/mpv/theme.nix
Normal file
30
modules/home/programs/gui/mpv/theme.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
conf = with config.lib.stylix.colors.withHashtag; {
|
||||
osd-font = config.stylix.fonts.monospace.name;
|
||||
sub-font = config.stylix.fonts.monospace.name;
|
||||
background-color = "#000000";
|
||||
osd-back-color = base01;
|
||||
osd-border-color = base01;
|
||||
osd-color = base05;
|
||||
osd-shadow-color = base00;
|
||||
};
|
||||
uosc = {
|
||||
uosc.color =
|
||||
with config.lib.stylix.colors;
|
||||
lib.concatMapAttrsStringSep "," (name: value: "${name}=${value}") {
|
||||
background = base00;
|
||||
background_text = base05;
|
||||
foreground = base05;
|
||||
foreground_text = base00;
|
||||
curtain = base0D;
|
||||
success = base0A;
|
||||
error = base0F;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -9,6 +9,7 @@
|
|||
# localhost
|
||||
keenWeb = "192.168.1.1";
|
||||
qBittorrent = "localhost:8080";
|
||||
flood = "localhost:8085";
|
||||
transmission = "localhost:9091";
|
||||
torrserver = "localhost:8090";
|
||||
syncthing = "localhost:8384";
|
||||
|
@ -18,6 +19,7 @@
|
|||
hydra = "hydra.nixos.org";
|
||||
prTracker = "nixpk.gs/pr-tracker.html";
|
||||
cachix = "app.cachix.org/cache/xache";
|
||||
noogle = "noogle.dev";
|
||||
# git
|
||||
ultima = "git.sr.ht/~neverness/ultima";
|
||||
# social
|
||||
|
@ -40,7 +42,7 @@
|
|||
broTorrent = "brotorrent.net";
|
||||
freeTP = "freetp.org";
|
||||
# study
|
||||
proteh = "profteh.com/study";
|
||||
profteh = "profteh.com/study";
|
||||
chatGpt = "chatgpt.com";
|
||||
gemini = "gemini.google.com";
|
||||
};
|
||||
|
|
|
@ -5,13 +5,10 @@
|
|||
}:
|
||||
|
||||
let
|
||||
inherit (pkgs.libsForQt5) qt5ct;
|
||||
inherit (pkgs) qt6ct formats;
|
||||
ini = formats.ini { };
|
||||
font = config.stylix.fonts;
|
||||
icon = config.stylix.iconTheme;
|
||||
inherit (config.stylix) fonts iconTheme;
|
||||
ini = pkgs.formats.ini { };
|
||||
mk =
|
||||
p: n:
|
||||
n:
|
||||
ini.generate n {
|
||||
Appearance = {
|
||||
custom_palette = true;
|
||||
|
@ -21,13 +18,13 @@ let
|
|||
config
|
||||
;
|
||||
};
|
||||
icon_theme = icon.dark;
|
||||
icon_theme = iconTheme.dark;
|
||||
standard_dialogs = ''"default"'';
|
||||
style = ''"Fusion"'';
|
||||
};
|
||||
Fonts = {
|
||||
fixed = ''"${font.monospace.name},${toString font.sizes.applications},-1,5,50,0,0,0,0,0,Regular"'';
|
||||
general = ''"${font.monospace.name},${toString font.sizes.applications},-1,5,50,0,0,0,0,0,Regular"'';
|
||||
fixed = ''"${fonts.monospace.name},${toString fonts.sizes.applications},-1,5,50,0,0,0,0,0,Regular"'';
|
||||
general = ''"${fonts.monospace.name},${toString fonts.sizes.applications},-1,5,50,0,0,0,0,0,Regular"'';
|
||||
};
|
||||
Interface = {
|
||||
activate_item_on_single_click = 1;
|
||||
|
@ -46,6 +43,6 @@ let
|
|||
in
|
||||
|
||||
{
|
||||
"qt5ct/qt5ct.conf".source = mk qt5ct "qt5ct";
|
||||
"qt6ct/qt6ct.conf".source = mk qt6ct "qt6ct";
|
||||
"qt5ct/qt5ct.conf".source = mk "qt5ct";
|
||||
"qt6ct/qt6ct.conf".source = mk "qt6ct";
|
||||
}
|
||||
|
|
|
@ -102,7 +102,6 @@ in
|
|||
mangohud = on;
|
||||
# gui
|
||||
spicetify = off;
|
||||
mpv = on;
|
||||
nixcord = on;
|
||||
zathura = on;
|
||||
qutebrowser = on;
|
||||
|
|
|
@ -46,11 +46,11 @@ in
|
|||
sudo-rs = on;
|
||||
};
|
||||
users = {
|
||||
groups.media = { };
|
||||
users.media = {
|
||||
isSystemUser = true;
|
||||
group = "media";
|
||||
};
|
||||
groups.media = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -30,15 +30,19 @@ in
|
|||
"media"
|
||||
"video"
|
||||
"audio"
|
||||
#
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"docker"
|
||||
"podman"
|
||||
"libvirtd"
|
||||
"terraria"
|
||||
"transmission"
|
||||
"deluge"
|
||||
"adbusers"
|
||||
# torrent
|
||||
"transmission"
|
||||
"qbittorrent"
|
||||
"deluge"
|
||||
"flood"
|
||||
];
|
||||
in
|
||||
{
|
||||
|
|
8
modules/nixos/services/flood/db.nix
Normal file
8
modules/nixos/services/flood/db.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
''
|
||||
{"id":"language","data":"auto","_id":"xNgKa1J9gLpQTit3"}
|
||||
{"id":"torrentListViewSize","data":"expanded","_id":"HSVzDhazHPsgDdWA"}
|
||||
{"id":"UITagSelectorMode","data":null,"_id":"nNIKiOdMCg74WWCu"}
|
||||
{"id":"torrentListColumns","data":[{"id":"name","visible":true},{"id":"percentComplete","visible":true},{"id":"downTotal","visible":true},{"id":"downRate","visible":true},{"id":"upTotal","visible":false},{"id":"upRate","visible":true},{"id":"eta","visible":true},{"id":"ratio","visible":true},{"id":"sizeBytes","visible":true},{"id":"peers","visible":false},{"id":"seeds","visible":false},{"id":"dateAdded","visible":false},{"id":"dateCreated","visible":false},{"id":"dateFinished","visible":false},{"id":"directory","visible":false},{"id":"hash","visible":false},{"id":"isPrivate","visible":false},{"id":"message","visible":false},{"id":"trackerURIs","visible":false},{"id":"tags","visible":false}],"_id":"31hPqfuB61JtgHoh"}
|
||||
{"id":"torrentContextMenuActions","data":[{"id":"start","visible":true},{"id":"stop","visible":true},{"id":"remove","visible":true},{"id":"checkHash","visible":true},{"id":"reannounce","visible":true},{"id":"setTaxonomy","visible":true},{"id":"move","visible":true},{"id":"setTrackers","visible":false},{"id":"torrentDetails","visible":true},{"id":"downloadContents","visible":true},{"id":"downloadMetainfo","visible":true},{"id":"generateMagnet","visible":true},{"id":"setInitialSeeding","visible":false},{"id":"setSequential","visible":false},{"id":"setPriority","visible":true}],"_id":"YXGLh2Fnq8KAKPg0"}
|
||||
{"id":"language","data":"auto","_id":"xNgKa1J9gLpQTit3"}
|
||||
''
|
88
modules/nixos/services/flood/default.nix
Normal file
88
modules/nixos/services/flood/default.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
with x;
|
||||
let
|
||||
cfg = config.module.services.flood;
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
module.services.flood = {
|
||||
enable = mkBool false;
|
||||
dir = mkPath "/var/lib/flood";
|
||||
port = mkPort 8085;
|
||||
qbit = {
|
||||
url = mkStr "localhost:8080";
|
||||
user = mkStr "pirate";
|
||||
pass = mkStr "yoho";
|
||||
};
|
||||
#
|
||||
user = mkStr "flood";
|
||||
group = mkStr "flood";
|
||||
mode = mkStr "775";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd = {
|
||||
tmpfiles.settings = {
|
||||
flood =
|
||||
let
|
||||
text = import ./db.nix;
|
||||
base = {
|
||||
inherit (cfg)
|
||||
user
|
||||
group
|
||||
mode
|
||||
;
|
||||
};
|
||||
in
|
||||
{
|
||||
"${cfg.dir}/db/_config/settings/settings.db"."L+" = base // {
|
||||
argument = "${pkgs.writeText "settings.db" text}";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.flood = {
|
||||
after = [
|
||||
"network.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"multi-user.target"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
StateDirectory = [
|
||||
"flood"
|
||||
];
|
||||
StateDirectoryMode = mkDefault 775;
|
||||
ExecStart = ''
|
||||
${getExe pkgs.flood} --auth "none" \
|
||||
--rundir ${cfg.dir} \
|
||||
--host "127.0.0.1" \
|
||||
--port "${toString cfg.port}" \
|
||||
\
|
||||
--qburl "http://${cfg.qbit.url}" \
|
||||
--qbuser "${cfg.qbit.user}" \
|
||||
--qbpass "${cfg.qbit.pass}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
users = {
|
||||
groups.${cfg.group} = { };
|
||||
users.${cfg.user} = {
|
||||
isSystemUser = true;
|
||||
group = cfg.group;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -18,11 +18,9 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
imports = [ ./qbit.nix ];
|
||||
imports = [ ./module.nix ];
|
||||
config = mkIf cfg.enable {
|
||||
services.qbittorrent = on // {
|
||||
user = "media";
|
||||
group = "media";
|
||||
torrentingPort = 6881;
|
||||
serverConfig = {
|
||||
LegalNotice.Accepted = true;
|
||||
|
|
|
@ -44,9 +44,9 @@ in
|
|||
options.services.qbittorrent = {
|
||||
enable = mkBool false;
|
||||
package = mkPkg pkgs.qbittorrent-nox;
|
||||
user = mkStr "media";
|
||||
group = mkStr "media";
|
||||
mode = mkStr "777";
|
||||
user = mkStr "qbittorrent";
|
||||
group = mkStr "qbittorrent";
|
||||
mode = mkStr "0775";
|
||||
profileDir = mkPath "/var/lib/qBittorrent/";
|
||||
webuiPort = mkPort 8080;
|
||||
torrentingPort = mkNull.port 6881;
|
||||
|
@ -59,7 +59,13 @@ in
|
|||
tmpfiles.settings = {
|
||||
qbittorrent =
|
||||
let
|
||||
base = { inherit (cfg) user group mode; };
|
||||
base = {
|
||||
inherit (cfg)
|
||||
user
|
||||
group
|
||||
mode
|
||||
;
|
||||
};
|
||||
in
|
||||
{
|
||||
"${cfg.profileDir}/"."d" = base;
|
||||
|
@ -133,5 +139,12 @@ in
|
|||
cfg.torrentingPort
|
||||
]
|
||||
);
|
||||
users = {
|
||||
groups.${cfg.group} = { };
|
||||
users.${cfg.user} = {
|
||||
isSystemUser = true;
|
||||
group = cfg.group;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -15,8 +15,6 @@ in
|
|||
options = {
|
||||
module.services.torrserver = {
|
||||
enable = mkBool false;
|
||||
user = mkStr "media";
|
||||
group = mkStr "media";
|
||||
port = mkStr "8090";
|
||||
disk = mkPath "/var/lib/torrserver";
|
||||
};
|
||||
|
@ -34,16 +32,18 @@ in
|
|||
"multi-user.target"
|
||||
];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${getExe' pkgs.torrserver "torrserver"} -d ${cfg.disk} -p ${cfg.port}
|
||||
'';
|
||||
Restart = "on-failure";
|
||||
Type = "simple";
|
||||
TimeoutSec = 30;
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
User = "media";
|
||||
Group = "media";
|
||||
StateDirectory = [ "torrserver" ];
|
||||
StateDirectoryMode = mkDefault 777;
|
||||
StateDirectoryMode = mkDefault 775;
|
||||
ExecStart = ''
|
||||
${getExe' pkgs.torrserver "torrserver"} \
|
||||
-d ${cfg.disk} \
|
||||
-p ${cfg.port}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
let
|
||||
inherit (inputs) home nixcord;
|
||||
backup = "ba";
|
||||
backup = "backa";
|
||||
secrets = ../../secrets.nix;
|
||||
# make configuration
|
||||
mkMachine =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue