Bunch of shit
This commit is contained in:
parent
06520092e8
commit
d8653015d5
9 changed files with 104 additions and 5 deletions
|
|
@ -18,7 +18,7 @@ in {
|
|||
home-manager.users.${username}.xdg.configFile."dunst/dunstrc".text = ''
|
||||
[global]
|
||||
origin = top-left
|
||||
offset = (0, -46)
|
||||
offset = (0, 0)
|
||||
font = CaskaydiaCove Nerd Font 12
|
||||
corner_radius = 10
|
||||
gap_size = 3
|
||||
|
|
|
|||
55
erase-your-darlings-setup.sh
Normal file
55
erase-your-darlings-setup.sh
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
DISK=/dev/null
|
||||
|
||||
# Create two partitions here: p1 and p2
|
||||
fdisk $DISK
|
||||
|
||||
# Formats the partitions
|
||||
mkfs.vfat -n BOOT ${DISK}p1
|
||||
mkfs.btrfs -L ROOT ${DISK}p2
|
||||
|
||||
mount -t btrfs ${DISK}p2
|
||||
|
||||
# Creates btrfs subvolumes
|
||||
btrfs subvolume create /mnt/root
|
||||
btrfs subvolume create /mnt/home
|
||||
btrfs subvolume create /mnt/nix
|
||||
btrfs subvolume create /mnt/persist
|
||||
btrfs subvolume create /mnt/log
|
||||
|
||||
# Creates snapshot
|
||||
btrfs subvolume snapshot -r /mnt/root /mnt/root-blank
|
||||
|
||||
umount /mnt
|
||||
|
||||
|
||||
|
||||
# Creates the directories for the subvolumes to be mounted to, nixos-install will detect this.
|
||||
|
||||
mount -o subvol=root,compress=zstd,noatime ${DISK}p2 /mnt
|
||||
|
||||
mkdir /mnt/home
|
||||
mount -o subvol=home,compress=zstd,noatime ${DISK}p2 /mnt/home
|
||||
|
||||
mkdir /mnt/nix
|
||||
mount -o subvol=nix,compress=zstd,noatime ${DISK}p2 /mnt/nix
|
||||
|
||||
mkdir /mnt/persist
|
||||
mount -o subvol=persist,compress=zstd,noatime ${DISK}p2 /mnt/persist
|
||||
|
||||
mkdir -p /mnt/var/log
|
||||
mount -o subvol=log,compress=zstd,noatime ${DISK}p2 /mnt/var/log
|
||||
|
||||
mkdir /mnt/boot
|
||||
mount "$DISK"p1 /mnt/boot
|
||||
|
||||
|
||||
|
||||
nixos-generate-config --root /mnt
|
||||
|
||||
# Add `"compress=zstd" "noatime"` to all btrfs fileSystem entries
|
||||
# Add `neededForBoot = true;` to the logging subvolume
|
||||
nano /mnt/etc/nixos/hardware-configuration.nix
|
||||
|
||||
echo "Initial setup complete :D"
|
||||
nixos-install
|
||||
reboot
|
||||
22
erase-your-darlings-todo.md
Normal file
22
erase-your-darlings-todo.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# TO DO
|
||||
|
||||
- Create option that enables the symlinks and such
|
||||
- make default user have a hashedPasswordFile
|
||||
|
||||
|
||||
|
||||
## Option
|
||||
|
||||
```nix
|
||||
# duh, nixos directory needs to be persistent
|
||||
# and machine idrk why but the guide has it lmao
|
||||
environment.etc = {
|
||||
nixos.source = "/persist/etc/nixos";
|
||||
machine-id.source = "/persist/etc/machine-id";
|
||||
};
|
||||
|
||||
# This gets erased and it's really annoying to see the lecture everytime
|
||||
security.sudo.extraConfig = ''
|
||||
Defaults lecture = never
|
||||
'';
|
||||
```
|
||||
|
|
@ -21,6 +21,8 @@ in {
|
|||
age.secrets = {
|
||||
wifi.file = secretFile "wifi";
|
||||
|
||||
password.file = secretFile "password";
|
||||
|
||||
personalSSHpub = {
|
||||
file = secretFile "ssh/id_personal.pub";
|
||||
owner = username;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ in {
|
|||
defaultStrategy = "school";
|
||||
strategies = {
|
||||
"school" = {
|
||||
movingAverageInterval = 10;
|
||||
movingAverageInterval = 20;
|
||||
speedCurve = [
|
||||
{
|
||||
temp = 40;
|
||||
|
|
@ -34,7 +34,7 @@ in {
|
|||
speed = 60;
|
||||
}
|
||||
{
|
||||
temp = 75;
|
||||
temp = 80;
|
||||
speed = 100;
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ in {
|
|||
};
|
||||
|
||||
users.users.${username} = {
|
||||
initialPassword = "1234";
|
||||
hashedPasswordFile = config.age.secrets.password.path;
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPpt0NisTZPYDdumMXhxaKv3JygSE0EKE6OiYw4A8ot7"
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ in {
|
|||
repeatDelay = 300;
|
||||
followMouse = 1;
|
||||
sensitivity = 0.0;
|
||||
touchpad.naturalScroll = true;
|
||||
touchpad.naturalScroll = false;
|
||||
numlockByDefault = true;
|
||||
|
||||
touchpad.disableWhileTyping = true;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ let
|
|||
"ssh/id_github.pub"
|
||||
"ssh/config"
|
||||
"containers/forgejo-secret"
|
||||
"password"
|
||||
];
|
||||
attrs = map (secret: {"secrets/${secret}.age".publicKeys = all;}) secrets;
|
||||
in
|
||||
|
|
|
|||
19
secrets/password.age
Normal file
19
secrets/password.age
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IC9tczZkdyBXeFlS
|
||||
OGVLMWMrZzZjSG56MTIwS2FYbXNhZ1ZuOHFDWjZqNE94QU16OFZjClFPRm9Da1px
|
||||
QXRxa2RQUnRJRmJ1UW1qbTBmOTdQaWQ5VnMzZnRpUU9BeU0KLT4gc3NoLWVkMjU1
|
||||
MTkgZ1BJZFpBIFJyRlp6N0pQSXp4ZDBEVVNkT3REUm8vcjRIcmhrZHlOczlsUXRi
|
||||
OEx2M00KdXNHSVZIT3hkQTFxZmdVaXpDTDFsbEgrSmNVMEphKy9OWXhXNVI5QVYr
|
||||
TQotPiBzc2gtZWQyNTUxOSBXeUlGekEgcnRvNWlaQzQ2VldHaDlzNkNzWWpKTjkw
|
||||
VHF3S09aSEp2QzR5d29NSE9oUQpNSjZsemc2OE9lb3QzRG1ZeWRKNHAxWEpTK0Nl
|
||||
Q3FydHAwTk5oc1pvRUZrCi0+IHNzaC1lZDI1NTE5IGRiT2VoQSBPOVhHRmtoNUpW
|
||||
U2txMVY5QjZLa2Q3Qk5BcElQanI3RklXOEwyc0hMaWtjCjBFR0pKUUpwOTFaTVBi
|
||||
dFBKTHRRaTkzMEt4UkcvVUR4MmJrTWJCSko5bWsKLT4gc3NoLWVkMjU1MTkgdHYv
|
||||
Q3pnIHRrOWZGL2t5OENlR2NBM1RsMHBUTDhJNnROYllvM1ptbmNoYXo1NDFjSEEK
|
||||
ejhpekRDR2g1djlrcElQRlJqdnZJS3Q5bFhEZmtqT21XWXNMUjVYTm8wNAotPiA6
|
||||
Zz4pKS1ncmVhc2UgQ1UpID1mVCA2ZU59IEgKODBjRWlKOEJnMGRGRlZmWTV4Zmt2
|
||||
UWRXQjk5RW9BCi0tLSAvVyszb3FlY29TTTdvS2xCNEJBYmlpeHpYeU5DVUtVejZC
|
||||
N01UZUlTVmpZCqyalMf17mas7TuIVaQ4bind1P/7JXeW1pxZ8BAwKFX32iYgaV5R
|
||||
gE5AM8QTiHVZ2Slhutuhb1zIJbJA0lHbKnH03Hr91sn3NhsOKJxOA7execLqk6cb
|
||||
o+3UeoKVSEuHXPE8L7imbWSnNWk=
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
Loading…
Add table
Add a link
Reference in a new issue