From f1a81a6408d7798659cdf7d74e196c3f9db488a6 Mon Sep 17 00:00:00 2001 From: oqyude Date: Mon, 9 Mar 2026 10:50:12 +0300 Subject: [PATCH] Init --- .sops.yaml | 7 + README.md | 1 + configurations/any.nix | 30 + configurations/default.nix | 12 + configurations/disko/mini-laptop.nix | 27 + configurations/disko/mini-pc.nix | 43 ++ configurations/disko/server.nix | 39 ++ configurations/disko/vds.nix | 33 + configurations/hardware/logitech.nix | 14 + configurations/hardware/mini-laptop.nix | 69 +++ configurations/hardware/mini-pc.nix | 77 +++ configurations/hardware/server.nix | 69 +++ configurations/hardware/vds-new.nix | 23 + configurations/hardware/vds.nix | 23 + configurations/mini-laptop.nix | 143 +++++ configurations/mini-pc.nix | 163 +++++ configurations/server.nix | 137 +++++ configurations/vds-new.nix | 177 ++++++ configurations/vds.nix | 177 ++++++ configurations/wsl.nix | 103 ++++ deploy/default.nix | 30 + flake.lock | 504 +++++++++++++++ flake.nix | 122 ++++ home/apps/default.nix | 11 + home/apps/gramps.nix | 29 + home/apps/streamrip.nix | 22 + home/apps/v2rayn.nix | 23 + home/apps/yt-dlp.nix | 22 + home/default.nix | 6 + home/home.nix | 76 +++ home/minimal.nix | 78 +++ home/modules/dconf.nix | 33 + home/modules/noctalia.nix | 451 ++++++++++++++ home/modules/packages.nix | 88 +++ home/modules/plasma-manager.nix | 125 ++++ home/others/primary.nix | 52 ++ home/others/secondary.nix | 52 ++ home/primary.nix | 73 +++ home/secondary.nix | 69 +++ home/server.nix | 46 ++ home/vds-new.nix | 27 + home/vds.nix | 27 + home/wsl.nix | 49 ++ modules/containers/3x-ui.nix | 118 ++++ modules/containers/openhands.nix | 121 ++++ modules/containers/remnawave.nix | 28 + modules/default.nix | 62 ++ modules/desktop/default.nix | 74 +++ modules/desktop/environment/default.nix | 11 + modules/desktop/environment/gnome.nix | 49 ++ modules/desktop/environment/kde.nix | 35 ++ modules/desktop/environment/noctalia.nix | 31 + modules/desktop/environment/xfce.nix | 36 ++ modules/desktop/theming.nix | 18 + modules/essentials/default.nix | 13 + modules/essentials/packages.nix | 200 ++++++ modules/essentials/services.nix | 12 + modules/essentials/settings.nix | 76 +++ modules/essentials/shell.nix | 69 +++ modules/essentials/systemd-routine.nix | 26 + modules/extra/gaming/aagl.nix | 19 + modules/extra/gaming/nix-gaming.nix | 13 + modules/extra/musnix.nix | 47 ++ modules/extra/self/fingerprint.nix | 33 + modules/extra/self/zapret.nix | 31 + modules/minimal/default.nix | 9 + modules/options.nix | 128 ++++ modules/others/default.nix | 32 + modules/primary/default.nix | 9 + modules/secondary/default.nix | 9 + modules/server/calibre-web.nix | 35 ++ modules/server/default.nix | 30 + modules/server/immich.nix | 54 ++ modules/server/mealie.nix | 15 + modules/server/memos.nix | 26 + modules/server/miniflux.nix | 24 + modules/server/netdata.nix | 25 + modules/server/nextcloud.nix | 190 ++++++ modules/server/nfs.nix | 24 + modules/server/nginx.nix | 98 +++ modules/server/node-red.nix | 21 + modules/server/open-webui.nix | 28 + modules/server/postgresql.nix | 36 ++ modules/server/rsync.nix | 70 +++ modules/server/samba.nix | 53 ++ modules/server/secrets/miniflux.env | 8 + modules/server/stirling-pdf.nix | 17 + modules/server/syncthing.nix | 23 + modules/server/systemd.nix | 64 ++ modules/server/transmission.nix | 25 + modules/server/trilium.nix | 20 + modules/server/uptime-kuma.nix | 29 + modules/server/zerotier.nix | 23 + modules/services/tts.nix | 19 + modules/services/zapret-old.nix | 47 ++ modules/services/zapret.nix | 54 ++ modules/software/aichat.nix | 12 + modules/software/beets/default.nix | 96 +++ modules/software/beets/dependencies.nix | 573 ++++++++++++++++++ modules/software/beets/other/default.nix | 57 ++ .../beets/other/dependencies-back.nix | 573 ++++++++++++++++++ .../software/beets/other/dependencies-cut.nix | 573 ++++++++++++++++++ modules/software/daw.nix | 21 + modules/software/virtual.nix | 52 ++ modules/software/whisper.nix | 24 + modules/software/wine.nix | 20 + modules/users.nix | 123 ++++ modules/vds-new/default.nix | 9 + modules/vds/default.nix | 12 + modules/vds/netbird.nix | 40 ++ modules/vds/nginx.nix | 214 +++++++ modules/vds/xray.nix | 44 ++ modules/wsl/containers/3x-ui.nix | 118 ++++ modules/wsl/containers/default.nix | 16 + modules/wsl/default.nix | 15 + overlays/default.nix | 6 + overlays/pkgs.nix | 3 + pkgs/default.nix | 9 + secrets/default.yaml | 19 + 119 files changed, 8378 insertions(+) create mode 100644 .sops.yaml create mode 100644 README.md create mode 100644 configurations/any.nix create mode 100644 configurations/default.nix create mode 100644 configurations/disko/mini-laptop.nix create mode 100644 configurations/disko/mini-pc.nix create mode 100644 configurations/disko/server.nix create mode 100644 configurations/disko/vds.nix create mode 100644 configurations/hardware/logitech.nix create mode 100644 configurations/hardware/mini-laptop.nix create mode 100644 configurations/hardware/mini-pc.nix create mode 100644 configurations/hardware/server.nix create mode 100644 configurations/hardware/vds-new.nix create mode 100644 configurations/hardware/vds.nix create mode 100644 configurations/mini-laptop.nix create mode 100644 configurations/mini-pc.nix create mode 100644 configurations/server.nix create mode 100644 configurations/vds-new.nix create mode 100644 configurations/vds.nix create mode 100644 configurations/wsl.nix create mode 100644 deploy/default.nix create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 home/apps/default.nix create mode 100644 home/apps/gramps.nix create mode 100644 home/apps/streamrip.nix create mode 100644 home/apps/v2rayn.nix create mode 100644 home/apps/yt-dlp.nix create mode 100644 home/default.nix create mode 100644 home/home.nix create mode 100644 home/minimal.nix create mode 100644 home/modules/dconf.nix create mode 100644 home/modules/noctalia.nix create mode 100644 home/modules/packages.nix create mode 100644 home/modules/plasma-manager.nix create mode 100644 home/others/primary.nix create mode 100644 home/others/secondary.nix create mode 100644 home/primary.nix create mode 100644 home/secondary.nix create mode 100644 home/server.nix create mode 100644 home/vds-new.nix create mode 100644 home/vds.nix create mode 100644 home/wsl.nix create mode 100644 modules/containers/3x-ui.nix create mode 100644 modules/containers/openhands.nix create mode 100644 modules/containers/remnawave.nix create mode 100644 modules/default.nix create mode 100644 modules/desktop/default.nix create mode 100644 modules/desktop/environment/default.nix create mode 100644 modules/desktop/environment/gnome.nix create mode 100644 modules/desktop/environment/kde.nix create mode 100644 modules/desktop/environment/noctalia.nix create mode 100644 modules/desktop/environment/xfce.nix create mode 100644 modules/desktop/theming.nix create mode 100644 modules/essentials/default.nix create mode 100644 modules/essentials/packages.nix create mode 100644 modules/essentials/services.nix create mode 100644 modules/essentials/settings.nix create mode 100644 modules/essentials/shell.nix create mode 100644 modules/essentials/systemd-routine.nix create mode 100644 modules/extra/gaming/aagl.nix create mode 100644 modules/extra/gaming/nix-gaming.nix create mode 100644 modules/extra/musnix.nix create mode 100644 modules/extra/self/fingerprint.nix create mode 100644 modules/extra/self/zapret.nix create mode 100644 modules/minimal/default.nix create mode 100644 modules/options.nix create mode 100644 modules/others/default.nix create mode 100644 modules/primary/default.nix create mode 100644 modules/secondary/default.nix create mode 100644 modules/server/calibre-web.nix create mode 100644 modules/server/default.nix create mode 100644 modules/server/immich.nix create mode 100644 modules/server/mealie.nix create mode 100644 modules/server/memos.nix create mode 100644 modules/server/miniflux.nix create mode 100644 modules/server/netdata.nix create mode 100644 modules/server/nextcloud.nix create mode 100644 modules/server/nfs.nix create mode 100644 modules/server/nginx.nix create mode 100644 modules/server/node-red.nix create mode 100644 modules/server/open-webui.nix create mode 100644 modules/server/postgresql.nix create mode 100644 modules/server/rsync.nix create mode 100644 modules/server/samba.nix create mode 100644 modules/server/secrets/miniflux.env create mode 100644 modules/server/stirling-pdf.nix create mode 100644 modules/server/syncthing.nix create mode 100644 modules/server/systemd.nix create mode 100644 modules/server/transmission.nix create mode 100644 modules/server/trilium.nix create mode 100644 modules/server/uptime-kuma.nix create mode 100644 modules/server/zerotier.nix create mode 100644 modules/services/tts.nix create mode 100644 modules/services/zapret-old.nix create mode 100644 modules/services/zapret.nix create mode 100644 modules/software/aichat.nix create mode 100644 modules/software/beets/default.nix create mode 100644 modules/software/beets/dependencies.nix create mode 100644 modules/software/beets/other/default.nix create mode 100644 modules/software/beets/other/dependencies-back.nix create mode 100644 modules/software/beets/other/dependencies-cut.nix create mode 100644 modules/software/daw.nix create mode 100644 modules/software/virtual.nix create mode 100644 modules/software/whisper.nix create mode 100644 modules/software/wine.nix create mode 100644 modules/users.nix create mode 100644 modules/vds-new/default.nix create mode 100644 modules/vds/default.nix create mode 100644 modules/vds/netbird.nix create mode 100644 modules/vds/nginx.nix create mode 100644 modules/vds/xray.nix create mode 100644 modules/wsl/containers/3x-ui.nix create mode 100644 modules/wsl/containers/default.nix create mode 100644 modules/wsl/default.nix create mode 100644 overlays/default.nix create mode 100644 overlays/pkgs.nix create mode 100644 pkgs/default.nix create mode 100644 secrets/default.yaml diff --git a/.sops.yaml b/.sops.yaml new file mode 100644 index 0000000..633ec5a --- /dev/null +++ b/.sops.yaml @@ -0,0 +1,7 @@ +keys: + - &default age13l2gtk0nzr484zprp7e0pkrt0ne0j4asyn2pjmlaw73nte7t7d8q4sqtxm +creation_rules: + - path_regex: secrets/[^/]+\.(yaml|json|env|ini)$ + key_groups: + - age: + - *default \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..0e6db73 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +I'm a super newbie who just posted my stuff here. Now maybe simple newbie \ No newline at end of file diff --git a/configurations/any.nix b/configurations/any.nix new file mode 100644 index 0000000..5d18cec --- /dev/null +++ b/configurations/any.nix @@ -0,0 +1,30 @@ +{ inputs, ... }@flakeContext: +let + nixosModule = + { + config, + lib, + modulesPath, + pkgs, + xlib, + ... + }: + { + imports = [ + inputs.self.nixosModules.default + ]; + + system = { + stateVersion = "26.05"; + }; + }; +in +inputs.nixpkgs.lib.nixosSystem { + modules = [ + nixosModule + ]; + system = "x86_64-linux"; + specialArgs = { + deviceType = "minimal"; + }; +} diff --git a/configurations/default.nix b/configurations/default.nix new file mode 100644 index 0000000..ff2fcc1 --- /dev/null +++ b/configurations/default.nix @@ -0,0 +1,12 @@ +{ inputs, ... }@flakeContext: +{ + nixosConfigurations = { + default = import ./any.nix flakeContext; # default + atoridu = import ./mini-pc.nix flakeContext; # atoridu + rydiwo = import ./mini-laptop.nix flakeContext; # rydiwo + otreca = import ./vds.nix flakeContext; # vds + otreca-new = import ./vds-new.nix flakeContext; # vds-new + sapphira = import ./server.nix flakeContext; # sapphira + wsl = import ./wsl.nix flakeContext; # wsl + }; +} diff --git a/configurations/disko/mini-laptop.nix b/configurations/disko/mini-laptop.nix new file mode 100644 index 0000000..a410aec --- /dev/null +++ b/configurations/disko/mini-laptop.nix @@ -0,0 +1,27 @@ +{ xlib, ... }: +{ + disko.devices = { + disk = { + "${xlib.device.hostname}" = { + device = "/dev/nvme0n1p4"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + extraArgs = [ + "-L ${xlib.device.hostname}" # Filesystem label + ]; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/configurations/disko/mini-pc.nix b/configurations/disko/mini-pc.nix new file mode 100644 index 0000000..6e572e5 --- /dev/null +++ b/configurations/disko/mini-pc.nix @@ -0,0 +1,43 @@ +{ xlib, ... }: +{ + disko.devices = { + disk = { + "${xlib.device.hostname}" = { + device = "/dev/sda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + # extraArgs = [ + # "-L ${xlib.device.hostname}" # Filesystem label + # ]; + }; + }; + swap = { + size = "2048M"; + content = { + type = "swap"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/configurations/disko/server.nix b/configurations/disko/server.nix new file mode 100644 index 0000000..0e73e05 --- /dev/null +++ b/configurations/disko/server.nix @@ -0,0 +1,39 @@ +{ + disko.devices = { + disk = { + main = { + device = "/dev/mmcblk0"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "512M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + swap = { + size = "2G"; + content = { + type = "swap"; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/configurations/disko/vds.nix b/configurations/disko/vds.nix new file mode 100644 index 0000000..c8210e5 --- /dev/null +++ b/configurations/disko/vds.nix @@ -0,0 +1,33 @@ +{ + disko.devices = { + disk = { + main = { + device = "/dev/vda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + boot = { + type = "EF02"; + size = "1M"; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + swap = { + size = "1G"; + content = { + type = "swap"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/configurations/hardware/logitech.nix b/configurations/hardware/logitech.nix new file mode 100644 index 0000000..4ec69a4 --- /dev/null +++ b/configurations/hardware/logitech.nix @@ -0,0 +1,14 @@ +{ + config, + ... +}: +{ + hardware = { + logitech = { + wireless = { + enable = true; + enableGraphical = true; + }; + }; + }; +} diff --git a/configurations/hardware/mini-laptop.nix b/configurations/hardware/mini-laptop.nix new file mode 100644 index 0000000..096a51d --- /dev/null +++ b/configurations/hardware/mini-laptop.nix @@ -0,0 +1,69 @@ +{ + config, + lib, + pkgs, + modulesPath, + xlib, + ... +}: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + initrd = { + supportedFilesystems = [ + "nfs" + "nfsv4" + "overlay" + ]; + availableKernelModules = [ + "nvme" + "xhci_pci" + "thunderbolt" + "usb_storage" + "uas" + "usbhid" + "sd_mod" + ]; + }; + # kernelModules = [ + # ]; + extraModulePackages = [ ]; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-partlabel/disk-${xlib.device.hostname}-root"; + # device = "/dev/disk/by-uuid/fe5364dc-a79c-458d-a0d0-b7ea32a56266"; + fsType = "ext4"; + }; + "/boot" = { + # device = "/dev/disk/by-uuid/7ECA-F1EC"; + device = "/dev/disk/by-partlabel/disk-${xlib.device.hostname}-ESP"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + }; + + # swapDevices = [ + # { device = "/dev/disk/by-partlabel/disk-${xlib.device.hostname}-swap"; } + # ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp100s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp98s0.useDHCP = lib.mkDefault true; + + #nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/configurations/hardware/mini-pc.nix b/configurations/hardware/mini-pc.nix new file mode 100644 index 0000000..fea7ead --- /dev/null +++ b/configurations/hardware/mini-pc.nix @@ -0,0 +1,77 @@ +{ + config, + lib, + pkgs, + modulesPath, + xlib, + ... +}: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "thunderbolt" + "usb_storage" + "uas" + "usbhid" + "sd_mod" + ]; + kernelModules = [ + "kvm-amd" + "amdgpu" + ]; + extraModulePackages = [ ]; + }; + + # hardware = { + # amdgpu = { + # opencl.enable = true; + # }; + # graphics.extraPackages = with pkgs; [ + # mesa + # amf + # ]; + # }; + # systemd.tmpfiles.rules = [ + # "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" + # ]; + + fileSystems = { + "/" = { + device = lib.mkForce "/dev/disk/by-uuid/5d20c3e3-bd18-4c28-9b35-903eb8ae9881"; + #device = lib.mkForce "/dev/disk/by-partlabel/disk-${xlib.device.hostname}-root"; + fsType = "ext4"; + }; + "/boot" = { + device = lib.mkForce "/dev/disk/by-uuid/A431-B16A"; + #device = lib.mkForce "/dev/disk/by-partlabel/disk-${xlib.device.hostname}-ESP"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + }; + + # swapDevices = [ + # { device = "/dev/disk/by-partlabel/disk-${xlib.device.hostname}-swap"; } + # ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp100s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp98s0.useDHCP = lib.mkDefault true; + + #nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/configurations/hardware/server.nix b/configurations/hardware/server.nix new file mode 100644 index 0000000..a4c066f --- /dev/null +++ b/configurations/hardware/server.nix @@ -0,0 +1,69 @@ +{ + config, + lib, + pkgs, + modulesPath, + ... +}: +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + boot = { + initrd = { + # supportedFilesystems = [ + # "nfs" + # "nfsv4" + # "overlay" + # ]; + availableKernelModules = [ + "ahci" + "xhci_pci" + "usbhid" + "usb_storage" + "sd_mod" + "sdhci_pci" + ]; + }; + kernel = { + sysctl = { + "fs.inotify.max_user_watches" = "204800"; + }; + }; + kernelModules = [ + "kvm-intel" + "coretemp" + ]; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-partlabel/disk-main-root"; + fsType = "ext4"; + }; + "/boot" = { + device = "/dev/disk/by-partlabel/disk-main-ESP"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; + }; + + # swapDevices = [ + # { device = "/dev/disk/by-partlabel/disk-main-swap"; } + # ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/configurations/hardware/vds-new.nix b/configurations/hardware/vds-new.nix new file mode 100644 index 0000000..cdbee5a --- /dev/null +++ b/configurations/hardware/vds-new.nix @@ -0,0 +1,23 @@ +{ + 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; +} diff --git a/configurations/hardware/vds.nix b/configurations/hardware/vds.nix new file mode 100644 index 0000000..cdbee5a --- /dev/null +++ b/configurations/hardware/vds.nix @@ -0,0 +1,23 @@ +{ + 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; +} diff --git a/configurations/mini-laptop.nix b/configurations/mini-laptop.nix new file mode 100644 index 0000000..431d40d --- /dev/null +++ b/configurations/mini-laptop.nix @@ -0,0 +1,143 @@ +{ + inputs, + ... +}@flakeContext: +let + nixosModule = + { + config, + lib, + pkgs, + xlib, + ... + }: + { + xlib.device = { + type = "secondary"; + hostname = "rydiwo"; + }; + + imports = with inputs; [ + nixos-hardware.nixosModules.chuwi-minibook-x + ./hardware/mini-laptop.nix + self.nixosModules.default + ]; + + boot = { + kernelPackages = lib.mkDefault pkgs.linuxPackages_xanmod_stable; + loader = { + systemd-boot.enable = lib.mkDefault true; + efi.canTouchEfiVariables = lib.mkDefault true; + }; + }; + + fileSystems."${xlib.dirs.lamet-drive}" = { + device = "/dev/disk/by-uuid/DC76BD3576BD116E"; + fsType = "ntfs3"; + options = [ + "defaults" + "uid=1000" + "gid=1000" + "fmask=0000" + "dmask=0000" + "nofail" + ]; + }; + + hardware = { + 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; + + system.stateVersion = "26.05"; + }; +in +inputs.nixpkgs.lib.nixosSystem { + modules = with inputs; [ + nixosModule + ]; + system = "x86_64-linux"; + specialArgs = { + deviceType = "secondary"; + }; +} diff --git a/configurations/mini-pc.nix b/configurations/mini-pc.nix new file mode 100644 index 0000000..db3c905 --- /dev/null +++ b/configurations/mini-pc.nix @@ -0,0 +1,163 @@ +{ + inputs, + ... +}@flakeContext: +let + nixosModule = + { + config, + lib, + pkgs, + xlib, + ... + }: + { + xlib.device = { + type = "primary"; + hostname = "atoridu"; + }; + + imports = with inputs; [ + ./hardware/mini-pc.nix + ./disko/mini-pc.nix + ./hardware/logitech.nix + self.nixosModules.default + ]; + + fileSystems = { + "${xlib.dirs.therima-drive}" = { + enable = false; + device = "/dev/disk/by-uuid/C0A2DDEFA2DDEA44"; + fsType = "ntfs3"; + options = [ + "defaults" + "uid=1000" + "gid=1000" + "fmask=0007" + "dmask=0007" + "nofail" + ]; + }; + "${xlib.dirs.vetymae-drive}" = { + enable = false; + device = "/dev/disk/by-uuid/6408433908430A0E"; + fsType = "ntfs3"; + options = [ + "defaults" + "uid=1000" + "gid=1000" + "fmask=0007" + "dmask=0007" + "nofail" + ]; + }; + "${xlib.dirs.soptur-drive}" = { + enable = false; + device = "/dev/disk/by-uuid/C00C56E40C56D54E"; + fsType = "ntfs3"; + options = [ + "defaults" + "uid=1000" + "gid=1000" + "fmask=0007" + "dmask=0007" + "nofail" + ]; + }; + }; + + boot = { + kernelPackages = lib.mkDefault pkgs.linuxPackages_xanmod_stable; + #kernelParams = [ "usbcore.autosuspend=-1" ]; + loader = { + systemd-boot.enable = lib.mkDefault true; + efi.canTouchEfiVariables = lib.mkDefault true; + }; + }; + + hardware = { + bluetooth.enable = true; + }; + + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + 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 = [ + "amdgpu" + ]; + }; + 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; + }; + nixpkgs.config.pulseaudio = true; + + security = { + rtkit.enable = true; + }; + + system.stateVersion = "26.05"; + }; +in +inputs.nixpkgs.lib.nixosSystem { + modules = [ + nixosModule + ]; + system = "x86_64-linux"; + specialArgs = { + deviceType = "primary"; + }; +} diff --git a/configurations/server.nix b/configurations/server.nix new file mode 100644 index 0000000..7e3fc68 --- /dev/null +++ b/configurations/server.nix @@ -0,0 +1,137 @@ +{ inputs, ... }@flakeContext: +let + nixosModule = + { + config, + lib, + pkgs, + xlib, + ... + }: + { + xlib.device = { + type = "server"; + hostname = "sapphira"; + }; + + imports = [ + ./hardware/server.nix + inputs.self.nixosModules.default + ]; + + boot = { + kernelPackages = pkgs.linuxPackages_xanmod_stable; + hardwareScan = true; + loader = { + systemd-boot.enable = lib.mkDefault true; + efi.canTouchEfiVariables = lib.mkDefault true; + }; + }; + + hardware = { + bluetooth.enable = true; + graphics = { + enable = true; + extraPackages = with pkgs; [ + intel-media-driver + intel-ocl + intel-vaapi-driver + ]; + }; + intel-gpu-tools.enable = true; + }; + + # swapDevices = [ + # { device = "/dev/disk/by-partlabel/disk-main-swap"; } + # ]; + + fileSystems = { + # External drive + "${xlib.dirs.server-home}" = { + device = "/dev/disk/by-uuid/37e53ebc-5343-a94d-9fe2-0ca39e13a8de"; + fsType = "ext4"; + }; + # Archive drive + "/mnt/archive" = { + device = "/dev/disk/by-label/archive"; + fsType = "exfat"; + options = [ + "nofail" + "uid=1000" + "gid=1000" + ]; + }; + # Mobile SD-Card + "/mnt/mobile" = { + device = "/dev/disk/by-uuid/7EB1-DC99"; + fsType = "exfat"; + options = [ + "nofail" + "uid=1000" + "gid=1000" + ]; + }; + "${xlib.dirs.services-mnt-folder}" = { + device = "${xlib.dirs.services-folder}"; + options = [ + "bind" + "nofail" + # "uid=1000" + # "gid=1000" + # "fmask=0000" + # "dmask=0000" + ]; + }; + }; + + systemd.tmpfiles.rules = [ + "z ${xlib.dirs.services-mnt-folder} 0777 root root -" + ]; + + services = { + power-profiles-daemon.enable = lib.mkForce false; + earlyoom.enable = true; + auto-cpufreq.enable = false; + throttled.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 = { + hostName = "${xlib.device.hostname}"; + networkmanager.enable = true; + firewall.enable = false; + }; + + system = { + stateVersion = "25.05"; + }; + }; +in +inputs.nixpkgs.lib.nixosSystem { + modules = [ + nixosModule + ]; + system = "x86_64-linux"; + specialArgs = { + deviceType = "server"; + }; +} diff --git a/configurations/vds-new.nix b/configurations/vds-new.nix new file mode 100644 index 0000000..d34bc85 --- /dev/null +++ b/configurations/vds-new.nix @@ -0,0 +1,177 @@ +{ 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 + ''; + }; + samba = { + enable = true; + openFirewall = true; + settings = { + global = { + "invalid users" = [ ]; + "passwd program" = "/run/wrappers/bin/passwd %u"; + security = "user"; + }; + nixos = { + "path" = "/etc/nixos"; + "browseable" = "yes"; + "read only" = "no"; + "valid users" = "${xlib.device.username}"; + "guest ok" = "no"; + "writable" = "yes"; + "create mask" = 755; + "directory mask" = 755; + "force user" = "${xlib.device.username}"; + "force group" = "users"; + }; + root = { + "path" = "/"; + "browseable" = "yes"; + "read only" = "no"; + "valid users" = "${xlib.device.username}"; + "guest ok" = "no"; + "writable" = "yes"; + #"create mask" = 0644; + #"directory mask" = 0644; + "force user" = "root"; + "force group" = "root"; + }; + "${xlib.device.username}" = { + "path" = "/home/${xlib.device.username}"; + "browseable" = "yes"; + "read only" = "no"; + "valid users" = "${xlib.device.username}"; + "guest ok" = "no"; + "writable" = "yes"; + "create mask" = 700; + "directory mask" = 700; + "force user" = "${xlib.device.username}"; + "force group" = "users"; + }; + }; + }; + 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"; + }; +} diff --git a/configurations/vds.nix b/configurations/vds.nix new file mode 100644 index 0000000..97d114a --- /dev/null +++ b/configurations/vds.nix @@ -0,0 +1,177 @@ +{ inputs, ... }@flakeContext: +let + nixosModule = + { + config, + lib, + modulesPath, + pkgs, + xlib, + ... + }: + { + xlib.device = { + type = "vds"; + hostname = "otreca"; + }; + + 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 + ''; + }; + samba = { + enable = true; + openFirewall = true; + settings = { + global = { + "invalid users" = [ ]; + "passwd program" = "/run/wrappers/bin/passwd %u"; + security = "user"; + }; + nixos = { + "path" = "/etc/nixos"; + "browseable" = "yes"; + "read only" = "no"; + "valid users" = "${xlib.device.username}"; + "guest ok" = "no"; + "writable" = "yes"; + "create mask" = 755; + "directory mask" = 755; + "force user" = "${xlib.device.username}"; + "force group" = "users"; + }; + root = { + "path" = "/"; + "browseable" = "yes"; + "read only" = "no"; + "valid users" = "${xlib.device.username}"; + "guest ok" = "no"; + "writable" = "yes"; + #"create mask" = 0644; + #"directory mask" = 0644; + "force user" = "root"; + "force group" = "root"; + }; + "${xlib.device.username}" = { + "path" = "/home/${xlib.device.username}"; + "browseable" = "yes"; + "read only" = "no"; + "valid users" = "${xlib.device.username}"; + "guest ok" = "no"; + "writable" = "yes"; + "create mask" = 700; + "directory mask" = 700; + "force user" = "${xlib.device.username}"; + "force group" = "users"; + }; + }; + }; + 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"; + }; +} diff --git a/configurations/wsl.nix b/configurations/wsl.nix new file mode 100644 index 0000000..ee8952e --- /dev/null +++ b/configurations/wsl.nix @@ -0,0 +1,103 @@ +{ inputs, ... }@flakeContext: +let + nixosModule = + { + config, + lib, + pkgs, + modulesPath, + xlib, + ... + }: + { + xlib.device = { + type = "wsl"; + hostname = "wsl"; + }; + + imports = [ + inputs.nixos-wsl.nixosModules.default + inputs.self.nixosModules.default + ]; + + #zramSwap.enable = true; + services = { + journald = { + extraConfig = '' + SystemMaxUse=512M + ''; + }; + earlyoom.enable = true; + }; + + hardware = { + graphics.enable = true; + # amdgpu.opencl.enable = true; + # amdgpu.amdvlk.enable = 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 = false; + allowPing = 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 = { + enable = true; + startMenuLaunchers = true; + useWindowsDriver = true; + defaultUser = config.xlib.device.username; + }; + + system.stateVersion = "24.11"; + }; +in +inputs.nixpkgs.lib.nixosSystem { + modules = [ + nixosModule + ]; + system = "x86_64-linux"; + specialArgs = { + deviceType = "wsl"; + }; +} diff --git a/deploy/default.nix b/deploy/default.nix new file mode 100644 index 0000000..79b706c --- /dev/null +++ b/deploy/default.nix @@ -0,0 +1,30 @@ +{ inputs, ... }@flakeContext: +let + mkDeploy = hostname: { + hostname = "${hostname}"; + profiles.system = { + path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.${hostname}; + }; + }; + user = "${inputs.self.nixosConfigurations.default.config.xlib.device.username}"; + server = "sapphira"; + vds = "otreca"; + vds-new = "otreca-new"; + mini-laptop = "rydiwo"; +in +{ + deploy = { + sshUser = "${user}"; + user = "root"; + nodes = { + "${server}" = mkDeploy "${server}"; + "${vds}" = mkDeploy "${vds}"; + "${vds-new}" = mkDeploy "${vds-new}"; + "${mini-laptop}" = mkDeploy "${mini-laptop}"; + }; + }; + # This is highly advised, and will prevent many possible mistakes + checks = builtins.mapAttrs ( + system: deployLib: deployLib.deployChecks inputs.self.deploy + ) inputs.deploy-rs.lib; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5d0cfaa --- /dev/null +++ b/flake.lock @@ -0,0 +1,504 @@ +{ + "nodes": { + "compose2nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "onchg": "onchg" + }, + "locked": { + "lastModified": 1771280126, + "narHash": "sha256-pegK7+4aWBgc7tKK9Us5LYK6lmvEXgrylFva7f4FbUs=", + "owner": "aksiksi", + "repo": "compose2nix", + "rev": "58d4b4685a8fe152a46386b63edb7a055f0de8a1", + "type": "github" + }, + "original": { + "owner": "aksiksi", + "repo": "compose2nix", + "type": "github" + } + }, + "deploy-rs": { + "inputs": { + "flake-compat": [ + "flake-compat" + ], + "nixpkgs": [ + "nixpkgs" + ], + "utils": [ + "utils" + ] + }, + "locked": { + "lastModified": 1770019181, + "narHash": "sha256-hwsYgDnby50JNVpTRYlF3UR/Rrpt01OrxVuryF40CFY=", + "owner": "serokell", + "repo": "deploy-rs", + "rev": "77c906c0ba56aabdbc72041bf9111b565cdd6171", + "type": "github" + }, + "original": { + "owner": "serokell", + "repo": "deploy-rs", + "type": "github" + } + }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772420042, + "narHash": "sha256-naZz40TUFMa0E0CutvwWsSPhgD5JldyTUDEgP9ADpfU=", + "owner": "nix-community", + "repo": "disko", + "rev": "5af7af10f14706e4095bd6bc0d9373eb097283c6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1652776076, + "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "grub2-themes": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1757136219, + "narHash": "sha256-tKU+vq34KHu/A2wD7WdgP5A4/RCmSD8hB0TyQAUlixA=", + "owner": "vinceliuice", + "repo": "grub2-themes", + "rev": "80dd04ddf3ba7b284a7b1a5df2b1e95ee2aad606", + "type": "github" + }, + "original": { + "owner": "vinceliuice", + "repo": "grub2-themes", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772516620, + "narHash": "sha256-2r4cKdqCVlQkvcTcLUMxmsmAYZZxCMd//w/PnDnukTE=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "2b9504d5a0169d4940a312abe2df2c5658db8de9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "musnix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767232402, + "narHash": "sha256-li+h6crnhc5Zqs+M6pn7D7M0W9M63ECNennDjRgzioE=", + "owner": "musnix", + "repo": "musnix", + "rev": "d65f98e0b1f792365f1705653d7b2d266ceeff6e", + "type": "github" + }, + "original": { + "owner": "musnix", + "repo": "musnix", + "type": "github" + } + }, + "nix-pre-commit": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "compose2nix", + "onchg", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1653259102, + "narHash": "sha256-XfCEu4zur/N2Dk4v8wFiQAgJ7bgNqPqwWp1vBXkeczM=", + "owner": "jmgilman", + "repo": "nix-pre-commit", + "rev": "6a99b2711c7eac9960939d8eb91e84322b22d50c", + "type": "github" + }, + "original": { + "owner": "jmgilman", + "repo": "nix-pre-commit", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1771969195, + "narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixos-wsl": { + "inputs": { + "flake-compat": [ + "flake-compat" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772386632, + "narHash": "sha256-sm6OpWZuoDwR53KNlsY482YOoHFWlWYwt0wHmqLkRGE=", + "owner": "nix-community", + "repo": "NixOS-WSL", + "rev": "be894604b2aa2184c0b3d3b44995acd0da14dc0c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "main", + "repo": "NixOS-WSL", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1772479524, + "narHash": "sha256-u7nCaNiMjqvKpE+uZz9hE7pgXXTmm5yvdtFaqzSzUQI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4215e62dc2cd3bc705b0a423b9719ff6be378a43", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-beets": { + "locked": { + "lastModified": 1770843696, + "narHash": "sha256-LovWTGDwXhkfCOmbgLVA10bvsi/P8eDDpRudgk68HA8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2343bbb58f99267223bc2aac4fc9ea301a155a16", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2343bbb58f99267223bc2aac4fc9ea301a155a16", + "type": "github" + } + }, + "nixpkgs-master": { + "locked": { + "lastModified": 1772553154, + "narHash": "sha256-ABGQcl66mr/bRDDLK9x3ffX1UK1Qhz8K169En8uxFnI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a029b57f0f31ce12dfdcf82dc72d15a20dfc2333", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1772465433, + "narHash": "sha256-ywy9troNEfpgh0Ee+zaV1UTgU8kYBVKtvPSxh6clYGU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c581273b8d5bdf1c6ce7e0a54da9841e6a763913", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "noctalia": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "noctalia-qs": "noctalia-qs" + }, + "locked": { + "lastModified": 1772547647, + "narHash": "sha256-ChPt01/Ts1ozhDvdaVgq3xqT+WMPR2rXZEEuowF1xdQ=", + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "rev": "500de16b3f6bc27b0074df0323d0b11e8767c276", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "type": "github" + } + }, + "noctalia-qs": { + "inputs": { + "nixpkgs": [ + "noctalia", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772227064, + "narHash": "sha256-f821ZSoGpa/aXrWq0gPpea9qBnX8KDyavGKkptz2Mog=", + "owner": "noctalia-dev", + "repo": "noctalia-qs", + "rev": "0741d27d2f7db567270f139c5d1684614ecf9863", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-qs", + "type": "github" + } + }, + "nypkgs": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772050470, + "narHash": "sha256-R0Rnu6+2a6Z3o4CpjL90MNu7eUOmMs2N9wfaUlk5LEA=", + "owner": "yunfachi", + "repo": "nypkgs", + "rev": "3c77745a7ea5d2b68ef3e6d65291fc052d9e360a", + "type": "github" + }, + "original": { + "owner": "yunfachi", + "repo": "nypkgs", + "type": "github" + } + }, + "onchg": { + "inputs": { + "nix-pre-commit": "nix-pre-commit", + "nixpkgs": [ + "compose2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1720368454, + "narHash": "sha256-NUSw3G2gsQX8/G64/pDBb1oitM+x13m7nFRvpiI4a+s=", + "owner": "aksiksi", + "repo": "onchg-rs", + "rev": "c42b693d10920874b3644ef1502e33318409d69c", + "type": "github" + }, + "original": { + "owner": "aksiksi", + "repo": "onchg-rs", + "type": "github" + } + }, + "plasma-manager": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772361940, + "narHash": "sha256-B1Cz+ydL1iaOnGlwOFld/C8lBECPtzhiy/pP93/CuyY=", + "owner": "nix-community", + "repo": "plasma-manager", + "rev": "a4b33606111c9c5dcd10009042bb710307174f51", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "plasma-manager", + "type": "github" + } + }, + "root": { + "inputs": { + "compose2nix": "compose2nix", + "deploy-rs": "deploy-rs", + "disko": "disko", + "flake-compat": "flake-compat", + "grub2-themes": "grub2-themes", + "home-manager": "home-manager", + "musnix": "musnix", + "nixos-hardware": "nixos-hardware", + "nixos-wsl": "nixos-wsl", + "nixpkgs": "nixpkgs", + "nixpkgs-beets": "nixpkgs-beets", + "nixpkgs-master": "nixpkgs-master", + "nixpkgs-stable": "nixpkgs-stable", + "noctalia": "noctalia", + "nypkgs": "nypkgs", + "plasma-manager": "plasma-manager", + "sops-nix": "sops-nix", + "utils": "utils", + "zapret": "zapret", + "zeroq-credentials": "zeroq-credentials" + } + }, + "sops-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772495394, + "narHash": "sha256-hmIvE/slLKEFKNEJz27IZ8BKlAaZDcjIHmkZ7GCEjfw=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "1d9b98a29a45abe9c4d3174bd36de9f28755e3ff", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "sops-nix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "zapret": { + "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": { + "locked": { + "lastModified": 1772104025, + "narHash": "sha256-tX5I2lkwbB1leoib6Ao/Et0B1GYrn3vxw4DkFYX8uyM=", + "ref": "refs/heads/master", + "rev": "511fc5446b502ff111020bda6d57261648d62333", + "revCount": 75, + "type": "git", + "url": "ssh://git@github.com/oqyude/zeroq-credentials.git" + }, + "original": { + "type": "git", + "url": "ssh://git@github.com/oqyude/zeroq-credentials.git" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..a2f7bfb --- /dev/null +++ b/flake.nix @@ -0,0 +1,122 @@ +{ + description = "oqyude flake"; + inputs = { + # My + 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.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + # nixpkgs-last-unstable.url = "github:NixOS/nixpkgs/6b4955211758ba47fac850c040a27f23b9b4008f"; + # nixpkgs-calibre.url = "github:NixOS/nixpkgs/e6f23dc08d3624daab7094b701aa3954923c6bbb"; + nixpkgs-master.url = "github:NixOS/nixpkgs/master"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11"; + nixpkgs-beets.url = "github:NixOS/nixpkgs/2343bbb58f99267223bc2aac4fc9ea301a155a16"; + #nixpkgs-fingerprint.url = "github:NixOS/nixpkgs/nixos-24.11"; + + # nix-community + nixos-wsl = { + url = "github:nix-community/NixOS-WSL/main"; + inputs = { + flake-compat.follows = "flake-compat"; + nixpkgs.follows = "nixpkgs"; + }; + }; + deploy-rs = { + url = "github:serokell/deploy-rs"; + inputs = { + flake-compat.follows = "flake-compat"; + nixpkgs.follows = "nixpkgs"; + utils.follows = "utils"; + }; + }; + + utils.url = "github:numtide/flake-utils"; + flake-compat.url = "github:edolstra/flake-compat"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + # nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; + # flake-utils.url = "github:numtide/flake-utils"; + # flake-parts.url = "github:hercules-ci/flake-parts"; + # nur = { + # url = "github:nix-community/NUR"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; + noctalia = { + url = "github:noctalia-dev/noctalia-shell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager"; # flake:home-manager + inputs.nixpkgs.follows = "nixpkgs"; + }; + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + plasma-manager = { + # https://github.com/nix-community/plasma-manager + url = "github:nix-community/plasma-manager"; + inputs = { + nixpkgs.follows = "nixpkgs"; + home-manager.follows = "home-manager"; + }; + }; + # nix-index-database = { + # url = "github:nix-community/nix-index-database"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; + compose2nix = { + url = "github:aksiksi/compose2nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # extras + # nix-gaming.url = "github:fufexan/nix-gaming"; + # aagl = { + # url = "github:ezKEa/aagl-gtk-on-nix"; + # inputs = { + # nixpkgs.follows = "nixpkgs"; + # flake-compat.follows = "flake-compat"; + # }; + # }; + musnix = { + url = "github:musnix/musnix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + grub2-themes = { + url = "github:vinceliuice/grub2-themes"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nypkgs = { + # https://github.com/yunfachi/nypkgs + url = "github:yunfachi/nypkgs"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + sops-nix = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # stylix = { + # url = "github:danth/stylix"; + # inputs = { + # nixpkgs.follows = "nixpkgs"; + # home-manager.follows = "home-manager"; + # flake-compat.follows = "flake-compat"; + # flake-utils.follows = "flake-utils"; + # }; + # }; + }; + outputs = + inputs: + let + flakeContext = { inherit inputs; }; + in + { + } + // (import ./configurations flakeContext) + // (import ./deploy flakeContext) + // (import ./home flakeContext) + // (import ./modules flakeContext) + // (import ./overlays flakeContext) + // (import ./pkgs flakeContext); +} diff --git a/home/apps/default.nix b/home/apps/default.nix new file mode 100644 index 0000000..401ee20 --- /dev/null +++ b/home/apps/default.nix @@ -0,0 +1,11 @@ +{ + ... +}: +{ + imports = [ + ./gramps.nix + ./streamrip.nix + ./v2rayn.nix + ./yt-dlp.nix + ]; +} diff --git a/home/apps/gramps.nix b/home/apps/gramps.nix new file mode 100644 index 0000000..761e46f --- /dev/null +++ b/home/apps/gramps.nix @@ -0,0 +1,29 @@ +{ + config, + pkgs, + xlib, + inputs, + ... +}: +let + grampsPath = "${xlib.dirs.wsl-storage}/gramps"; +in +{ + xdg = { + configFile = { + "grampsConfig" = { + source = config.lib.file.mkOutOfStoreSymlink grampsPath; + target = "gramps"; + }; + }; + dataFile = { + "grampsData" = { + source = config.lib.file.mkOutOfStoreSymlink grampsPath; + target = "gramps"; + }; + }; + }; + home.packages = [ + pkgs.gramps + ]; +} diff --git a/home/apps/streamrip.nix b/home/apps/streamrip.nix new file mode 100644 index 0000000..cd91859 --- /dev/null +++ b/home/apps/streamrip.nix @@ -0,0 +1,22 @@ +{ + config, + pkgs, + xlib, + ... +}: +let + streamripPath = "${xlib.dirs.wsl-storage}/streamrip"; +in +{ + xdg = { + configFile = { + "streamrip" = { + source = config.lib.file.mkOutOfStoreSymlink streamripPath; + target = "streamrip"; + }; + }; + }; + home.packages = [ + pkgs.streamrip + ]; +} diff --git a/home/apps/v2rayn.nix b/home/apps/v2rayn.nix new file mode 100644 index 0000000..86014ed --- /dev/null +++ b/home/apps/v2rayn.nix @@ -0,0 +1,23 @@ +{ + config, + pkgs, + xlib, + inputs, + ... +}: +let + v2raynPath = "${xlib.dirs.wsl-storage}/v2rayN"; +in +{ + xdg = { + dataFile = { + "v2raynData" = { + source = config.lib.file.mkOutOfStoreSymlink v2raynPath; + target = "v2rayN"; + }; + }; + }; + home.packages = [ + pkgs.v2rayn + ]; +} diff --git a/home/apps/yt-dlp.nix b/home/apps/yt-dlp.nix new file mode 100644 index 0000000..6cee5c4 --- /dev/null +++ b/home/apps/yt-dlp.nix @@ -0,0 +1,22 @@ +{ + config, + pkgs, + xlib, + ... +}: +let + streamripPath = "${xlib.dirs.wsl-storage}/streamrip"; +in +{ + # xdg = { + # configFile = { + # "streamrip" = { + # source = config.lib.file.mkOutOfStoreSymlink streamripPath; + # target = "streamrip"; + # }; + # }; + # }; + home.packages = [ + pkgs.yt-dlp-light + ]; +} diff --git a/home/default.nix b/home/default.nix new file mode 100644 index 0000000..509f390 --- /dev/null +++ b/home/default.nix @@ -0,0 +1,6 @@ +{ ... }@flakeContext: +{ + homeConfigurations = { + default = import ./home.nix flakeContext; + }; +} diff --git a/home/home.nix b/home/home.nix new file mode 100644 index 0000000..dcac69f --- /dev/null +++ b/home/home.nix @@ -0,0 +1,76 @@ +{ inputs, ... }@flakeContext: +let + nixosModule = + { + config, + lib, + pkgs, + xlib, + ... + }: + let + mkHomeModule = username: { + imports = [ + (./. + "/${xlib.device.type}.nix") + ]; + home = { + username = username; + stateVersion = lib.mkDefault "25.05"; + homeDirectory = + if username == "root" then lib.mkDefault "/${username}" else lib.mkDefault "/home/${username}"; + enableNixpkgsReleaseCheck = false; + }; + }; + mkRootModule = username: { + home = { + username = username; + stateVersion = lib.mkDefault "25.05"; + homeDirectory = + if username == "root" then lib.mkDefault "/${username}" else lib.mkDefault "/home/${username}"; + enableNixpkgsReleaseCheck = false; + }; + }; + mkOthersModule = username: { + imports = [ + (./. + "/others/${xlib.device.type}.nix") + ]; + home = { + username = username; + stateVersion = lib.mkDefault "25.05"; + homeDirectory = + if username == "root" then lib.mkDefault "/${username}" else lib.mkDefault "/home/${username}"; + enableNixpkgsReleaseCheck = false; + }; + }; + in + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users = { + root = mkRootModule "root"; + "${xlib.device.username}" = mkHomeModule xlib.device.username; + } + // + lib.optionalAttrs + (builtins.elem xlib.device.type [ + "test" + #"secondary" + #"primary" + ]) + { + snity = mkOthersModule "snity"; + }; + sharedModules = [ + inputs.plasma-manager.homeModules.plasma-manager + ]; + extraSpecialArgs = { + inherit inputs; + inherit xlib; + }; + }; + }; +in +{ + inherit nixosModule; +} diff --git a/home/minimal.nix b/home/minimal.nix new file mode 100644 index 0000000..be5b5bf --- /dev/null +++ b/home/minimal.nix @@ -0,0 +1,78 @@ +{ + config, + pkgs, + ... +}: +{ + programs = { + btop.enable = true; + broot.enable = true; + bottom.enable = true; + fastfetch.enable = true; + yazi = { + enable = true; + plugins = { + inherit (pkgs.yaziPlugins) + gitui + git + sudo + ouch + rsync + diff + mount + chmod + dupes + lazygit + toggle-pane + rich-preview + smart-filter + full-border + recycle-bin + ; + }; + flavors = { + nord = pkgs.yaziPlugins.nord; + }; + theme = { + flavor = { + light = "nord"; + dark = "nord"; + }; + }; + keymap = { + mgr.prepend_keymap = [ + { + on = [ + "M" + ]; + run = "plugin mount"; + desc = "Mount manager"; + } + { + on = [ + "g" + "i" + ]; + run = "plugin lazygit"; + desc = "run lazygit"; + } + { + run = "plugin ouch --args=zip"; + on = [ + "g" + "C" + ]; + desc = "Compress with ouch"; + } + ]; + }; + settings = { + mgr.ratio = [ + 1 + 1 + 4 + ]; + }; + }; + }; +} diff --git a/home/modules/dconf.nix b/home/modules/dconf.nix new file mode 100644 index 0000000..a38886a --- /dev/null +++ b/home/modules/dconf.nix @@ -0,0 +1,33 @@ +{ + config, + pkgs, + ... +}: +{ + dconf = { + settings = { + "org/virt-manager/virt-manager/connections" = { + autoconnect = [ "qemu:///system" ]; + uris = [ "qemu:///system" ]; + }; + "org/gnome/shell" = { + disable-user-extensions = false; + enabled-extensions = with pkgs.gnomeExtensions; [ + # dash-to-panel.extensionUuid + # arcmenu.extensionUuid + # vitals.extensionUuid + appindicator.extensionUuid + ]; + disabled-extensions = [ ]; + }; + "org/gnome/desktop/interface" = { + color-scheme = "prefer-light"; + enable-hot-corners = false; + }; + }; + }; + home = { + packages = with pkgs; [ + ]; + }; +} diff --git a/home/modules/noctalia.nix b/home/modules/noctalia.nix new file mode 100644 index 0000000..b9698ae --- /dev/null +++ b/home/modules/noctalia.nix @@ -0,0 +1,451 @@ +{ + config, + inputs, + pkgs, + ... +}: +{ + imports = [ + inputs.noctalia.homeModules.default + ]; + + programs.noctalia-shell = { + enable = false; + settings = { + settingsVersion = 0; + bar = { + position = "top"; + monitors = [ ]; + density = "default"; + showOutline = false; + showCapsule = true; + capsuleOpacity = 1; + backgroundOpacity = 0.93; + useSeparateOpacity = false; + floating = false; + marginVertical = 4; + marginHorizontal = 4; + outerCorners = true; + exclusive = true; + hideOnOverview = false; + widgets = { + left = [ + { + id = "Launcher"; + } + { + id = "Clock"; + } + { + id = "SystemMonitor"; + } + { + id = "ActiveWindow"; + } + { + id = "MediaMini"; + } + ]; + center = [ + { + id = "Workspace"; + } + ]; + right = [ + { + id = "Tray"; + } + { + id = "NotificationHistory"; + } + { + id = "Battery"; + } + { + id = "Volume"; + } + { + id = "Brightness"; + } + { + id = "ControlCenter"; + } + ]; + }; + }; + general = { + avatarImage = ""; + dimmerOpacity = 0.2; + showScreenCorners = false; + forceBlackScreenCorners = false; + scaleRatio = 1; + radiusRatio = 1; + iRadiusRatio = 1; + boxRadiusRatio = 1; + screenRadiusRatio = 1; + animationSpeed = 1; + animationDisabled = false; + compactLockScreen = false; + lockOnSuspend = true; + showSessionButtonsOnLockScreen = true; + showHibernateOnLockScreen = false; + enableShadows = true; + shadowDirection = "bottom_right"; + shadowOffsetX = 2; + shadowOffsetY = 3; + language = ""; + allowPanelsOnScreenWithoutBar = true; + showChangelogOnStartup = true; + telemetryEnabled = true; + }; + ui = { + fontDefault = ""; + fontFixed = ""; + fontDefaultScale = 1; + fontFixedScale = 1; + tooltipsEnabled = true; + panelBackgroundOpacity = 0.93; + panelsAttachedToBar = true; + settingsPanelMode = "attached"; + wifiDetailsViewMode = "grid"; + bluetoothDetailsViewMode = "grid"; + networkPanelView = "wifi"; + bluetoothHideUnnamedDevices = false; + boxBorderEnabled = false; + }; + location = { + name = "Tokyo"; + weatherEnabled = true; + weatherShowEffects = true; + useFahrenheit = false; + use12hourFormat = false; + showWeekNumberInCalendar = false; + showCalendarEvents = true; + showCalendarWeather = true; + analogClockInCalendar = false; + firstDayOfWeek = -1; + hideWeatherTimezone = false; + hideWeatherCityName = false; + }; + calendar = { + cards = [ + { + enabled = true; + id = "calendar-header-card"; + } + { + enabled = true; + id = "calendar-month-card"; + } + { + enabled = true; + id = "weather-card"; + } + ]; + }; + wallpaper = { + enabled = true; + overviewEnabled = false; + directory = ""; + monitorDirectories = [ ]; + enableMultiMonitorDirectories = false; + recursiveSearch = false; + setWallpaperOnAllMonitors = true; + fillMode = "crop"; + fillColor = "#000000"; + useSolidColor = false; + solidColor = "#1a1a2e"; + randomEnabled = false; + wallpaperChangeMode = "random"; + randomIntervalSec = 300; + transitionDuration = 1500; + transitionType = "random"; + transitionEdgeSmoothness = 0.05; + panelPosition = "follow_bar"; + hideWallpaperFilenames = false; + useWallhaven = false; + wallhavenQuery = ""; + wallhavenSorting = "relevance"; + wallhavenOrder = "desc"; + wallhavenCategories = "111"; + wallhavenPurity = "100"; + wallhavenRatios = ""; + wallhavenApiKey = ""; + wallhavenResolutionMode = "atleast"; + wallhavenResolutionWidth = ""; + wallhavenResolutionHeight = ""; + }; + appLauncher = { + enableClipboardHistory = false; + autoPasteClipboard = false; + enableClipPreview = true; + clipboardWrapText = true; + position = "center"; + pinnedApps = [ ]; + useApp2Unit = false; + sortByMostUsed = true; + terminalCommand = "xterm -e"; + customLaunchPrefixEnabled = false; + customLaunchPrefix = ""; + viewMode = "list"; + showCategories = true; + iconMode = "tabler"; + showIconBackground = false; + ignoreMouseInput = false; + screenshotAnnotationTool = ""; + }; + controlCenter = { + position = "close_to_bar_button"; + diskPath = "/"; + shortcuts = { + left = [ + { + id = "Network"; + } + { + id = "Bluetooth"; + } + { + id = "WallpaperSelector"; + } + ]; + right = [ + { + id = "Notifications"; + } + { + id = "PowerProfile"; + } + { + id = "KeepAwake"; + } + { + id = "NightLight"; + } + ]; + }; + cards = [ + { + enabled = true; + id = "profile-card"; + } + { + enabled = true; + id = "shortcuts-card"; + } + { + enabled = true; + id = "audio-card"; + } + { + enabled = false; + id = "brightness-card"; + } + { + enabled = true; + id = "weather-card"; + } + { + enabled = true; + id = "media-sysmon-card"; + } + ]; + }; + systemMonitor = { + cpuWarningThreshold = 80; + cpuCriticalThreshold = 90; + tempWarningThreshold = 80; + tempCriticalThreshold = 90; + gpuWarningThreshold = 80; + gpuCriticalThreshold = 90; + memWarningThreshold = 80; + memCriticalThreshold = 90; + diskWarningThreshold = 80; + diskCriticalThreshold = 90; + cpuPollingInterval = 3000; + tempPollingInterval = 3000; + gpuPollingInterval = 3000; + enableDgpuMonitoring = false; + memPollingInterval = 3000; + diskPollingInterval = 3000; + networkPollingInterval = 3000; + loadAvgPollingInterval = 3000; + useCustomColors = false; + warningColor = ""; + criticalColor = ""; + externalMonitor = "resources || missioncenter || jdsystemmonitor || corestats || system-monitoring-center || gnome-system-monitor || plasma-systemmonitor || mate-system-monitor || ukui-system-monitor || deepin-system-monitor || pantheon-system-monitor"; + }; + dock = { + enabled = true; + position = "bottom"; + displayMode = "auto_hide"; + backgroundOpacity = 1; + floatingRatio = 1; + size = 1; + onlySameOutput = true; + monitors = [ ]; + pinnedApps = [ ]; + colorizeIcons = false; + pinnedStatic = false; + inactiveIndicators = false; + deadOpacity = 0.6; + animationSpeed = 1; + }; + network = { + wifiEnabled = true; + bluetoothRssiPollingEnabled = false; + bluetoothRssiPollIntervalMs = 10000; + wifiDetailsViewMode = "grid"; + bluetoothDetailsViewMode = "grid"; + bluetoothHideUnnamedDevices = false; + }; + sessionMenu = { + enableCountdown = true; + countdownDuration = 10000; + position = "center"; + showHeader = true; + largeButtonsStyle = false; + largeButtonsLayout = "grid"; + showNumberLabels = true; + powerOptions = [ + { + action = "lock"; + enabled = true; + } + { + action = "suspend"; + enabled = true; + } + { + action = "hibernate"; + enabled = true; + } + { + action = "reboot"; + enabled = true; + } + { + action = "logout"; + enabled = true; + } + { + action = "shutdown"; + enabled = true; + } + ]; + }; + notifications = { + enabled = true; + monitors = [ ]; + location = "top_right"; + overlayLayer = true; + backgroundOpacity = 1; + respectExpireTimeout = false; + lowUrgencyDuration = 3; + normalUrgencyDuration = 8; + criticalUrgencyDuration = 15; + enableKeyboardLayoutToast = true; + saveToHistory = { + low = true; + normal = true; + critical = true; + }; + sounds = { + enabled = false; + volume = 0.5; + separateSounds = false; + criticalSoundFile = ""; + normalSoundFile = ""; + lowSoundFile = ""; + excludedApps = "discord,firefox,chrome,chromium,edge"; + }; + }; + osd = { + enabled = true; + location = "top_right"; + autoHideMs = 2000; + overlayLayer = true; + backgroundOpacity = 1; + enabledTypes = [ + 0 + 1 + 2 + ]; + monitors = [ ]; + }; + audio = { + volumeStep = 5; + volumeOverdrive = false; + cavaFrameRate = 30; + visualizerType = "linear"; + mprisBlacklist = [ ]; + preferredPlayer = ""; + }; + brightness = { + brightnessStep = 5; + enforceMinimum = true; + enableDdcSupport = false; + }; + colorSchemes = { + useWallpaperColors = false; + predefinedScheme = "Noctalia (default)"; + darkMode = true; + schedulingMode = "off"; + manualSunrise = "06:30"; + manualSunset = "18:30"; + matugenSchemeType = "scheme-fruit-salad"; + }; + templates = { + gtk = false; + qt = false; + kcolorscheme = false; + alacritty = false; + kitty = false; + ghostty = false; + foot = false; + wezterm = false; + fuzzel = false; + discord = false; + pywalfox = false; + vicinae = false; + walker = false; + code = false; + spicetify = false; + telegram = false; + cava = false; + yazi = false; + emacs = false; + niri = false; + hyprland = false; + mango = false; + zed = false; + helix = false; + zenBrowser = false; + enableUserTemplates = false; + }; + nightLight = { + enabled = false; + forced = false; + autoSchedule = true; + nightTemp = "4000"; + dayTemp = "6500"; + manualSunrise = "06:30"; + manualSunset = "18:30"; + }; + hooks = { + enabled = false; + wallpaperChange = ""; + darkModeChange = ""; + screenLock = ""; + screenUnlock = ""; + performanceModeEnabled = ""; + performanceModeDisabled = ""; + }; + desktopWidgets = { + enabled = false; + gridSnap = false; + monitorWidgets = [ ]; + }; + }; + }; +} diff --git a/home/modules/packages.nix b/home/modules/packages.nix new file mode 100644 index 0000000..848b4b1 --- /dev/null +++ b/home/modules/packages.nix @@ -0,0 +1,88 @@ +{ + config, + pkgs, + inputs, + ... +}: +{ + programs = { + mangohud.enable = true; + keepassxc.enable = true; + zed-editor = { + enable = false; + extensions = [ + "nix" + ]; + userSettings = { + "telemetry" = { + "diagnostics" = false; + "metrics" = false; + }; + "ui_font_size" = 20; + "buffer_font_size" = 26; + "theme" = { + "mode" = "system"; + "light" = "Ayu Light"; + "dark" = "Ayu Dark"; + }; + }; + }; + }; + services = { + kdeconnect.enable = true; + easyeffects.enable = true; + }; + home = { + packages = with pkgs; [ + # Surfing + # (brave.override { + # commandLineArgs = [ + # "--password-store=basic" # on purpose to make it break "--password-store=gnome-libsecret" + # ]; + # }) + brave + v2rayn + + # Workflow + #cloudflared + # amdgpu_top + vscodium + ayugram-desktop + # vesktop + # discord + gramps + kdePackages.filelight + localsend + lollypop + obsidian + pdfarranger + stretchly + transmission_4-gtk + #vlc + #libreoffice-qt6 + #normcap + #zerotierone + #nextcloud-client + + # (handbrake.overrideAttrs (old: { + # configureFlags = old.configureFlags ++ [ "--enable-vce" ]; + # buildInputs = old.buildInputs ++ [ + # pkgs.amf + # pkgs.ffmpeg-full + # ]; + # })) + + # Games + #ludusavi + #prismlauncher + steam + #lutris + + # AI + #lmstudio + + # Libs + #libsecret + ]; + }; +} diff --git a/home/modules/plasma-manager.nix b/home/modules/plasma-manager.nix new file mode 100644 index 0000000..a157970 --- /dev/null +++ b/home/modules/plasma-manager.nix @@ -0,0 +1,125 @@ +{ + config, + pkgs, + ... +}: +{ + programs = { + kate = { + enable = true; + editor = { + brackets = { + automaticallyAddClosing = true; + highlightMatching = true; + }; + font = { + family = "Hack"; + pointSize = 14; + }; + }; + }; + plasma = { + enable = true; + overrideConfig = false; + configFile = { + dolphinrc = { + "General" = { + "RememberOpenedTabs" = true; + }; + "DetailsMode" = { + "ExpandableFolders" = false; + "PreviewSize" = 32; + "IconSize" = 32; + }; + }; + "katerc" = { + "KTextEditor View" = { + "Scroll Bar MiniMap" = false; + "Scroll Bar Preview" = false; + }; + }; + }; + input = { + # /proc/bus/input/devices + mice = [ + { + acceleration = -0.2; + accelerationProfile = "none"; + enable = true; + leftHanded = false; + middleButtonEmulation = false; + name = "Logitech USB Receiver Mouse"; + naturalScroll = false; + productId = "c548"; + scrollSpeed = 1; + vendorId = "046d"; + } + ]; + touchpads = [ + { + accelerationProfile = "none"; + disableWhileTyping = true; + enable = true; + leftHanded = true; + middleButtonEmulation = false; + name = "ELAN1203:00 04F3:307A Touchpad"; + naturalScroll = true; + pointerSpeed = 0; + productId = "307a"; + rightClickMethod = "bottomRight"; + scrollMethod = "twoFingers"; + tapDragLock = false; + tapToClick = true; + twoFingerTap = "rightClick"; + vendorId = "04f3"; + } + ]; + keyboard = { + switchingPolicy = "global"; + # options = [ + # "altshift" + # ]; + layouts = [ + { + layout = "us"; + } + { + layout = "ru"; + } + ]; + }; + }; + workspace = { + #clickItemTo = "open"; # If you liked the click-to-open default from plasma 5 + lookAndFeel = "com.github.vinceliuice.WhiteSur-alt"; + colorScheme = "WhiteSurAlt"; + theme = "WhiteSur-Alt"; + iconTheme = "WhiteSur"; + cursor = { + theme = "Qogir"; + size = 24; + }; + #wallpaper = "${config.home.homeDirectory}//Misc/Desktops/Wallpapers/Desktop/END_Circle_7.png"; + #windowDecorations = { + # library = "org.kde.kwin.aurorae"; + # theme = "__aurorae__svg__WhiteSur"; + #}; + }; + kwin = { + edgeBarrier = 0; # Disables the edge-barriers introduced in plasma 6.1 + cornerBarrier = false; + #scripts.polonium.enable = true; + nightLight = { + enable = true; + mode = "constant"; + temperature.night = 5800; + }; + effects.shakeCursor.enable = false; + virtualDesktops = { + number = 2; + rows = 1; + }; + }; + }; + }; +} diff --git a/home/others/primary.nix b/home/others/primary.nix new file mode 100644 index 0000000..0cc3792 --- /dev/null +++ b/home/others/primary.nix @@ -0,0 +1,52 @@ +{ + 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; + }; + }; +} diff --git a/home/others/secondary.nix b/home/others/secondary.nix new file mode 100644 index 0000000..0cc3792 --- /dev/null +++ b/home/others/secondary.nix @@ -0,0 +1,52 @@ +{ + 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; + }; + }; +} diff --git a/home/primary.nix b/home/primary.nix new file mode 100644 index 0000000..b058761 --- /dev/null +++ b/home/primary.nix @@ -0,0 +1,73 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +let + symlinksPaths = { + # cfg + "${xlib.dirs.user-storage}/ssh/config" = ".ssh/config"; + "${xlib.dirs.user-storage}/beets" = ".config/beets"; + "${xlib.dirs.user-storage}/ludusavi" = ".config/ludusavi"; + "${xlib.dirs.user-storage}/solaar" = ".config/solaar"; + "${xlib.dirs.user-storage}/easyeffects" = ".config/easyeffects"; + "${xlib.dirs.user-storage}/KeePassXC" = ".config/keepassxc"; + "${xlib.dirs.user-storage}/v2rayN" = ".local/share/v2rayN"; + "/etc/nixos" = "Configuration"; + + "${config.home.homeDirectory}/Games/PrismLaunchers/${config.home.username}" = + ".local/share/PrismLauncher"; + #"${xlib.dirs.vetymae-drive}/Users/oqyude/Music" = "Music"; + + # smthng + # "${xlib.dirs.soptur-drive}/AI/LM Studio" = ".lmstudio"; + #"${xlib.dirs.therima-drive}" = "External"; + }; + mkLinks = lib.mapAttrs' (sourcePath: targetPath: { + name = targetPath; + value.source = config.lib.file.mkOutOfStoreSymlink "${sourcePath}"; + }) symlinksPaths; +in +{ + imports = [ + ./minimal.nix + ./modules/dconf.nix + ./modules/packages.nix + ./modules/plasma-manager.nix + ./modules/noctalia.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; + }; + }; + home.activation = { + yaziSync = '' + ${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.user-storage}/yazi/" + ''; + }; +} diff --git a/home/secondary.nix b/home/secondary.nix new file mode 100644 index 0000000..ec3eed8 --- /dev/null +++ b/home/secondary.nix @@ -0,0 +1,69 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +let + symlinksPaths = { + # cfg + "${xlib.dirs.user-storage}/ssh/config" = ".ssh/config"; + "${xlib.dirs.user-storage}/beets" = ".config/beets"; + "${xlib.dirs.user-storage}/ludusavi" = ".config/ludusavi"; + "${xlib.dirs.user-storage}/solaar" = ".config/solaar"; + "${xlib.dirs.user-storage}/easyeffects" = ".config/easyeffects"; + "${xlib.dirs.user-storage}/KeePassXC" = ".config/keepassxc"; + "${xlib.dirs.user-storage}/v2rayN" = ".local/share/v2rayN"; + "/etc/nixos" = "Configuration"; + + "${config.home.homeDirectory}/Games/PrismLaunchers/${config.home.username}" = + ".local/share/PrismLauncher"; + #"${xlib.dirs.lamet-drive}/Users/oqyude/Music" = "Music"; + }; + mkLinks = lib.mapAttrs' (sourcePath: targetPath: { + name = targetPath; + value.source = config.lib.file.mkOutOfStoreSymlink "${sourcePath}"; + }) symlinksPaths; +in +{ + imports = [ + ./minimal.nix + ./modules/dconf.nix + ./modules/packages.nix + ./modules/plasma-manager.nix + ./modules/noctalia.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; + }; + }; + home.activation = { + yaziSync = '' + ${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.user-storage}/yazi/" + ''; + }; +} diff --git a/home/server.nix b/home/server.nix new file mode 100644 index 0000000..fa197d5 --- /dev/null +++ b/home/server.nix @@ -0,0 +1,46 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +let + symlinksPaths = { + "${config.home.homeDirectory}/External/Music" = "Music"; + "${xlib.dirs.storage}/beets" = ".config/beets"; + "${xlib.dirs.storage}/ssh/config" = ".ssh/config"; + "${xlib.dirs.storage}/ssh/known_hosts" = ".ssh/known_hosts"; + }; + mkLinks = lib.mapAttrs' (sourcePath: targetPath: { + name = targetPath; + value.source = config.lib.file.mkOutOfStoreSymlink "${sourcePath}"; + }) symlinksPaths; +in +{ + imports = [ + ./minimal.nix + ]; + 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 = { + yaziSync = '' + ${pkgs.rsync}/bin/rsync -Lrv --no-A --no-X "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.storage}/yazi/" + ''; + }; +} diff --git a/home/vds-new.nix b/home/vds-new.nix new file mode 100644 index 0000000..15d68db --- /dev/null +++ b/home/vds-new.nix @@ -0,0 +1,27 @@ +{ + 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; + }; + }; +} diff --git a/home/vds.nix b/home/vds.nix new file mode 100644 index 0000000..15d68db --- /dev/null +++ b/home/vds.nix @@ -0,0 +1,27 @@ +{ + 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; + }; + }; +} diff --git a/home/wsl.nix b/home/wsl.nix new file mode 100644 index 0000000..4d0f686 --- /dev/null +++ b/home/wsl.nix @@ -0,0 +1,49 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +let + symlinksPaths = { + "${config.home.homeDirectory}/External/Music" = "Music"; + "${xlib.dirs.wsl-home}" = "External"; + "${xlib.dirs.wsl-storage}/beets" = ".config/beets"; + "${xlib.dirs.wsl-storage}/ssh/config" = ".ssh/config"; + "${xlib.dirs.wsl-storage}/ssh/known_hosts" = ".ssh/known_hosts"; + "${xlib.dirs.wsl-storage}/flow" = ".config/flow"; + }; + mkLinks = lib.mapAttrs' (sourcePath: targetPath: { + name = targetPath; + value.source = config.lib.file.mkOutOfStoreSymlink "${sourcePath}"; + }) symlinksPaths; +in +{ + imports = [ + ./apps + ./minimal.nix + ]; + 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 = { + yaziSync = '' + ${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.wsl-storage}/yazi/" + ''; + }; +} diff --git a/modules/containers/3x-ui.nix b/modules/containers/3x-ui.nix new file mode 100644 index 0000000..451fbbd --- /dev/null +++ b/modules/containers/3x-ui.nix @@ -0,0 +1,118 @@ +# 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 -" + ]; +} diff --git a/modules/containers/openhands.nix b/modules/containers/openhands.nix new file mode 100644 index 0000000..31e9537 --- /dev/null +++ b/modules/containers/openhands.nix @@ -0,0 +1,121 @@ +{ + pkgs, + lib, + config, + xlib, + ... +}: + +{ + # Runtime + virtualisation.podman = { + enable = true; + autoPrune.enable = true; + dockerCompat = true; + dockerSocket.enable = true; + defaultNetwork.settings.dns_enabled = 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 ]; + }; + + virtualisation.oci-containers.backend = "podman"; + + # Containers + virtualisation.oci-containers.containers."openhands-app" = { + image = "ghcr.io/openhands/openhands:latest"; + environment = { + "AGENT_SERVER_IMAGE_REPOSITORY" = "ghcr.io/openhands/agent-server"; + "AGENT_SERVER_IMAGE_TAG" = "31536c8-python"; + "WORKSPACE_MOUNT_PATH" = "${xlib.dirs.services-mnt-folder}/containers/openhands/workspace"; + }; + volumes = [ + "${xlib.dirs.services-mnt-folder}/containers/openhands/userspace:/.openhands:rw" + "${xlib.dirs.services-mnt-folder}/containers/openhands/workspace:/opt/workspace_base:rw" + "/run/podman/podman.sock:/var/run/docker.sock:rw" + ]; + ports = [ + "3000:3000/tcp" + ]; + log-driver = "journald"; + extraOptions = [ + # "--network=host" + "--add-host=host.docker.internal:host-gateway" + "--network-alias=openhands" + "--network=openhands_default" + ]; + }; + systemd.services."podman-openhands-app" = { + serviceConfig = { + Restart = lib.mkOverride 90 "no"; + }; + after = [ + "podman-network-openhands_default.service" + ]; + requires = [ + "podman-network-openhands_default.service" + ]; + partOf = [ + "podman-compose-openhands-root.target" + ]; + wantedBy = [ + "podman-compose-openhands-root.target" + ]; + }; + + # Networks + systemd.services."podman-network-openhands_default" = { + path = [ pkgs.podman ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStop = "podman network rm -f openhands_default"; + }; + script = '' + podman network inspect openhands_default || podman network create openhands_default + ''; + partOf = [ "podman-compose-openhands-root.target" ]; + wantedBy = [ "podman-compose-openhands-root.target" ]; + }; + + # Builds + systemd.services."podman-build-openhands-app" = { + enable = false; + path = [ + pkgs.podman + pkgs.git + ]; + serviceConfig = { + Type = "oneshot"; + TimeoutSec = 300; + }; + script = '' + cd ${xlib.dirs.services-mnt-folder}/containers/openhands/source + podman build -t openhands:latest -f ./containers/app/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-openhands-root" = { + unitConfig = { + Description = "Root target generated by compose2nix."; + }; + wantedBy = [ "multi-user.target" ]; + }; + + systemd.tmpfiles.rules = [ + "d ${xlib.dirs.services-mnt-folder} 0755 root root -" + "d ${xlib.dirs.services-mnt-folder}/containers 0755 root root -" + "d ${xlib.dirs.services-mnt-folder}/containers/openhands 0755 root root -" + "d ${xlib.dirs.services-mnt-folder}/containers/openhands/userspace 0755 root root -" + "d ${xlib.dirs.services-mnt-folder}/containers/openhands/workspace 0755 root root -" + ]; +} diff --git a/modules/containers/remnawave.nix b/modules/containers/remnawave.nix new file mode 100644 index 0000000..242c5b0 --- /dev/null +++ b/modules/containers/remnawave.nix @@ -0,0 +1,28 @@ +{ + config, + lib, + pkgs, + inputs, + xlib, + ... +}: +{ + + # fileSystems."${config.services.immich.mediaLocation}" = { + # device = "${xlib.dirs.services-folder}/immich"; + # options = [ + # "bind" + # "nofail" + # ]; + # }; + + # systemd.tmpfiles.rules = [ + # "z ${config.services.immich.mediaLocation} 0755 immich immich -" + # ]; + + # environment = { + # systemPackages = with pkgs; [ + # immich-cli + # ]; + # }; +} diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..945c7d1 --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,62 @@ +{ inputs, ... }@flakeContext: +let + defaultModule = + { + config, + lib, + xlib, + deviceType, + ... + }: + { + imports = with inputs; [ + ./essentials + ./users.nix + ./options.nix + (./. + "/${deviceType}") # specific modules + + home-manager.nixosModules.home-manager # home-manager module + # nix-index-database.nixosModules.nix-index # nix-index module + grub2-themes.nixosModules.default # grub2 themes module + sops-nix.nixosModules.sops # sops module + self.homeConfigurations.default.nixosModule # default homeConfigurations + disko.nixosModules.disko # disko module + noctalia.nixosModules.default + ]; + nixpkgs.overlays = [ + inputs.self.nixosOverlays.default + ]; + _module.args = { + inputs = inputs; + 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; + }; + }; +in +{ + nixosModules = { + default = defaultModule; + public = publicModule; + }; +} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix new file mode 100644 index 0000000..2ffd4ee --- /dev/null +++ b/modules/desktop/default.nix @@ -0,0 +1,74 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + imports = [ + ./environment + ./theming.nix + ]; + + boot = { + plymouth = { + enable = true; + theme = "bgrt"; + }; + consoleLogLevel = 3; # Enable "Silent boot" + initrd.verbose = false; + kernelParams = [ + "quiet" + "splash" + "boot.shell_on_fail" + "udev.log_priority=3" + "rd.systemd.show_status=auto" + ]; + loader = { + timeout = 2; + efi.canTouchEfiVariables = lib.mkForce false; + systemd-boot.enable = lib.mkForce false; + grub = { + enable = lib.mkForce true; + device = "nodev"; + efiInstallAsRemovable = true; + efiSupport = true; + useOSProber = true; + }; + grub2-theme = { + enable = true; + theme = "whitesur"; + icon = "whitesur"; + footer = true; + customResolution = "1920x1080"; # Optional: Set a custom resolution + }; + }; + }; + + hardware.graphics.enable = true; + programs = { + dconf.enable = true; + gamemode.enable = true; + # steam.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.sessionVariables = { + # NIXOS_OZONE_WL = "1"; + # }; +} diff --git a/modules/desktop/environment/default.nix b/modules/desktop/environment/default.nix new file mode 100644 index 0000000..80a19a8 --- /dev/null +++ b/modules/desktop/environment/default.nix @@ -0,0 +1,11 @@ +{ + ... +}: +{ + imports = [ + ./kde.nix + # ./gnome.nix + # ./noctalia.nix + # ./xfce.nix + ]; +} diff --git a/modules/desktop/environment/gnome.nix b/modules/desktop/environment/gnome.nix new file mode 100644 index 0000000..acbf906 --- /dev/null +++ b/modules/desktop/environment/gnome.nix @@ -0,0 +1,49 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + # qt = { + # enable = true; + # style = "breeze"; + # platformTheme = "kde6"; # kde6 + # }; + programs.dconf.enable = true; + environment = { + gnome.excludePackages = with pkgs; [ + cheese # webcam tool + epiphany # web browser + #evince # document viewer + geary # email reader + gnome-characters + gnome-music + gnome-user-docs + gnome-tour + ]; + systemPackages = with pkgs; [ + gnomeExtensions.appindicator + # gnomeExtensions.dash-to-panel + # gnomeExtensions.arcmenu + # gnomeExtensions.vitals + gnomeExtensions.user-themes + gnome-tweaks + # dconf-editor + # dconf2nix + + gnome-color-manager + ]; + }; + services = { + gnome.gnome-keyring.enable = lib.mkForce false; + udev.packages = with pkgs; [ + gnome-settings-daemon + ]; + displayManager.gdm = { + enable = true; + wayland = true; + }; + desktopManager.gnome.enable = true; + }; +} diff --git a/modules/desktop/environment/kde.nix b/modules/desktop/environment/kde.nix new file mode 100644 index 0000000..c3fb200 --- /dev/null +++ b/modules/desktop/environment/kde.nix @@ -0,0 +1,35 @@ +{ + 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 + ]; + services = { + displayManager = { + sddm = { + enable = true; + theme = "WhiteSur-light"; + wayland = { + enable = true; + compositor = "kwin"; + }; + }; + }; + desktopManager.plasma6.enable = true; + }; + programs.partition-manager.enable = true; +} diff --git a/modules/desktop/environment/noctalia.nix b/modules/desktop/environment/noctalia.nix new file mode 100644 index 0000000..6b661fc --- /dev/null +++ b/modules/desktop/environment/noctalia.nix @@ -0,0 +1,31 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: +{ + # environment.systemPackages = with pkgs; [ + # # inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default + # ]; + services = { + noctalia-shell = { + enable = false; + }; + # hypridle.enable = true; + }; + programs = { + niri = { + enable = true; + }; + # uwsm.enable = true; + # hyprland = { + # enable = true; + # xwayland.enable = true; + # withUWSM = true; + # }; + # iio-hyprland.enable = true; + # hyprlock.enable = true; + }; +} diff --git a/modules/desktop/environment/xfce.nix b/modules/desktop/environment/xfce.nix new file mode 100644 index 0000000..297c81b --- /dev/null +++ b/modules/desktop/environment/xfce.nix @@ -0,0 +1,36 @@ +{ + 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; + +} diff --git a/modules/desktop/theming.nix b/modules/desktop/theming.nix new file mode 100644 index 0000000..a285070 --- /dev/null +++ b/modules/desktop/theming.nix @@ -0,0 +1,18 @@ +{ + config, + pkgs, + ... +}: +{ + environment = { + systemPackages = with pkgs; [ + #qogir-kde + #qogir-theme + #whitesur-cursors + qogir-icon-theme + whitesur-gtk-theme + whitesur-icon-theme + whitesur-kde + ]; + }; +} diff --git a/modules/essentials/default.nix b/modules/essentials/default.nix new file mode 100644 index 0000000..c8e356a --- /dev/null +++ b/modules/essentials/default.nix @@ -0,0 +1,13 @@ +{ + config, + ... +}: +{ + imports = [ + ./packages.nix + ./services.nix + ./settings.nix + # ./systemd-routine.nix + ./shell.nix + ]; +} diff --git a/modules/essentials/packages.nix b/modules/essentials/packages.nix new file mode 100644 index 0000000..2745416 --- /dev/null +++ b/modules/essentials/packages.nix @@ -0,0 +1,200 @@ +{ + config, + pkgs, + inputs, + ... +}: +let + master = import inputs.nixpkgs-master { + system = "x86_64-linux"; + }; +in +{ + environment = { + systemPackages = with pkgs; [ + # Minimal + btop + broot + bottom + fastfetchMinimal + + # Encrypt + age + sops + ssh-to-age + + # Nix + nix-diff + nix-tree + nixfmt-tree + nvd + nix-du + nix-prefetch-scripts + deploy-rs + + # Lazy + lazycli + lazysql + lazyjournal + systemctl-tui + + # Base + curl + # efibootmgr + fd + fdupes + fzf + gdu + lsof + mc + pciutils + usbutils + rsync + wget + tree + dust + flow-control + + # Net Diagnostic + mtr + dnsutils + inetutils + + # Android tools + android-tools + + # Monitoring + smartmontools + + # Disk + parted + ntfs3g + exfatprogs # for gparted exfat support + + # Archivers + # rar + unzip + zstd + zip + #xarchiver + + # Net + ipset + iptables + nftables + openssl + + # To save + tuios + fresh-editor + + # Test + jocalsend + lazydocker + dtop + tlrc + lazyssh + mcat + framework-tool-tui + bluetui + snitch + devenv + whosthere + ]; + }; + environment.variables.EDITOR = "fresh"; + programs = { + # nix-ld.enable = true; + nano = { + enable = true; + nanorc = '' + set nowrap + set tabstospaces + set tabsize 2 + ''; + syntaxHighlight = true; + }; + yazi = { + enable = false; + plugins = { + inherit (pkgs.yaziPlugins) + gitui + git + sudo + ouch + rsync + diff + mount + chmod + dupes + lazygit + toggle-pane + rich-preview + smart-filter + full-border + recycle-bin + ; + }; + flavors = { + nord = pkgs.yaziPlugins.nord; + }; + settings = { + yazi = { + mgr.ratio = [ + 1 + 1 + 4 + ]; + }; + keymap = { + mgr.prepend_keymap = [ + { + on = [ + "g" + "i" + ]; + run = "plugin lazygit"; + desc = "run lazygit"; + } + { + run = "plugin ouch --args=zip"; + on = [ + "g" + "C" + ]; + desc = "Compress with ouch"; + } + ]; + }; + theme = { + flavor = { + light = "nord"; + dark = "nord"; + }; + }; + }; + }; + git = { + enable = true; + config = { + user = { + name = "oqyude"; + email = "oqyude@gmail.com"; + }; + }; + }; + lazygit.enable = true; + bat.enable = true; + # command-not-found.enable = false; + # nix-index.enable = true; + nh = { + enable = true; + flake = "/etc/nixos"; + clean = { + enable = true; + extraArgs = "--keep 3 --keep-since 2d"; + dates = "daily"; + }; + }; + }; +} diff --git a/modules/essentials/services.nix b/modules/essentials/services.nix new file mode 100644 index 0000000..980018c --- /dev/null +++ b/modules/essentials/services.nix @@ -0,0 +1,12 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +{ + services = { + tailscale.enable = xlib.device.type != "wsl"; # true, if not wsl + }; +} diff --git a/modules/essentials/settings.nix b/modules/essentials/settings.nix new file mode 100644 index 0000000..8ca2973 --- /dev/null +++ b/modules/essentials/settings.nix @@ -0,0 +1,76 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + # new things https://git.voronind.com/voronind/nix/src/commit/c4a70068a474e9f30b8e367b69520c563e02fbd9/system/nix.nix + system.nixos.label = "default"; + + nix = { + package = pkgs.lixPackageSets.stable.lix; + channel.enable = false; + nixPath = [ "nixpkgs=flake:nixpkgs" ]; + settings = { + require-sigs = false; + substituters = [ + "https://cache.nixos.org" + "https://nix-community.cachix.org" + "https://mirror.yandex.ru/nixos" + "https://cache.nixos.kz" + # "https://cache.xd0.zip" + "https://nixos-cache-proxy.cofob.dev" + # "https://nixos-cache-proxy.sweetdogs.ru" + # "https://nixos-cache-proxy.elxreno.com" + # "https://nixos.snix.store" # https://nixos.snix.store/ + ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + stalled-download-timeout = 4; + connect-timeout = 4; + auto-optimise-store = true; + fallback = true; + allow-import-from-derivation = false; + keep-derivations = false; + keep-outputs = false; + experimental-features = [ + "flakes" + "nix-command" + ]; + }; + }; + + nixpkgs = { + flake = { + setFlakeRegistry = false; + setNixPath = false; + }; + config.allowUnfree = true; + }; + + security = { + sudo.wheelNeedsPassword = false; + polkit = { + enable = true; + extraConfig = '' + polkit.addRule(function(action, subject) { + if (subject.isInGroup("wheel")){ // for sudo + return polkit.Result.YES; + } + }); + ''; + }; + }; + systemd.network.wait-online.enable = false; + + time.timeZone = "Europe/Moscow"; + i18n = { + defaultLocale = "en_US.UTF-8"; + supportedLocales = [ + "en_US.UTF-8/UTF-8" + "ru_RU.UTF-8/UTF-8" + ]; + }; +} diff --git a/modules/essentials/shell.nix b/modules/essentials/shell.nix new file mode 100644 index 0000000..1c53217 --- /dev/null +++ b/modules/essentials/shell.nix @@ -0,0 +1,69 @@ +{ + config, + pkgs, + ... +}: +{ + system.userActivationScripts.zshrc = "touch .zshrc"; + users.defaultUserShell = pkgs.zsh; + programs.zsh = { + enable = true; + enableCompletion = true; + enableBashCompletion = true; + syntaxHighlighting.enable = true; + zsh-autoenv.enable = true; + histSize = 10000; + loginShellInit = "cd /etc/nixos && clear && fastfetch"; + ohMyZsh = { + enable = true; + theme = "robbyrussell"; + }; + shellInit = '' + beet-n() { + echo "$*" | aichat -cer beets + } + beet-p() { + beet mod path:. playlist="$*" + } + beet-ims() { + beet im ./ -S $* + } + ''; + shellAliases = { + # shell + ff = "clear && fastfetch"; + l = "ls -l"; + lg = "lazygit"; + lc = "lazycli"; + st = "systemctl-tui"; + gp = "git pull"; + ns = "nh os switch"; + gp-ns = "gp && ns"; + y = "yazi"; + nix-shellp = "nix-shell --run $SHELL -p"; + z-proxy = "export ALL_PROXY=socks5://localhost:10808"; + + # beets + beet-ima = "beet im ./ -A"; + + # ssh + z-s = "ssh sapphira"; + z-st = "ssh sapphira-tailscale"; + z-o = "ssh otreca"; + z-ot = "ssh otreca-tailscale"; + z-l = "ssh lamet"; + z-lt = "ssh lamet-tailscale"; + z-p-1 = "ssh pubray-1"; + z-map-local-proxy = "ssh -R 10808:localhost:10808"; + + # Somethings + reboot-bios = "sudo systemctl reboot --firmware-setup"; + + # Extras + plasma-manager = "nix run github:nix-community/plasma-manager"; + pip2nix = "nix run github:nix-community/pip2nix --"; # https://github.com/nix-community/pip2nix + pip2nix-g = "nix run github:nix-community/pip2nix -- generate -r"; + json2nix = "nix run github:sempruijs/json2nix"; + }; + }; +} diff --git a/modules/essentials/systemd-routine.nix b/modules/essentials/systemd-routine.nix new file mode 100644 index 0000000..fcb068c --- /dev/null +++ b/modules/essentials/systemd-routine.nix @@ -0,0 +1,26 @@ +{ + config, + xlib, + ... +}: +{ + systemd = { + services.nixos-auto-rebuild = { + description = "Auto rebuild NixOS config"; + serviceConfig = { + Type = "oneshot"; + User = "${xlib.device.username}"; + WorkingDirectory = "/etc/nixos"; + ExecStart = "gp-ns"; + }; + }; + timers.nixos-auto-rebuild = { + description = "Run NixOS auto rebuild at 4am daily"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "*-*-* 04:00:00"; + Persistent = true; + }; + }; + }; +} diff --git a/modules/extra/gaming/aagl.nix b/modules/extra/gaming/aagl.nix new file mode 100644 index 0000000..d9948e8 --- /dev/null +++ b/modules/extra/gaming/aagl.nix @@ -0,0 +1,19 @@ +# https://github.com/ezKEa/aagl-gtk-on-nix +{ inputs, ... }@flakeContext: +{ + config, + pkgs, + ... +}: +{ + imports = [ inputs.aagl.nixosModules.default ]; + nix.settings = inputs.aagl.nixConfig; # Set up Cachix + programs = { + anime-game-launcher.enable = true; + #anime-games-launcher.enable = true; + #honkers-railway-launcher.enable = true; + #honkers-launcher.enable = true; + #wavey-launcher.enable = true; + #sleepy-launcher.enable = true; + }; +} diff --git a/modules/extra/gaming/nix-gaming.nix b/modules/extra/gaming/nix-gaming.nix new file mode 100644 index 0000000..ffb6d71 --- /dev/null +++ b/modules/extra/gaming/nix-gaming.nix @@ -0,0 +1,13 @@ +# https://github.com/fufexan/nix-gaming +{ inputs, ... }@flakeContext: +{ + config, + pkgs, + ... +}: +{ + nix.settings = { + substituters = [ "https://nix-gaming.cachix.org" ]; + trusted-public-keys = [ "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" ]; + }; +} diff --git a/modules/extra/musnix.nix b/modules/extra/musnix.nix new file mode 100644 index 0000000..c2c7f87 --- /dev/null +++ b/modules/extra/musnix.nix @@ -0,0 +1,47 @@ +# https://github.com/musnix/musnix +{ inputs, ... }@flakeContext: +{ + config, + lib, + pkgs, + ... +}: +{ + imports = [ inputs.musnix.nixosModules.musnix ]; + + specialisation = { + "rt_kernel" = { + inheritParentConfig = true; + configuration = { + ### + boot.kernelModules = [ + "snd-seq" + "snd-rawmidi" + ]; + services = { + pipewire.enable = lib.mkForce false; + jack = { + jackd.enable = lib.mkForce true; + alsa.enable = true; + loopback.enable = true; + }; + }; + environment.systemPackages = with pkgs; [ + jack2 + jack_capture + libjack2 + pavucontrol + qjackctl + ]; + musnix = { + enable = true; + #ffado.enable = true; + rtcqs.enable = true; + kernel.realtime = true; + kernel.packages = pkgs.linuxPackages_latest_rt; + }; + ### + }; + }; + }; +} diff --git a/modules/extra/self/fingerprint.nix b/modules/extra/self/fingerprint.nix new file mode 100644 index 0000000..fbefd6a --- /dev/null +++ b/modules/extra/self/fingerprint.nix @@ -0,0 +1,33 @@ +{ inputs, ... }@flakeContext: +let + pkgs-stable = import inputs.nixpkgs-fingerprint { system = "x86_64-linux"; }; +in +{ + config, + pkgs, + ... +}: +{ + security.pam.services.login.fprintAuth = false; + services = { + fprintd = { + enable = true; + package = pkgs-stable.fprintd.override { + libfprint = pkgs-stable.libfprint.overrideAttrs (oldAttrs: { + version = "git"; + src = pkgs-stable.fetchFromGitHub { + owner = "ericlinagora"; + repo = "libfprint-CS9711"; + rev = "c242a40fcc51aec5b57d877bdf3edfe8cb4883fd"; + sha256 = "sha256-WFq8sNitwhOOS3eO8V35EMs+FA73pbILRP0JoW/UR80="; + }; + nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ + pkgs-stable.opencv + pkgs-stable.cmake + pkgs-stable.doctest + ]; + }); + }; + }; + }; +} diff --git a/modules/extra/self/zapret.nix b/modules/extra/self/zapret.nix new file mode 100644 index 0000000..26571e4 --- /dev/null +++ b/modules/extra/self/zapret.nix @@ -0,0 +1,31 @@ +{ 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 + ]; + }; +} diff --git a/modules/minimal/default.nix b/modules/minimal/default.nix new file mode 100644 index 0000000..79b8d1e --- /dev/null +++ b/modules/minimal/default.nix @@ -0,0 +1,9 @@ +{ + lib, + pkgs, + ... +}: +{ + # imports = [ + # ]; +} diff --git a/modules/options.nix b/modules/options.nix new file mode 100644 index 0000000..91ded17 --- /dev/null +++ b/modules/options.nix @@ -0,0 +1,128 @@ +{ + config, + lib, + ... +}: +{ + options = { + xlib = { + device = { + type = lib.mkOption { + type = lib.types.enum [ + "minimal" + "primary" + "secondary" + "server" + "vds" + "vds-new" + "wsl" + ]; + default = "minimal"; + description = "Type of device for this host."; + }; + username = lib.mkOption { + type = lib.types.str; + default = "oqyude"; + description = "Username for host."; + }; + hostname = lib.mkOption { + type = lib.types.str; + default = "nixos"; + description = "Hostname..."; + }; + }; + dirs = { + user-home = lib.mkOption { + type = lib.types.str; + default = "/home/${config.xlib.device.username}"; + description = "User home directory."; + }; + user-storage = lib.mkOption { + type = lib.types.str; + default = "${config.xlib.dirs.user-home}/Storage"; + description = "User storage directory."; + }; + archive-drive = lib.mkOption { + type = lib.types.str; + default = "/mnt/archive"; + description = "Archive drive mount point."; + }; + lamet-drive = lib.mkOption { + type = lib.types.str; + default = "/mnt/lamet"; + description = "Lamet drive mount point."; + }; + mobile-drive = lib.mkOption { + type = lib.types.str; + default = "/mnt/mobile"; + description = "Mobile drive mount point."; + }; + therima-drive = lib.mkOption { + type = lib.types.str; + default = "/mnt/therima"; + description = "Therima drive mount point."; + }; + vetymae-drive = lib.mkOption { + type = lib.types.str; + default = "/mnt/vetymae"; + description = "Vetymae drive mount point."; + }; + soptur-drive = lib.mkOption { + type = lib.types.str; + default = "/mnt/soptur"; + description = "Soptur drive mount point."; + }; + wsl-home = lib.mkOption { + type = lib.types.str; + default = "/mnt/c/Users/${config.xlib.device.username}"; + description = "WSL home directory."; + }; + wsl-storage = lib.mkOption { + type = lib.types.str; + default = "${config.xlib.dirs.wsl-home}/Storage"; + description = "WSL storage directory."; + }; + server-home = lib.mkOption { + type = lib.types.str; + default = "/home/${config.xlib.device.username}/External"; + description = "Server home directory."; + }; + server-credentials = lib.mkOption { + type = lib.types.str; + default = "${config.xlib.dirs.server-home}/Credentials/server"; + description = "Server credentials directory."; + }; + storage = lib.mkOption { + type = lib.types.str; + default = "${config.xlib.dirs.server-home}/Storage"; + description = "General storage directory."; + }; + calibre-library = lib.mkOption { + type = lib.types.str; + default = "${config.xlib.dirs.server-home}/Books-Library"; + description = "Calibre library directory."; + }; + music-library = lib.mkOption { + type = lib.types.str; + default = "${config.xlib.dirs.user-home}/Music"; + description = "Music library directory."; + }; + services-folder = lib.mkOption { + type = lib.types.str; + default = "${config.xlib.dirs.server-home}/Services"; + description = "All services folder."; + }; + services-mnt-folder = lib.mkOption { + type = lib.types.str; + default = "/mnt/services"; + description = "All services folder."; + }; + postgresql-folder = lib.mkOption { + type = lib.types.str; + default = "${config.xlib.dirs.services-mnt-folder}/postgresql"; + description = "PostgreSQL service folder."; + }; + }; + }; + }; +} diff --git a/modules/others/default.nix b/modules/others/default.nix new file mode 100644 index 0000000..289c13a --- /dev/null +++ b/modules/others/default.nix @@ -0,0 +1,32 @@ +{ + config, + xlib, + pkgs, + ... +}: +let + user = "snity"; +in +{ + users = { + users = { + "${user}" = { + name = "${user}"; + isNormalUser = true; + group = "users"; + description = "Snity"; + hashedPassword = "$y$j9T$851xwObfIp7SYzIyFtH.k1$mNofT2sxEAV50Kxgmwvqc6Kj/3B/fJoPP8qgn./siEB"; + homeMode = "700"; + home = "/home/${user}"; + extraGroups = [ + "audio" + "disk" + "gamemode" + "networkmanager" + "pipewire" + "wheel" + ]; + }; + }; + }; +} diff --git a/modules/primary/default.nix b/modules/primary/default.nix new file mode 100644 index 0000000..e343ffa --- /dev/null +++ b/modules/primary/default.nix @@ -0,0 +1,9 @@ +{ + lib, + ... +}: +{ + imports = [ + ../desktop + ]; +} diff --git a/modules/secondary/default.nix b/modules/secondary/default.nix new file mode 100644 index 0000000..e343ffa --- /dev/null +++ b/modules/secondary/default.nix @@ -0,0 +1,9 @@ +{ + lib, + ... +}: +{ + imports = [ + ../desktop + ]; +} diff --git a/modules/server/calibre-web.nix b/modules/server/calibre-web.nix new file mode 100644 index 0000000..4bc7719 --- /dev/null +++ b/modules/server/calibre-web.nix @@ -0,0 +1,35 @@ +{ + config, + xlib, + inputs, + ... +}: +let + stable = import inputs.nixpkgs-beets { + system = "x86_64-linux"; + }; +in +{ + services.calibre-web = { + package = stable.calibre-web; + enable = true; + # dataDir = "${xlib.dirs.services-mnt-folder}/calibre-web"; + options = { + calibreLibrary = "${xlib.dirs.services-mnt-folder}/calibre-web-library"; + enableBookUploading = true; + enableKepubify = true; + enableBookConversion = false; + }; + listen.ip = "0.0.0.0"; + listen.port = 8083; + openFirewall = true; + }; + + fileSystems."/var/lib/calibre-web" = { + device = "${xlib.dirs.services-mnt-folder}/calibre-web"; + options = [ + "bind" + "nofail" + ]; + }; +} diff --git a/modules/server/default.nix b/modules/server/default.nix new file mode 100644 index 0000000..a4ec44e --- /dev/null +++ b/modules/server/default.nix @@ -0,0 +1,30 @@ +{ + lib, + ... +}: +{ + imports = [ + ../software/beets + ./calibre-web.nix + ./immich.nix + ./miniflux.nix + ./nextcloud.nix + ./nginx.nix + ./open-webui.nix + ./postgresql.nix + ./samba.nix + ./stirling-pdf.nix + ./syncthing.nix + ./systemd.nix + ./transmission.nix + ./uptime-kuma.nix + ./netdata.nix + # ./mealie.nix + # ./memos.nix + # ./nfs.nix + # ./node-red.nix + # ./rsync.nix + # ./trilium.nix + # ./zerotier.nix + ]; +} diff --git a/modules/server/immich.nix b/modules/server/immich.nix new file mode 100644 index 0000000..20ac9c1 --- /dev/null +++ b/modules/server/immich.nix @@ -0,0 +1,54 @@ +{ + config, + lib, + pkgs, + inputs, + xlib, + ... +}: +let + master = import inputs.nixpkgs-master { + system = "x86_64-linux"; + }; +in +{ + services = { + immich = { + enable = true; + # package = master.immich; + port = 2283; + host = "0.0.0.0"; + openFirewall = true; + accelerationDevices = null; + machine-learning.enable = true; + mediaLocation = "${xlib.dirs.services-mnt-folder}/immich"; + database = { + enableVectors = false; + enableVectorChord = true; + }; + }; + }; + + # fileSystems."${config.services.immich.mediaLocation}" = { + # device = "${xlib.dirs.services-folder}/immich"; + # options = [ + # "bind" + # "nofail" + # ]; + # }; + + systemd.tmpfiles.rules = [ + "z ${config.services.immich.mediaLocation} 0755 immich immich -" + ]; + + users.users.immich.extraGroups = [ + "video" + "render" + ]; + + environment = { + systemPackages = with pkgs; [ + immich-cli + ]; + }; +} diff --git a/modules/server/mealie.nix b/modules/server/mealie.nix new file mode 100644 index 0000000..d3aea5e --- /dev/null +++ b/modules/server/mealie.nix @@ -0,0 +1,15 @@ +{ + config, + ... +}: +{ + services.mealie = { + enable = true; + listenAddress = "0.0.0.0"; + port = 9000; + database.createLocally = true; + settings = { + ALLOW_SIGNUP = "false"; + }; + }; +} diff --git a/modules/server/memos.nix b/modules/server/memos.nix new file mode 100644 index 0000000..0436151 --- /dev/null +++ b/modules/server/memos.nix @@ -0,0 +1,26 @@ +{ + config, + xlib, + ... +}: +{ + services.memos = { + enable = true; + openFirewall = true; + settings = { + MEMOS_MODE = "prod"; + MEMOS_ADDR = "0.0.0.0"; + MEMOS_PORT = "5230"; + MEMOS_DATA = config.services.memos.dataDir; + MEMOS_DRIVER = "sqlite"; + MEMOS_INSTANCE_URL = "http://0.0.0.0:5230"; + }; + # user = "${xlib.device.username}"; + # group = "users"; + dataDir = "/mnt/services/memos"; + }; + + systemd.tmpfiles.rules = [ + "z /mnt/services/memos 0750 memos memos -" + ]; +} diff --git a/modules/server/miniflux.nix b/modules/server/miniflux.nix new file mode 100644 index 0000000..67103cb --- /dev/null +++ b/modules/server/miniflux.nix @@ -0,0 +1,24 @@ +{ + config, + inputs, + xlib, + ... +}: +{ + services.miniflux = { + enable = true; + config = { + ADMIN_USERNAME = ""; + CLEANUP_FREQUENCY = 48; + LISTEN_ADDR = "0.0.0.0:6061"; + }; + # adminCredentialsFile = "${inputs.zeroq-credentials}/services/miniflux/admin-pass.txt"; + adminCredentialsFile = config.sops.secrets.minifluxenv.path; + }; + + sops.secrets.minifluxenv = { + format = "dotenv"; + sopsFile = ./secrets/miniflux.env; + mode = "0650"; + }; +} diff --git a/modules/server/netdata.nix b/modules/server/netdata.nix new file mode 100644 index 0000000..8b266ef --- /dev/null +++ b/modules/server/netdata.nix @@ -0,0 +1,25 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: +{ + services = { + netdata = { + enable = false; + config = { + web = { + "allow connections from" = "localhost netdata.local *"; + "default port" = "19999"; + "bind to" = "0.0.0.0"; + }; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ + 19999 + ]; +} diff --git a/modules/server/nextcloud.nix b/modules/server/nextcloud.nix new file mode 100644 index 0000000..761d53a --- /dev/null +++ b/modules/server/nextcloud.nix @@ -0,0 +1,190 @@ +{ + config, + lib, + pkgs, + inputs, + xlib, + ... +}: +let + master = import inputs.nixpkgs-master { + system = "x86_64-linux"; + # config.allowUnfree = true; + # config.allowUnfreePredicate = true; + }; +in +{ + services = { + nextcloud-whiteboard-server = { + enable = true; + settings = { + NEXTCLOUD_URL = "http://nextcloud.local"; + }; + secrets = [ "${inputs.zeroq-credentials}/services/nextcloud/jwt-secret.txt" ]; + }; + nextcloud = { + enable = true; + package = pkgs.nextcloud33; + hostName = "nextcloud.local"; + database.createLocally = true; + home = "${xlib.dirs.services-mnt-folder}/nextcloud"; + configureRedis = true; + caching = { + redis = true; + memcached = true; + }; + maxUploadSize = "5G"; + config = { + dbtype = "pgsql"; + dbuser = "nextcloud"; + dbname = "nextcloud"; + adminuser = "oqyude"; + adminpassFile = "${inputs.zeroq-credentials}/services/nextcloud/admin-pass.txt"; + }; + settings = { + log_type = "file"; + trusted_domains = [ + "nextcloud.zeroq.ru" + "100.64.0.0" + "192.168.1.20" + "localhost" + "nextcloud.local" + ]; + trusted_proxies = [ + "100.64.1.0" + ]; + overwriteprotocol = "https"; + }; + extraAppsEnable = true; + appstoreEnable = false; + notify_push = { + enable = false; + bendDomainToLocalhost = true; + }; + phpPackage = pkgs.php85; + extraApps = { + inherit (config.services.nextcloud.package.packages.apps) + # gpoddersync + # integration_paperless + # memories + # nextpod + # onlyoffice + # phonetrack + # repod + # sociallogin + bookmarks + calendar + collectives + contacts + cookbook + cospend + dav_push + deck + files_retention + forms + groupfolders + impersonate + mail + music + #tasks? + tasks + # news + notes + # notify_push + polls + previewgenerator + richdocuments + spreed + tables + user_oidc + user_saml + whiteboard + ; + # inherit (pkgs.nextcloud31Packages.apps) + # # end_to_end_encryption + # # maps + # tasks + # ; + }; + }; + collabora-online = { + enable = true; + port = 9980; + # package = master.collabora-online; + settings = { + server_name = "office.zeroq.ru"; + ssl = { + enable = false; + termination = true; + ssl_verification = false; + }; + net = { + listen = "0.0.0.0"; + post_allow.host = [ + "0.0.0.0" + ]; + }; + storage.wopi = { + "@allow" = true; + host = [ + "0.0.0.0/0" + ]; + }; + }; + }; + onlyoffice = { + enable = false; + hostname = "0.0.0.0"; + jwtSecretFile = "${inputs.zeroq-credentials}/services/onlyoffice/jwt.txt"; + }; + }; + + # fonts.packages = [ work.corefonts ]; + + networking.hosts = { + "localhost" = [ "nextcloud.local" ]; + }; + + systemd.services.nextcloud-config-collabora = + let + inherit (config.services.nextcloud) occ; + wopi_url = "http://localhost:${toString config.services.collabora-online.port}"; + public_wopi_url = "https://office.zeroq.ru"; + wopi_allowlist = lib.concatStringsSep "," [ + "0.0.0.0/0" + ]; + in + { + wantedBy = [ "multi-user.target" ]; + after = [ + "nextcloud-setup.service" + "coolwsd.service" + ]; + requires = [ "coolwsd.service" ]; + 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_allowlist --value ${lib.escapeShellArg wopi_allowlist} + ${occ}/bin/nextcloud-occ richdocuments:setup + ''; + serviceConfig = { + Type = "oneshot"; + }; + }; + + # fileSystems."${config.services.nextcloud.home}" = { + # device = "${xlib.dirs.services-folder}/nextcloud"; + # options = [ + # "bind" + # "nofail" + # ]; + # }; + + systemd.tmpfiles.rules = [ + "z ${config.services.nextcloud.home} 0750 nextcloud nextcloud -" + ]; + + environment.systemPackages = [ + pkgs.nc4nix # Packaging helper for Nextcloud apps + ]; +} diff --git a/modules/server/nfs.nix b/modules/server/nfs.nix new file mode 100644 index 0000000..b3ae98c --- /dev/null +++ b/modules/server/nfs.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + xlib, + ... +}: +{ + systemd.tmpfiles.rules = [ + "z /export 0755 nobody nogroup -" + ]; + services.nfs = { + server = { + enable = false; + exports = '' + /export 192.168.1.20(rw,fsid=0,no_subtree_check) 192.168.1.102(rw,fsid=0,no_subtree_check) + /export/root 192.168.1.20(rw,nohide,insecure,no_subtree_check) 192.168.1.102(rw,nohide,insecure,no_subtree_check) + ''; + }; + }; + # fileSystems."/export/root" = { + # device = "/"; + # options = [ "bind" ]; + # }; +} diff --git a/modules/server/nginx.nix b/modules/server/nginx.nix new file mode 100644 index 0000000..60be649 --- /dev/null +++ b/modules/server/nginx.nix @@ -0,0 +1,98 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +{ + services = { + nginx = { + enable = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + virtualHosts = { + "nextcloud.local" = { + forceSSL = false; + enableACME = false; + listen = [ + { + addr = "100.64.0.0"; + port = 10000; + } + { + addr = "192.168.1.20"; + port = 10000; + } + ]; + }; + # "localhost:19999" = { + # forceSSL = false; + # enableACME = false; + # listen = [ + # { + # addr = "100.64.0.0"; + # port = 19999; + # } + # { + # addr = "192.168.1.20"; + # port = 19999; + # } + # ]; + # }; + "zeroq.local" = { + forceSSL = false; + enableACME = false; + root = pkgs.writeTextDir "index.html" '' + + + +
This server is running in backend.
+ + + ''; + listen = [ + { + addr = "100.64.0.0"; + port = 80; + } + { + addr = "192.168.1.20"; + port = 80; + } + ]; + }; + # "localhost:8000" = { + # forceSSL = false; + # enableACME = false; + # listen = [ + # { + # addr = "100.64.0.0"; + # port = 9980; + # } + # { + # addr = "192.168.1.20"; + # port = 9980; + # } + # ]; + # }; + # "office.zeroq.ru" = { + # forceSSL = false; + # enableACME = false; + # locations."/" = { + # proxyPass = "http://onlyoffice.local:8000"; + # proxyWebsockets = true; + # }; + # extraConfig = '' + # # Force nginx to return relative redirects. This lets the browser + # # figure out the full URL. This ends up working better because it's in + # # front of the reverse proxy and has the right protocol, hostname & port. + # absolute_redirect off; + # ''; + # }; + }; + }; + }; +} diff --git a/modules/server/node-red.nix b/modules/server/node-red.nix new file mode 100644 index 0000000..4a4ddb8 --- /dev/null +++ b/modules/server/node-red.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + pkgs, + xlib, + inputs, + ... +}: +{ + services.node-red = { + enable = false; + port = 1880; + openFirewall = true; + userDir = "${xlib.dirs.services-mnt-folder}/node-red"; + configFile = "${inputs.zeroq-credentials}/configs/node-red/settings.js"; + }; + + systemd.tmpfiles.rules = [ + "z ${config.services.node-red.userDir} 0750 node-red node-red -" + ]; +} diff --git a/modules/server/open-webui.nix b/modules/server/open-webui.nix new file mode 100644 index 0000000..1d8c188 --- /dev/null +++ b/modules/server/open-webui.nix @@ -0,0 +1,28 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: +{ + services = { + open-webui = { + enable = false; + host = "0.0.0.0"; + port = 11112; + openFirewall = true; + environment = { + ANONYMIZED_TELEMETRY = "False"; + DO_NOT_TRACK = "True"; + SCARF_NO_ANALYTICS = "True"; + OPENAI_API_BASE_URL = "http://192.168.1.100:1234/v1"; + #OLLAMA_API_BASE_URL = "http://127.0.0.1:1234"; + WEBUI_AUTH = "True"; + ENABLE_SIGNUP = "False"; + ENABLE_SIGNUP_PASSWORD_CONFIRMATION = "True"; + ENABLE_VERSION_UPDATE_CHECK = "False"; + }; + }; + }; +} diff --git a/modules/server/postgresql.nix b/modules/server/postgresql.nix new file mode 100644 index 0000000..e02b0be --- /dev/null +++ b/modules/server/postgresql.nix @@ -0,0 +1,36 @@ +{ + config, + inputs, + lib, + pkgs, + xlib, + ... +}: +let + master = import inputs.nixpkgs-master { + system = "x86_64-linux"; + }; +in +{ + services = { + postgresql = { + enable = true; + package = pkgs.postgresql_17; + # dataDir = "${xlib.dirs.services-mnt-folder}/postgresql"; + }; + # postgresqlBackup.enable = true; + }; + + fileSystems."/var/lib/postgresql" = { + device = "${xlib.dirs.services-mnt-folder}/postgresql"; + options = [ + "bind" + "nofail" + ]; + }; + + systemd.tmpfiles.rules = [ + "z ${xlib.dirs.services-mnt-folder}/postgresql 0760 postgres postgres -" + # "z ${config.services.postgresql.dataDir} 0760 postgres postgres -" + ]; +} diff --git a/modules/server/rsync.nix b/modules/server/rsync.nix new file mode 100644 index 0000000..3440b2b --- /dev/null +++ b/modules/server/rsync.nix @@ -0,0 +1,70 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +{ + services = { + rsync = { + enable = true; + jobs = { + archivesta-mobile-music = { + user = "root"; + group = "root"; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + }; + sources = [ + "${xlib.dirs.server-home}/Music/" + ]; + destination = "${xlib.dirs.mobile-drive}/Music/"; + settings = { + archive = true; + delete = true; + mkpath = true; + verbose = true; + }; + }; + archivesta-mobile-neo = { + user = "root"; + group = "root"; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + }; + sources = [ + "${xlib.dirs.server-home}/Hosts/epral/Neo Backup/" + ]; + destination = "${xlib.dirs.mobile-drive}/Neo Backup/"; + settings = { + archive = true; + delete = true; + mkpath = true; + verbose = true; + }; + }; + archivesta-services = { + user = "root"; + group = "root"; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + }; + sources = [ + "${xlib.dirs.services-folder}/" + ]; + destination = "${xlib.dirs.archive-drive}/Services/"; + settings = { + archive = true; + delete = true; + mkpath = true; + verbose = true; + }; + }; + }; + }; + }; +} diff --git a/modules/server/samba.nix b/modules/server/samba.nix new file mode 100644 index 0000000..3e6bf9d --- /dev/null +++ b/modules/server/samba.nix @@ -0,0 +1,53 @@ +{ + config, + xlib, + ... +}: +{ + services.samba = { + enable = true; + settings = { + global = { + "invalid users" = [ ]; + "passwd program" = "/run/wrappers/bin/passwd %u"; + security = "user"; + }; + nixos = { + "path" = "/etc/nixos"; + "browseable" = "yes"; + "read only" = "no"; + "valid users" = "${xlib.device.username}"; + "guest ok" = "no"; + "writable" = "yes"; + "create mask" = 755; + "directory mask" = 755; + "force user" = "${xlib.device.username}"; + "force group" = "users"; + }; + root = { + "path" = "/"; + "browseable" = "yes"; + "read only" = "no"; + "valid users" = "${xlib.device.username}"; + "guest ok" = "no"; + "writable" = "yes"; + #"create mask" = 0644; + #"directory mask" = 0644; + "force user" = "root"; + "force group" = "root"; + }; + "${xlib.device.username}" = { + "path" = "${xlib.dirs.server-home}"; + "browseable" = "yes"; + "read only" = "no"; + "valid users" = "${xlib.device.username}"; + "guest ok" = "no"; + "writable" = "yes"; + "create mask" = 700; + "directory mask" = 700; + "force user" = "${xlib.device.username}"; + "force group" = "users"; + }; + }; + }; +} diff --git a/modules/server/secrets/miniflux.env b/modules/server/secrets/miniflux.env new file mode 100644 index 0000000..8c3acb2 --- /dev/null +++ b/modules/server/secrets/miniflux.env @@ -0,0 +1,8 @@ +ADMIN_USERNAME=ENC[AES256_GCM,data:OhS8ZIE0Tw==,iv:LChSD428nAuCW0pIfJ6Jc9Vor6ZW+XbrU0zZa2SQ29E=,tag:8I26KuAkMP7lXInuoiIP2Q==,type:str] +ADMIN_PASSWORD=ENC[AES256_GCM,data:X7k4qIshq5cpB1m6hNGRlw==,iv:JZoTU4LJ8nw3T2dUTdODgDRH6gXiEzvPVp4F9E18pnw=,tag:03nY8zBntbpB2AJS2mizow==,type:str] +sops_age__list_0__map_enc=-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBXcjByc2NHcEd1M1hmL3ZU\nWGRsMXBGYUtKTHFBOExDOU10S3NJTXd5WVdRClMzcHZDZVhDMTNLbEFVRDhHb3pL\nVnRXWXJTaTZCcDFRdzFsNG94NURwVXMKLS0tIFdpajcyaGdLRXM2YTRvcE55N2M5\nV2N3TEFDajhkRHVRMDQ5bTNWeHh0TTQKqwiC/ZOjLBsqO5qLvL2WtLrl2nOjb1fZ\nHxiCSutJfgGfftfk9h7nVK/ee5O3HvUlgXOjaFeD1CZMqukOIpZJhw==\n-----END AGE ENCRYPTED FILE-----\n +sops_age__list_0__map_recipient=age13l2gtk0nzr484zprp7e0pkrt0ne0j4asyn2pjmlaw73nte7t7d8q4sqtxm +sops_lastmodified=2025-10-09T22:05:48Z +sops_mac=ENC[AES256_GCM,data:1SzZFKwcKjGggKpo03T23kcYazz+bJJ3mWgQMGg+1sBkmDRxmsfiUV2bjhQOeuJIBJn5yRomQvgUAjYGNsLp8dfasChZ65KiTVSCd1rDbN2gT4tIzwWM6Dqs6LaMosU0eYzPq3JTLphy+KjLMMJtb46DSY0yf8izOV1N9xdGaLc=,iv:4vslV1ooPd/m+khKOUgFHBWoDf7EBqJmmC4TkzqwRFc=,tag:OfhcRMQsPevSn41hsyWFOg==,type:str] +sops_unencrypted_suffix=_unencrypted +sops_version=3.11.0 diff --git a/modules/server/stirling-pdf.nix b/modules/server/stirling-pdf.nix new file mode 100644 index 0000000..e70ee7c --- /dev/null +++ b/modules/server/stirling-pdf.nix @@ -0,0 +1,17 @@ +{ + config, + inputs, + ... +}: +# let +# pkgs-stable = import inputs.nixpkgs-stable { system = "x86_64-linux"; }; +# in +{ + services.stirling-pdf = { + enable = false; + # package = pkgs-stable.stirling-pdf; + environment = { + SERVER_PORT = 6060; + }; + }; +} diff --git a/modules/server/syncthing.nix b/modules/server/syncthing.nix new file mode 100644 index 0000000..d716fdb --- /dev/null +++ b/modules/server/syncthing.nix @@ -0,0 +1,23 @@ +{ + config, + xlib, + inputs, + ... +}: +let + master = import inputs.nixpkgs-master { + system = "x86_64-linux"; + }; +in +{ + services.syncthing = { + enable = true; + # package = master.syncthing; + systemService = true; + guiAddress = "0.0.0.0:8384"; + configDir = "${xlib.dirs.storage}/Syncthing/${xlib.device.hostname}"; + dataDir = "${xlib.dirs.server-home}"; + group = "users"; + user = "${xlib.device.username}"; + }; +} diff --git a/modules/server/systemd.nix b/modules/server/systemd.nix new file mode 100644 index 0000000..6301250 --- /dev/null +++ b/modules/server/systemd.nix @@ -0,0 +1,64 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +{ + systemd = { + services = { + rsync-archivesta = { + # Archivesta + description = "Backup data using rsync"; + requisite = [ "mnt-archive.mount" ]; # hard-code + script = '' + ${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.services-folder}/ ${xlib.dirs.archive-drive}/Services/ + ''; + serviceConfig = { + Type = "oneshot"; + User = "root"; + Group = "root"; + Nice = 19; + IOSchedulingClass = "idle"; + }; + }; + rsync-archivesta-lite = { + # Archivesta Lite + description = "Backup data using rsync"; + requisite = [ "mnt-mobile.mount" ]; # hard-code + 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/" + ''; + serviceConfig = { + Type = "oneshot"; + User = "root"; + Group = "root"; + Nice = 19; + IOSchedulingClass = "idle"; + }; + }; + }; + timers = { + rsync-archivesta = { + description = "Run rsync backup daily"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + Unit = "rsync-archivesta.service"; + }; + }; + rsync-archivesta-lite = { + description = "Run rsync backup weekly"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "weekly"; + Persistent = true; + Unit = "rsync-archivesta-lite.service"; + }; + }; + }; + }; +} diff --git a/modules/server/transmission.nix b/modules/server/transmission.nix new file mode 100644 index 0000000..4b6008c --- /dev/null +++ b/modules/server/transmission.nix @@ -0,0 +1,25 @@ +{ + config, + pkgs, + xlib, + ... +}: +{ + services.transmission = { + enable = false; + #credentialsFile = "${xlib.dirs.server-home}/server/transmission/settings.json"; + openRPCPort = true; + package = pkgs.transmission_4; + user = "${xlib.device.username}"; + group = "users"; + settings = { + download-dir = "${xlib.dirs.server-home}/Downloads"; + incomplete-dir = "${xlib.dirs.server-home}/Downloads/Temp"; + incomplete-dir-enabled = true; + rpc-bind-address = "0.0.0.0"; + rpc-port = 9091; + rpc-whitelist-enabled = false; + umask = 0; + }; + }; +} diff --git a/modules/server/trilium.nix b/modules/server/trilium.nix new file mode 100644 index 0000000..490ffea --- /dev/null +++ b/modules/server/trilium.nix @@ -0,0 +1,20 @@ +{ + config, + xlib, + ... +}: +{ + services.trilium-server = { + enable = false; + nginx = { + enable = true; + hostName = "trilium"; + }; + host = "0.0.0.0"; + dataDir = "/mnt/services/trilium"; + }; + + systemd.tmpfiles.rules = [ + "z /mnt/services/trilium 0750 trilium trilium -" + ]; +} diff --git a/modules/server/uptime-kuma.nix b/modules/server/uptime-kuma.nix new file mode 100644 index 0000000..882af08 --- /dev/null +++ b/modules/server/uptime-kuma.nix @@ -0,0 +1,29 @@ +{ + config, + lib, + pkgs, + xlib, + inputs, + ... +}: +{ + services.uptime-kuma = { + enable = true; + settings = { + PORT = "4001"; + HOST = "0.0.0.0"; + }; + }; + + systemd.tmpfiles.rules = [ + "z ${xlib.dirs.services-mnt-folder}/uptime-kuma 0755 nobody nogroup -" + ]; + + fileSystems."/var/lib/private/uptime-kuma" = { + device = "${xlib.dirs.services-mnt-folder}/uptime-kuma"; + options = [ + "bind" + "nofail" + ]; + }; +} diff --git a/modules/server/zerotier.nix b/modules/server/zerotier.nix new file mode 100644 index 0000000..98b1173 --- /dev/null +++ b/modules/server/zerotier.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + services = { + zerotierone = { + enable = false; + joinNetworks = [ + "db64858fedde087e" + ]; + port = 9993; + }; + }; + + # environment = { + # systemPackages = with pkgs; [ + # zerotierone + # ]; + # }; +} diff --git a/modules/services/tts.nix b/modules/services/tts.nix new file mode 100644 index 0000000..b0bdc05 --- /dev/null +++ b/modules/services/tts.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +{ + services.tts.servers = { + russian = { + enable = true; + port = 5301; + }; + english = { + #enable = false; + port = 5300; + }; + }; +} diff --git a/modules/services/zapret-old.nix b/modules/services/zapret-old.nix new file mode 100644 index 0000000..ca19b70 --- /dev/null +++ b/modules/services/zapret-old.nix @@ -0,0 +1,47 @@ +{ 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" + ]; + }; +} diff --git a/modules/services/zapret.nix b/modules/services/zapret.nix new file mode 100644 index 0000000..6ca32fd --- /dev/null +++ b/modules/services/zapret.nix @@ -0,0 +1,54 @@ +{ + 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"; + }; + }; +} diff --git a/modules/software/aichat.nix b/modules/software/aichat.nix new file mode 100644 index 0000000..0e3f5e3 --- /dev/null +++ b/modules/software/aichat.nix @@ -0,0 +1,12 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +{ + environment.systemPackages = [ + pkgs.aichat + ]; +} diff --git a/modules/software/beets/default.nix b/modules/software/beets/default.nix new file mode 100644 index 0000000..88f3bed --- /dev/null +++ b/modules/software/beets/default.nix @@ -0,0 +1,96 @@ +{ + config, + inputs, + lib, + pkgs, + xlib, + ... +}: +let + stable = import inputs.nixpkgs-beets { + system = "x86_64-linux"; + }; +in +let + # depsOverlay = import ./dependencies.nix { + # # ./dependencies-full.nix if broken + # inherit (pkgs) fetchurl fetchgit fetchhg; + # inherit pkgs; + # }; + # python3 = pkgs.python3.override { + # packageOverrides = depsOverlay; + # }; + beetsEnv = stable.python313.withPackages ( + ps: with ps; [ + beautifulsoup4 + beetcamp + beets + certifi + charset-normalizer + colorama + confuse + discogs-client + exceptiongroup + filetype + h11 + httpcore + httpx + httpx-socks + socksio + idna + jellyfish + langdetect + mediafile + munkres + musicbrainzngs + mutagen + oauthlib + packaging + pillow + platformdirs + pycountry + pylast + python-dateutil + pyyaml + requests + six + sniffio + soupsieve + typing-extensions + unidecode + urllib3 + ] + ); +in +{ + # nixpkgs.config.allowBroken = true; + + users = { + users = { + "${xlib.device.username}" = { + packages = [ + beetsEnv + pkgs.mp3gain + pkgs.imagemagick + #ffmpeg + ]; + }; + }; + }; + fileSystems."/mnt/beets/music" = { + device = "/home/${xlib.device.username}/Music"; # "${xlib.dirs.vetymae-drive}/Users/User/Music" + options = [ + "bind" + "uid=1000" + "gid=1000" + "fmask=0077" + "dmask=0077" + "nofail" + #"x-systemd.device-timeout=0" + ]; + }; + + systemd.tmpfiles.rules = [ + "z /mnt/beets 0700 ${xlib.device.username} users -" # beets absolute paths + ]; +} diff --git a/modules/software/beets/dependencies.nix b/modules/software/beets/dependencies.nix new file mode 100644 index 0000000..d184382 --- /dev/null +++ b/modules/software/beets/dependencies.nix @@ -0,0 +1,573 @@ +# Generated by pip2nix 0.8.0.dev1 +# See https://github.com/nix-community/pip2nix + +{ + pkgs, + fetchurl, + fetchgit, + fetchhg, +}: + +self: super: { + "PyYAML" = super.buildPythonPackage rec { + pname = "PyYAML"; + version = "6.0.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz"; + sha256 = "0gmwggzm0j0iprx074g5hah91y2f68sfhhldq0f8crddj7ndk16m"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "Unidecode" = super.buildPythonPackage rec { + pname = "Unidecode"; + version = "1.3.8"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/84/b7/6ec57841fb67c98f52fc8e4a2d96df60059637cba077edc569a302a8ffc7/Unidecode-1.3.8-py3-none-any.whl"; + sha256 = "0fgxj6h9lkjq4saynkjqf2wb9plsr5wyg3xxld482vv9wqfacc6i"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "anyio" = super.buildPythonPackage rec { + pname = "anyio"; + version = "4.7.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/a0/7a/4daaf3b6c08ad7ceffea4634ec206faeff697526421c20f07628c7372156/anyio-4.7.0-py3-none-any.whl"; + sha256 = "0lp30wfn1hs2wvaz3wadzwwcb3l9ii4b1k78yzzscaxl79rc6q7a"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."exceptiongroup" + self."idna" + self."sniffio" + self."typing-extensions" + ]; + }; + "beautifulsoup4" = super.buildPythonPackage rec { + pname = "beautifulsoup4"; + version = "4.12.3"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b1/fe/e8c672695b37eecc5cbf43e1d0638d88d66ba3a44c4d321c796f4e59167f/beautifulsoup4-4.12.3-py3-none-any.whl"; + sha256 = "1vc2w3wvnhbp2q287ilzjsiqyvd0vc5s52ysalz32481yk4ph25q"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."soupsieve" + ]; + }; + "beetcamp" = super.buildPythonPackage rec { + pname = "beetcamp"; + version = "0.21.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/6c/d3/94cad1ba1e65a9445655968a6dcdd528cb1352e2389f0921a9f8c0ccd4a0/beetcamp-0.21.0-py3-none-any.whl"; + sha256 = "08mxqmckg2fx9rkm5a1n9zs2sjccjj75vgxac22xjyi3fw1k0wz2"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + #self."beets" # its doesnt matter? + self."httpx" + self."packaging" + self."pycountry" + ]; + }; + "beets" = super.buildPythonPackage rec { + pname = "beets"; + version = "2.2.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/f3/44/1c53c2ac111e5526083e58f50a22504ad7c609be1ce660c0339938a42c33/beets-2.2.0-py3-none-any.whl"; + sha256 = "076hl1j74cgyh6n1piwprnzb89gihy2vmajm8lzfhy1jjcrfrpbd"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."PyYAML" + self."Unidecode" + self."confuse" + self."jellyfish" + self."mediafile" + self."munkres" + self."musicbrainzngs" + self."platformdirs" + self."typing-extensions" + # ext + self."requests" # For spotify, deezer, embedart, fetchart, lyrics + self."python3-discogs-client" # For discogs + self."pylast" # For lastgenre + # self."beetcamp" # Another + ]; + }; + "certifi" = super.buildPythonPackage rec { + pname = "certifi"; + version = "2024.12.14"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/a5/32/8f6669fc4798494966bf446c8c4a162e0b5d893dff088afddf76414f70e1/certifi-2024.12.14-py3-none-any.whl"; + sha256 = "0mpccx4yscnk6rhl12fk8wpgwrpq62m4w23k27y4wip9bfjgfx8j"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "charset-normalizer" = super.buildPythonPackage rec { + pname = "charset-normalizer"; + version = "3.4.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz"; + sha256 = "18sfsqpdmxbddr3g3yg0sln10ghq4sp0vl2xb1b5p9v8rlc1y9a4"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "colorama" = super.buildPythonPackage rec { + pname = "colorama"; + version = "0.4.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl"; + sha256 = "1ijz53xpmxds2qf02l9yf0rnp7bznwh3ci4xkw8wmh5cyn8rj7ag"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "confuse" = super.buildPythonPackage rec { + pname = "confuse"; + version = "2.0.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/32/1f/cf496479814d41fc252004482deeb90b740b4a6a391a3355c0b11d7e0abf/confuse-2.0.1-py3-none-any.whl"; + sha256 = "0amxm8vnxcayh7inahvj3fzj33n8gs8lvcfaicqrpjz2f2y5p7lv"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."PyYAML" + ]; + }; + "exceptiongroup" = super.buildPythonPackage rec { + pname = "exceptiongroup"; + version = "1.3.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/36/f4/c6e662dade71f56cd2f3735141b265c3c79293c109549c1e6933b0651ffc/exceptiongroup-1.3.0-py3-none-any.whl"; + sha256 = "044alxyhkfdlr5z3xlpnf5lv78310bnsgnkdmm669l0k1ip1w4ad"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."typing-extensions" + ]; + }; + "filetype" = super.buildPythonPackage rec { + pname = "filetype"; + version = "1.2.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/18/79/1b8fa1bb3568781e84c9200f951c735f3f157429f44be0495da55894d620/filetype-1.2.0-py2.py3-none-any.whl"; + sha256 = "099d3igvmfcdgg9dcylz8advva5n3qpplsf8gb7l24hqh1l1prvw"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "h11" = super.buildPythonPackage rec { + pname = "h11"; + version = "0.14.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/95/04/ff642e65ad6b90db43e668d70ffb6736436c7ce41fcc549f4e9472234127/h11-0.14.0-py3-none-any.whl"; + sha256 = "0qd7z9p38dwx215048q708vd1sn2abdh1mb3hg66ii2ip324mzp3"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "httpcore" = super.buildPythonPackage rec { + pname = "httpcore"; + version = "1.0.7"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/87/f5/72347bc88306acb359581ac4d52f23c0ef445b57157adedb9aee0cd689d2/httpcore-1.0.7-py3-none-any.whl"; + sha256 = "1p8f8bnrir1d50s6z19jndca98qghgqrr7rx6syxaq627psgizx3"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."certifi" + self."h11" + ]; + }; + "httpx" = super.buildPythonPackage rec { + pname = "httpx"; + version = "0.28.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl"; + sha256 = "1barpaw8as8xb7b2bsmzdmdbq5nqljlq5jhlz3xcgy0hq76gq2fr"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."anyio" + self."certifi" + self."httpcore" + self."idna" + ]; + }; + "idna" = super.buildPythonPackage rec { + pname = "idna"; + version = "3.10"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl"; + sha256 = "1lw72a5swas501zvkpd6dsryj5hzjijqxs3526kbp7151md1jvcl"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + # "jellyfish" = super.buildPythonPackage rec { # That is Rust package + # pname = "jellyfish"; + # version = "1.1.3"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/5b/3a/f607d7d44ee5cbad51ce8e2966bde112789eeb53633558f500bc4e44c053/jellyfish-1.1.3.tar.gz"; + # sha256 = "17wgy021wsp8jj95v638kfk34r9yzbry3q7shnglj5npmgfs22v5"; + # }; + # format = "setuptools"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ ]; + # }; + "langdetect" = super.buildPythonPackage rec { + pname = "langdetect"; + version = "1.0.9"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/0e/72/a3add0e4eec4eb9e2569554f7c70f4a3c27712f40e3284d483e88094cc0e/langdetect-1.0.9.tar.gz"; + sha256 = "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."six" + ]; + }; + "mediafile" = super.buildPythonPackage rec { + pname = "mediafile"; + version = "0.13.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/9f/b0/363b4d1443a593398f9d3784f406385f075e8fd0991c35356e73fc37638a/mediafile-0.13.0-py3-none-any.whl"; + sha256 = "1jqlwmwpgn0fxkbxrj8y5a4wr3ikwgs2rsc678hbaw861qyii3fd"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."filetype" + self."mutagen" + ]; + }; + "munkres" = super.buildPythonPackage rec { + pname = "munkres"; + version = "1.1.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/90/ab/0301c945a704218bc9435f0e3c88884f6b19ef234d8899fb47ce1ccfd0c9/munkres-1.1.4-py2.py3-none-any.whl"; + sha256 = "0apdpkbhg4wq5pis5d2mkqg46ikwix5nwcm2mrjxi04499yqc0bb"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "musicbrainzngs" = super.buildPythonPackage rec { + pname = "musicbrainzngs"; + version = "0.7.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/6d/fd/cef7b2580436910ccd2f8d3deec0f3c81743e15c0eb5b97dde3fbf33c0c8/musicbrainzngs-0.7.1-py2.py3-none-any.whl"; + sha256 = "040s1q4ia6gl2bjjxrjs384980854s9za28b55r0lk0hfpwshhg8"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "mutagen" = super.buildPythonPackage rec { + pname = "mutagen"; + version = "1.47.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b0/7a/620f945b96be1f6ee357d211d5bf74ab1b7fe72a9f1525aafbfe3aee6875/mutagen-1.47.0-py3-none-any.whl"; + sha256 = "06d7miq4z6m7j8rx2czkmqhgbjb2bwjagfz5v0wraylhqm86zngd"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "oauthlib" = super.buildPythonPackage rec { + pname = "oauthlib"; + version = "3.2.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/7e/80/cab10959dc1faead58dc8384a781dfbf93cb4d33d50988f7a69f1b7c9bbe/oauthlib-3.2.2-py3-none-any.whl"; + sha256 = "1jpvcxq0xr3z50fdg828in1icgz8cfcy3sc04r85vqhkmjdg4fc1"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "packaging" = super.buildPythonPackage rec { + pname = "packaging"; + version = "24.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl"; + sha256 = "0nd7a421brjgd4prm8fbs8a6bcv4n1yplgxalgs02p16rnyb3aq9"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "pillow" = super.buildPythonPackage rec { + pname = "pillow"; + version = "11.0.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/a5/26/0d95c04c868f6bdb0c447e3ee2de5564411845e36a858cfd63766bc7b563/pillow-11.0.0.tar.gz"; + sha256 = "0fbpcwgiac19ap0h1qa1imsqhq6vxv8kg67zkgm3y05c4jpwpfkj"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "platformdirs" = super.buildPythonPackage rec { + pname = "platformdirs"; + version = "4.3.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl"; + sha256 = "1yy39iay8fdb3c1r4gm011lla1sk1mc9fsw300wi1f4a83hpbrbk"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "pycountry" = super.buildPythonPackage rec { + pname = "pycountry"; + version = "24.6.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b1/ec/1fb891d8a2660716aadb2143235481d15ed1cbfe3ad669194690b0604492/pycountry-24.6.1-py3-none-any.whl"; + sha256 = "0vz0dhfkbjld5jagh9wafwy27k5d83bmd5fkxy74y8fp3hwzp97i"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "pylast" = super.buildPythonPackage rec { + pname = "pylast"; + version = "5.3.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/9b/57/e25206d012afe3fe5e3336a875babb5413b81c00706411a645a38185ad3b/pylast-5.3.0-py3-none-any.whl"; + sha256 = "023ki92jgc9mk2k9c4li48zf23yz2wn022m1rsjj9bsvn3f7ri2c"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."httpx" + ]; + }; + "python-dateutil" = super.buildPythonPackage rec { + pname = "python-dateutil"; + version = "2.9.0.post0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl"; + sha256 = "09q48zvsbagfa3w87zkd2c5xl54wmb9rf2hlr20j4a5fzxxvrcm8"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."six" + ]; + }; + "python3-discogs-client" = super.buildPythonPackage rec { + pname = "python3-discogs-client"; + version = "2.7.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/02/eb/b3d321440728addb72296e75ae2bfddd8fd3518b5ce5bd54a1ad821227a2/python3_discogs_client-2.7.1-py3-none-any.whl"; + sha256 = "0i3lfdn2ncxfvmmldg31gmdv7vdcicjl890mihncxa48yb9g7daz"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."oauthlib" + self."python-dateutil" + self."requests" + ]; + }; + "requests" = super.buildPythonPackage rec { + pname = "requests"; + version = "2.32.3"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl"; + sha256 = "1inwsrhx0m16q0wa1z6dfm8i8xkrfns73xm25arcwwy70gz1qxkh"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."certifi" + self."charset-normalizer" + self."idna" + self."urllib3" + ]; + }; + "six" = super.buildPythonPackage rec { + pname = "six"; + version = "1.17.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl"; + sha256 = "0x1jdic712dylbnyiqdj4xyxrlx0gaacynmbmkfiym4hxn8z68a7"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "sniffio" = super.buildPythonPackage rec { + pname = "sniffio"; + version = "1.3.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl"; + sha256 = "18i50l85yppn9w1ily8m342yd577h0bg8y24hkfzvq7is4ca8v9g"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "soupsieve" = super.buildPythonPackage rec { + pname = "soupsieve"; + version = "2.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/d1/c2/fe97d779f3ef3b15f05c94a2f1e3d21732574ed441687474db9d342a7315/soupsieve-2.6-py3-none-any.whl"; + sha256 = "1jfc0b39kwnh4n30458mr8gmh50mx3k5zxghm6sy9djgdvq4yb77"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "typing-extensions" = super.buildPythonPackage rec { + pname = "typing-extensions"; + version = "4.12.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl"; + sha256 = "03bhjivpvdhn4c3x0963z89hv7b5vxr415akd1fgiwz0a41wmr84"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "urllib3" = super.buildPythonPackage rec { + pname = "urllib3"; + version = "2.3.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl"; + sha256 = "1pz380a93mhdrzx5003inw5pm5n0fh1xazcbnjxzsyw6d79rmvhw"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; +} diff --git a/modules/software/beets/other/default.nix b/modules/software/beets/other/default.nix new file mode 100644 index 0000000..72ce4bd --- /dev/null +++ b/modules/software/beets/other/default.nix @@ -0,0 +1,57 @@ +{ + config, + lib, + pkgs, + xlib, + ... +}: +let + depsOverlay = import ./dependencies.nix { + # ./dependencies-full.nix if broken + inherit (pkgs) fetchurl fetchgit fetchhg; + inherit pkgs; + }; + python3 = pkgs.python3.override { + packageOverrides = depsOverlay; + }; + beetsEnv = python3.withPackages ( + ps: with pkgs.python313Packages; [ + #pkgs.beets # Из nixpkgs (проверь версию!) или оверлея + beautifulsoup4 # Из nixpkgs + certifi # Из nixpkgs + requests # Из nixpkgs + pyyaml # Из nixpkgs + unidecode # Из nixpkgs + pylast # Из nixpkgs + jellyfish # Из nixpkgs, если есть, или оверлея + confuse + #httpcore + httpx + packaging + pycountry + typing-extensions + anyio + ps.python3-discogs-client + ps.beetcamp # Из оверлея + ] + ); +in +{ + systemd.tmpfiles.rules = [ + "z /mnt/beets 0700 ${xlib.device.username} users -" # beets absolute paths + ]; + + users = { + users = { + "${xlib.device.username}" = { + packages = [ + beetsEnv + pkgs.beets + pkgs.mp3gain + pkgs.imagemagick + #pkgs.ffmpeg + ]; + }; + }; + }; +} diff --git a/modules/software/beets/other/dependencies-back.nix b/modules/software/beets/other/dependencies-back.nix new file mode 100644 index 0000000..9c3c459 --- /dev/null +++ b/modules/software/beets/other/dependencies-back.nix @@ -0,0 +1,573 @@ +# Generated by pip2nix 0.8.0.dev1 +# See https://github.com/nix-community/pip2nix + +{ + pkgs, + fetchurl, + fetchgit, + fetchhg, +}: + +self: super: { + "PyYAML" = super.buildPythonPackage rec { + pname = "PyYAML"; + version = "6.0.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz"; + sha256 = "0gmwggzm0j0iprx074g5hah91y2f68sfhhldq0f8crddj7ndk16m"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "Unidecode" = super.buildPythonPackage rec { + pname = "Unidecode"; + version = "1.3.8"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/84/b7/6ec57841fb67c98f52fc8e4a2d96df60059637cba077edc569a302a8ffc7/Unidecode-1.3.8-py3-none-any.whl"; + sha256 = "0fgxj6h9lkjq4saynkjqf2wb9plsr5wyg3xxld482vv9wqfacc6i"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "anyio" = super.buildPythonPackage rec { + pname = "anyio"; + version = "4.7.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/a0/7a/4daaf3b6c08ad7ceffea4634ec206faeff697526421c20f07628c7372156/anyio-4.7.0-py3-none-any.whl"; + sha256 = "0lp30wfn1hs2wvaz3wadzwwcb3l9ii4b1k78yzzscaxl79rc6q7a"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."exceptiongroup" + self."idna" + self."sniffio" + self."typing-extensions" + ]; + }; + "beautifulsoup4" = super.buildPythonPackage rec { + pname = "beautifulsoup4"; + version = "4.12.3"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b1/fe/e8c672695b37eecc5cbf43e1d0638d88d66ba3a44c4d321c796f4e59167f/beautifulsoup4-4.12.3-py3-none-any.whl"; + sha256 = "1vc2w3wvnhbp2q287ilzjsiqyvd0vc5s52ysalz32481yk4ph25q"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."soupsieve" + ]; + }; + "beetcamp" = super.buildPythonPackage rec { + pname = "beetcamp"; + version = "0.21.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/6c/d3/94cad1ba1e65a9445655968a6dcdd528cb1352e2389f0921a9f8c0ccd4a0/beetcamp-0.21.0-py3-none-any.whl"; + sha256 = "08mxqmckg2fx9rkm5a1n9zs2sjccjj75vgxac22xjyi3fw1k0wz2"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + #self."beets" # its doesnt matter? + self."httpx" + self."packaging" + self."pycountry" + ]; + }; + "beets" = super.buildPythonPackage rec { + pname = "beets"; + version = "2.2.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/f3/44/1c53c2ac111e5526083e58f50a22504ad7c609be1ce660c0339938a42c33/beets-2.2.0-py3-none-any.whl"; + sha256 = "076hl1j74cgyh6n1piwprnzb89gihy2vmajm8lzfhy1jjcrfrpbd"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."PyYAML" + self."Unidecode" + self."confuse" + self."jellyfish" + self."mediafile" + self."munkres" + self."musicbrainzngs" + self."platformdirs" + self."typing-extensions" + # ext + self."requests" # For spotify, deezer, embedart, fetchart, lyrics + self."python3-discogs-client" # For discogs + self."pylast" # For lastgenre + self."beetcamp" # Another + ]; + }; + "certifi" = super.buildPythonPackage rec { + pname = "certifi"; + version = "2024.12.14"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/a5/32/8f6669fc4798494966bf446c8c4a162e0b5d893dff088afddf76414f70e1/certifi-2024.12.14-py3-none-any.whl"; + sha256 = "0mpccx4yscnk6rhl12fk8wpgwrpq62m4w23k27y4wip9bfjgfx8j"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "charset-normalizer" = super.buildPythonPackage rec { + pname = "charset-normalizer"; + version = "3.4.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz"; + sha256 = "18sfsqpdmxbddr3g3yg0sln10ghq4sp0vl2xb1b5p9v8rlc1y9a4"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "colorama" = super.buildPythonPackage rec { + pname = "colorama"; + version = "0.4.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl"; + sha256 = "1ijz53xpmxds2qf02l9yf0rnp7bznwh3ci4xkw8wmh5cyn8rj7ag"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "confuse" = super.buildPythonPackage rec { + pname = "confuse"; + version = "2.0.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/32/1f/cf496479814d41fc252004482deeb90b740b4a6a391a3355c0b11d7e0abf/confuse-2.0.1-py3-none-any.whl"; + sha256 = "0amxm8vnxcayh7inahvj3fzj33n8gs8lvcfaicqrpjz2f2y5p7lv"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."PyYAML" + ]; + }; + "exceptiongroup" = super.buildPythonPackage rec { + pname = "exceptiongroup"; + version = "1.3.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/36/f4/c6e662dade71f56cd2f3735141b265c3c79293c109549c1e6933b0651ffc/exceptiongroup-1.3.0-py3-none-any.whl"; + sha256 = "044alxyhkfdlr5z3xlpnf5lv78310bnsgnkdmm669l0k1ip1w4ad"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."typing-extensions" + ]; + }; + "filetype" = super.buildPythonPackage rec { + pname = "filetype"; + version = "1.2.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/18/79/1b8fa1bb3568781e84c9200f951c735f3f157429f44be0495da55894d620/filetype-1.2.0-py2.py3-none-any.whl"; + sha256 = "099d3igvmfcdgg9dcylz8advva5n3qpplsf8gb7l24hqh1l1prvw"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "h11" = super.buildPythonPackage rec { + pname = "h11"; + version = "0.14.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/95/04/ff642e65ad6b90db43e668d70ffb6736436c7ce41fcc549f4e9472234127/h11-0.14.0-py3-none-any.whl"; + sha256 = "0qd7z9p38dwx215048q708vd1sn2abdh1mb3hg66ii2ip324mzp3"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "httpcore" = super.buildPythonPackage rec { + pname = "httpcore"; + version = "1.0.7"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/87/f5/72347bc88306acb359581ac4d52f23c0ef445b57157adedb9aee0cd689d2/httpcore-1.0.7-py3-none-any.whl"; + sha256 = "1p8f8bnrir1d50s6z19jndca98qghgqrr7rx6syxaq627psgizx3"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."certifi" + self."h11" + ]; + }; + "httpx" = super.buildPythonPackage rec { + pname = "httpx"; + version = "0.28.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl"; + sha256 = "1barpaw8as8xb7b2bsmzdmdbq5nqljlq5jhlz3xcgy0hq76gq2fr"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."anyio" + self."certifi" + self."httpcore" + self."idna" + ]; + }; + "idna" = super.buildPythonPackage rec { + pname = "idna"; + version = "3.10"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl"; + sha256 = "1lw72a5swas501zvkpd6dsryj5hzjijqxs3526kbp7151md1jvcl"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + # "jellyfish" = super.buildPythonPackage rec { # That is Rust package + # pname = "jellyfish"; + # version = "1.1.3"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/5b/3a/f607d7d44ee5cbad51ce8e2966bde112789eeb53633558f500bc4e44c053/jellyfish-1.1.3.tar.gz"; + # sha256 = "17wgy021wsp8jj95v638kfk34r9yzbry3q7shnglj5npmgfs22v5"; + # }; + # format = "setuptools"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ ]; + # }; + "langdetect" = super.buildPythonPackage rec { + pname = "langdetect"; + version = "1.0.9"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/0e/72/a3add0e4eec4eb9e2569554f7c70f4a3c27712f40e3284d483e88094cc0e/langdetect-1.0.9.tar.gz"; + sha256 = "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."six" + ]; + }; + "mediafile" = super.buildPythonPackage rec { + pname = "mediafile"; + version = "0.13.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/9f/b0/363b4d1443a593398f9d3784f406385f075e8fd0991c35356e73fc37638a/mediafile-0.13.0-py3-none-any.whl"; + sha256 = "1jqlwmwpgn0fxkbxrj8y5a4wr3ikwgs2rsc678hbaw861qyii3fd"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."filetype" + self."mutagen" + ]; + }; + "munkres" = super.buildPythonPackage rec { + pname = "munkres"; + version = "1.1.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/90/ab/0301c945a704218bc9435f0e3c88884f6b19ef234d8899fb47ce1ccfd0c9/munkres-1.1.4-py2.py3-none-any.whl"; + sha256 = "0apdpkbhg4wq5pis5d2mkqg46ikwix5nwcm2mrjxi04499yqc0bb"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "musicbrainzngs" = super.buildPythonPackage rec { + pname = "musicbrainzngs"; + version = "0.7.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/6d/fd/cef7b2580436910ccd2f8d3deec0f3c81743e15c0eb5b97dde3fbf33c0c8/musicbrainzngs-0.7.1-py2.py3-none-any.whl"; + sha256 = "040s1q4ia6gl2bjjxrjs384980854s9za28b55r0lk0hfpwshhg8"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "mutagen" = super.buildPythonPackage rec { + pname = "mutagen"; + version = "1.47.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b0/7a/620f945b96be1f6ee357d211d5bf74ab1b7fe72a9f1525aafbfe3aee6875/mutagen-1.47.0-py3-none-any.whl"; + sha256 = "06d7miq4z6m7j8rx2czkmqhgbjb2bwjagfz5v0wraylhqm86zngd"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "oauthlib" = super.buildPythonPackage rec { + pname = "oauthlib"; + version = "3.2.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/7e/80/cab10959dc1faead58dc8384a781dfbf93cb4d33d50988f7a69f1b7c9bbe/oauthlib-3.2.2-py3-none-any.whl"; + sha256 = "1jpvcxq0xr3z50fdg828in1icgz8cfcy3sc04r85vqhkmjdg4fc1"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "packaging" = super.buildPythonPackage rec { + pname = "packaging"; + version = "24.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl"; + sha256 = "0nd7a421brjgd4prm8fbs8a6bcv4n1yplgxalgs02p16rnyb3aq9"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "pillow" = super.buildPythonPackage rec { + pname = "pillow"; + version = "11.0.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/a5/26/0d95c04c868f6bdb0c447e3ee2de5564411845e36a858cfd63766bc7b563/pillow-11.0.0.tar.gz"; + sha256 = "0fbpcwgiac19ap0h1qa1imsqhq6vxv8kg67zkgm3y05c4jpwpfkj"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "platformdirs" = super.buildPythonPackage rec { + pname = "platformdirs"; + version = "4.3.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl"; + sha256 = "1yy39iay8fdb3c1r4gm011lla1sk1mc9fsw300wi1f4a83hpbrbk"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "pycountry" = super.buildPythonPackage rec { + pname = "pycountry"; + version = "24.6.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b1/ec/1fb891d8a2660716aadb2143235481d15ed1cbfe3ad669194690b0604492/pycountry-24.6.1-py3-none-any.whl"; + sha256 = "0vz0dhfkbjld5jagh9wafwy27k5d83bmd5fkxy74y8fp3hwzp97i"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "pylast" = super.buildPythonPackage rec { + pname = "pylast"; + version = "5.3.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/9b/57/e25206d012afe3fe5e3336a875babb5413b81c00706411a645a38185ad3b/pylast-5.3.0-py3-none-any.whl"; + sha256 = "023ki92jgc9mk2k9c4li48zf23yz2wn022m1rsjj9bsvn3f7ri2c"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."httpx" + ]; + }; + "python-dateutil" = super.buildPythonPackage rec { + pname = "python-dateutil"; + version = "2.9.0.post0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl"; + sha256 = "09q48zvsbagfa3w87zkd2c5xl54wmb9rf2hlr20j4a5fzxxvrcm8"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."six" + ]; + }; + "python3-discogs-client" = super.buildPythonPackage rec { + pname = "python3-discogs-client"; + version = "2.7.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/02/eb/b3d321440728addb72296e75ae2bfddd8fd3518b5ce5bd54a1ad821227a2/python3_discogs_client-2.7.1-py3-none-any.whl"; + sha256 = "0i3lfdn2ncxfvmmldg31gmdv7vdcicjl890mihncxa48yb9g7daz"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."oauthlib" + self."python-dateutil" + self."requests" + ]; + }; + "requests" = super.buildPythonPackage rec { + pname = "requests"; + version = "2.32.3"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl"; + sha256 = "1inwsrhx0m16q0wa1z6dfm8i8xkrfns73xm25arcwwy70gz1qxkh"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."certifi" + self."charset-normalizer" + self."idna" + self."urllib3" + ]; + }; + "six" = super.buildPythonPackage rec { + pname = "six"; + version = "1.17.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl"; + sha256 = "0x1jdic712dylbnyiqdj4xyxrlx0gaacynmbmkfiym4hxn8z68a7"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "sniffio" = super.buildPythonPackage rec { + pname = "sniffio"; + version = "1.3.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl"; + sha256 = "18i50l85yppn9w1ily8m342yd577h0bg8y24hkfzvq7is4ca8v9g"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "soupsieve" = super.buildPythonPackage rec { + pname = "soupsieve"; + version = "2.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/d1/c2/fe97d779f3ef3b15f05c94a2f1e3d21732574ed441687474db9d342a7315/soupsieve-2.6-py3-none-any.whl"; + sha256 = "1jfc0b39kwnh4n30458mr8gmh50mx3k5zxghm6sy9djgdvq4yb77"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "typing-extensions" = super.buildPythonPackage rec { + pname = "typing-extensions"; + version = "4.12.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl"; + sha256 = "03bhjivpvdhn4c3x0963z89hv7b5vxr415akd1fgiwz0a41wmr84"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "urllib3" = super.buildPythonPackage rec { + pname = "urllib3"; + version = "2.3.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl"; + sha256 = "1pz380a93mhdrzx5003inw5pm5n0fh1xazcbnjxzsyw6d79rmvhw"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; +} diff --git a/modules/software/beets/other/dependencies-cut.nix b/modules/software/beets/other/dependencies-cut.nix new file mode 100644 index 0000000..6807358 --- /dev/null +++ b/modules/software/beets/other/dependencies-cut.nix @@ -0,0 +1,573 @@ +# Generated by pip2nix 0.8.0.dev1 +# See https://github.com/nix-community/pip2nix + +{ + pkgs, + fetchurl, + fetchgit, + fetchhg, +}: + +self: super: { + # "PyYAML" = super.buildPythonPackage rec { + # pname = "PyYAML"; + # version = "6.0.2"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz"; + # sha256 = "0gmwggzm0j0iprx074g5hah91y2f68sfhhldq0f8crddj7ndk16m"; + # }; + # format = "setuptools"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ ]; + # }; + # "Unidecode" = super.buildPythonPackage rec { + # pname = "Unidecode"; + # version = "1.3.8"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/84/b7/6ec57841fb67c98f52fc8e4a2d96df60059637cba077edc569a302a8ffc7/Unidecode-1.3.8-py3-none-any.whl"; + # sha256 = "0fgxj6h9lkjq4saynkjqf2wb9plsr5wyg3xxld482vv9wqfacc6i"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ ]; + # }; + # "anyio" = super.buildPythonPackage rec { + # pname = "anyio"; + # version = "4.7.0"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/a0/7a/4daaf3b6c08ad7ceffea4634ec206faeff697526421c20f07628c7372156/anyio-4.7.0-py3-none-any.whl"; + # sha256 = "0lp30wfn1hs2wvaz3wadzwwcb3l9ii4b1k78yzzscaxl79rc6q7a"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ + # self."exceptiongroup" + # self."idna" + # self."sniffio" + # self."typing-extensions" + # ]; + # }; + # "beautifulsoup4" = super.buildPythonPackage rec { + # pname = "beautifulsoup4"; + # version = "4.12.3"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/b1/fe/e8c672695b37eecc5cbf43e1d0638d88d66ba3a44c4d321c796f4e59167f/beautifulsoup4-4.12.3-py3-none-any.whl"; + # sha256 = "1vc2w3wvnhbp2q287ilzjsiqyvd0vc5s52ysalz32481yk4ph25q"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ + # self."soupsieve" + # ]; + # }; + "beetcamp" = super.buildPythonPackage rec { + pname = "beetcamp"; + version = "0.21.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/6c/d3/94cad1ba1e65a9445655968a6dcdd528cb1352e2389f0921a9f8c0ccd4a0/beetcamp-0.21.0-py3-none-any.whl"; + sha256 = "08mxqmckg2fx9rkm5a1n9zs2sjccjj75vgxac22xjyi3fw1k0wz2"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."beets" # its doesnt matter? + # self."httpx" + # self."packaging" + # self."pycountry" + ]; + }; + "beets" = super.buildPythonPackage rec { + pname = "beets"; + version = "2.2.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/f3/44/1c53c2ac111e5526083e58f50a22504ad7c609be1ce660c0339938a42c33/beets-2.2.0-py3-none-any.whl"; + sha256 = "076hl1j74cgyh6n1piwprnzb89gihy2vmajm8lzfhy1jjcrfrpbd"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + #self."PyYAML" + #self."Unidecode" + #self."confuse" + #self."jellyfish" + self."mediafile" + self."munkres" + self."musicbrainzngs" + self."platformdirs" + #self."typing-extensions" + # ext + #self."requests" # For spotify, deezer, embedart, fetchart, lyrics + self."python3-discogs-client" # For discogs + #self."pylast" # For lastgenre + #self."beetcamp" # Another + ]; + }; + # "certifi" = super.buildPythonPackage rec { + # pname = "certifi"; + # version = "2024.12.14"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/a5/32/8f6669fc4798494966bf446c8c4a162e0b5d893dff088afddf76414f70e1/certifi-2024.12.14-py3-none-any.whl"; + # sha256 = "0mpccx4yscnk6rhl12fk8wpgwrpq62m4w23k27y4wip9bfjgfx8j"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ ]; + # }; + "charset-normalizer" = super.buildPythonPackage rec { + pname = "charset-normalizer"; + version = "3.4.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz"; + sha256 = "18sfsqpdmxbddr3g3yg0sln10ghq4sp0vl2xb1b5p9v8rlc1y9a4"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "colorama" = super.buildPythonPackage rec { + pname = "colorama"; + version = "0.4.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl"; + sha256 = "1ijz53xpmxds2qf02l9yf0rnp7bznwh3ci4xkw8wmh5cyn8rj7ag"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + # "confuse" = super.buildPythonPackage rec { + # pname = "confuse"; + # version = "2.0.1"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/32/1f/cf496479814d41fc252004482deeb90b740b4a6a391a3355c0b11d7e0abf/confuse-2.0.1-py3-none-any.whl"; + # sha256 = "0amxm8vnxcayh7inahvj3fzj33n8gs8lvcfaicqrpjz2f2y5p7lv"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ + # self."PyYAML" + # ]; + # }; + "exceptiongroup" = super.buildPythonPackage rec { + pname = "exceptiongroup"; + version = "1.3.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/36/f4/c6e662dade71f56cd2f3735141b265c3c79293c109549c1e6933b0651ffc/exceptiongroup-1.3.0-py3-none-any.whl"; + sha256 = "044alxyhkfdlr5z3xlpnf5lv78310bnsgnkdmm669l0k1ip1w4ad"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."typing-extensions" + ]; + }; + "filetype" = super.buildPythonPackage rec { + pname = "filetype"; + version = "1.2.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/18/79/1b8fa1bb3568781e84c9200f951c735f3f157429f44be0495da55894d620/filetype-1.2.0-py2.py3-none-any.whl"; + sha256 = "099d3igvmfcdgg9dcylz8advva5n3qpplsf8gb7l24hqh1l1prvw"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "h11" = super.buildPythonPackage rec { + pname = "h11"; + version = "0.14.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/95/04/ff642e65ad6b90db43e668d70ffb6736436c7ce41fcc549f4e9472234127/h11-0.14.0-py3-none-any.whl"; + sha256 = "0qd7z9p38dwx215048q708vd1sn2abdh1mb3hg66ii2ip324mzp3"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + # "httpcore" = super.buildPythonPackage rec { + # pname = "httpcore"; + # version = "1.0.7"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/87/f5/72347bc88306acb359581ac4d52f23c0ef445b57157adedb9aee0cd689d2/httpcore-1.0.7-py3-none-any.whl"; + # sha256 = "1p8f8bnrir1d50s6z19jndca98qghgqrr7rx6syxaq627psgizx3"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ + # self."certifi" + # self."h11" + # ]; + # }; + # "httpx" = super.buildPythonPackage rec { + # pname = "httpx"; + # version = "0.28.1"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl"; + # sha256 = "1barpaw8as8xb7b2bsmzdmdbq5nqljlq5jhlz3xcgy0hq76gq2fr"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ + # self."anyio" + # self."certifi" + # self."httpcore" + # self."idna" + # ]; + # }; + "idna" = super.buildPythonPackage rec { + pname = "idna"; + version = "3.10"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl"; + sha256 = "1lw72a5swas501zvkpd6dsryj5hzjijqxs3526kbp7151md1jvcl"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + # "jellyfish" = super.buildPythonPackage rec { # That is Rust package + # pname = "jellyfish"; + # version = "1.1.3"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/5b/3a/f607d7d44ee5cbad51ce8e2966bde112789eeb53633558f500bc4e44c053/jellyfish-1.1.3.tar.gz"; + # sha256 = "17wgy021wsp8jj95v638kfk34r9yzbry3q7shnglj5npmgfs22v5"; + # }; + # format = "setuptools"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ ]; + # }; + "langdetect" = super.buildPythonPackage rec { + pname = "langdetect"; + version = "1.0.9"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/0e/72/a3add0e4eec4eb9e2569554f7c70f4a3c27712f40e3284d483e88094cc0e/langdetect-1.0.9.tar.gz"; + sha256 = "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."six" + ]; + }; + "mediafile" = super.buildPythonPackage rec { + pname = "mediafile"; + version = "0.13.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/9f/b0/363b4d1443a593398f9d3784f406385f075e8fd0991c35356e73fc37638a/mediafile-0.13.0-py3-none-any.whl"; + sha256 = "1jqlwmwpgn0fxkbxrj8y5a4wr3ikwgs2rsc678hbaw861qyii3fd"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."filetype" + self."mutagen" + ]; + }; + "munkres" = super.buildPythonPackage rec { + pname = "munkres"; + version = "1.1.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/90/ab/0301c945a704218bc9435f0e3c88884f6b19ef234d8899fb47ce1ccfd0c9/munkres-1.1.4-py2.py3-none-any.whl"; + sha256 = "0apdpkbhg4wq5pis5d2mkqg46ikwix5nwcm2mrjxi04499yqc0bb"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "musicbrainzngs" = super.buildPythonPackage rec { + pname = "musicbrainzngs"; + version = "0.7.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/6d/fd/cef7b2580436910ccd2f8d3deec0f3c81743e15c0eb5b97dde3fbf33c0c8/musicbrainzngs-0.7.1-py2.py3-none-any.whl"; + sha256 = "040s1q4ia6gl2bjjxrjs384980854s9za28b55r0lk0hfpwshhg8"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "mutagen" = super.buildPythonPackage rec { + pname = "mutagen"; + version = "1.47.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b0/7a/620f945b96be1f6ee357d211d5bf74ab1b7fe72a9f1525aafbfe3aee6875/mutagen-1.47.0-py3-none-any.whl"; + sha256 = "06d7miq4z6m7j8rx2czkmqhgbjb2bwjagfz5v0wraylhqm86zngd"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "oauthlib" = super.buildPythonPackage rec { + pname = "oauthlib"; + version = "3.2.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/7e/80/cab10959dc1faead58dc8384a781dfbf93cb4d33d50988f7a69f1b7c9bbe/oauthlib-3.2.2-py3-none-any.whl"; + sha256 = "1jpvcxq0xr3z50fdg828in1icgz8cfcy3sc04r85vqhkmjdg4fc1"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "packaging" = super.buildPythonPackage rec { + pname = "packaging"; + version = "24.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl"; + sha256 = "0nd7a421brjgd4prm8fbs8a6bcv4n1yplgxalgs02p16rnyb3aq9"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "pillow" = super.buildPythonPackage rec { + pname = "pillow"; + version = "11.0.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/a5/26/0d95c04c868f6bdb0c447e3ee2de5564411845e36a858cfd63766bc7b563/pillow-11.0.0.tar.gz"; + sha256 = "0fbpcwgiac19ap0h1qa1imsqhq6vxv8kg67zkgm3y05c4jpwpfkj"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "platformdirs" = super.buildPythonPackage rec { + pname = "platformdirs"; + version = "4.3.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl"; + sha256 = "1yy39iay8fdb3c1r4gm011lla1sk1mc9fsw300wi1f4a83hpbrbk"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "pycountry" = super.buildPythonPackage rec { + pname = "pycountry"; + version = "24.6.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b1/ec/1fb891d8a2660716aadb2143235481d15ed1cbfe3ad669194690b0604492/pycountry-24.6.1-py3-none-any.whl"; + sha256 = "0vz0dhfkbjld5jagh9wafwy27k5d83bmd5fkxy74y8fp3hwzp97i"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + # "pylast" = super.buildPythonPackage rec { + # pname = "pylast"; + # version = "5.3.0"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/9b/57/e25206d012afe3fe5e3336a875babb5413b81c00706411a645a38185ad3b/pylast-5.3.0-py3-none-any.whl"; + # sha256 = "023ki92jgc9mk2k9c4li48zf23yz2wn022m1rsjj9bsvn3f7ri2c"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ + # self."httpx" + # ]; + # }; + "python-dateutil" = super.buildPythonPackage rec { + pname = "python-dateutil"; + version = "2.9.0.post0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl"; + sha256 = "09q48zvsbagfa3w87zkd2c5xl54wmb9rf2hlr20j4a5fzxxvrcm8"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."six" + ]; + }; + "python3-discogs-client" = super.buildPythonPackage rec { + pname = "python3-discogs-client"; + version = "2.7.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/02/eb/b3d321440728addb72296e75ae2bfddd8fd3518b5ce5bd54a1ad821227a2/python3_discogs_client-2.7.1-py3-none-any.whl"; + sha256 = "0i3lfdn2ncxfvmmldg31gmdv7vdcicjl890mihncxa48yb9g7daz"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ + self."oauthlib" + self."python-dateutil" + #self."requests" + ]; + }; + # "requests" = super.buildPythonPackage rec { + # pname = "requests"; + # version = "2.32.3"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl"; + # sha256 = "1inwsrhx0m16q0wa1z6dfm8i8xkrfns73xm25arcwwy70gz1qxkh"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ + # self."certifi" + # self."charset-normalizer" + # self."idna" + # self."urllib3" + # ]; + # }; + "six" = super.buildPythonPackage rec { + pname = "six"; + version = "1.17.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl"; + sha256 = "0x1jdic712dylbnyiqdj4xyxrlx0gaacynmbmkfiym4hxn8z68a7"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "sniffio" = super.buildPythonPackage rec { + pname = "sniffio"; + version = "1.3.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl"; + sha256 = "18i50l85yppn9w1ily8m342yd577h0bg8y24hkfzvq7is4ca8v9g"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "soupsieve" = super.buildPythonPackage rec { + pname = "soupsieve"; + version = "2.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/d1/c2/fe97d779f3ef3b15f05c94a2f1e3d21732574ed441687474db9d342a7315/soupsieve-2.6-py3-none-any.whl"; + sha256 = "1jfc0b39kwnh4n30458mr8gmh50mx3k5zxghm6sy9djgdvq4yb77"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + "typing-extensions" = super.buildPythonPackage rec { + pname = "typing-extensions"; + version = "4.12.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl"; + sha256 = "03bhjivpvdhn4c3x0963z89hv7b5vxr415akd1fgiwz0a41wmr84"; + }; + format = "wheel"; + doCheck = false; + buildInputs = [ ]; + checkInputs = [ ]; + nativeBuildInputs = [ ]; + propagatedBuildInputs = [ ]; + }; + # "urllib3" = super.buildPythonPackage rec { + # pname = "urllib3"; + # version = "2.3.0"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl"; + # sha256 = "1pz380a93mhdrzx5003inw5pm5n0fh1xazcbnjxzsyw6d79rmvhw"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = [ ]; + # checkInputs = [ ]; + # nativeBuildInputs = [ ]; + # propagatedBuildInputs = [ ]; + # }; +} diff --git a/modules/software/daw.nix b/modules/software/daw.nix new file mode 100644 index 0000000..f34c27d --- /dev/null +++ b/modules/software/daw.nix @@ -0,0 +1,21 @@ +{ inputs, ... }@flakeContext: +{ + config, + lib, + pkgs, + ... +}: +{ + environment = { + systemPackages = with pkgs; [ + # yabridge + wineWowPackages.yabridge + yabridge + yabridgectl + + # JACK Control + qjackctl + ]; + }; + +} diff --git a/modules/software/virtual.nix b/modules/software/virtual.nix new file mode 100644 index 0000000..f508bbb --- /dev/null +++ b/modules/software/virtual.nix @@ -0,0 +1,52 @@ +{ inputs, ... }@flakeContext: +{ + config, + lib, + pkgs, + ... +}: +{ + boot = { + kernelModules = [ + "kvm-amd" + "vfio" + "vfio-pci" + "vfio_iommu_type1" + "vfio_virqfd" + ]; + kernelParams = [ + "amd_iommu=on" + "iommu=pt" + "kvm.ignore_msrs=1" + ]; + }; + services = { + spice-vdagentd.enable = true; + }; + virtualisation = { + libvirtd = { + enable = true; + onBoot = "ignore"; + onShutdown = "shutdown"; + qemu = { + swtpm.enable = true; + ovmf.enable = true; + ovmf.packages = [ pkgs.OVMFFull.fd ]; + }; + }; + spiceUSBRedirection.enable = true; + }; + environment = { + systemPackages = with pkgs; [ + spice + #spice-gtk + #spice-protocol + virt-manager + virt-viewer + virtiofsd + win-spice + virtio-win + #looking-glass-client # pci-passthrough + ]; + }; +} diff --git a/modules/software/whisper.nix b/modules/software/whisper.nix new file mode 100644 index 0000000..5542078 --- /dev/null +++ b/modules/software/whisper.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + pkgs, + xlib, + inputs, + ... +}: +# let +# work = import inputs.nixpkgs-master { system = "x86_64-linux"; }; +# in +{ + environment.systemPackages = [ + pkgs.openai-whisper + + # (work.openai-whisper.override { + # torch = pkgs.python313Packages.torch-bin; # Используй бинарный torch с ROCm, чтобы обойти сборочную хуйню + # }) + ]; + # systemd.tmpfiles.rules = ["L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"]; + # hardware.graphics.extraPackages = with pkgs.rocmPackages; [ clr clr.icd ]; + + #nixpkgs.config.rocmSupport = true; +} diff --git a/modules/software/wine.nix b/modules/software/wine.nix new file mode 100644 index 0000000..07bf53a --- /dev/null +++ b/modules/software/wine.nix @@ -0,0 +1,20 @@ +{ inputs, ... }@flakeContext: +{ + config, + lib, + pkgs, + ... +}: +{ + environment = { + systemPackages = with pkgs; [ + #wineWowPackages.waylandFull + wineWowPackages.stagingFull + #wineWowPackages.fonts + dxvk + ]; + sessionVariables = { + WINEARCH = "win64"; + }; + }; +} diff --git a/modules/users.nix b/modules/users.nix new file mode 100644 index 0000000..8b7af16 --- /dev/null +++ b/modules/users.nix @@ -0,0 +1,123 @@ +{ + config, + xlib, + lib, + pkgs, + ... +}: +{ + #imports = [ + # ./others + #]; + + xlib.device.username = "oqyude"; + + users = { + mutableUsers = false; + users = { + "${xlib.device.username}" = { + name = "${xlib.device.username}"; + isNormalUser = true; + group = "users"; + description = "Jor Oqyude"; + hashedPasswordFile = config.sops.secrets.hashed_password.path; # hashed_password + homeMode = "700"; + home = "/home/${xlib.device.username}"; + extraGroups = [ + "audio" + "disk" + "gamemode" + "networkmanager" + "pipewire" + "wheel" + "libvirtd" + "qemu-libvirtd" + ]; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKduJia+unaQQdN6X5syaHvnpIutO+yZwvfiCP4qKQ/P" + ]; + }; + }; + }; + + #systemd.tmpfiles.rules = [ + # "z /home/shared 2775 root users -" + #]; + + sops = { + age = { + sshKeyPaths = [ + "/etc/ssh/id_ed25519" + ]; + }; + defaultSopsFile = ../secrets/default.yaml; + secrets = { + hashed_password = { + neededForUsers = true; + key = "hashed_password"; + format = "yaml"; + }; + age_key_private = { + format = "yaml"; + key = "age_key_private"; + path = "/home/${xlib.device.username}/.config/sops/age/keys.txt"; + owner = config.users.users."${xlib.device.username}".name; + group = config.users.users."${xlib.device.username}".group; + mode = "0600"; + }; + ssh_key_private = { + format = "yaml"; + key = "ssh_key_private"; + path = "/home/${xlib.device.username}/.ssh/id_ed25519"; + owner = config.users.users."${xlib.device.username}".name; + group = config.users.users."${xlib.device.username}".group; + mode = "0600"; + }; + ssh_key_public = { + format = "yaml"; + key = "ssh_key_public"; + path = "/home/${xlib.device.username}/.ssh/id_ed25519.pub"; + owner = config.users.users."${xlib.device.username}".name; + group = config.users.users."${xlib.device.username}".group; + mode = "0655"; + }; + ssh_key_private_root = { + format = "yaml"; + key = "ssh_key_private"; + path = "/root/.ssh/id_ed25519"; + owner = "root"; + group = "root"; + mode = "0600"; + }; + ssh_key_public_root = { + format = "yaml"; + key = "ssh_key_public"; + path = "/root/.ssh/id_ed25519"; + owner = "root"; + group = "root"; + mode = "0655"; + }; + ssh_key_public_host = { + format = "yaml"; + key = "ssh_key_public"; + path = "/etc/ssh/id_ed25519.pub"; + mode = "0655"; + }; + }; + }; + + # systemd.services.nixos-auto-rebuild-sops = { + # description = "Auto rebuild NixOS at boot"; + # wantedBy = [ "multi-user.target" ]; + # after = [ "network-online.target" ]; + # serviceConfig = { + # Type = "oneshot"; + # User = "${xlib.device.username}"; + # Group = "users"; + # WorkingDirectory = "/etc/nixos"; + # ExecStart = [ "/run/wrappers/bin/sudo ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch" ]; + # }; + # }; + + # fileSystems."/etc/ssh".neededForBoot = true; +} diff --git a/modules/vds-new/default.nix b/modules/vds-new/default.nix new file mode 100644 index 0000000..58a7e29 --- /dev/null +++ b/modules/vds-new/default.nix @@ -0,0 +1,9 @@ +{ + lib, + ... +}: +{ + imports = [ + ../vds + ]; +} diff --git a/modules/vds/default.nix b/modules/vds/default.nix new file mode 100644 index 0000000..724d21e --- /dev/null +++ b/modules/vds/default.nix @@ -0,0 +1,12 @@ +{ + lib, + ... +}: +{ + imports = [ + ../containers/3x-ui.nix + ./nginx.nix + ./xray.nix + # ./netbird.nix + ]; +} diff --git a/modules/vds/netbird.nix b/modules/vds/netbird.nix new file mode 100644 index 0000000..ec6ba1f --- /dev/null +++ b/modules/vds/netbird.nix @@ -0,0 +1,40 @@ +{ + config, + pkgs, + ... +}: +{ + services.netbird.server = { + enable = false; + enableNginx = true; + domain = "netbird.zeroq.ru"; + dashboard = { + enable = false; + domain = "netbird.zeroq.ru"; + settings = { + #AUTH_AUTHORITY = "nbp_ufe0v5mbb5H1lQWL8eJfuzJ5ItPmlM46Mik0"; + }; + }; + management = { + enable = false; + domain = "netbird.zeroq.ru"; + }; + }; + + # networking.firewall = { + # allowedTCPPorts = [ + # 80 + # 443 + # 33073 + # 10000 + # 33080 + # ]; + # allowedUDPPorts = [ 3478 ]; + # allowedUDPPortRanges = [ + # { + # from = 49152; + # to = 65535; + # } + # ]; + # }; +} diff --git a/modules/vds/nginx.nix b/modules/vds/nginx.nix new file mode 100644 index 0000000..b46e3db --- /dev/null +++ b/modules/vds/nginx.nix @@ -0,0 +1,214 @@ +{ + config, + inputs, + pkgs, + ... +}: +let + server = "100.64.0.0"; +in +{ + environment.etc."nginx/pubray".text = inputs.zeroq-credentials.services.xray.auth; + users.users.nginx.extraGroups = [ "acme" ]; + services = { + nginx = { + enable = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + appendHttpConfig = inputs.zeroq-credentials.services.xray.maps; + virtualHosts = { + # "pubray.zeroq.ru" = { + # enableACME = true; + # forceSSL = true; + # root = "${inputs.zeroq-credentials.services.xray.subs}"; + # locations."/" = { + # extraConfig = '' + # auth_basic "Restricted"; + # auth_basic_user_file /etc/nginx/pubray; + + # if ($subfile = "") { return 403; } + # rewrite ^/$ $subfile break; + # ''; + # }; + # }; + "x.zeroq.ru" = { + forceSSL = true; + enableACME = true; + locations = { + "/" = { + proxyPass = "http://localhost:2049"; + proxyWebsockets = true; + }; + "/subs/" = { + proxyPass = "http://localhost:2096"; + proxyWebsockets = true; + }; + }; + }; + "kuma.zeroq.ru" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://${server}:4001"; + proxyWebsockets = true; + }; + extraConfig = '' + client_max_body_size 5G; + ''; + }; + "health.zeroq.ru" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://${server}:19999"; + proxyWebsockets = true; + }; + }; + "agent.zeroq.ru" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://${server}:3000"; + proxyWebsockets = true; + }; + }; + # "node-red.zeroq.ru" = { + # forceSSL = true; + # enableACME = true; + # kTLS = true; + # locations."/" = { + # proxyPass = "http://${server}:1880"; + # proxyWebsockets = true; + # }; + # extraConfig = '' + # client_max_body_size 5G; + # ''; + # }; + "zeroq.ru" = { + forceSSL = true; + enableACME = true; + root = pkgs.writeTextDir "index.html" '' + + + +
What are you doing here?
+ + + ''; + locations = { + "/guest/" = { + proxyPass = "http://${server}:80"; + proxyWebsockets = true; + }; + # "/.well-known/discord" = { + # extraConfig = '' + # default_type text/plain; + # return 200 "dh=c2d103553a4cfdaa1b7952a87a7d8120a1e167cc"; + # ''; + # }; + }; + }; + "flux.zeroq.ru" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://${server}:6061"; + proxyWebsockets = true; + }; + extraConfig = '' + client_max_body_size 5G; + ''; + }; + "office.zeroq.ru" = { + enableACME = true; + forceSSL = true; + locations = { + "/" = { + proxyPass = "http://${server}:9980"; # API и coauthoring + proxyWebsockets = true; + }; + }; + extraConfig = '' + client_max_body_size 5G; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + ''; # absolute_redirect off; + }; + "immich.zeroq.ru" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://${server}:2283"; + proxyWebsockets = true; + }; + extraConfig = '' + client_max_body_size 5G; + ''; + }; + "nextcloud.zeroq.ru" = { + forceSSL = true; + enableACME = true; + locations = { + "/" = { + proxyPass = "http://${server}:10000"; + proxyWebsockets = true; + }; + "/whiteboard" = { + proxyPass = "http://${server}:3002"; + proxyWebsockets = true; + }; + }; + extraConfig = '' + client_max_body_size 5G; + ''; + }; + "calibre.zeroq.ru" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://${server}:8083"; + proxyWebsockets = true; + }; + extraConfig = '' + client_max_body_size 5G; + ''; + }; + # "pdf.zeroq.ru" = { + # forceSSL = true; + # enableACME = true; + # locations."/" = { + # proxyPass = "http://${server}:6060"; + # proxyWebsockets = true; + # }; + # extraConfig = '' + # client_max_body_size 5G; + # ''; + # }; + # "ai.zeroq.ru" = { + # forceSSL = true; + # enableACME = true; + # locations."/" = { + # proxyPass = "http://${server}:11112"; + # proxyWebsockets = true; + # }; + # extraConfig = '' + # client_max_body_size 5G; + # ''; + # }; + }; + }; + }; + security.acme = { + acceptTerms = true; + defaults = { + email = "go.bin043120@gmail.com"; + }; + }; + networking.firewall.allowedTCPPorts = [ + 80 + 443 + ]; +} diff --git a/modules/vds/xray.nix b/modules/vds/xray.nix new file mode 100644 index 0000000..11ad406 --- /dev/null +++ b/modules/vds/xray.nix @@ -0,0 +1,44 @@ +{ + config, + inputs, + pkgs, + ... +}: +{ + services.xray = { + enable = false; + settings = inputs.zeroq-credentials.services.xray.config; + }; + + # networking.firewall = { + # allowedTCPPorts = [ + # 8443 + # 9443 + # 13380 + # ]; + # allowedUDPPorts = [ + # 8443 + # 9443 + # 13380 + # ]; + # }; + + environment.systemPackages = [ pkgs.xray ]; + + # sops.secrets = { + # xray_uuid = { + # key = "uuid"; + # mode = "0444"; + # format = "yaml"; + # sopsFile = ./secrets/xray.yaml; + # path = "/etc/xray/uuid"; + # }; + # xray_private-key = { + # path = "/etc/xray/private-key"; + # key = "private-key"; + # mode = "0444"; + # format = "yaml"; + # sopsFile = ./secrets/xray.yaml; + # }; + # }; +} diff --git a/modules/wsl/containers/3x-ui.nix b/modules/wsl/containers/3x-ui.nix new file mode 100644 index 0000000..c951ea0 --- /dev/null +++ b/modules/wsl/containers/3x-ui.nix @@ -0,0 +1,118 @@ +# 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 -" + ]; +} diff --git a/modules/wsl/containers/default.nix b/modules/wsl/containers/default.nix new file mode 100644 index 0000000..d9d57c6 --- /dev/null +++ b/modules/wsl/containers/default.nix @@ -0,0 +1,16 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + imports = [ + # ./3x-ui.nix + ]; + + environment.systemPackages = with pkgs; [ + compose2nix + podman-tui + ]; +} diff --git a/modules/wsl/default.nix b/modules/wsl/default.nix new file mode 100644 index 0000000..101bb2d --- /dev/null +++ b/modules/wsl/default.nix @@ -0,0 +1,15 @@ +{ + lib, + pkgs, + ... +}: +{ + imports = [ + ../software/aichat.nix + ../software/beets + ../software/whisper.nix + ./containers + #../server/open-webui.nix + #../services/tts.nix + ]; +} diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 0000000..3726b0b --- /dev/null +++ b/overlays/default.nix @@ -0,0 +1,6 @@ +{ inputs, ... }@flakeContext: +{ + nixosOverlays = { + default = import ./pkgs.nix flakeContext; + }; +} diff --git a/overlays/pkgs.nix b/overlays/pkgs.nix new file mode 100644 index 0000000..c4d52c2 --- /dev/null +++ b/overlays/pkgs.nix @@ -0,0 +1,3 @@ +{ inputs, ... }: +self: super: { +} diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..c1545bf --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,9 @@ +{ inputs, ... }@flakeContext: +let + pkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; +in +{ + # packages."x86_64-linux" = { + # immich = pkgs.callPackage ./immich/package.nix { }; + # }; +} diff --git a/secrets/default.yaml b/secrets/default.yaml new file mode 100644 index 0000000..75b6201 --- /dev/null +++ b/secrets/default.yaml @@ -0,0 +1,19 @@ +ssh_key_private: ENC[AES256_GCM,data:cyqjgPmj9rAR1n25ICRM8V+46rb9iZ3r15ujnrulh775MwjhDjKy1wPnDYlCl+YNIWxmsQnxmEYoRi3jHYOwaItQsH47D3velK9BVuBGo/srWsE1D7Sd8olAWFqeM5n1LLlLzm3zB9Jvl1rE1VhkaLj/q0arnTvTGMnkgmpCxTn0x6J9PydV4zNzNyVz2ejtnb2fnYm6fhfF5nCyKlwFQ5k922k5EOnnK57JF6zQEsLV83Rh0hu/vjbwPYeKjeLUsaFTIMtoCfuQg8p+1EEGTt4FUPsSaXaax/5WWtKccSl2Ky6QM+4kHocpEIxcLZlbWVfpY/sfisDBdxNEzq+EeXBc7I3oV8SsvZ7EraCjuDIY17DJjyTxgduZmorVHwQVwGqfTJcunAQ6NTX2FmCrGINPlduIXI5ENHO/ki+XweMugYYGCVxg/A/wBkWdqqGFMkxneXK9e9LNu66Cx3WIALWY0eZJQapo0AaxCb8IFPLtidyxhmBulR50T2SMQFchY0mtbVhUtnWXZmdffbX6,iv:irfuVOG/3kJto9Bfo9kfWuAiMnSDv2lEIgHgS74sNPI=,tag:WMz84t/fUyUokm5WYoNAOQ==,type:str] +age_key_private: ENC[AES256_GCM,data:x0B/ch6jnR91pUoh+l299zkLkon8EVdpv43Y9ZaO5UGtoHZTz4WNv+bFlx8JeKpIi225yafviEwDkjXSNVSOyEiKX96AMdITWEQ=,iv:/IPQF64nEXsR6WAFnKRVn9xNLJxnPFkl4zy3Y1SAbow=,tag:OOR+kdQcRIelf2u+MHRT+g==,type:str] +hashed_password: ENC[AES256_GCM,data:4XLEKKrBy6J+WVcOOgQLrxyPgkNuqd2QBpE2IZUSe9rxNL8E+hA39EDXzlR/p08VX83Y8SsCc9AP4Lc+E4461fCt7G5JDDVBdqWhWDhRxdiUfQMcjRbj5WoNBCuB85VixwIYNgR2drGvKA==,iv:BbSSWimBybfwc9ICXuQwPn6SENAqbwvW1zfFtcG/RJ8=,tag:bC2xPTVX/rYzAhRuoiKwbA==,type:str] +ssh_key_public: ENC[AES256_GCM,data:0LhcdZrSFDl5KvHTC9C6XILjcwzN6gCSbC+7qwJZG7G13BOde76mtIpHnzLVu1QhKgc681Qw5j0MaAOMbIFSi5uFbnh87r+3onJ98l2IMQc=,iv:Z0l6a5APKqvYCYlLriUrM+RKsd+x1d6m79gP1LFOzec=,tag:hNLcmSx42uCS5CO/2ZzlgQ==,type:str] +sops: + age: + - recipient: age13l2gtk0nzr484zprp7e0pkrt0ne0j4asyn2pjmlaw73nte7t7d8q4sqtxm + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByZkU4c1hVTDJFbDkwQlFO + aXZqU1JGd2F1OTRESTB5SFhQZFRDc281ZFd3CmVCcVI0Q0hVOVlMYVpIbVEzc0F2 + Z3FlSURDNzc4M2k1eTRtZnpaUHBHajQKLS0tIDkzMVVqTVFpU3VJcWlDS1BMdVQ1 + bk9jY0J0dE9jd1gxRzhNUlNBaHc3QlkKFDdWVhqMUgRjndhph+UvkSPcvsP0Z92+ + 5U9lYlHnWwTIUKnFM8pVxdrLDE7O8Q5qw/H33ECttyMD4NZIYjmmyA== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2025-10-09T22:17:57Z" + mac: ENC[AES256_GCM,data:/ubehy/KUtmgteU5EK4r7icDk/yh9U72DRVnnQAb7JTUtxKQOWADHj2evjiv0QMfAughrS9O9OO/gEuuWXHKGHJslqqLxegm8RECoFBa0P40cxS4ZW33HN7Yi2irsSvLs3Ghw2b9lExHUP2dKfT4pwi/hO8HHg+mFN/q6vv8vTI=,iv:/Klr3CWkGwv0LxtKqysWvatzbv0XzG+wjHlmuI2c/Vg=,tag:jf0B6uObTe6KFf7D9GQYwg==,type:str] + unencrypted_suffix: _unencrypted + version: 3.11.0