1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-05-13 05:55:16 +00:00

add torrserver module

This commit is contained in:
nixzoid 2025-02-25 21:11:54 +09:00
parent a681f0a67c
commit 97f31fdd45
40 changed files with 595 additions and 107 deletions

96
flake.lock generated
View file

@ -398,6 +398,66 @@
"type": "github"
}
},
"niri": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": [
"nixpkgs"
],
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1740262899,
"narHash": "sha256-iVN73FYXdNHul0spp1XdvEoYre0lZiGKYx+Vv3YeIuE=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "a5690658f971bf4746077e850b230c325108094a",
"type": "github"
},
"original": {
"owner": "sodiboo",
"repo": "niri-flake",
"type": "github"
}
},
"niri-stable": {
"flake": false,
"locked": {
"lastModified": 1736614405,
"narHash": "sha256-AJ1rlgNOPb3/+DbS5hkhm21t6Oz8IgqLllwmZt0lyzk=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "e05bc269e678ecf828b96ae79c991c13b00b38a5",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"ref": "v25.01",
"repo": "niri",
"type": "github"
}
},
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1740251548,
"narHash": "sha256-53kgDwNYEPIZadX5SEk7+OoTXycHm1QUF7x2XCoo9+U=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "bca65452882e1e616045e21a0a9a4a0b7024239b",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nixcord": {
"inputs": {
"flake-compat": "flake-compat",
@ -491,6 +551,7 @@
"hardware": "hardware",
"home": "home",
"impermanence": "impermanence",
"niri": "niri",
"nixcord": "nixcord",
"nixpkgs": "nixpkgs_2",
"spicetify": "spicetify",
@ -723,7 +784,7 @@
},
"locked": {
"lastModified": 1,
"narHash": "sha256-7gc7d8zw+6qTttJ/gsDORCrro+eKBFj5gPUvt2jASVI=",
"narHash": "sha256-VdAisfEfTkBmrrpVd+BlhXvTWTOGQR410/EkUhLtsLE=",
"path": "xpackages",
"type": "path"
},
@ -731,6 +792,39 @@
"path": "xpackages",
"type": "path"
}
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {
"lastModified": 1730166465,
"narHash": "sha256-nq7bouXQXaaPPo/E+Jbq+wNHnatD4dY8OxSrRqzvy6s=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "a713cf46cb7db84a0d1b57c3a397c610cad3cf98",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"ref": "v0.5",
"repo": "xwayland-satellite",
"type": "github"
}
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1739246919,
"narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
}
},
"root": "root",

View file

@ -29,6 +29,11 @@
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
};
spicetify = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -34,6 +34,7 @@ in
printing = off;
tailscale = off;
tlp = on;
torrserver = off;
transmission = off // {
tui = off;
};
@ -45,7 +46,6 @@ in
hyprland = on;
steam = on;
sway = off;
torrserver = off;
};
misc = {
console = off;

View file

@ -71,6 +71,7 @@ in
wm = {
hyprland = on;
sway = off;
niri = on;
terminals = {
kitty = on;
foot = off;

View file

@ -35,6 +35,7 @@ in
printing = off;
tailscale = on;
tlp = off;
torrserver = on;
transmission = off // {
tui = off;
};
@ -46,7 +47,6 @@ in
hyprland = on;
steam = on;
sway = off;
torrserver = on;
};
misc = {
console = off;

View file

@ -19,7 +19,7 @@ in
"${x.sys.userName}"
"@wheel"
];
extra-substituters = x.nix.substituters;
extra-substituters = x.nix.subs;
extra-trusted-public-keys = x.nix.keys;
builders-use-substitutes = true;
auto-optimise-store = true;

View file

@ -1,4 +1,4 @@
{
a@{
pkgs,
lib,
config,
@ -24,8 +24,8 @@ in
settings = import ./settings.nix // {
keys = import ./binds.nix;
};
languages = import ./languages.nix { inherit pkgs lib; };
themes = import ./theme.nix { inherit lib config; };
languages = import ./languages.nix a;
themes = import ./theme.nix a;
};
};
}

View file

@ -1,4 +1,4 @@
{
a@{
lib,
config,
...
@ -19,9 +19,9 @@ in
config = mkIf cfg.enable {
programs.joshuto = on // {
mimetype = import ./mimetype.nix;
mimetype = import ./mimeType.nix;
settings = import ./settings.nix;
theme = import ./theme.nix { inherit config; };
theme = import ./theme.nix a;
};
};
}

