disko doesn't support bcachefs subvolumes yet

This commit is contained in:
Tao Tien 2024-10-13 23:28:53 -07:00
parent 8d086ffcca
commit d8ce8bddef
6 changed files with 61 additions and 56 deletions

View file

@ -90,12 +90,12 @@
SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg" SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg"
''; '';
virtualisation.docker = { # virtualisation.docker = {
enable = true; # enable = true;
storageDriver = "btrfs"; # storageDriver = "btrfs";
}; # };
virtualisation.docker.rootless = { # virtualisation.docker.rootless = {
enable = true; # enable = true;
setSocketVariable = true; # setSocketVariable = true;
}; # };
} }

View file

@ -2,12 +2,14 @@
pkgs, pkgs,
lib, lib,
... ...
}: let }:
if_desktop = # let
if lib.strings.hasPrefix "NOcomputer" (builtins.readFile /etc/hostname) # if_desktop =
then true # if lib.strings.hasPrefix "NOcomputer" (builtins.readFile /etc/hostname)
else false; # then true
in { # else false;
# in
{
# aagl.url = "github:ezKEa/aagl-gtk-on-nix"; # aagl.url = "github:ezKEa/aagl-gtk-on-nix";
# aagl.inputs.nixpkgs.follows = "nixpkgs"; # aagl.inputs.nixpkgs.follows = "nixpkgs";

View file

@ -99,7 +99,7 @@
}; };
services.smartd.enable = true; services.smartd.enable = true;
services.btrfs.autoScrub.enable = lib.mkDefault true; # services.btrfs.autoScrub.enable = lib.mkDefault true;
hardware.pulseaudio.enable = lib.mkDefault false; hardware.pulseaudio.enable = lib.mkDefault false;
security.rtkit.enable = true; security.rtkit.enable = true;

View file

@ -31,15 +31,16 @@
type = "filesystem"; type = "filesystem";
format = "bcachefs"; format = "bcachefs";
mountOptions = ["noatime"]; mountOptions = ["noatime"];
mountpoint = "/";
extraArgs = [ extraArgs = [
"--compression zstd" "--compression zstd"
"--background_compression zstd" "--background_compression zstd"
"--discard" "--discard"
]; ];
subvolumes = { # subvolumes = {
"/home" = {}; # "/home" = {};
"/nix" = {}; # "/nix" = {};
}; # };
}; };
}; };
}; };

View file

@ -101,38 +101,38 @@
# "nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path; # "nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path;
# "nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path; # "nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path;
# "uwuraid".id = builtins.readFile config.age.secrets.syncthing-uwuraid.path; # "uwuraid".id = builtins.readFile config.age.secrets.syncthing-uwuraid.path;
}; # };
folders = let # folders = let
devs = [ # devs = [
"nocomputer" # "nocomputer"
"nolaptop" # "nolaptop"
"uwuraid" # "uwuraid"
]; # ];
in { # in {
# "documents" = { # # "documents" = {
# path = "/home/tao/documents"; # # path = "/home/tao/documents";
# # devices = devs;
# # };
# "pictures" = {
# path = "/home/tao/pictures";
# devices = devs;
# };
# "projects" = {
# path = "/home/tao/projects";
# devices = devs;
# };
# "school" = {
# path = "/home/tao/school";
# devices = devs;
# };
# "sync" = {
# path = "/home/tao/sync";
# devices = devs;
# };
# "work" = {
# path = "/home/tao/work";
# devices = devs; # devices = devs;
# }; # };
"pictures" = {
path = "/home/tao/pictures";
devices = devs;
};
"projects" = {
path = "/home/tao/projects";
devices = devs;
};
"school" = {
path = "/home/tao/school";
devices = devs;
};
"sync" = {
path = "/home/tao/sync";
devices = devs;
};
"work" = {
path = "/home/tao/work";
devices = devs;
};
}; };
}; };
}; };
@ -171,6 +171,7 @@
documentation.enable = true; documentation.enable = true;
age.secrets.password-tao.file = ../secrets/syncthing-uwuraid.age;
users.users.tao = { users.users.tao = {
isNormalUser = true; isNormalUser = true;
passwordFile = config.age.secrets.password-tao.path; passwordFile = config.age.secrets.password-tao.path;

View file

@ -38,9 +38,10 @@ in {
color = "gruvbox"; color = "gruvbox";
flags = { flags = {
battery = battery =
if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname) # if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname)
then true # then true
else false; # else false;
true;
hide_time = true; hide_time = true;
enable_gpu = true; enable_gpu = true;
}; };