From 24a97b7d23b734f3b800169c0638c5f8d230b23b Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Thu, 28 Sep 2023 15:29:12 -0400 Subject: [PATCH] fixes --- NOTES | 4 +++- nixos/floki/disks.nix | 16 ++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/NOTES b/NOTES index db691d8..cbf6e19 100644 --- a/NOTES +++ b/NOTES @@ -80,7 +80,8 @@ swapDevices = [ { device = "/dev/disk/by-label/swap/swapfile"; } ]; nixos-rebulid switch export NIX_CONFIG="experimental-features = nix-command flakes" -nix-env -iA nixos.pinentry nixos.git +nix-env -iA nixos.pinentry nixos.git nixos.direnv +eval "$(direnv hook bash)" echo pinentry-program $(which pinentry) >> ~/.gnupg/gpg-agent.conf git clone https://github.com/gburd/nix-config.git cd nix-config @@ -98,6 +99,7 @@ home-manager switch --flake .#username@hostname sudo nixos-rebuild switch --flake .#my-hostname clear; sudo nixos-rebuild dry-activate --flake .#${hostname} sudo nix --extra-experimental-features "flakes nix-command" run github:nix-community/disko -- --mode disko nixos/${hostname}/disks.nix --arg disks '[ "/dev/nvme0n1" ]' --arg config.networking.hostName ${hostname} +sudo nix run github:nix-community/disko -- --mode disko nixos/${hostname}/disks.nix ------- services.pcscd.enable = true; diff --git a/nixos/floki/disks.nix b/nixos/floki/disks.nix index 74eaa87..ae02853 100644 --- a/nixos/floki/disks.nix +++ b/nixos/floki/disks.nix @@ -1,8 +1,4 @@ -{ config, disk ? "/dev/nvme0n1", ... }: -let - hostname = config.networking.hostName; -in -{ +{ disk ? "/dev/nvme0n1", ... }: { disko.devices = { disk = { nvme = { @@ -34,23 +30,23 @@ in type = "btrfs"; extraArgs = [ "-f" ]; subvolumes = { - "/root" = { + "root" = { mountpoint = "/"; mountOptions = [ "compress=zstd" ]; }; - "/home" = { + "home" = { mountpoint = "/home"; mountOptions = [ "compress=zstd" ]; }; - "/nix" = { + "nix" = { mountpoint = "/nix"; mountOptions = [ "compress=zstd" "noatime" ]; }; - "/persist" = { + "persist" = { mountpoint = "/persist"; mountOptions = [ "compress=zstd" ]; }; - "/var/logs" = { + "logs" = { mountpoint = "/var/logs"; mountOptions = [ "compress=zstd" "noatime" ]; };