This commit is contained in:
mjallen18
2025-09-06 10:28:07 -05:00
parent 6b44792e06
commit 30fb21e062
5 changed files with 107 additions and 4 deletions

View File

@@ -17,6 +17,8 @@ in
enableSwap = mkBoolOpt false "Enable swap";
enableLuks = mkBoolOpt false "Enable Luks";
swapSize = mkOpt types.str "16G" "size of swap part";
};
}

View File

@@ -56,6 +56,62 @@ let
};
};
# BTRFS root partition configuration
encBtrfsRoot = {
name = "cryptroot";
size = "100%";
content = {
type = "luks";
name = "cryptroot";
extraOpenArgs = [
"--allow-discards"
"--perf-no_read_workqueue"
"--perf-no_write_workqueue"
];
settings = {crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10"];};
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
"home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
"root" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/root";
};
"nix" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/nix";
};
"etc" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/etc";
};
"log" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/var/log";
};
};
};
};
};
# BCacheFS root partition configuration
bcachefsRoot = {
name = "bcachefs-root";
@@ -108,7 +164,7 @@ in
size = cfg.swapSize;
};
root = if cfg.filesystem == "btrfs" then btrfsRoot else bcachefsRoot;
root = if cfg.filesystem == "btrfs" then ( if cfg.enableLuks then encBtrfsRoot else btrfsRoot) else bcachefsRoot;
};
};
};

View File

@@ -106,6 +106,7 @@ in
"homekit_controller"
"http"
"humidifier"
"ibeacon"
"image"
"image_processing"
"image_upload"
@@ -117,6 +118,7 @@ in
"input_select"
"input_text"
"ios"
"ipp"
"isal"
"jellyfin"
"keyboard"
@@ -206,7 +208,7 @@ in
"usb"
"vacuum"
"vlc"
"vesync"
# "vesync"
"wake_on_lan"
"waze_travel_time"
"weather"
@@ -258,6 +260,7 @@ in
extraPackages =
ps: with ps; [
pkgs.${namespace}.python-roborock
pkgs.${namespace}.pyvesync
# # Core functionality
# aiohttp
# aiodns

View File

@@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonPackage rec {
pname = "pyvesync";
version = "3.0.0b8";
pyproject = true;
disabled = python3Packages.pythonOlder "3.11";
src = fetchFromGitHub {
owner = "webdjoe";
repo = "pyvesync";
rev = "dev-2.0";
hash = "sha256-hJGlcszXD8EXNPppOUuBt9obtunhymlqIGAltkAuZjA=";
};
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [
aiohttp
mashumaro
python-dateutil
];
# pythonImportsCheck = [ "pyvesync" ];
meta = with lib; {
description = "Python library to manage Etekcity Devices and Levoit Air Purifier";
homepage = "https://github.com/webdjoe/pyvesync";
changelog = "https://github.com/webdjoe/pyvesync/releases/tag/${src.tag}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View File

@@ -23,7 +23,7 @@
imports = [
./boot.nix
./filesystems.nix
./hardware-configuration.nix
# ./hardware-configuration.nix
./sops.nix
./services/lsfg-vk
./services/ratbagd
@@ -44,7 +44,11 @@
gaming.enable = true;
hardware = {
disko.enable = false;
disko = {
enable = true;
enableLuks = true;
};
amd = {
enable = true;
lact.enable = true;