diff --git a/dots/.config/dunst/dunstrc.nix b/dots/.config/dunst/dunstrc.nix index 50c59ea..b88b911 100644 --- a/dots/.config/dunst/dunstrc.nix +++ b/dots/.config/dunst/dunstrc.nix @@ -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 diff --git a/erase-your-darlings-setup.sh b/erase-your-darlings-setup.sh new file mode 100644 index 0000000..b77c0ad --- /dev/null +++ b/erase-your-darlings-setup.sh @@ -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 diff --git a/erase-your-darlings-todo.md b/erase-your-darlings-todo.md new file mode 100644 index 0000000..42e0303 --- /dev/null +++ b/erase-your-darlings-todo.md @@ -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 +''; +``` diff --git a/modules/base/secrets.nix b/modules/base/secrets.nix index 429d96e..8526bcb 100644 --- a/modules/base/secrets.nix +++ b/modules/base/secrets.nix @@ -21,6 +21,8 @@ in { age.secrets = { wifi.file = secretFile "wifi"; + password.file = secretFile "password"; + personalSSHpub = { file = secretFile "ssh/id_personal.pub"; owner = username; diff --git a/modules/hardware/fans.nix b/modules/hardware/fans.nix index b3c2e65..2eb3deb 100644 --- a/modules/hardware/fans.nix +++ b/modules/hardware/fans.nix @@ -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; } ]; diff --git a/modules/users/default.nix b/modules/users/default.nix index 607f935..12aa366 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -48,7 +48,7 @@ in { }; users.users.${username} = { - initialPassword = "1234"; + hashedPasswordFile = config.age.secrets.password.path; isNormalUser = true; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPpt0NisTZPYDdumMXhxaKv3JygSE0EKE6OiYw4A8ot7" diff --git a/modules/wm/hyprland/default.nix b/modules/wm/hyprland/default.nix index 28c00c3..c209f96 100644 --- a/modules/wm/hyprland/default.nix +++ b/modules/wm/hyprland/default.nix @@ -151,7 +151,7 @@ in { repeatDelay = 300; followMouse = 1; sensitivity = 0.0; - touchpad.naturalScroll = true; + touchpad.naturalScroll = false; numlockByDefault = true; touchpad.disableWhileTyping = true; diff --git a/secrets.nix b/secrets.nix index edb111b..e4f4976 100644 --- a/secrets.nix +++ b/secrets.nix @@ -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 diff --git a/secrets/password.age b/secrets/password.age new file mode 100644 index 0000000..b42ad08 --- /dev/null +++ b/secrets/password.age @@ -0,0 +1,19 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IC9tczZkdyBXeFlS +OGVLMWMrZzZjSG56MTIwS2FYbXNhZ1ZuOHFDWjZqNE94QU16OFZjClFPRm9Da1px +QXRxa2RQUnRJRmJ1UW1qbTBmOTdQaWQ5VnMzZnRpUU9BeU0KLT4gc3NoLWVkMjU1 +MTkgZ1BJZFpBIFJyRlp6N0pQSXp4ZDBEVVNkT3REUm8vcjRIcmhrZHlOczlsUXRi +OEx2M00KdXNHSVZIT3hkQTFxZmdVaXpDTDFsbEgrSmNVMEphKy9OWXhXNVI5QVYr +TQotPiBzc2gtZWQyNTUxOSBXeUlGekEgcnRvNWlaQzQ2VldHaDlzNkNzWWpKTjkw +VHF3S09aSEp2QzR5d29NSE9oUQpNSjZsemc2OE9lb3QzRG1ZeWRKNHAxWEpTK0Nl +Q3FydHAwTk5oc1pvRUZrCi0+IHNzaC1lZDI1NTE5IGRiT2VoQSBPOVhHRmtoNUpW +U2txMVY5QjZLa2Q3Qk5BcElQanI3RklXOEwyc0hMaWtjCjBFR0pKUUpwOTFaTVBi +dFBKTHRRaTkzMEt4UkcvVUR4MmJrTWJCSko5bWsKLT4gc3NoLWVkMjU1MTkgdHYv +Q3pnIHRrOWZGL2t5OENlR2NBM1RsMHBUTDhJNnROYllvM1ptbmNoYXo1NDFjSEEK +ejhpekRDR2g1djl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