View file

@ -1,4 +1,4 @@
{
a@{
inputs,
lib,
config,

View file

@ -21,13 +21,13 @@ in
config = mkIf cfg.enable {
programs.yazi =
on
// import ./sets.nix
// import ./plugins.nix { inherit pkgs; }
// {
keymap = import ./binds.nix { inherit lib; };
initLua = import ./lua.nix { inherit config; };
theme = import ./theme.nix { inherit lib config; };
};
}
// import ./plugins.nix { inherit pkgs; }
// import ./settings.nix;
home.packages = with pkgs; [
ffmpegthumbnailer
wl-clipboard

View file

@ -1,4 +1,4 @@
{
a@{
pkgs,
lib,
config,

View file

@ -31,10 +31,11 @@ in
];
programs.qutebrowser =
on
// import ./sets.nix { inherit lib config; }
// import ./settings.nix { inherit lib config; }
// {
keyBindings = import ./binds.nix { inherit inputs lib; };
greasemonkey = import ./plugins.nix { inherit pkgs; };
searchEngines = import ./search.nix;
};
};
}

View file

@ -0,0 +1,15 @@
{
DEFAULT = "https://google.com/search?q={}";
d = "https://duckduckgo.com/?q={}";
r = "https://reddit.com/r/{}";
ig = "https://instagram.com/{}";
ytm = "https://music.youtube.com/search?q={}";
yt = "https://www.youtube.com/results?search_query={}";
nixo = "https://search.nixos.org/options?channel=unstable&query={}";
nixp = "https://search.nixos.org/packages?channel=unstable&query={}";
odysee = "https://odysee.com/$/search?q={}";
rumble = "https://rumble.com/search/all?q={}";
}

View file

@ -77,7 +77,4 @@ in
chars = "asdfghjkl";
};
};
searchEngines = {
DEFAULT = "https://www.google.com/search?hl=en&q={}";
};
}

View file

@ -5,9 +5,9 @@
...
}:
with lib;
with x;
let
inherit (lib) x getExe;
inherit (x) mkAttrs path machineName;
cfg = config.home;
in
@ -24,9 +24,9 @@ in
s = "sudo";
};
home.shellAliases = with pkgs; {
goToFlake = "cd ${lib.x.path.flake}";
rebuild = "nh os switch -H ${lib.x.machineName}";
nixRepl = "nh os repl -H ${lib.x.machineName}";
goToFlake = "cd ${path.flake}";
rebuild = "nh os switch -H ${machineName}";
nixRepl = "nh os repl -H ${machineName}";
# override default
trash = "${getExe trashy} put";
touch = "${getExe bonk}";
@ -45,7 +45,7 @@ in
# useful
ca = "cava";
pmx = "pulsemixer";
blt = "${getExe bluetuith}";
blt = "${getExe bluetui}";
icat = "kitten icat";
# tops
btop = "btop";
@ -59,6 +59,26 @@ in
};
xdg.configFile."lutgen/stylix".text =
with config.lib.stylix.colors;
"${base00} ${base01} ${base02} ${base03} ${base04} ${base05} ${base06} ${base07} ${base08} ${base09} ${base0A} ${base0B} ${base0C} ${base0D} ${base0E} ${base0E}";
"${builtins.concatStringsSep " " (
with config.lib.stylix.colors;
[
base00
base01
base02
base03
base04
base05
base06
base07
base08
base09
base0A
base0B
base0C
base0D
base0E
base0F
]
)}";
};
}

View file

@ -21,6 +21,7 @@ in
};
};
imports = with inputs; [ niri.homeModules.stylix ];
config = mkIf cfg.enable {
home.packages =
with pkgs;
@ -93,6 +94,7 @@ in
hyprpaper = on;
};
hyprpaper = on;
niri = on;
sway = on;
river = on;
# MISC PROGRAMS
@ -109,7 +111,7 @@ in
mangohud = on;
# GUI
spicetify = off;
vesktop = on;
nixcord = on;
zathura = on;
qutebrowser = on;
firefox = on;

View file

