Make pianonix work

This commit is contained in:
2024-11-26 14:03:41 +01:00
parent b0a22014c3
commit 6bfa5e0b73
9 changed files with 616 additions and 284 deletions

View File

@ -1,103 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
lib,
inputs,
config,
pkgs,
...
}:
{
imports = [ ./disko-config.nix ];
disko.devices.disk.main.device = "/dev/sda";
networking.networkmanager.enable = true;
networking.hostName = "pianonix"; # Define your hostname.
# Set your time zone.
time.timeZone = "Europe/Berlin";
modules = {
nix-settings.enable = true;
xserver-defaults.enable = true;
keymap.enable = true;
builder.enable = false;
system.boot-efi.enable = true;
sound.enable = true;
locales.enable = true;
pcmanfm.enable = true;
# i3.enable = true;
# gdm.enable = true;
redshift.enable = true;
wayland.enable = true;
# hyprland.enable = true;
# tuigreet.enable = true;
# virtualbox.enable = true;
users-julian.enable = true;
# syncthing.enable = true;
xdg-portal.enable = true;
polkit.enable = true;
keyring.enable = true;
};
users.mutableUsers = false;
users.users.root.hashedPassword = "$y$j9T$mDQgl0GARH9fKg01akW1V0$2E5Z4TVra0RbY.tO2B6rW2YnVtJ6tbzZkJRvGWciSkB";
# no password
users.users.julian.hashedPassword = "$y$j9T$khuv2ubKt48fkWS754jkL1$/YSqi4mWV9ccfnMAWCF0yumnwZrJ/ddg2TZTuZaDsi8";
# Enable the Desktop Environment.
# services.xserver.displayManager.lightdm.enable = true;
services.displayManager.autoLogin = {
enable = true;
user = "julian";
};
services.xserver.desktopManager = {
# xterm.enable = false;
lxqt = {
enable = true;
};
};
xdg.portal.lxqt.enable = true;
services.openssh = {
enable = true;
# require public key authentication for better security
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
settings.PermitRootLogin = "yes";
};
users.users."root".openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDVk/m4ydcYXzHxTWeNw2MlwxKU+JirTVOeHsYR4wdTokwYyNWZ3/zPcU4+XekSRatwJW1LJYrZ1Y5IJkobzgnOvYVI7SXZ1Tbzb1kAcnChSt+Dp/pKdMPZ8yY3PTFZh+R5F3rWFA/YZqTRhh0vuxPIVbLl7zOPExWwYGn9crkZaYZvKHVvgE5660hXo9pxbUKsSs+DIy/AE7gfKiZLusY95nk9T/jZ7Vmhl0UsF0RiDsfxgE664/vEKe8b+82kKCDt5nJVe8THSrjaw4+NUhef6R8UoUO1/Pn4TKq3Gil3Z36wPEPdkw2lYzX+d1EFyaC3hZJedSUfdFliPOejIbNvvhPBBD1wAGxxyuJZB5KLwWN7/efwCgw45buLbVfUuwwug7K7GK84A3yzqClbZKKv8rYdO04UG64A+Taq2LeyxQIDjygTgGk/1j/0Neb1RO0FbjlbTeNMZ54P+u7BTEcikJCsbFeseWDtYzupQtLt96KMbcdRgHy0CTGqFHE+my8= julian@julian-aspi"
];
# Packages needed as root
environment.systemPackages = with pkgs; [
vim
htop
mc
];
## Raspberry pi specific config
# Prevent host becoming unreachable on wifi after some time (for raspberry pi)
networking.networkmanager.wifi.powersave = false;
# Enable audio devices on raspberry pi
boot.kernelParams = [
"snd_bcm2835.enable_hdmi=1"
"snd_bcm2835.enable_headphones=1"
];
boot.loader.raspberryPi.firmwareConfig = ''
dtparam=audio=on
'';
# ======================== DO NOT CHANGE THIS ========================
system.stateVersion = "22.11";
# ======================== DO NOT CHANGE THIS ========================
}

View File

@ -1,41 +0,0 @@
# USAGE in your configuration.nix.
# Update devices to match your hardware.
# {
# imports = [ ./disko-config.nix ];
# disko.devices.disk.main.device = "/dev/sda";
# }
{
disko.devices = {
disk = {
main = {
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}

View File

@ -1,80 +0,0 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
# TODO: This has to adapted yet !!!
boot.initrd.availableKernelModules = [
"vmd"
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices = {
root = {
device = "/dev/disk/by-uuid/a4dc9a2c-725b-4252-8fbb-093a271c31ba";
preLVM = true;
allowDiscards = true;
};
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/bbc45be3-75f5-40c5-8427-2a425de8422c";
fsType = "btrfs";
options = [
"subvol=root"
"compress=zstd"
];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/bbc45be3-75f5-40c5-8427-2a425de8422c";
fsType = "btrfs";
options = [
"subvol=home"
"compress=zstd"
];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/bbc45be3-75f5-40c5-8427-2a425de8422c";
fsType = "btrfs";
options = [
"subvol=nix"
"compress=zstd"
"noatime"
];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7040-F37C";
fsType = "vfat";
};
swapDevices = [ { device = "/dev/disk/by-uuid/26140b4a-0579-406d-a484-35aa31b32e80"; } ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}