From 122679ce1a17ebdf6eacbd12c0f50e140a295513 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 31 Jul 2024 08:06:18 +0200 Subject: ... --- hosts/sif/default.nix | 2 +- hosts/sif/hw.nix | 50 ++++++++++++++++++++++++++++++------------ system-profiles/tmpfs-root.nix | 2 +- user-profiles/yt-dlp.nix | 13 ++++++----- 4 files changed, 45 insertions(+), 22 deletions(-) diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index f02c77cf..87c0f3bf 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix @@ -380,7 +380,7 @@ in { xkbOptions = "compose:caps"; displayManager.lightdm = { - enable = false; + enable = true; greeters.gtk = { clock-format = "%H:%M %a %b %_d"; indicators = ["~host" "~spacer" "~clock" "~session" "~power"]; diff --git a/hosts/sif/hw.nix b/hosts/sif/hw.nix index f3b20580..a2991def 100644 --- a/hosts/sif/hw.nix +++ b/hosts/sif/hw.nix @@ -5,17 +5,17 @@ "/boot" = { label = "boot"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - "/.bcachefs" = - { device = "/dev/mapper/sif-nvm0:/dev/mapper/sif-nvm1"; - fsType = "bcachefs"; - neededForBoot = true; + options = [ "fmask=0033" "dmask=0022" ]; }; + # "/.bcachefs" = + # { device = "/dev/mapper/sif-nvm0:/dev/mapper/sif-nvm1"; + # fsType = "bcachefs"; + # neededForBoot = true; + # }; "/nix" = { device = "/.bcachefs/nix"; fsType = "none"; - options = [ "bind" ]; + options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ]; }; "/root" = { device = "/.bcachefs/root"; @@ -25,29 +25,33 @@ "/var/log" = { device = "/.bcachefs/var/log"; fsType = "none"; - options = [ "bind" ]; + options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ]; }; "/var/lib/sops-nix" = { device = "/.bcachefs/var/lib/sops-nix"; fsType = "none"; - options = [ "bind" ]; + options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ]; neededForBoot = true; }; "/var/lib/nixos" = { device = "/.bcachefs/var/lib/nixos"; fsType = "none"; - options = [ "bind" ]; - neededForBoot = true; + options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ]; }; "/var/lib/chrony" = { device = "/.bcachefs/var/lib/chrony"; fsType = "none"; options = [ "bind" ]; }; + "/var/lib/fprint" = + { device = "/.bcachefs/var/lib/fprint"; + fsType = "none"; + options = [ "bind" ]; + }; "/var/lib/systemd" = { device = "/.bcachefs/var/lib/systemd"; fsType = "none"; - options = [ "bind" ]; + options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ]; neededForBoot = true; }; "/home" = @@ -61,7 +65,25 @@ options = [ "bind" ]; }; }; - boot.initrd.systemd.services."unlock-bcachefs-${utils.escapeSystemdPath "/.bcachefs"}".enable = false; + + boot.initrd.supportedFilesystems.bcachefs = true; + boot.initrd.systemd.units."dev-sif-nvm0:-dev-sif-nvm1.device".enable = false; + systemd.units."dev-sif-nvm0:-dev-sif-nvm1.device".enable = false; + boot.initrd.systemd.services."bcachefs" = { + before = [ "initrd-fs.target" ]; + after = [ "local-fs-pre.target" "dev-sif-nvm0.device" "dev-sif-nvm1.device" ]; + requires = [ "dev-sif-nvm0.device" "dev-sif-nvm1.device" ]; + wantedBy = [ "initrd-fs.target" ]; + unitConfig = { + DefaultDependencies = false; + StopPropagatedFrom = [ "dev-sif-nvm0.device" "dev-sif-nvm1.device" ]; + }; + serviceConfig = { + Type = "oneshot"; + ExecStart = "/bin/mount -o X-mount.mkdir -t bcachefs /dev/sif/nvm0:/dev/sif/nvm1 /sysroot/.bcachefs"; + RemainAfterExit = true; + }; + }; swapDevices = [ { label = "swap"; } @@ -72,6 +94,6 @@ console.font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; hardware.cpu.intel.updateMicrocode = true; - + hardware.enableRedistributableFirmware = true; } diff --git a/system-profiles/tmpfs-root.nix b/system-profiles/tmpfs-root.nix index 9cdb0308..23939c2e 100644 --- a/system-profiles/tmpfs-root.nix +++ b/system-profiles/tmpfs-root.nix @@ -1,6 +1,6 @@ { ... }: { config = { - system.etc.overlay.enable = true; + # system.etc.overlay.enable = true; fileSystems."/" = { fsType = "tmpfs"; diff --git a/user-profiles/yt-dlp.nix b/user-profiles/yt-dlp.nix index 4ec6d6f7..005f56ff 100644 --- a/user-profiles/yt-dlp.nix +++ b/user-profiles/yt-dlp.nix @@ -4,11 +4,12 @@ programs.yt-dlp = { enable = true; settings = { - cookies-from-browser = "firefox"; + cookies-from-browser = "firefox::none"; mark-watched = true; format = lib.concatStringsSep "/" [ - "bestvideo[width<=3840][height<=2160][fps<=60]+bestaudio" + "bestvideo*[width<=3840][height<=2160][fps<=60]+bestaudio" "best[width<=3840][height<=2160][fps<=60]" + "bestvideo*+bestaudio" "best" ]; sub-langs = "all,-live_chat,-rechat"; @@ -19,10 +20,10 @@ buffer-size = "16K"; sponsorblock-mark = "all"; restrict-filenames = true; - extractor-args = lib.concatStringsSep ";" [ - "youtube:player-client=android,web" - "youtube:formats=dashy" - ]; + # extractor-args = lib.concatStringsSep ";" [ + # "youtube:player-client=android,web" + # "youtube:formats=dashy" + # ]; remux-video = "mp4>mkv"; }; }; -- cgit v1.2.3