@ -9,8 +9,12 @@ let
inherit (lib) x getExe;
cfg = config.module.wm.hyprland;
tee = "${lib.getExe' pkgs.uutils-coreutils-noprefix "tee"}";
pic = "$(xdg-user-dir PICTURES)/$(date +'scr_%d-%m-%y|%H:%M:%S.png')";
mic = ''fixf4=$(cat /sys/class/leds/platform\:\:micmute/brightness); echo $((1-fixf4)) | sudo ${tee} /sys/class/leds/platform\:\:micmute/brightness; wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle'';
pic = "$(xdg-user-dir PICTURES)/scr/$(date +'scr_%d-%m-%y|%H:%M:%S.png')";
mic = pkgs.writeShellScriptBin "micMute-hyprland" ''
fixf4=$(cat /sys/class/leds/platform\:\:micmute/brightness);
echo $((1-fixf4)) | sudo ${tee} /sys/class/leds/platform\:\:micmute/brightness;
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
'';
in
{
@ -139,7 +143,7 @@ in
]
++ [
(fn "XF86AudioMute " "$ex, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle")
(fn "XF86AudioMicMute " "$ex, bash -c '${mic}'")
(fn "XF86AudioMicMute " "$ex, ${getExe mic}'")
(fn "XF86AudioRaiseVolume" "$ex, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+")
(fn "XF86AudioLowerVolume" "$ex, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-")
(fs "XF86AudioRaiseVolume" "$ex, wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%+")

View file

@ -33,7 +33,7 @@ in
;
}
// import ./rules.nix { inherit config; }
// import ./sets.nix {
// import ./settings.nix {
inherit
pkgs
lib

View file

@ -6,7 +6,12 @@
}:
let
inherit (lib) x mkForce getExe';
inherit (lib)
x
mkForce
getExe
getExe'
;
cfg = config.module.wm.hyprland;
on.enabled = true;
in
@ -17,19 +22,23 @@ with config.lib.stylix.colors;
exec-once =
let
tee = "${getExe' pkgs.uutils-coreutils-noprefix "tee"}";
mic = pkgs.writeShellScriptBin "micMute-hyprland" ''
fixf4=$(cat /sys/class/leds/platform\:\:micmute/brightness);
echo $((1-fixf4)) | sudo ${tee} /sys/class/leds/platform\:\:micmute/brightness;
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
'';
in
[
"wpctl set-volume @DEFAULT_AUDIO_SINK@ 1"
''bash -c fixf4=$(cat /sys/class/leds/platform\:\:micmute/brightness); echo $((1-fixf4)) | sudo ${tee} /sys/class/leds/platform\:\:micmute/brightness; wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle''
''${getExe mic}''
]
++ cfg.autostart;
monitor =
if x.sys.is == "desktop" then
"eDP-1, 1920x1080@60, 0x0, 1.2, transform, 0"
else if x.sys.is == "laptop" then
if x.sys.is == "laptop" then
"eDP-1, 1920x1080@60, 0x0, 1, transform, 0"
else
"eDP-1, 1920x1080@60, 0x0, 1, transform, 0";
"HDMI-A-1, 1920x1080@60, 0x0, 1, transform, 0";
# apperance
general = {
gaps_in = 4;

View file

@ -0,0 +1,102 @@
{
pkgs,
lib,
config,
...
}:
with config.lib.niri.actions;
let
m = "Mod";
s = "Shift";
a = "Alt";
in
{
"${m}+Q".action = close-window;
"${m}+Grave".action = quit;
"${m}+Return".action = spawn "kitty";
"${m}+Tab".action = spawn "tofi-drun | xargs h";
"${m}+Space".action = toggle-window-floating;
"${m}+${a}+Space".action = switch-focus-between-floating-and-tiling;
"${m}+F".action = maximize-column;
"${m}+${s}+F".action = fullscreen-window;
"${m}+C".action = center-window;
"${m}+${s}+C".action = center-column;
"Print".action = screenshot;
"${s}+Print".action = screenshot-window;
"${a}+Print".action = screenshot-screen;
"${m}+S".action = switch-preset-column-width;
"${m}+Comma".action = consume-window-into-column;
"${m}+Period".action = expel-window-from-column;
"${m}+Minus".action = set-column-width "-10%";
"${m}+Plus".action = set-column-width "+10%";
"${m}+${s}+Minus".action = set-window-height "-10%";
"${m}+${s}+Plus".action = set-window-height "+10%";
# hjkl
"${m}+H".action = focus-column-left;
"${m}+J".action = focus-window-or-workspace-down;
"${m}+K".action = focus-window-or-workspace-up;
"${m}+L".action = focus-column-right;
# arrows
"${m}+Left".action = focus-column-left;
"${m}+Down".action = focus-workspace-down;
"${m}+Up".action = focus-workspace-up;
"${m}+Right".action = focus-column-right;
# hjkl
"${m}+${s}+H".action = move-column-left;
"${m}+${s}+J".action = move-column-to-workspace-down;
"${m}+${s}+K".action = move-column-to-workspace-up;
"${m}+${s}+L".action = move-column-right;
# arrows
"${m}+${s}+Left".action = move-column-left;
"${m}+${s}+Down".action = move-column-to-workspace-down;
"${m}+${s}+Up".action = move-column-to-workspace-up;
"${m}+${s}+Right".action = move-column-right;
"${m}+${a}+J".action = move-column-to-monitor-down;
"${m}+${a}+K".action = move-column-to-monitor-up;
}
// {
# sound
"XF86AudioMute".action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
"XF86AudioMicMute".action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
# volume
"XF86AudioRaiseVolume".action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+";
"XF86AudioLowerVolume".action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-";
"${s}+XF86AudioRaiseVolume".action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "10%+";
"${s}+XF86AudioLowerVolume".action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "10%-";
# brighness
"XF86MonBrightnessUp".action = spawn "sudo" "light" "-A" "10";
"XF86MonBrightnessDown".action = spawn "sudo" "light" "-U" "10";
"${s}+XF86MonBrightnessUp".action = spawn "sudo" "light" "-S" "70";
"${s}+XF86MonBrightnessDown".action = spawn "sudo" "light" "-S" "100";
}
// {
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+Shift+1".action = move-column-to-workspace 1;
"Mod+Shift+2".action = move-column-to-workspace 2;
"Mod+Shift+3".action = move-column-to-workspace 3;
"Mod+Shift+4".action = move-column-to-workspace 4;
"Mod+Shift+5".action = move-column-to-workspace 5;
"Mod+Shift+6".action = move-column-to-workspace 6;
"Mod+Shift+7".action = move-column-to-workspace 7;
"Mod+Shift+8".action = move-column-to-workspace 8;
"Mod+Shift+9".action = move-column-to-workspace 9;
}

