mirror of
https://github.com/oqyude/nixos.git
synced 2026-10-07 20:47:14 +03:00
br v3
This commit is contained in:
@@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
fileSystems = {
|
|
||||||
"/" = {
|
|
||||||
device = lib.mkForce "/dev/disk/by-partlabel/disk-main-root"; # "/dev/disk/by-partlabel/disk-main-root";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# swapDevices = [
|
|
||||||
# { device = "/dev/disk/by-partlabel/disk-main-swap"; }
|
|
||||||
# ];
|
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
Generated
-16
@@ -356,7 +356,6 @@
|
|||||||
"proxy-suite": "proxy-suite",
|
"proxy-suite": "proxy-suite",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"utils": "utils",
|
"utils": "utils",
|
||||||
"zapret": "zapret_2",
|
|
||||||
"zeroq-credentials": "zeroq-credentials"
|
"zeroq-credentials": "zeroq-credentials"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -467,21 +466,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"zapret_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767430655,
|
|
||||||
"narHash": "sha256-f9PricXeNm3lG1tk2TepPPY+wxM5y0ezo1HSzNn4BQ8=",
|
|
||||||
"owner": "oqyude",
|
|
||||||
"repo": "zapret-easyflake",
|
|
||||||
"rev": "302e77aae5fc6030a9c3bcc781d6514d87b19d11",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oqyude",
|
|
||||||
"repo": "zapret-easyflake",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"zeroq-credentials": {
|
"zeroq-credentials": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772104025,
|
"lastModified": 1772104025,
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
# My
|
# My
|
||||||
zeroq-credentials.url = "git+ssh://git@github.com/oqyude/zeroq-credentials.git"; # flake of creds
|
zeroq-credentials.url = "git+ssh://git@github.com/oqyude/zeroq-credentials.git"; # flake of creds
|
||||||
zapret.url = "github:oqyude/zapret-easyflake"; # stupid flake of zapret
|
|
||||||
|
|
||||||
# nixpkgs
|
# nixpkgs
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|||||||
@@ -54,18 +54,6 @@ let
|
|||||||
enableNixpkgsReleaseCheck = false;
|
enableNixpkgsReleaseCheck = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mkOthersModule = username: {
|
|
||||||
imports = [
|
|
||||||
(./. + "/others/${xlib.device.type}.nix")
|
|
||||||
];
|
|
||||||
home = {
|
|
||||||
username = username;
|
|
||||||
stateVersion = lib.mkDefault "26.05";
|
|
||||||
homeDirectory =
|
|
||||||
if username == "root" then lib.mkDefault "/${username}" else lib.mkDefault "/home/${username}";
|
|
||||||
enableNixpkgsReleaseCheck = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
@@ -74,16 +62,6 @@ let
|
|||||||
users = {
|
users = {
|
||||||
root = mkRootModule "root";
|
root = mkRootModule "root";
|
||||||
"${xlib.device.username}" = mkHomeModule xlib.device.username;
|
"${xlib.device.username}" = mkHomeModule xlib.device.username;
|
||||||
}
|
|
||||||
//
|
|
||||||
lib.optionalAttrs
|
|
||||||
(builtins.elem xlib.device.type [
|
|
||||||
"test"
|
|
||||||
#"secondary"
|
|
||||||
#"primary"
|
|
||||||
])
|
|
||||||
{
|
|
||||||
snity = mkOthersModule "snity";
|
|
||||||
};
|
};
|
||||||
sharedModules = [
|
sharedModules = [
|
||||||
inputs.plasma-manager.homeModules.plasma-manager
|
inputs.plasma-manager.homeModules.plasma-manager
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
xlib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
symlinksPaths = {
|
|
||||||
"/home/oqyude/Games/PrismLaunchers" = "${config.home.homeDirectory}/Games/PrismLaunchers";
|
|
||||||
"${config.home.homeDirectory}/Games/PrismLaunchers/${config.home.username}" =
|
|
||||||
".local/share/PrismLauncher";
|
|
||||||
};
|
|
||||||
mkLinks = lib.mapAttrs' (sourcePath: targetPath: {
|
|
||||||
name = targetPath;
|
|
||||||
value.source = config.lib.file.mkOutOfStoreSymlink "${sourcePath}";
|
|
||||||
}) symlinksPaths;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../minimal.nix
|
|
||||||
../modules/packages.nix
|
|
||||||
../modules/plasma-manager.nix
|
|
||||||
];
|
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
autostart.enable = true;
|
|
||||||
userDirs = {
|
|
||||||
enable = true;
|
|
||||||
createDirectories = true;
|
|
||||||
desktop = "${config.xdg.dataHome}/desktop";
|
|
||||||
documents = null;
|
|
||||||
download = "${config.home.homeDirectory}/Downloads";
|
|
||||||
music = "${config.home.homeDirectory}/Music";
|
|
||||||
pictures = "${config.home.homeDirectory}/Pictures";
|
|
||||||
publicShare = "${config.home.homeDirectory}/Misc/Public";
|
|
||||||
templates = null;
|
|
||||||
videos = "${config.home.homeDirectory}/Pictures/Videos";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home = {
|
|
||||||
file = mkLinks;
|
|
||||||
pointerCursor = {
|
|
||||||
enable = true;
|
|
||||||
x11.enable = true;
|
|
||||||
gtk.enable = true;
|
|
||||||
size = 24;
|
|
||||||
name = "Qogir";
|
|
||||||
package = pkgs.qogir-icon-theme;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
xlib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
symlinksPaths = {
|
|
||||||
"/home/oqyude/Games/PrismLaunchers" = "${config.home.homeDirectory}/Games/PrismLaunchers";
|
|
||||||
"${config.home.homeDirectory}/Games/PrismLaunchers/${config.home.username}" =
|
|
||||||
".local/share/PrismLauncher";
|
|
||||||
};
|
|
||||||
mkLinks = lib.mapAttrs' (sourcePath: targetPath: {
|
|
||||||
name = targetPath;
|
|
||||||
value.source = config.lib.file.mkOutOfStoreSymlink "${sourcePath}";
|
|
||||||
}) symlinksPaths;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../minimal.nix
|
|
||||||
../modules/packages.nix
|
|
||||||
../modules/plasma-manager.nix
|
|
||||||
];
|
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
autostart.enable = true;
|
|
||||||
userDirs = {
|
|
||||||
enable = true;
|
|
||||||
createDirectories = true;
|
|
||||||
desktop = "${config.xdg.dataHome}/desktop";
|
|
||||||
documents = null;
|
|
||||||
download = "${config.home.homeDirectory}/Downloads";
|
|
||||||
music = "${config.home.homeDirectory}/Music";
|
|
||||||
pictures = "${config.home.homeDirectory}/Pictures";
|
|
||||||
publicShare = "${config.home.homeDirectory}/Misc/Public";
|
|
||||||
templates = null;
|
|
||||||
videos = "${config.home.homeDirectory}/Pictures/Videos";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home = {
|
|
||||||
file = mkLinks;
|
|
||||||
pointerCursor = {
|
|
||||||
enable = true;
|
|
||||||
x11.enable = true;
|
|
||||||
gtk.enable = true;
|
|
||||||
size = 24;
|
|
||||||
name = "Qogir";
|
|
||||||
package = pkgs.qogir-icon-theme;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -43,25 +43,6 @@ let
|
|||||||
self.nixosOverlays.default
|
self.nixosOverlays.default
|
||||||
];
|
];
|
||||||
networking.hostName = lib.mkDefault config.xlib.device.hostname;
|
networking.hostName = lib.mkDefault config.xlib.device.hostname;
|
||||||
_module.args = moduleArgs config;
|
|
||||||
};
|
|
||||||
publicModule =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
xlib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = with inputs; [
|
|
||||||
./essentials
|
|
||||||
./users.nix
|
|
||||||
./options.nix
|
|
||||||
|
|
||||||
disko.nixosModules.disko # disko module
|
|
||||||
sops-nix.nixosModules.sops # sops module
|
|
||||||
];
|
|
||||||
|
|
||||||
_module.args = moduleArgs config;
|
_module.args = moduleArgs config;
|
||||||
};
|
};
|
||||||
strictModule =
|
strictModule =
|
||||||
@@ -87,7 +68,6 @@ in
|
|||||||
{
|
{
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
default = defaultModule;
|
default = defaultModule;
|
||||||
public = publicModule;
|
|
||||||
strict = strictModule;
|
strict = strictModule;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,5 @@
|
|||||||
./kde.nix
|
./kde.nix
|
||||||
# ./gnome.nix
|
# ./gnome.nix
|
||||||
# ./noctalia.nix
|
# ./noctalia.nix
|
||||||
# ./xfce.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
|
|
||||||
services.xserver.displayManager.lightdm.enable = true;
|
|
||||||
#services.displayManager.defaultSession = "lomiri";
|
|
||||||
# services.xserver.desktopManager.budgie.enable = true;
|
|
||||||
#services.xserver.displayManager.lightdm.greeters.lomiri.enable= true;
|
|
||||||
|
|
||||||
#services.desktopManager.lomiri.enable = true;
|
|
||||||
#-services.xserver.desktopManager.mate.enable = true;
|
|
||||||
#-services.xserver.desktopManager.lxqt.enable = true;
|
|
||||||
# services.xserver.desktopManager.lumina.enable = true;
|
|
||||||
# services.xserver.desktopManager.cde.enable = true;
|
|
||||||
# services.xserver.desktopManager.cinnamon.enable = true;
|
|
||||||
# services.xserver.desktopManager.enlightenment.enable = true;
|
|
||||||
# services.desktopManager.cosmic.xwayland.enable = true;
|
|
||||||
# services.desktopManager.cosmic.enable = true;
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
desktopManager = {
|
|
||||||
#xterm.enable = false;
|
|
||||||
xfce.enable = true;
|
|
||||||
xfce.enableWaylandSession = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#- services.xserver.desktopManager.pantheon.enable = true;
|
|
||||||
#- services.pantheon.apps.enable = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
{ inputs, ... }@flakeContext:
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
systemd.services.zapret = {
|
|
||||||
enable = true;
|
|
||||||
description = "zapret complete";
|
|
||||||
unitConfig = {
|
|
||||||
After = [ "network-online.target" ];
|
|
||||||
Wants = [ "network-online.target" ];
|
|
||||||
};
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
path = [ "/run/current-system/sw" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
Restart = "on-failure";
|
|
||||||
User = "root";
|
|
||||||
WorkingDirectory = "${inputs.zapret.script-dir}";
|
|
||||||
ExecStart = "/run/current-system/sw/bin/bash ./main_script.sh -nointeractive";
|
|
||||||
ExecStop = "/run/current-system/sw/bin/bash ./stop_and_clean_nft.sh";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment = {
|
|
||||||
systemPackages = with pkgs; [
|
|
||||||
nftables
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../containers/3x-ui.nix
|
../containers/3x-ui.nix
|
||||||
../software/beets
|
../pkgs/beets.nix
|
||||||
./acme.nix
|
./acme.nix
|
||||||
./bentopdf.nix
|
./bentopdf.nix
|
||||||
./calibre-web.nix
|
./calibre-web.nix
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
xlib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
services.tts.servers = {
|
|
||||||
russian = {
|
|
||||||
enable = true;
|
|
||||||
port = 5301;
|
|
||||||
};
|
|
||||||
english = {
|
|
||||||
#enable = false;
|
|
||||||
port = 5300;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
#? 🙏 https://github.com/ViZiD/dotfiles/blob/master/modules/shared/zapret.nix
|
|
||||||
#? https://github.com/Flowseal/zapret-discord-youtube/blob/main/general.bat
|
|
||||||
let
|
|
||||||
list-general = pkgs.fetchurl {
|
|
||||||
# https://github.com/Flowseal/zapret-discord-youtube/blob/main/lists/list-general.txt
|
|
||||||
url = "https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/779853740f9c957551685bdebf59ad3a788b5004/lists/list-general.txt";
|
|
||||||
sha256 = "sha256-/9dYk5fiVLfN+bY0STlqutnRQQoInS9NBGg9fWHZedk=";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.zapret = {
|
|
||||||
enable = true;
|
|
||||||
udpSupport = true;
|
|
||||||
udpPorts = [
|
|
||||||
"443"
|
|
||||||
"50000:50099"
|
|
||||||
];
|
|
||||||
params = [
|
|
||||||
"--filter-tcp=80"
|
|
||||||
"--hostlist=${list-general}"
|
|
||||||
"--dpi-desync=fake,split2"
|
|
||||||
"--dpi-desync-autottl=2"
|
|
||||||
"--dpi-desync-fooling=md5sig"
|
|
||||||
|
|
||||||
"--new"
|
|
||||||
"--filter-tcp=443"
|
|
||||||
"--hostlist=${list-general}"
|
|
||||||
"--dpi-desync=fake,multidisorder"
|
|
||||||
"--dpi-desync-split-pos=midsld"
|
|
||||||
"--dpi-desync-repeats=8"
|
|
||||||
"--dpi-desync-fooling=md5sig,badseq"
|
|
||||||
|
|
||||||
"--new"
|
|
||||||
"--filter-udp=443"
|
|
||||||
"--hostlist=${list-general}"
|
|
||||||
"--dpi-desync=fake"
|
|
||||||
"--dpi-desync-repeats=6"
|
|
||||||
|
|
||||||
"--new"
|
|
||||||
"--filter-udp=50000-50099"
|
|
||||||
"--filter-l7=discord,stun"
|
|
||||||
"--dpi-desync=fake"
|
|
||||||
"--dpi-desync-repeats=6"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
xlib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
# services.zapret = {
|
|
||||||
# enable = true;
|
|
||||||
# params = [
|
|
||||||
# "--dpi-desync=fake,disorder2"
|
|
||||||
# "--dpi-desync-ttl=1"
|
|
||||||
# "--dpi-desync-autottl=2"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
systemd.services.zapret = {
|
|
||||||
enable = true;
|
|
||||||
after = [ "network.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
description = "Custom Script Service";
|
|
||||||
path = with pkgs; [
|
|
||||||
sudo
|
|
||||||
git
|
|
||||||
nftables
|
|
||||||
iproute2
|
|
||||||
zapret
|
|
||||||
coreutils
|
|
||||||
];
|
|
||||||
unitConfig = {
|
|
||||||
After = [ "network-online.target" ];
|
|
||||||
Wants = [ "network-online.target" ];
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
WorkingDirectory = "${xlib.dirs.user-services}/zapret";
|
|
||||||
User = "root";
|
|
||||||
ExecStart = ''
|
|
||||||
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/main_script.sh -nointeractive
|
|
||||||
'';
|
|
||||||
ExecStop = ''
|
|
||||||
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/stop_and_clean_nft.sh
|
|
||||||
'';
|
|
||||||
# ExecStopPost = ''
|
|
||||||
# /run/current-system/sw/bin/echo "Сервис завершён"
|
|
||||||
# '';
|
|
||||||
PIDFile = ''
|
|
||||||
/run/zapret_discord_youtube.pid
|
|
||||||
'';
|
|
||||||
# Restart = "on-failure";
|
|
||||||
# RestartSec = "5s";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -6,11 +6,9 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../software/beets
|
../pkgs/beets.nix
|
||||||
./containers
|
./containers
|
||||||
./nix-serve.nix
|
./nix-serve.nix
|
||||||
# ./tools
|
# ./tools
|
||||||
#../server/open-webui.nix
|
|
||||||
#../services/tts.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user