This commit is contained in:
Greg Burd 2023-09-28 13:15:12 -04:00
parent 82f5854f20
commit 489bbeef3c
No known key found for this signature in database
GPG key ID: 1FC1E7793410DE46
5 changed files with 9 additions and 39 deletions

4
NOTES
View file

@ -22,6 +22,7 @@
* udevadm trigger
INSTALL:
nix-env -iA nixos.pkgs.gitAndTools.gitFull
export device=/dev/nvme0n1
export hostname=floki
wipefs/shread/scrub ${device}
@ -96,7 +97,7 @@ home-manager switch --flake .#username@hostname
sudo nixos-rebuild switch --flake .#my-hostname
clear; sudo nixos-rebuild dry-activate --flake .#${hostname}
sudo nix run github:nix-community/disko -- --mode disko /tmp/disko-config.nix --arg disks '[ "/dev/nvme0n1" ]'
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}
-------
services.pcscd.enable = true;
@ -123,4 +124,5 @@ TODO:
EXAMPLE COMMANDS:
* nh os switch --ask
* nix run github:viperML/nh os switch --ask --nom .
* clear; sudo nixos-rebuild dry-activate --flake .#floki

View file

@ -126,6 +126,7 @@
];
sessionVariables = {
PAGER = "moar";
FLAKE = "/home/${username}/ws/nix-config";
};
};
programs = {

View file

@ -1,33 +0,0 @@
_:
{
fileSystems."/" =
{
device = "/dev/disk/by-uuid/bf75af76-49b0-41fa-a4e5-9a52a6a0a667";
fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" ];
};
fileSystems."/nix" =
{
device = "/dev/disk/by-uuid/bf75af76-49b0-41fa-a4e5-9a52a6a0a667";
fsType = "btrfs";
options = [ "subvol=nix" "noatime" "compress=zstd" ];
};
fileSystems."/persist" =
{
device = "/dev/disk/by-uuid/bf75af76-49b0-41fa-a4e5-9a52a6a0a667";
fsType = "btrfs";
options = [ "subvol=persist" "noatime" "compression=zstd" ];
neededForBoot = true;
};
fileSystems."/var/logs" =
{
device = "/dev/disk/by-uuid/bf75af76-49b0-41fa-a4e5-9a52a6a0a667";
fsType = "btrfs";
options = [ "subvol=logs" "noatime" "compress=zstd" ];
neededForBoot = true;
};
}

View file

@ -5,11 +5,10 @@
#inputs.nixos-hardware.nixosModules.common-gpu-nvidia
inputs.nixos-hardware.nixosModules.common-pc
inputs.nixos-hardware.nixosModules.common-pc-ssd
(import ./disks.nix { })
(import ./disks.nix)
../_mixins/hardware/systemd-boot.nix
../_mixins/filesystems/encrypted-root.nix
../_mixins/filesystems/btrfs.nix
../_mixins/services/bluetooth.nix
../_mixins/services/pipewire.nix
../_mixins/virt

View file

@ -1,4 +1,4 @@
{ disks ? [ "/dev/nvme0n1" ], ... }:
{ config, disk ? "/dev/nvme0n1", ... }:
let
hostname = config.networking.hostName;
in
@ -7,7 +7,7 @@ in
disk = {
nvme = {
type = "disk";
device = "/dev/nvme0n1";
device = disk;
content = {
type = "gpt";
partitions = {
@ -63,5 +63,6 @@ in
};
};
};
}
fileSystems."/persist".neededForBoot = true;
}