View file

@ -0,0 +1,31 @@
args@{
inputs,
pkgs,
lib,
config,
...
}:
with lib;
with x;
let
cfg = config.module.wm.niri;
in
{
options = {
module.wm.niri = {
enable = mkBool false;
};
};
imports = with inputs; [ niri.homeModules.niri ];
config = mkIf cfg.enable {
programs.niri = on // {
package = pkgs.niri-unstable;
settings = {
binds = import ./binds.nix args;
} // import ./settings.nix args;
};
};
}

View file

@ -0,0 +1,176 @@
{
lib,
config,
...
}:
let
inherit (lib.x) on off;
makeCommand = command: {
command = [ command ];
};
in
with config.lib.stylix.colors.withHashtag;
{
spawn-at-startup = [ (makeCommand "mako") ];
screenshot-path = "~/Pictures/scr/scr_%d-%m-%y_%H:%M:%S.png";
input = {
# jmakalka
keyboard.xkb = {
layout = "us,ru";
options = "grp:caps_toggle";
};
# rat
mouse = {
scroll-method = "no-scroll";
accel-profile = "flat";
};
# glass?
trackpoint = {
scroll-method = "on-button-down";
accel-profile = "flat";
};
# clitor
touchpad = {
tap = true;
dwt = true;
dwtp = true;
natural-scroll = true;
disabled-on-external-mouse = true;
click-method = "clickfinger";
scroll-method = "two-finger";
accel-profile = "adaptive";
};
warp-mouse-to-focus = true;
focus-follows-mouse.enable = true;
workspace-auto-back-and-forth = false;
};
outputs = {
# laptop
"eDP-1" = {
scale = 1.2;
};
# monitor
"HDMI-A-1" = {
scale = 1.0;
};
};
cursor = {
size = config.stylix.cursor.size;
theme = "${config.stylix.cursor.name}";
hide-when-typing = true;
hide-after-inactive-ms = 1000;
};
layout = {
# style
focus-ring = off;
border = on // {
width = 3;
active = {
color = base0E;
# gradient = {
# angle = 130;
# relative-to = "workspace-view";
# from = "#${theme.base0D}";
# to = "#${theme.base0E}";
# };
};
inactive.color = base01;
};
# preset
default-column-width.proportion = 1.0 / 2.0;
preset-column-widths = [
{ proportion = 1.0 / 3.0; }
{ proportion = 1.0 / 2.0; }
{ proportion = 2.0 / 3.0; }
{ proportion = 1.0 / 1.0; }
];
# apperance
gaps = 8;
struts = {
left = 0;
right = 0;
top = 0;
bottom = 0;
};
# hedgehog
# shadow = on // {
# softness = 30;
# draw-behind-window = true;
# color = "${base00}70";
# inactive-color = "${base00}70";
# };
# tabs
# tab-indicator = on // {
# hide-when-single-tab = true;
# gap = 5;
# width = 4;
# position = "right";
# gaps-between-tabs = 2;
# corner-radius = 12;
# active-color = "${base09}";
# inactive-color = "${base01}";
# };
};
animations =
let
spring = {
damping-ratio = 0.760000;
epsilon = 0.000100;
stiffness = 700;
};
easing = {
duration-ms = 150;
curve = "ease-out-expo";
};
in
{
horizontal-view-movement.spring = spring;
workspace-switch.spring = spring;
window-movement.spring = spring;
window-resize.spring = spring;
window-open.easing = easing;
window-close.easing = easing;
# idk
shaders.window-resize = ''
vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) {
vec3 coords_next_geo = niri_curr_geo_to_next_geo * coords_curr_geo;
vec3 coords_stretch = niri_geo_to_tex_next * coords_curr_geo;
vec3 coords_crop = niri_geo_to_tex_next * coords_next_geo;
// We can crop if the current window size is smaller than the next window
// size. One way to tell is by comparing to 1.0 the X and Y scaling
// coefficients in the current-to-next transformation matrix.
bool can_crop_by_x = niri_curr_geo_to_next_geo[0][0] <= 1.0;
bool can_crop_by_y = niri_curr_geo_to_next_geo[1][1] <= 1.0;
vec3 coords = coords_stretch;
if (can_crop_by_x)
coords.x = coords_crop.x;
if (can_crop_by_y)
coords.y = coords_crop.y;
vec4 color = texture2D(niri_tex_next, coords.st);
// However, when we crop, we also want to crop out anything outside the
// current geometry. This is because the area of the shader is unspecified
// and usually bigger than the current geometry, so if we don't fill pixels
// outside with transparency, the texture will leak out.
//
// When stretching, this is not an issue because the area outside will
// correspond to client-side decoration shadows, which are already supposed
// to be outside.
if (can_crop_by_x && (coords_curr_geo.x < 0.0 || 1.0 < coords_curr_geo.x))
color = vec4(0.0);
if (can_crop_by_y && (coords_curr_geo.y < 0.0 || 1.0 < coords_curr_geo.y))
color = vec4(0.0);
return color;
}
'';
};
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
}

