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

@ -98,41 +98,41 @@
devices = { devices = {
# we do a lil anti-patterns https://github.com/ryantm/agenix?tab=readme-ov-file#builtinsreadfile-anti-pattern # we do a lil anti-patterns https://github.com/ryantm/agenix?tab=readme-ov-file#builtinsreadfile-anti-pattern
# bootstrap by commenting out devices first and rebuild switch impurely # bootstrap by commenting out devices first and rebuild switch impurely
# "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
devs = [
"nocomputer"
"nolaptop"
"uwuraid"
];
in {
# "documents" = {
# path = "/home/tao/documents";
# devices = devs;
# }; # };
"pictures" = { # folders = let
path = "/home/tao/pictures"; # devs = [
devices = devs; # "nocomputer"
}; # "nolaptop"
"projects" = { # "uwuraid"
path = "/home/tao/projects"; # ];
devices = devs; # in {
}; # # "documents" = {
"school" = { # # path = "/home/tao/documents";
path = "/home/tao/school"; # # devices = devs;
devices = devs; # # };
}; # "pictures" = {
"sync" = { # path = "/home/tao/pictures";
path = "/home/tao/sync"; # devices = devs;
devices = devs; # };
}; # "projects" = {
"work" = { # path = "/home/tao/projects";
path = "/home/tao/work"; # devices = devs;
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;
}; };