From d8ce8bddeff4dbe87df80c16717203168055b7f3 Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Sun, 13 Oct 2024 23:28:53 -0700 Subject: [PATCH] disko doesn't support bcachefs subvolumes yet --- extras/dev.nix | 16 +++++----- extras/gaming.nix | 14 +++++---- systems/BASED.nix | 2 +- systems/disk-config.nix | 9 +++--- users/tao.nix | 69 +++++++++++++++++++++-------------------- users/tao/HOME.nix | 7 +++-- 6 files changed, 61 insertions(+), 56 deletions(-) diff --git a/extras/dev.nix b/extras/dev.nix index 2327ec6..3fb891b 100644 --- a/extras/dev.nix +++ b/extras/dev.nix @@ -90,12 +90,12 @@ SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg" ''; - virtualisation.docker = { - enable = true; - storageDriver = "btrfs"; - }; - virtualisation.docker.rootless = { - enable = true; - setSocketVariable = true; - }; + # virtualisation.docker = { + # enable = true; + # storageDriver = "btrfs"; + # }; + # virtualisation.docker.rootless = { + # enable = true; + # setSocketVariable = true; + # }; } diff --git a/extras/gaming.nix b/extras/gaming.nix index 9198d01..c49f759 100644 --- a/extras/gaming.nix +++ b/extras/gaming.nix @@ -2,12 +2,14 @@ pkgs, lib, ... -}: let - if_desktop = - if lib.strings.hasPrefix "NOcomputer" (builtins.readFile /etc/hostname) - then true - else false; -in { +}: +# let +# if_desktop = +# if lib.strings.hasPrefix "NOcomputer" (builtins.readFile /etc/hostname) +# then true +# else false; +# in +{ # aagl.url = "github:ezKEa/aagl-gtk-on-nix"; # aagl.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/systems/BASED.nix b/systems/BASED.nix index 8d6d219..8b03b03 100644 --- a/systems/BASED.nix +++ b/systems/BASED.nix @@ -99,7 +99,7 @@ }; services.smartd.enable = true; - services.btrfs.autoScrub.enable = lib.mkDefault true; + # services.btrfs.autoScrub.enable = lib.mkDefault true; hardware.pulseaudio.enable = lib.mkDefault false; security.rtkit.enable = true; diff --git a/systems/disk-config.nix b/systems/disk-config.nix index d6686ed..6abd97f 100644 --- a/systems/disk-config.nix +++ b/systems/disk-config.nix @@ -31,15 +31,16 @@ type = "filesystem"; format = "bcachefs"; mountOptions = ["noatime"]; + mountpoint = "/"; extraArgs = [ "--compression zstd" "--background_compression zstd" "--discard" ]; - subvolumes = { - "/home" = {}; - "/nix" = {}; - }; + # subvolumes = { + # "/home" = {}; + # "/nix" = {}; + # }; }; }; }; diff --git a/users/tao.nix b/users/tao.nix index 4b15bc7..0d02bd9 100644 --- a/users/tao.nix +++ b/users/tao.nix @@ -98,41 +98,41 @@ devices = { # 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 - # "nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path; - # "nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.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; + # "nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path; + # "nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path; + # "uwuraid".id = builtins.readFile config.age.secrets.syncthing-uwuraid.path; # }; - "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; - }; + # folders = let + # devs = [ + # "nocomputer" + # "nolaptop" + # "uwuraid" + # ]; + # in { + # # "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; + # }; }; }; }; @@ -171,6 +171,7 @@ documentation.enable = true; + age.secrets.password-tao.file = ../secrets/syncthing-uwuraid.age; users.users.tao = { isNormalUser = true; passwordFile = config.age.secrets.password-tao.path; diff --git a/users/tao/HOME.nix b/users/tao/HOME.nix index 6e81bb7..6043817 100644 --- a/users/tao/HOME.nix +++ b/users/tao/HOME.nix @@ -38,9 +38,10 @@ in { color = "gruvbox"; flags = { battery = - if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname) - then true - else false; + # if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname) + # then true + # else false; + true; hide_time = true; enable_gpu = true; };