View file

@ -21,7 +21,7 @@ in
config = mkIf cfg.enable {
wayland.windowManager.sway = on // {
package = pkgs.swayfx;
config = import ./sets.nix { inherit pkgs lib config; } // {
config = import ./settings.nix { inherit pkgs lib config; } // {
keybindings = import ./binds.nix { inherit pkgs lib; };
};
extraConfig =

View file

@ -21,7 +21,7 @@ in
programs.kitty = on // {
keybindings = import ./binds.nix;
extraConfig = import ./extraBinds.nix;
settings = import ./sets.nix // import ./colors.nix { inherit config; };
settings = import ./settings.nix // import ./colors.nix { inherit config; };
};
};
}

View file

@ -19,12 +19,15 @@ in
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ bluetui ];
hardware.bluetooth = on // {
powerOnBoot = true;
settings = {
General = {
Experimental = true;
Enable = "Source,Sink,Media,Socket";
};
};
};
environment.systemPackages = with pkgs; [
bluetuith
bluetooth_battery
];
};
}

View file

@ -4,16 +4,19 @@
}:
let
nahuy = lib.mkDefault lib.x.off;
ye = with lib; mkDefault x.off;
in
{
programs.command-not-found = nahuy;
documentation = nahuy // {
dev = nahuy;
doc = nahuy;
info = nahuy;
man = nahuy;
nixos = nahuy;
programs = {
nano = ye;
command-not-found = ye;
};
documentation = ye // {
dev = ye;
doc = ye;
info = ye;
man = ye;
nixos = ye;
};
}

View file

