Skip to content

Commit 114bccc

Browse files
author
Carl Mitchell
committed
Fix some typos, correct mount of user home (hard-code UID/GID for now)
1 parent 6ec15bd commit 114bccc

File tree

6 files changed

+16
-30
lines changed

6 files changed

+16
-30
lines changed

Readme.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ zpool create -f -m none -R /mnt \
9191
-O xattr=sa \
9292
-O normalization=formD \
9393
-O secondarycachne=none \
94-
rpool $ZFS
94+
rpool "${ZFS:?}"
9595
```
9696

9797
Make ZFS datasets for /nix, /persist, and /home/persist. Datasets under `/rpool/safe` should be backed up,
@@ -121,7 +121,10 @@ mkdir -p /mnt/{nix,home,persist,boot}
121121

122122
Replace `USER` with your username in the following:
123123

124-
`mount -t tmpfs tmpfs /mnt/home/USER`
124+
```
125+
mkdir -p /mnt/home/USER
126+
mount -t tmpfs tmpfs /mnt/home/USER
127+
```
125128

126129
```
127130
mkdir -p /mnt/home/persist
@@ -136,6 +139,8 @@ Make persistent subdirectories:
136139
```
137140
mkdir -p /mnt/persist/etc/{ssh,users,nixos,wireguard,NetworkManager/system-connections}
138141
mkdir -p /mnt/persist/var/{log,lib/bluetooth}
142+
mkdir -p /mnt/etc/nixos
143+
mkdir -p /mnt/var/log
139144
```
140145

141146
Bind mount the /etc/nixos and /var/log directories:
@@ -181,6 +186,6 @@ Unmount `/mnt`:
181186

182187
Export the ZFS pool (THIS IS MANDATORY, FAILURE TO EXPORT WILL PREVENT BOOT):
183188

184-
`zfs export rpool`
189+
`zpool export rpool`
185190

186191
Reboot into your new system!

home-manager/home.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
zsh-autosuggestions
122122
zsh-syntax-highlighting
123123
zsh-history-substring-search
124+
oh-my-zsh
124125
nix-zsh-completions
125126
# cod # Tool for generating Bash/Fish/Zsh autocompletions based on `--help` output, broken
126127
jq # JSON CLI editor
@@ -132,6 +133,7 @@
132133
nixpkgs-fmt # Format Nix files
133134
wl-clipboard # Needed for zellilj option `copy_command = "wl-copy";` which is needed for clipboard to work on Wayland
134135
];
136+
};
135137

136138
xdg = {
137139
enable = true;

home-manager/sub-configs/xcompose.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@
7070
<Multi_key> <z> <space> : "​" U200B # Zero-width space
7171
'';
7272
};
73-
}
73+
}

home-manager/sub-configs/zsh.nix

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,5 @@
4141
ll = "${ls} --all --long --header --group";
4242
};
4343

44-
ohMyZsh = {
45-
enable = true;
46-
# TODO: Customize your plugins, themes, etc.
47-
plugins = [
48-
"colored-man-pages"
49-
"colorize"
50-
"command-not-found"
51-
"emacs"
52-
"git"
53-
"git-extras"
54-
"history"
55-
"man"
56-
"rsync"
57-
"safe-paste"
58-
"scd"
59-
"screen"
60-
"systemd"
61-
"tmux"
62-
"urltools"
63-
"vi-mode"
64-
"z"
65-
"zsh-interactive-cd"
66-
];
67-
}
6844
};
6945
}

nixos/configuration.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@
230230
# Enable GnuPG Agent
231231
programs.gnupg.agent = {
232232
enable = true;
233+
pinentryFlavor = "curses";
233234
enableSSHSupport = true;
234235
};
235236

@@ -303,7 +304,7 @@
303304
home = "/home/USER"; # TODO: Set to your username. MUST match the `fileSystems."/home/USER" =` value.
304305
createHome = true; # Does nothing, due to a bug. https://github.com/NixOS/nixpkgs/pull/223932 should resolve it. Harmless here.
305306
passwordFile = "/persist/etc/users/USER"; # TODO: Set your username. Be sure to create this *before* rebooting during first install!
306-
extraGroups = [ "wheel" "networkmanager" "audio" "dialout" ]; # TODO: add any extra groups, e.g. "docker" for Docker or "dumpcap" for Wireshark
307+
extraGroups = [ "wheel" "networkmanager" "audio" "dialout" "dumpcap" ]; # TODO: add any extra groups, e.g. "docker" for Docker or "dumpcap" for Wireshark
307308
#openssh.authorizedKeys.keys = [ "${AUTHORIZED_SSH_KEY}" ]; # TODO: Add keys that can log into *this* user account from _other_ computers.
308309
};
309310
};

nixos/hosts/nix-win-dual-example/default.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
fileSystems."/home/USER" = # TODO: Set your username here. Must match the users.users value.
4242
{ device = "tmpfs";
4343
fsType = "tmpfs";
44-
options = [ "defaults" "size=12G" "mode=700" ]; # TODO: Set the size based on how much space you want ephemeral data to take.
44+
options = [ "defaults" "size=12G" "mode=700" "uid=1000" "gid=100" "user" ]; # TODO: Set the size based on how much space you want ephemeral data to take.
4545
};
4646

4747
fileSystems."/home/persist" =
@@ -59,13 +59,15 @@
5959
{ device = "/persist/etc/nixos";
6060
fsType = "none";
6161
options = [ "bind" ];
62+
depends = [ "/persist" ];
6263
neededForBoot = true;
6364
};
6465

6566
fileSystems."/var/log" =
6667
{ device = "/persist/var/log";
6768
fsType = "none";
6869
options = [ "bind" ];
70+
depends = [ "/persist" ];
6971
neededForBoot = true;
7072
};
7173

0 commit comments

Comments
 (0)