mirror of
https://github.com/oqyude/nixos.git
synced 2026-10-08 04:57:13 +03:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
056e5895fe | ||
|
|
843f0bafa1 | ||
|
|
871fad26d4 |
+8
-20
@@ -1,12 +1,9 @@
|
|||||||
{ inputs, ... }@flakeContext:
|
{
|
||||||
let
|
deviceType = "minimal";
|
||||||
nixosModule =
|
modules = [
|
||||||
|
(
|
||||||
{
|
{
|
||||||
config,
|
inputs,
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
pkgs,
|
|
||||||
xlib,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@@ -14,17 +11,8 @@ let
|
|||||||
inputs.self.nixosModules.default
|
inputs.self.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
system = {
|
system.stateVersion = "26.05";
|
||||||
stateVersion = "26.05";
|
}
|
||||||
};
|
)
|
||||||
};
|
|
||||||
in
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
nixosModule
|
|
||||||
];
|
];
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = {
|
|
||||||
deviceType = "minimal";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
{ inputs, ... }@flakeContext:
|
{ inputs, ... }@flakeContext:
|
||||||
|
let
|
||||||
|
mkSystem = import ../lib/mkSystem.nix flakeContext;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
default = import ./any.nix flakeContext; # default
|
default = mkSystem (import ./any.nix); # default
|
||||||
atoridu = import ./mini-pc.nix flakeContext; # atoridu
|
atoridu = mkSystem (import ./mini-pc.nix); # atoridu
|
||||||
rydiwo = import ./mini-laptop.nix flakeContext; # rydiwo
|
rydiwo = mkSystem (import ./mini-laptop.nix); # rydiwo
|
||||||
otreca = import ./vds.nix flakeContext; # vds
|
otreca = mkSystem (import ./vds.nix); # vds
|
||||||
otreca-new = import ./vds-new.nix flakeContext; # vds-new
|
sapphira = mkSystem (import ./server.nix); # sapphira
|
||||||
sapphira = import ./server.nix flakeContext; # sapphira
|
wsl = mkSystem (import ./wsl.nix); # wsl
|
||||||
wsl = import ./wsl.nix flakeContext; # wsl
|
|
||||||
};
|
};
|
||||||
nixOnDroidConfigurations = {
|
nixOnDroidConfigurations = {
|
||||||
epral = import ./mobile.nix flakeContext; # epral (Android via nix-on-droid)
|
epral = import ./mobile.nix flakeContext; # epral (Android via nix-on-droid)
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -1,22 +1,16 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
deviceType = "secondary";
|
||||||
...
|
hostname = "rydiwo";
|
||||||
}@flakeContext:
|
modules = [
|
||||||
let
|
(
|
||||||
nixosModule =
|
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
xlib,
|
xlib,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
xlib.device = {
|
|
||||||
type = "secondary";
|
|
||||||
hostname = "rydiwo";
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = with inputs; [
|
imports = with inputs; [
|
||||||
nixos-hardware.nixosModules.chuwi-minibook-x
|
nixos-hardware.nixosModules.chuwi-minibook-x
|
||||||
./hardware/mini-laptop.nix
|
./hardware/mini-laptop.nix
|
||||||
@@ -44,100 +38,11 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
xlib.ssh.enable = true;
|
||||||
bluetooth.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "${xlib.device.hostname}";
|
|
||||||
networkmanager.enable = true;
|
|
||||||
firewall.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
i18n = {
|
|
||||||
extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "ru_RU.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "ru_RU.UTF-8";
|
|
||||||
LC_MEASUREMENT = "ru_RU.UTF-8";
|
|
||||||
LC_MONETARY = "ru_RU.UTF-8";
|
|
||||||
LC_NAME = "ru_RU.UTF-8";
|
|
||||||
LC_NUMERIC = "ru_RU.UTF-8";
|
|
||||||
LC_PAPER = "ru_RU.UTF-8";
|
|
||||||
LC_TELEPHONE = "ru_RU.UTF-8";
|
|
||||||
LC_TIME = "ru_RU.UTF-8";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
# xserver = {
|
|
||||||
# videoDrivers = [
|
|
||||||
# "nomodeset"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
syncthing = {
|
|
||||||
enable = true;
|
|
||||||
systemService = true;
|
|
||||||
configDir = "${xlib.dirs.user-storage}/Syncthing/${config.system.name}";
|
|
||||||
dataDir = "${xlib.dirs.user-home}";
|
|
||||||
group = "users";
|
|
||||||
user = "${xlib.device.username}";
|
|
||||||
};
|
|
||||||
# pipewire = {
|
|
||||||
# enable = lib.mkDefault true;
|
|
||||||
# systemWide = true;
|
|
||||||
# alsa.enable = false;
|
|
||||||
# alsa.support32Bit = true;
|
|
||||||
# pulse.enable = true;
|
|
||||||
# jack.enable = true;
|
|
||||||
# extraConfig.pipewire = {
|
|
||||||
# "99-default.conf" = {
|
|
||||||
# "context.properties" = {
|
|
||||||
# "default.clock.rate" = 96000;
|
|
||||||
# "default.clock.allowed-rates" = [
|
|
||||||
# 44100
|
|
||||||
# 48000
|
|
||||||
# 96000
|
|
||||||
# ];
|
|
||||||
# "default.clock.quantum" = 1024;
|
|
||||||
# "default.clock.min-quantum" = 256;
|
|
||||||
# "default.clock.max-quantum" = 2048;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
thermald.enable = true;
|
|
||||||
earlyoom.enable = true;
|
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
allowSFTP = true;
|
|
||||||
hostKeys = [
|
|
||||||
{
|
|
||||||
path = "/etc/ssh/id_ed25519";
|
|
||||||
type = "ed25519";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
settings = {
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
PermitRootLogin = "yes";
|
|
||||||
UsePAM = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
security = {
|
|
||||||
rtkit.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.intel-gpu-tools.enable = true;
|
hardware.intel-gpu-tools.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "26.05";
|
system.stateVersion = "26.05";
|
||||||
};
|
}
|
||||||
in
|
)
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
modules = with inputs; [
|
|
||||||
nixosModule
|
|
||||||
];
|
];
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = {
|
|
||||||
deviceType = "secondary";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,16 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
deviceType = "primary";
|
||||||
...
|
hostname = "atoridu";
|
||||||
}@flakeContext:
|
modules = [
|
||||||
let
|
(
|
||||||
nixosModule =
|
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
xlib,
|
xlib,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
xlib.device = {
|
|
||||||
type = "primary";
|
|
||||||
hostname = "atoridu";
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = with inputs; [
|
imports = with inputs; [
|
||||||
./hardware/mini-pc.nix
|
./hardware/mini-pc.nix
|
||||||
./disko/mini-pc.nix
|
./disko/mini-pc.nix
|
||||||
@@ -74,47 +68,12 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
services.xserver = {
|
||||||
bluetooth.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "${xlib.device.hostname}";
|
|
||||||
networkmanager.enable = true;
|
|
||||||
firewall.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
i18n = {
|
|
||||||
extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "ru_RU.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "ru_RU.UTF-8";
|
|
||||||
LC_MEASUREMENT = "ru_RU.UTF-8";
|
|
||||||
LC_MONETARY = "ru_RU.UTF-8";
|
|
||||||
LC_NAME = "ru_RU.UTF-8";
|
|
||||||
LC_NUMERIC = "ru_RU.UTF-8";
|
|
||||||
LC_PAPER = "ru_RU.UTF-8";
|
|
||||||
LC_TELEPHONE = "ru_RU.UTF-8";
|
|
||||||
LC_TIME = "ru_RU.UTF-8";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
#logrotate.checkConfig = false;
|
|
||||||
#power-profiles-daemon.enable = false;
|
|
||||||
xserver = {
|
|
||||||
videoDrivers = [
|
videoDrivers = [
|
||||||
"amdgpu"
|
"amdgpu"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
syncthing = {
|
services.pipewire = {
|
||||||
enable = true;
|
|
||||||
systemService = true;
|
|
||||||
configDir = "${xlib.dirs.user-storage}/Syncthing/${config.system.name}";
|
|
||||||
dataDir = "${xlib.dirs.user-home}";
|
|
||||||
group = "users";
|
|
||||||
user = "${xlib.device.username}";
|
|
||||||
};
|
|
||||||
pipewire = {
|
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
systemWide = true;
|
systemWide = true;
|
||||||
alsa.enable = false;
|
alsa.enable = false;
|
||||||
@@ -137,24 +96,10 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
thermald.enable = true;
|
|
||||||
earlyoom.enable = true;
|
|
||||||
};
|
|
||||||
nixpkgs.config.pulseaudio = true;
|
nixpkgs.config.pulseaudio = true;
|
||||||
|
|
||||||
security = {
|
|
||||||
rtkit.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "26.05";
|
system.stateVersion = "26.05";
|
||||||
};
|
}
|
||||||
in
|
)
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
nixosModule
|
|
||||||
];
|
];
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = {
|
|
||||||
deviceType = "primary";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,16 @@
|
|||||||
{ inputs, ... }@flakeContext:
|
{
|
||||||
let
|
deviceType = "server";
|
||||||
nixosModule =
|
hostname = "sapphira";
|
||||||
|
modules = [
|
||||||
|
(
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
xlib,
|
xlib,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
xlib.device = {
|
|
||||||
type = "server";
|
|
||||||
hostname = "sapphira";
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware/server.nix
|
./hardware/server.nix
|
||||||
inputs.self.nixosModules.default
|
inputs.self.nixosModules.default
|
||||||
@@ -82,32 +79,9 @@ let
|
|||||||
"z ${xlib.dirs.services-mnt-folder} 0777 root root -"
|
"z ${xlib.dirs.services-mnt-folder} 0777 root root -"
|
||||||
];
|
];
|
||||||
|
|
||||||
services = {
|
xlib.ssh.enable = true;
|
||||||
earlyoom.enable = true;
|
|
||||||
journald = {
|
|
||||||
extraConfig = ''
|
|
||||||
SystemMaxUse=512M
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
allowSFTP = true;
|
|
||||||
hostKeys = [
|
|
||||||
{
|
|
||||||
path = "/etc/ssh/id_ed25519";
|
|
||||||
type = "ed25519";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
settings = {
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
PermitRootLogin = "yes";
|
|
||||||
UsePAM = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "${xlib.device.hostname}";
|
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
firewall.enable = false;
|
firewall.enable = false;
|
||||||
# nameservers = [
|
# nameservers = [
|
||||||
@@ -119,14 +93,7 @@ let
|
|||||||
system = {
|
system = {
|
||||||
stateVersion = "25.05";
|
stateVersion = "25.05";
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
in
|
)
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
nixosModule
|
|
||||||
];
|
];
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = {
|
|
||||||
deviceType = "server";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,130 +0,0 @@
|
|||||||
{ inputs, ... }@flakeContext:
|
|
||||||
let
|
|
||||||
nixosModule =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
pkgs,
|
|
||||||
xlib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
xlib.device = {
|
|
||||||
type = "vds-new";
|
|
||||||
hostname = "otreca-new";
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
|
|
||||||
./disko/vds.nix
|
|
||||||
./hardware/vds.nix
|
|
||||||
|
|
||||||
inputs.self.nixosModules.default
|
|
||||||
];
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
kernelPackages = pkgs.linuxPackages_xanmod_stable;
|
|
||||||
hardwareScan = true;
|
|
||||||
loader = {
|
|
||||||
grub = {
|
|
||||||
enable = true;
|
|
||||||
device = "nodev";
|
|
||||||
useOSProber = false;
|
|
||||||
efiSupport = false;
|
|
||||||
};
|
|
||||||
systemd-boot.enable = lib.mkDefault false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
earlyoom.enable = true;
|
|
||||||
journald = {
|
|
||||||
extraConfig = ''
|
|
||||||
SystemMaxUse=512M
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
allowSFTP = true;
|
|
||||||
openFirewall = true;
|
|
||||||
hostKeys = [
|
|
||||||
{
|
|
||||||
path = "/etc/ssh/id_ed25519";
|
|
||||||
type = "ed25519";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
settings = {
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
PermitRootLogin = "yes";
|
|
||||||
UsePAM = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
tailscale = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
nameservers = [
|
|
||||||
"1.1.1.1"
|
|
||||||
"8.8.8.8"
|
|
||||||
"2001:4860:4860::8844"
|
|
||||||
"2001:4860:4860::8888"
|
|
||||||
"2606:4700:4700::1111"
|
|
||||||
"2606:4700:4700::1001"
|
|
||||||
];
|
|
||||||
hostName = "${xlib.device.hostname}";
|
|
||||||
networkmanager.enable = true;
|
|
||||||
tempAddresses = "disabled";
|
|
||||||
dhcpcd = {
|
|
||||||
enable = true;
|
|
||||||
IPv6rs = true;
|
|
||||||
};
|
|
||||||
firewall = {
|
|
||||||
enable = true;
|
|
||||||
allowPing = true;
|
|
||||||
};
|
|
||||||
enableIPv6 = true;
|
|
||||||
interfaces.ens3 = {
|
|
||||||
useDHCP = true;
|
|
||||||
# ipv4.addresses = [
|
|
||||||
# {
|
|
||||||
# address = "31.57.158.109";
|
|
||||||
# prefixLength = 24;
|
|
||||||
# }
|
|
||||||
# ];
|
|
||||||
# ipv6.addresses = [
|
|
||||||
# {
|
|
||||||
# address = "2a13:7c00:6:102:f816:3eff:fe91:6b9e";
|
|
||||||
# prefixLength = 64;
|
|
||||||
# }
|
|
||||||
# ];
|
|
||||||
};
|
|
||||||
# defaultGateway = {
|
|
||||||
# address = "31.57.158.1";
|
|
||||||
# interface = "ens3";
|
|
||||||
# };
|
|
||||||
# defaultGateway6 = {
|
|
||||||
# address = "2a13:7c00:6:102::1";
|
|
||||||
# interface = "ens3";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
|
|
||||||
system = {
|
|
||||||
stateVersion = "25.05";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
nixosModule
|
|
||||||
];
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = {
|
|
||||||
deviceType = "vds-new";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
+12
-47
@@ -1,20 +1,18 @@
|
|||||||
{ inputs, ... }@flakeContext:
|
{
|
||||||
let
|
deviceType = "vds";
|
||||||
nixosModule =
|
hostname = "otreca";
|
||||||
|
modules = [
|
||||||
|
(
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
pkgs,
|
pkgs,
|
||||||
xlib,
|
xlib,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
xlib.device = {
|
|
||||||
type = "vds";
|
|
||||||
hostname = "otreca";
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
@@ -45,44 +43,18 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
xlib.ssh.enable = true;
|
||||||
earlyoom.enable = true;
|
services.openssh.openFirewall = true;
|
||||||
journald = {
|
|
||||||
extraConfig = ''
|
services.tailscale = {
|
||||||
SystemMaxUse=512M
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
allowSFTP = true;
|
|
||||||
openFirewall = true;
|
|
||||||
hostKeys = [
|
|
||||||
{
|
|
||||||
path = "/etc/ssh/id_ed25519";
|
|
||||||
type = "ed25519";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
settings = {
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
PermitRootLogin = "yes";
|
|
||||||
UsePAM = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
tailscale = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
networking = {
|
networking = {
|
||||||
nameservers = [
|
nameservers = [
|
||||||
"1.1.1.1"
|
"1.1.1.1"
|
||||||
"8.8.8.8"
|
"8.8.8.8"
|
||||||
# "2001:4860:4860::8844"
|
|
||||||
# "2001:4860:4860::8888"
|
|
||||||
# "2606:4700:4700::1111"
|
|
||||||
# "2606:4700:4700::1001"
|
|
||||||
];
|
];
|
||||||
hostName = "${xlib.device.hostname}";
|
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
tempAddresses = "disabled";
|
tempAddresses = "disabled";
|
||||||
dhcpcd = {
|
dhcpcd = {
|
||||||
@@ -144,14 +116,7 @@ let
|
|||||||
system = {
|
system = {
|
||||||
stateVersion = "25.05";
|
stateVersion = "25.05";
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
in
|
)
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
nixosModule
|
|
||||||
];
|
];
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = {
|
|
||||||
deviceType = "vds";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-67
@@ -1,85 +1,33 @@
|
|||||||
{ inputs, ... }@flakeContext:
|
{
|
||||||
let
|
deviceType = "wsl";
|
||||||
nixosModule =
|
hostname = "wsl";
|
||||||
|
modules = [
|
||||||
|
(
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
xlib,
|
xlib,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
xlib.device = {
|
|
||||||
type = "wsl";
|
|
||||||
hostname = "wsl";
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-wsl.nixosModules.default
|
inputs.nixos-wsl.nixosModules.default
|
||||||
inputs.self.nixosModules.default
|
inputs.self.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
#zramSwap.enable = true;
|
|
||||||
services = {
|
|
||||||
journald = {
|
|
||||||
extraConfig = ''
|
|
||||||
SystemMaxUse=512M
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
earlyoom.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
graphics.enable = true;
|
graphics.enable = true;
|
||||||
# amdgpu.opencl.enable = true;
|
|
||||||
# amdgpu.amdvlk.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
# nameservers = [
|
|
||||||
# "1.1.1.1"
|
|
||||||
# "8.8.8.8"
|
|
||||||
# "2001:4860:4860::8844"
|
|
||||||
# "2001:4860:4860::8888"
|
|
||||||
# "2606:4700:4700::1111"
|
|
||||||
# "2606:4700:4700::1001"
|
|
||||||
# ];
|
|
||||||
hostName = "${xlib.device.hostname}";
|
|
||||||
# networkmanager.enable = true;
|
|
||||||
# tempAddresses = "disabled";
|
|
||||||
# dhcpcd = {
|
|
||||||
# enable = true;
|
|
||||||
# IPv6rs = true;
|
|
||||||
# };
|
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = false;
|
enable = false;
|
||||||
allowPing = true;
|
allowPing = true;
|
||||||
};
|
};
|
||||||
enableIPv6 = true;
|
enableIPv6 = true;
|
||||||
# interfaces.ens3 = {
|
|
||||||
# useDHCP = true;
|
|
||||||
# # ipv4.addresses = [
|
|
||||||
# # {
|
|
||||||
# # address = "31.57.158.109";
|
|
||||||
# # prefixLength = 24;
|
|
||||||
# # }
|
|
||||||
# # ];
|
|
||||||
# ipv6.addresses = [
|
|
||||||
# {
|
|
||||||
# address = "2a13:7c00:10:6:f816:3eff:fe36:fe1b";
|
|
||||||
# prefixLength = 64;
|
|
||||||
# }
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# # defaultGateway = {
|
|
||||||
# # address = "31.57.158.1";
|
|
||||||
# # interface = "ens3";
|
|
||||||
# # };
|
|
||||||
# defaultGateway6 = {
|
|
||||||
# address = "2a13:7c00:10:6::1";
|
|
||||||
# interface = "ens3";
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
wsl = {
|
wsl = {
|
||||||
@@ -90,14 +38,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
};
|
}
|
||||||
in
|
)
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
nixosModule
|
|
||||||
];
|
];
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = {
|
|
||||||
deviceType = "wsl";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ let
|
|||||||
user = "${inputs.self.nixosConfigurations.default.config.xlib.device.username}";
|
user = "${inputs.self.nixosConfigurations.default.config.xlib.device.username}";
|
||||||
server = "sapphira";
|
server = "sapphira";
|
||||||
vds = "otreca";
|
vds = "otreca";
|
||||||
vds-new = "otreca-new";
|
|
||||||
mini-laptop = "rydiwo";
|
mini-laptop = "rydiwo";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -19,7 +18,6 @@ in
|
|||||||
nodes = {
|
nodes = {
|
||||||
"${server}" = mkDeploy "${server}";
|
"${server}" = mkDeploy "${server}";
|
||||||
"${vds}" = mkDeploy "${vds}";
|
"${vds}" = mkDeploy "${vds}";
|
||||||
"${vds-new}" = mkDeploy "${vds-new}";
|
|
||||||
"${mini-laptop}" = mkDeploy "${mini-laptop}";
|
"${mini-laptop}" = mkDeploy "${mini-laptop}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Generated
+39
-118
@@ -211,38 +211,6 @@
|
|||||||
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-beets": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1774610258,
|
|
||||||
"narHash": "sha256-HaThtroVD9wRdx7KQk0B75JmFcXlMUoEdDFNOMOlsOs=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "832efc09b4caf6b4569fbf9dc01bec3082a00611",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "832efc09b4caf6b4569fbf9dc01bec3082a00611",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-calibre": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1776255774,
|
|
||||||
"narHash": "sha256-psVTpH6PK3q1htMJpmdz1hLF5pQgEshu7gQWgKO6t6Y=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "566acc07c54dc807f91625bb286cb9b321b5f42a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "566acc07c54dc807f91625bb286cb9b321b5f42a",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-docs": {
|
"nixpkgs-docs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705957679,
|
"lastModified": 1705957679,
|
||||||
@@ -275,70 +243,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-master": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1786198689,
|
|
||||||
"narHash": "sha256-XkvYmpRd4cmcrzKS8QplEHPZkDDeKwpalJQwosCd3+Q=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "94ec6671dbe7d4879c2c8103e67425e85bf066d7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-previous": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767892417,
|
|
||||||
"narHash": "sha256-dhhvQY67aboBk8b0/u0XB6vwHdgbROZT3fJAjyNh5Ww=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1782847189,
|
|
||||||
"narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "b6018f87da91d19d0ab4cf979885689b469cdd41",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-25.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1785975029,
|
|
||||||
"narHash": "sha256-X44cn5rzytELc3NNoQsh0aLkjWA/QzPfc6HPQmsG3sU=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "70ce234312134a463ba7728e94da2486a1d237ac",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1785967620,
|
"lastModified": 1785967620,
|
||||||
@@ -420,19 +324,20 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
],
|
||||||
|
"zapret": "zapret"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783174389,
|
"lastModified": 1785752612,
|
||||||
"narHash": "sha256-aCWC8ngycU7OdJrU2+Je3qf+1a2ykuBvpPhZT/9tXMc=",
|
"narHash": "sha256-xplyGWMis+MHSOJcwlnOTlebJGNag0qFsZ719JQWsz8=",
|
||||||
"owner": "Mic92",
|
"owner": "FUFSoB",
|
||||||
"repo": "sops-nix",
|
"repo": "proxy-suite-flake",
|
||||||
"rev": "f1406619a3884cd5c47992a70b8b35c9c0fcb4c9",
|
"rev": "47a07d971cf53e62b912d2809a9a711275ceb00d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Mic92",
|
"owner": "FUFSoB",
|
||||||
"repo": "sops-nix",
|
"repo": "proxy-suite-flake",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -447,17 +352,10 @@
|
|||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixos-wsl": "nixos-wsl",
|
"nixos-wsl": "nixos-wsl",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-beets": "nixpkgs-beets",
|
|
||||||
"nixpkgs-calibre": "nixpkgs-calibre",
|
|
||||||
"nixpkgs-master": "nixpkgs-master",
|
|
||||||
"nixpkgs-previous": "nixpkgs-previous",
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
|
||||||
"plasma-manager": "plasma-manager",
|
"plasma-manager": "plasma-manager",
|
||||||
"proxy-suite": "proxy-suite",
|
"proxy-suite": "proxy-suite",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"utils": "utils",
|
"utils": "utils",
|
||||||
"zapret": "zapret",
|
|
||||||
"zeroq-credentials": "zeroq-credentials"
|
"zeroq-credentials": "zeroq-credentials"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -531,17 +429,40 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"zapret": {
|
"zapret": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"proxy-suite",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"zapret-flowseal": "zapret-flowseal"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767430655,
|
"lastModified": 1784758289,
|
||||||
"narHash": "sha256-f9PricXeNm3lG1tk2TepPPY+wxM5y0ezo1HSzNn4BQ8=",
|
"narHash": "sha256-gUwiD33Dn5Q4Fi3RwbRmJJ7wiRw19rvyFJBBnhHWMQc=",
|
||||||
"owner": "oqyude",
|
"owner": "kartavkun",
|
||||||
"repo": "zapret-easyflake",
|
"repo": "zapret-discord-youtube",
|
||||||
"rev": "302e77aae5fc6030a9c3bcc781d6514d87b19d11",
|
"rev": "a7d7f1dd3765937b051d1289fba3fde2a6c8c7c0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "oqyude",
|
"owner": "kartavkun",
|
||||||
"repo": "zapret-easyflake",
|
"repo": "zapret-discord-youtube",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zapret-flowseal": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1784697388,
|
||||||
|
"narHash": "sha256-Lf7oloMkMziQRzyE/nw16J1/hAxSuRG5ioZb7UbLRUo=",
|
||||||
|
"owner": "Flowseal",
|
||||||
|
"repo": "zapret-discord-youtube",
|
||||||
|
"rev": "9503dc045133000af8075e066f09bb469008e530",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Flowseal",
|
||||||
|
"repo": "zapret-discord-youtube",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,18 +3,11 @@
|
|||||||
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";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
||||||
# nixpkgs-last-unstable.url = "github:NixOS/nixpkgs/6b4955211758ba47fac850c040a27f23b9b4008f";
|
# nixpkgs-last-unstable.url = "github:NixOS/nixpkgs/6b4955211758ba47fac850c040a27f23b9b4008f";
|
||||||
nixpkgs-calibre.url = "github:NixOS/nixpkgs/566acc07c54dc807f91625bb286cb9b321b5f42a";
|
# nixpkgs-fingerprint.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
nixpkgs-previous.url = "github:NixOS/nixpkgs/3497aa5c9457a9d88d71fa93a4a8368816fbeeba";
|
|
||||||
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
|
||||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11";
|
|
||||||
nixpkgs-beets.url = "github:NixOS/nixpkgs/832efc09b4caf6b4569fbf9dc01bec3082a00611"; # 2343bbb58f99267223bc2aac4fc9ea301a155a16
|
|
||||||
#nixpkgs-fingerprint.url = "github:NixOS/nixpkgs/nixos-24.11";
|
|
||||||
|
|
||||||
# nix-community
|
# nix-community
|
||||||
nixos-wsl = {
|
nixos-wsl = {
|
||||||
@@ -67,7 +60,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
proxy-suite = {
|
proxy-suite = {
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:FUFSoB/proxy-suite-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
sops-nix = {
|
sops-nix = {
|
||||||
|
|||||||
+24
-22
@@ -20,6 +20,30 @@ let
|
|||||||
if username == "root" then lib.mkDefault "/${username}" else lib.mkDefault "/home/${username}";
|
if username == "root" then lib.mkDefault "/${username}" else lib.mkDefault "/home/${username}";
|
||||||
enableNixpkgsReleaseCheck = false;
|
enableNixpkgsReleaseCheck = false;
|
||||||
};
|
};
|
||||||
|
# Headless hosts: no GUI user dirs
|
||||||
|
xdg =
|
||||||
|
lib.mkIf
|
||||||
|
(builtins.elem xlib.device.type [
|
||||||
|
"server"
|
||||||
|
"vds"
|
||||||
|
"wsl"
|
||||||
|
])
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
autostart.enable = true;
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
createDirectories = false;
|
||||||
|
desktop = null;
|
||||||
|
documents = null;
|
||||||
|
download = null;
|
||||||
|
music = null;
|
||||||
|
pictures = null;
|
||||||
|
publicShare = null;
|
||||||
|
templates = null;
|
||||||
|
videos = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
mkRootModule = username: {
|
mkRootModule = username: {
|
||||||
home = {
|
home = {
|
||||||
@@ -30,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 = {
|
||||||
@@ -50,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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -19,22 +19,6 @@ in
|
|||||||
./minimal.nix
|
./minimal.nix
|
||||||
];
|
];
|
||||||
home.file = mkLinks;
|
home.file = mkLinks;
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
autostart.enable = true;
|
|
||||||
userDirs = {
|
|
||||||
enable = true;
|
|
||||||
createDirectories = false;
|
|
||||||
desktop = null;
|
|
||||||
documents = null;
|
|
||||||
download = null;
|
|
||||||
music = null;
|
|
||||||
pictures = null;
|
|
||||||
publicShare = null;
|
|
||||||
templates = null;
|
|
||||||
videos = null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
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/"
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
xlib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./minimal.nix
|
|
||||||
];
|
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
autostart.enable = true;
|
|
||||||
userDirs = {
|
|
||||||
enable = true;
|
|
||||||
createDirectories = false;
|
|
||||||
desktop = null;
|
|
||||||
documents = null;
|
|
||||||
download = null;
|
|
||||||
music = null;
|
|
||||||
pictures = null;
|
|
||||||
publicShare = null;
|
|
||||||
templates = null;
|
|
||||||
videos = null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,27 +1,8 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
xlib,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./minimal.nix
|
./minimal.nix
|
||||||
];
|
];
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
autostart.enable = true;
|
|
||||||
userDirs = {
|
|
||||||
enable = true;
|
|
||||||
createDirectories = false;
|
|
||||||
desktop = null;
|
|
||||||
documents = null;
|
|
||||||
download = null;
|
|
||||||
music = null;
|
|
||||||
pictures = null;
|
|
||||||
publicShare = null;
|
|
||||||
templates = null;
|
|
||||||
videos = null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,22 +22,6 @@ in
|
|||||||
./minimal.nix
|
./minimal.nix
|
||||||
];
|
];
|
||||||
home.file = mkLinks;
|
home.file = mkLinks;
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
autostart.enable = true;
|
|
||||||
userDirs = {
|
|
||||||
enable = true;
|
|
||||||
createDirectories = false;
|
|
||||||
desktop = null;
|
|
||||||
documents = null;
|
|
||||||
download = null;
|
|
||||||
music = null;
|
|
||||||
pictures = null;
|
|
||||||
publicShare = null;
|
|
||||||
templates = null;
|
|
||||||
videos = null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
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/"
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
deviceType,
|
||||||
|
hostname ? null,
|
||||||
|
modules ? [ ],
|
||||||
|
system ? "x86_64-linux",
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
lib = inputs.nixpkgs.lib;
|
||||||
|
in
|
||||||
|
lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = modules ++ [
|
||||||
|
{
|
||||||
|
xlib.device = {
|
||||||
|
type = deviceType;
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs (hostname != null) { inherit hostname; };
|
||||||
|
}
|
||||||
|
];
|
||||||
|
specialArgs = {
|
||||||
|
inherit deviceType inputs;
|
||||||
|
};
|
||||||
|
}
|
||||||
+23
-37
@@ -1,5 +1,12 @@
|
|||||||
{ inputs, ... }@flakeContext:
|
{ inputs, ... }@flakeContext:
|
||||||
let
|
let
|
||||||
|
# NixOS-only modules. termux runs nix-on-droid (its own module system,
|
||||||
|
# class = "nixOnDroid"): options like services.*, users.*, sops.*, disko.*
|
||||||
|
# and nixpkgs.overlays (flake assertion) do not exist there.
|
||||||
|
moduleArgs = config: {
|
||||||
|
inherit inputs;
|
||||||
|
xlib = config.xlib;
|
||||||
|
};
|
||||||
defaultModule =
|
defaultModule =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
@@ -8,15 +15,19 @@ let
|
|||||||
xlib,
|
xlib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
isDesktop = builtins.elem deviceType [
|
||||||
|
"primary"
|
||||||
|
"secondary"
|
||||||
|
];
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# NixOS-only modules. termux runs nix-on-droid (its own module system,
|
imports =
|
||||||
# class = "nixOnDroid"): options like services.*, users.*, sops.*, disko.*
|
with inputs;
|
||||||
# and nixpkgs.overlays (flake assertion) do not exist there.
|
[
|
||||||
imports = with inputs; [
|
|
||||||
./essentials
|
./essentials
|
||||||
./options.nix
|
./options.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
(./. + "/${deviceType}")
|
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager # home-manager module
|
home-manager.nixosModules.home-manager # home-manager module
|
||||||
# nix-index-database.nixosModules.nix-index # nix-index module
|
# nix-index-database.nixosModules.nix-index # nix-index module
|
||||||
@@ -24,36 +35,15 @@ let
|
|||||||
sops-nix.nixosModules.sops # sops module
|
sops-nix.nixosModules.sops # sops module
|
||||||
self.homeConfigurations.default.nixosModule # default homeConfigurations
|
self.homeConfigurations.default.nixosModule # default homeConfigurations
|
||||||
disko.nixosModules.disko # disko module
|
disko.nixosModules.disko # disko module
|
||||||
];
|
]
|
||||||
|
++ lib.optional isDesktop ../desktop # desktop class: primary/secondary
|
||||||
|
# device-type module dir; "minimal" has no extra modules
|
||||||
|
++ lib.optional (!isDesktop && deviceType != "minimal") (./. + "/${deviceType}");
|
||||||
nixpkgs.overlays = with inputs; [
|
nixpkgs.overlays = with inputs; [
|
||||||
self.nixosOverlays.default
|
self.nixosOverlays.default
|
||||||
];
|
];
|
||||||
_module.args = {
|
networking.hostName = lib.mkDefault config.xlib.device.hostname;
|
||||||
inputs = inputs;
|
_module.args = moduleArgs config;
|
||||||
xlib = config.xlib;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
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 = {
|
|
||||||
inputs = inputs;
|
|
||||||
xlib = config.xlib;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
strictModule =
|
strictModule =
|
||||||
{
|
{
|
||||||
@@ -72,16 +62,12 @@ let
|
|||||||
# sops-nix.nixosModules.sops
|
# sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
|
|
||||||
_module.args = {
|
_module.args = moduleArgs config;
|
||||||
inputs = inputs;
|
|
||||||
xlib = config.xlib;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
default = defaultModule;
|
default = defaultModule;
|
||||||
public = publicModule;
|
|
||||||
strict = strictModule;
|
strict = strictModule;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+49
-16
@@ -3,6 +3,7 @@
|
|||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
xlib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@@ -11,6 +12,54 @@
|
|||||||
./theming.nix
|
./theming.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Things every desktop host has in common
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "ru_RU.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "ru_RU.UTF-8";
|
||||||
|
LC_MEASUREMENT = "ru_RU.UTF-8";
|
||||||
|
LC_MONETARY = "ru_RU.UTF-8";
|
||||||
|
LC_NAME = "ru_RU.UTF-8";
|
||||||
|
LC_NUMERIC = "ru_RU.UTF-8";
|
||||||
|
LC_PAPER = "ru_RU.UTF-8";
|
||||||
|
LC_TELEPHONE = "ru_RU.UTF-8";
|
||||||
|
LC_TIME = "ru_RU.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
networkmanager.enable = true;
|
||||||
|
firewall.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
services = {
|
||||||
|
syncthing = {
|
||||||
|
enable = true;
|
||||||
|
systemService = true;
|
||||||
|
configDir = "${xlib.dirs.user-storage}/Syncthing/${config.system.name}";
|
||||||
|
dataDir = "${xlib.dirs.user-home}";
|
||||||
|
group = "users";
|
||||||
|
user = "${xlib.device.username}";
|
||||||
|
};
|
||||||
|
thermald.enable = true;
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
xkb = {
|
||||||
|
layout = "us,ru";
|
||||||
|
variant = "";
|
||||||
|
# options = "grp:alt_shift_toggle";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
libinput.enable = true;
|
||||||
|
colord.enable = true;
|
||||||
|
printing = {
|
||||||
|
enable = true;
|
||||||
|
cups-pdf.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
plymouth = {
|
plymouth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -53,22 +102,6 @@
|
|||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
};
|
};
|
||||||
services = {
|
|
||||||
xserver = {
|
|
||||||
enable = true;
|
|
||||||
xkb = {
|
|
||||||
layout = "us,ru";
|
|
||||||
variant = "";
|
|
||||||
# options = "grp:alt_shift_toggle";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
libinput.enable = true;
|
|
||||||
colord.enable = true;
|
|
||||||
printing = {
|
|
||||||
enable = true;
|
|
||||||
cups-pdf.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# environment = {
|
# environment = {
|
||||||
# systemPackages = [
|
# systemPackages = [
|
||||||
# pkgs.pcbu-desktop
|
# pkgs.pcbu-desktop
|
||||||
|
|||||||
@@ -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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
./packages.nix
|
./packages.nix
|
||||||
./services.nix
|
./services.nix
|
||||||
./settings.nix
|
./settings.nix
|
||||||
|
./ssh.nix
|
||||||
./systemd-routines.nix
|
./systemd-routines.nix
|
||||||
./shell.nix
|
./shell.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
xlib,
|
xlib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
services = {
|
services.tailscale.enable = xlib.device.type != "wsl"; # true, if not wsl
|
||||||
tailscale.enable = xlib.device.type != "wsl"; # true, if not wsl
|
|
||||||
};
|
# All real hosts (not the bare "minimal" test config) get OOM protection
|
||||||
|
# and a bounded journal.
|
||||||
|
services.earlyoom.enable = lib.mkIf (xlib.device.type != "minimal") true;
|
||||||
|
services.journald.extraConfig = lib.mkIf (xlib.device.type != "minimal") ''
|
||||||
|
SystemMaxUse=512M
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.mkIf config.xlib.ssh.enable {
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
allowSFTP = true;
|
||||||
|
openFirewall = lib.mkDefault false;
|
||||||
|
hostKeys = [
|
||||||
|
{
|
||||||
|
path = "/etc/ssh/id_ed25519";
|
||||||
|
type = "ed25519";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
PermitRootLogin = "yes";
|
||||||
|
UsePAM = 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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
+7
-1
@@ -14,7 +14,6 @@
|
|||||||
"secondary"
|
"secondary"
|
||||||
"server"
|
"server"
|
||||||
"vds"
|
"vds"
|
||||||
"vds-new"
|
|
||||||
"wsl"
|
"wsl"
|
||||||
"termux"
|
"termux"
|
||||||
];
|
];
|
||||||
@@ -32,6 +31,13 @@
|
|||||||
description = "Hostname...";
|
description = "Hostname...";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
ssh = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable SSH server with the standard config.";
|
||||||
|
};
|
||||||
|
};
|
||||||
dirs = {
|
dirs = {
|
||||||
user-home = lib.mkOption {
|
user-home = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../desktop
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../desktop
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../vds
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
# Auto-generated using compose2nix v0.3.3-pre.
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
# Runtime
|
|
||||||
virtualisation.podman = {
|
|
||||||
enable = true;
|
|
||||||
autoPrune = {
|
|
||||||
enable = true;
|
|
||||||
flags = [ "--all" ];
|
|
||||||
};
|
|
||||||
dockerCompat = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable container name DNS for all Podman networks.
|
|
||||||
networking.firewall.interfaces =
|
|
||||||
let
|
|
||||||
matchAll = if !config.networking.nftables.enable then "podman+" else "podman*";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
"${matchAll}".allowedUDPPorts = [ 53 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall = {
|
|
||||||
allowedUDPPortRanges = [
|
|
||||||
{
|
|
||||||
from = 14380;
|
|
||||||
to = 15380;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
allowedTCPPortRanges = [
|
|
||||||
{
|
|
||||||
from = 14380;
|
|
||||||
to = 15380;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
allowedTCPPorts = [
|
|
||||||
8443
|
|
||||||
9443
|
|
||||||
13380
|
|
||||||
];
|
|
||||||
allowedUDPPorts = [
|
|
||||||
8443
|
|
||||||
9443
|
|
||||||
13380
|
|
||||||
];
|
|
||||||
};
|
|
||||||
virtualisation.oci-containers.backend = "podman";
|
|
||||||
|
|
||||||
# Containers
|
|
||||||
virtualisation.oci-containers.containers."3xui_app" = {
|
|
||||||
image = "ghcr.io/mhsanaei/3x-ui:latest";
|
|
||||||
environment = {
|
|
||||||
"XRAY_VMESS_AEAD_FORCED" = "false";
|
|
||||||
"XUI_ENABLE_FAIL2BAN" = "true";
|
|
||||||
"TZ" = "Europe/Moscow";
|
|
||||||
};
|
|
||||||
volumes = [
|
|
||||||
"/mnt/containers/3x-ui/cert/:/root/cert:rw"
|
|
||||||
"/mnt/containers/3x-ui/db/:/etc/x-ui:rw"
|
|
||||||
];
|
|
||||||
log-driver = "journald";
|
|
||||||
extraOptions = [
|
|
||||||
"--network=host"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
systemd.services."podman-3xui_app" = {
|
|
||||||
serviceConfig = {
|
|
||||||
Restart = lib.mkOverride 90 "always";
|
|
||||||
};
|
|
||||||
partOf = [
|
|
||||||
"podman-compose-3x-ui-root.target"
|
|
||||||
];
|
|
||||||
wantedBy = [
|
|
||||||
"podman-compose-3x-ui-root.target"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Builds
|
|
||||||
systemd.services."podman-build-3xui_app" = {
|
|
||||||
path = [
|
|
||||||
pkgs.podman
|
|
||||||
pkgs.git
|
|
||||||
];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
TimeoutSec = 300;
|
|
||||||
};
|
|
||||||
script = ''
|
|
||||||
cd /mnt/containers/3x-ui
|
|
||||||
podman build -t compose2nix/3xui_app -f ./Dockerfile .
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Root service
|
|
||||||
# When started, this will automatically create all resources and start
|
|
||||||
# the containers. When stopped, this will teardown all resources.
|
|
||||||
systemd.targets."podman-compose-3x-ui-root" = {
|
|
||||||
unitConfig = {
|
|
||||||
Description = "Root target generated by compose2nix.";
|
|
||||||
};
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Folders
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"d /mnt 0755 root root -"
|
|
||||||
"d /mnt/containers 0755 root root -"
|
|
||||||
"d /mnt/containers/3x-ui 0755 root root -"
|
|
||||||
"d /mnt/containers/3x-ui/cert 0755 root root -"
|
|
||||||
"d /mnt/containers/3x-ui/db 0755 root root -"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,8 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# ./3x-ui.nix
|
# shared container modules live in ../../containers
|
||||||
|
# ../../containers/3x-ui.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|||||||
@@ -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
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,5 @@ in
|
|||||||
packages.${system} = {
|
packages.${system} = {
|
||||||
rovr = pkgs.callPackage ./rovr { };
|
rovr = pkgs.callPackage ./rovr { };
|
||||||
pcbu-desktop = pkgs.callPackage ./pcbu-desktop { };
|
pcbu-desktop = pkgs.callPackage ./pcbu-desktop { };
|
||||||
# immich = pkgs.callPackage ./immich { };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user