Bunch of shit

This commit is contained in:
KoenDR06 2026-03-24 01:04:55 +01:00
parent 06520092e8
commit d8653015d5
9 changed files with 104 additions and 5 deletions

View file

@ -18,7 +18,7 @@ in {
home-manager.users.${username}.xdg.configFile."dunst/dunstrc".text = '' home-manager.users.${username}.xdg.configFile."dunst/dunstrc".text = ''
[global] [global]
origin = top-left origin = top-left
offset = (0, -46) offset = (0, 0)
font = CaskaydiaCove Nerd Font 12 font = CaskaydiaCove Nerd Font 12
corner_radius = 10 corner_radius = 10
gap_size = 3 gap_size = 3

View 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

View 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
'';
```

View file

@ -21,6 +21,8 @@ in {
age.secrets = { age.secrets = {
wifi.file = secretFile "wifi"; wifi.file = secretFile "wifi";
password.file = secretFile "password";
personalSSHpub = { personalSSHpub = {
file = secretFile "ssh/id_personal.pub"; file = secretFile "ssh/id_personal.pub";
owner = username; owner = username;

View file

@ -19,7 +19,7 @@ in {
defaultStrategy = "school"; defaultStrategy = "school";
strategies = { strategies = {
"school" = { "school" = {
movingAverageInterval = 10; movingAverageInterval = 20;
speedCurve = [ speedCurve = [
{ {
temp = 40; temp = 40;
@ -34,7 +34,7 @@ in {
speed = 60; speed = 60;
} }
{ {
temp = 75; temp = 80;
speed = 100; speed = 100;
} }
]; ];

View file

@ -48,7 +48,7 @@ in {
}; };
users.users.${username} = { users.users.${username} = {
initialPassword = "1234"; hashedPasswordFile = config.age.secrets.password.path;
isNormalUser = true; isNormalUser = true;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPpt0NisTZPYDdumMXhxaKv3JygSE0EKE6OiYw4A8ot7" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPpt0NisTZPYDdumMXhxaKv3JygSE0EKE6OiYw4A8ot7"

View file

@ -151,7 +151,7 @@ in {
repeatDelay = 300; repeatDelay = 300;
followMouse = 1; followMouse = 1;
sensitivity = 0.0; sensitivity = 0.0;
touchpad.naturalScroll = true; touchpad.naturalScroll = false;
numlockByDefault = true; numlockByDefault = true;
touchpad.disableWhileTyping = true; touchpad.disableWhileTyping = true;

View file

@ -18,6 +18,7 @@ let
"ssh/id_github.pub" "ssh/id_github.pub"
"ssh/config" "ssh/config"
"containers/forgejo-secret" "containers/forgejo-secret"
"password"
]; ];
attrs = map (secret: {"secrets/${secret}.age".publicKeys = all;}) secrets; attrs = map (secret: {"secrets/${secret}.age".publicKeys = all;}) secrets;
in in

19
secrets/password.age Normal file
View 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-----