@ -23,12 +23,13 @@ in
"${sys.userName}"
"@wheel"
];
substituters = x.nix.substituters;
substituters = x.nix.subs;
trusted-public-keys = x.nix.keys;
};
};
nixpkgs = {
hostPlatform = mkDefault sys.platform;
overlays = x.nix.over;
config = {
allowBroken = true;
allowUnfree = true;

View file

@ -24,16 +24,12 @@ in
killall
];
programs = {
adb = on;
nano = off;
fuse.userAllowOther = true;
light = if x.sys.is == "laptop" then on else off;
git = on // {
package = mkDefault pkgs.gitMinimal;
};
ryzen-monitor-ng = if x.sys.is == "desktop" then on else off;
adb = if sys.is == "laptop " then on else off;
light = if sys.is == "desktop" then on else off;
git.package = mkDefault pkgs.gitMinimal;
nh = on // {
flake = path.flake;
clean = on;
};
};
};

View file

@ -1,39 +0,0 @@
{
inputs,
lib,
config,
...
}:
with lib;
with x;
let
cfg = config.module.programs.torrserver;
in
{
options = {
module.programs.torrserver = {
enable = mkBool false;
};
};
config = mkIf cfg.enable {
systemd.services = {
torrserver = {
enable = true;
after = [
"multi-user.target"
"network.target"
];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${getExe' inputs.xpk.torrserver "torrserver"}";
Restart = "on-failure";
Type = "simple";
TimeoutSec = 30;
};
};
};
};
}

View file

@ -0,0 +1,57 @@
{
inputs,
lib,
config,
...
}:
with lib;
with x;
let
cfg = config.module.services.torrserver;
in
{
options = {
module.services.torrserver = {
enable = mkBool false;
user = mkStr "torrserver";
group = mkStr "torrserver";
port = mkStr "8080";
dir = mkPath "/var/lib/torrserver";
};
};
config = mkIf cfg.enable {
systemd.services = {
torrserver = {
enable = true;
after = [
"multi-user.target"
"network.target"
];
wantedBy = [
"multi-user.target"
];
serviceConfig = {
ExecStart = "${getExe' inputs.xpk.torrserver "torrserver"} -d ${cfg.dir} -p ${cfg.port}";
Restart = "on-failure";
Type = "simple";
TimeoutSec = 30;
User = cfg.user;
Group = cfg.group;
StateDirectory = [ "torrserver" ];
StateDirectoryMode = mkDefault 777;
};
};
};
users = {
groups.${cfg.user} = { };
users.${cfg.user} = {
group = cfg.user;
home = cfg.dir;
isSystemUser = true;
};
};
};
}

View file

@ -44,8 +44,8 @@ let
sec
;
}
// import ./options.nix { inherit self pkgs lib; }
// import ./mkOpt.nix { inherit lib; };
// import ./options/addit.nix { inherit inputs lib; }
// import ./options/mkOpt.nix { inherit lib; };
}
);
# dirs

View file

@ -1,7 +1,8 @@
{
inputs,
lib,
...
}:
}@a:
with lib;
with types;
@ -9,14 +10,14 @@ with types;
{
# ylib & stylix
umport = import ./umport.nix { inherit lib; };
baseName = lib.filter (path: baseNameOf path == "default.nix");
baseName = filter (path: baseNameOf path == "default.nix");
# enable = true; ++ enable = false;
on.enable = true;
off.enable = false;
# for programs
gen = type: text: lib.generators.${toString type} { } text;
gen = type: text: generators.${toString type} { } text;
wm.workspaces =
with builtins;
(concatLists (
@ -32,4 +33,4 @@ with types;
) 10
));
}
// import ./nixpkgs
// import ./nixpkgs a

View file

@ -1,12 +1,18 @@
{
inputs,
...
}:
{
# overlays, nix subsitutters and keys
nix = {
substituters = [
subs = [
"https://nix-gaming.cachix.org" # NIX GAMING
"https://hyprland.cachix.org" # HYPRLAND
"https://cache.garnix.io" # AYUGRAM
"https://helix.cachix.org" # HELIX
"https://xache.cachix.org" # MY OWN
"https://niri.cachix.org" # NIRI
];
keys = [
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" # NIX GAMING
@ -14,6 +20,10 @@
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" # AYUGRAM
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" # HELIX
"xache.cachix.org-1:InoMKnvFvDh+J5gFNHN1mmUONxvYJqFImLJY8/bl9YA=" # MY OWN
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" # NIRI
];
over = [
inputs.niri.overlays.niri
];
};
}

View file

@ -1 +0,0 @@
/nix/store/6h8v730qlasynw78rfx89d2qxj9gq0cx-tgt-unstable-2024-11-04