mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-15 22:41:52 +03:00
1
This commit is contained in:
@@ -95,7 +95,8 @@ let
|
|||||||
throttled.enable = true;
|
throttled.enable = true;
|
||||||
journald = {
|
journald = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
SystemMaxUse=512M
|
|
||||||
|
SystemMaxUse=512M
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
openssh = {
|
openssh = {
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ let
|
|||||||
earlyoom.enable = true;
|
earlyoom.enable = true;
|
||||||
journald = {
|
journald = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
SystemMaxUse=512M
|
|
||||||
|
SystemMaxUse=512M
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
samba = {
|
samba = {
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ let
|
|||||||
services = {
|
services = {
|
||||||
journald = {
|
journald = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
SystemMaxUse=512M
|
|
||||||
|
SystemMaxUse=512M
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
earlyoom.enable = true;
|
earlyoom.enable = true;
|
||||||
|
|||||||
@@ -41,6 +41,10 @@
|
|||||||
# url = "github:nix-community/NUR";
|
# url = "github:nix-community/NUR";
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
# };
|
# };
|
||||||
|
noctalia = {
|
||||||
|
url = "github:noctalia-dev/noctalia-shell";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager"; # flake:home-manager
|
url = "github:nix-community/home-manager"; # flake:home-manager
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.noctalia.homeModules.default
|
||||||
|
];
|
||||||
|
programs.noctalia-shell = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
# configure noctalia here
|
||||||
|
bar = {
|
||||||
|
density = "compact";
|
||||||
|
position = "right";
|
||||||
|
showCapsule = false;
|
||||||
|
widgets = {
|
||||||
|
left = [
|
||||||
|
{
|
||||||
|
id = "ControlCenter";
|
||||||
|
useDistroLogo = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "WiFi";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "Bluetooth";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
center = [
|
||||||
|
{
|
||||||
|
hideUnoccupied = false;
|
||||||
|
id = "Workspace";
|
||||||
|
labelMode = "none";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
right = [
|
||||||
|
{
|
||||||
|
alwaysShowPercentage = false;
|
||||||
|
id = "Battery";
|
||||||
|
warningThreshold = 30;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
formatHorizontal = "HH:mm";
|
||||||
|
formatVertical = "HH mm";
|
||||||
|
id = "Clock";
|
||||||
|
useMonospacedFont = true;
|
||||||
|
usePrimaryColor = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
colorSchemes.predefinedScheme = "Monochrome";
|
||||||
|
general = {
|
||||||
|
avatarImage = "/home/drfoobar/.face";
|
||||||
|
radiusRatio = 0.2;
|
||||||
|
};
|
||||||
|
location = {
|
||||||
|
monthBeforeDay = true;
|
||||||
|
name = "Marseille, France";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# this may also be a string or a path to a JSON file.
|
||||||
|
};
|
||||||
|
}
|
||||||
+3
-1
@@ -33,6 +33,7 @@ in
|
|||||||
./modules/plasma-manager.nix
|
./modules/plasma-manager.nix
|
||||||
# ./modules/external.nix
|
# ./modules/external.nix
|
||||||
./modules/external-mini-laptop.nix
|
./modules/external-mini-laptop.nix
|
||||||
|
./modules/noctalia.nix
|
||||||
];
|
];
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -63,7 +64,8 @@ in
|
|||||||
};
|
};
|
||||||
home.activation = {
|
home.activation = {
|
||||||
yaziSync = ''
|
yaziSync = ''
|
||||||
${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.user-storage}/yazi/"
|
|
||||||
|
${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.user-storage}/yazi/"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -40,7 +40,8 @@ in
|
|||||||
};
|
};
|
||||||
home.activation = {
|
home.activation = {
|
||||||
yaziSync = ''
|
yaziSync = ''
|
||||||
${pkgs.rsync}/bin/rsync -Lrv --no-A --no-X "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.storage}/yazi/"
|
|
||||||
|
${pkgs.rsync}/bin/rsync -Lrv --no-A --no-X "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.storage}/yazi/"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -43,7 +43,8 @@ in
|
|||||||
};
|
};
|
||||||
home.activation = {
|
home.activation = {
|
||||||
yaziSync = ''
|
yaziSync = ''
|
||||||
${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.wsl-storage}/yazi/"
|
|
||||||
|
${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.wsl-storage}/yazi/"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# ./kde.nix
|
# ./kde.nix
|
||||||
./gnome.nix
|
./gnome.nix
|
||||||
|
./noctalia.nix
|
||||||
#./xfce.nix
|
#./xfce.nix
|
||||||
#./deepin.nix
|
#./deepin.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
# qt = {
|
|
||||||
# enable = true;
|
|
||||||
# style = "breeze";
|
|
||||||
# platformTheme = "kde6"; # kde6
|
|
||||||
# };
|
|
||||||
environment.plasma6.excludePackages = with pkgs; [
|
|
||||||
kdePackages.plasma-browser-integration
|
|
||||||
kdePackages.elisa
|
|
||||||
kdePackages.ksshaskpass
|
|
||||||
kdePackages.kwallet
|
|
||||||
kdePackages.kwallet-pam
|
|
||||||
kdePackages.kwalletmanager
|
|
||||||
# libsForQt5.kwallet
|
|
||||||
# libsForQt5.kwallet-pam # error
|
|
||||||
# libsForQt5.kwalletmanager
|
|
||||||
];
|
|
||||||
services = {
|
|
||||||
displayManager = {
|
|
||||||
sddm = {
|
|
||||||
enable = true;
|
|
||||||
theme = "WhiteSur-light";
|
|
||||||
wayland = {
|
|
||||||
enable = true;
|
|
||||||
compositor = "kwin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
desktopManager.plasma6.enable = true;
|
|
||||||
};
|
|
||||||
programs.partition-manager.enable = true;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
|
# ... maybe other stuff
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -93,9 +93,10 @@ in
|
|||||||
nano = {
|
nano = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nanorc = ''
|
nanorc = ''
|
||||||
set nowrap
|
|
||||||
set tabstospaces
|
set nowrap
|
||||||
set tabsize 2
|
set tabstospaces
|
||||||
|
set tabsize 2
|
||||||
'';
|
'';
|
||||||
syntaxHighlight = true;
|
syntaxHighlight = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,11 +38,12 @@
|
|||||||
polkit = {
|
polkit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
polkit.addRule(function(action, subject) {
|
|
||||||
if (subject.isInGroup("wheel")){ // for sudo
|
polkit.addRule(function(action, subject) {
|
||||||
return polkit.Result.YES;
|
if (subject.isInGroup("wheel")){ // for sudo
|
||||||
}
|
return polkit.Result.YES;
|
||||||
});
|
}
|
||||||
|
});
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,15 +19,16 @@
|
|||||||
theme = "robbyrussell";
|
theme = "robbyrussell";
|
||||||
};
|
};
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
beet-n() {
|
|
||||||
echo "$*" | aichat -cer beets
|
beet-n() {
|
||||||
}
|
echo "$*" | aichat -cer beets
|
||||||
beet-p() {
|
}
|
||||||
beet mod path:. playlist="$*"
|
beet-p() {
|
||||||
}
|
beet mod path:. playlist="$*"
|
||||||
beet-ims() {
|
}
|
||||||
beet im ./ -S $*
|
beet-ims() {
|
||||||
}
|
beet im ./ -S $*
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
# shell
|
# shell
|
||||||
|
|||||||
@@ -153,10 +153,11 @@ in
|
|||||||
];
|
];
|
||||||
requires = [ "coolwsd.service" ];
|
requires = [ "coolwsd.service" ];
|
||||||
script = ''
|
script = ''
|
||||||
${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_url --value ${lib.escapeShellArg wopi_url}
|
|
||||||
${occ}/bin/nextcloud-occ config:app:set richdocuments public_wopi_url --value ${lib.escapeShellArg public_wopi_url}
|
${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_url --value ${lib.escapeShellArg wopi_url}
|
||||||
${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_allowlist --value ${lib.escapeShellArg wopi_allowlist}
|
${occ}/bin/nextcloud-occ config:app:set richdocuments public_wopi_url --value ${lib.escapeShellArg public_wopi_url}
|
||||||
${occ}/bin/nextcloud-occ richdocuments:setup
|
${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_allowlist --value ${lib.escapeShellArg wopi_allowlist}
|
||||||
|
${occ}/bin/nextcloud-occ richdocuments:setup
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
description = "Backup data using rsync";
|
description = "Backup data using rsync";
|
||||||
requisite = [ "mnt-archive.mount" ]; # hard-code
|
requisite = [ "mnt-archive.mount" ]; # hard-code
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.services-folder}/ ${xlib.dirs.archive-drive}/Services/
|
|
||||||
|
${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.services-folder}/ ${xlib.dirs.archive-drive}/Services/
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
@@ -28,8 +29,9 @@
|
|||||||
description = "Backup data using rsync";
|
description = "Backup data using rsync";
|
||||||
requisite = [ "mnt-mobile.mount" ]; # hard-code
|
requisite = [ "mnt-mobile.mount" ]; # hard-code
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.server-home}/Music/ ${xlib.dirs.mobile-drive}/Music/
|
|
||||||
${pkgs.rsync}/bin/rsync -rtv --delete "${xlib.dirs.server-home}/Hosts/epral/Neo Backup/" "${xlib.dirs.mobile-drive}/Neo Backup/"
|
${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.server-home}/Music/ ${xlib.dirs.mobile-drive}/Music/
|
||||||
|
${pkgs.rsync}/bin/rsync -rtv --delete "${xlib.dirs.server-home}/Hosts/epral/Neo Backup/" "${xlib.dirs.mobile-drive}/Neo Backup/"
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|||||||
@@ -36,16 +36,19 @@
|
|||||||
WorkingDirectory = "${xlib.dirs.user-services}/zapret";
|
WorkingDirectory = "${xlib.dirs.user-services}/zapret";
|
||||||
User = "root";
|
User = "root";
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/main_script.sh -nointeractive
|
|
||||||
|
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/main_script.sh -nointeractive
|
||||||
'';
|
'';
|
||||||
ExecStop = ''
|
ExecStop = ''
|
||||||
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/stop_and_clean_nft.sh
|
|
||||||
|
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/stop_and_clean_nft.sh
|
||||||
'';
|
'';
|
||||||
# ExecStopPost = ''
|
# ExecStopPost = ''
|
||||||
# /run/current-system/sw/bin/echo "Сервис завершён"
|
# /run/current-system/sw/bin/echo "Сервис завершён"
|
||||||
# '';
|
# '';
|
||||||
PIDFile = ''
|
PIDFile = ''
|
||||||
/run/zapret_discord_youtube.pid
|
|
||||||
|
/run/zapret_discord_youtube.pid
|
||||||
'';
|
'';
|
||||||
# Restart = "on-failure";
|
# Restart = "on-failure";
|
||||||
# RestartSec = "5s";
|
# RestartSec = "5s";
|
||||||
|
|||||||
@@ -64,8 +64,9 @@
|
|||||||
TimeoutSec = 300;
|
TimeoutSec = 300;
|
||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
cd /mnt/containers/3x-ui
|
|
||||||
podman build -t compose2nix/3xui_app -f ./Dockerfile .
|
cd /mnt/containers/3x-ui
|
||||||
|
podman build -t compose2nix/3xui_app -f ./Dockerfile .
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+24
-15
@@ -24,11 +24,12 @@ in
|
|||||||
root = "${inputs.zeroq-credentials.services.xray.subs}";
|
root = "${inputs.zeroq-credentials.services.xray.subs}";
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
auth_basic "Restricted";
|
|
||||||
auth_basic_user_file /etc/nginx/pubray;
|
|
||||||
|
|
||||||
if ($subfile = "") { return 403; }
|
auth_basic "Restricted";
|
||||||
rewrite ^/$ $subfile break;
|
auth_basic_user_file /etc/nginx/pubray;
|
||||||
|
|
||||||
|
if ($subfile = "") { return 403; }
|
||||||
|
rewrite ^/$ $subfile break;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -40,7 +41,8 @@ in
|
|||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 5G;
|
|
||||||
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
# "node-red.zeroq.ru" = {
|
# "node-red.zeroq.ru" = {
|
||||||
@@ -73,7 +75,8 @@ in
|
|||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 5G;
|
|
||||||
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"office.zeroq.ru" = {
|
"office.zeroq.ru" = {
|
||||||
@@ -86,10 +89,11 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 5G;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
client_max_body_size 5G;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
''; # absolute_redirect off;
|
''; # absolute_redirect off;
|
||||||
};
|
};
|
||||||
"immich.zeroq.ru" = {
|
"immich.zeroq.ru" = {
|
||||||
@@ -100,7 +104,8 @@ in
|
|||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 5G;
|
|
||||||
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"nextcloud.zeroq.ru" = {
|
"nextcloud.zeroq.ru" = {
|
||||||
@@ -117,7 +122,8 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 5G;
|
|
||||||
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"calibre.zeroq.ru" = {
|
"calibre.zeroq.ru" = {
|
||||||
@@ -128,7 +134,8 @@ in
|
|||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 5G;
|
|
||||||
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"pdf.zeroq.ru" = {
|
"pdf.zeroq.ru" = {
|
||||||
@@ -139,7 +146,8 @@ in
|
|||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 5G;
|
|
||||||
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"ai.zeroq.ru" = {
|
"ai.zeroq.ru" = {
|
||||||
@@ -150,7 +158,8 @@ in
|
|||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 5G;
|
|
||||||
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user