updates and some reorganizing
This commit is contained in:
@@ -15,6 +15,7 @@ let
|
||||
hostname = "matt-nixos";
|
||||
gnome = false;
|
||||
plasma = true;
|
||||
cosmic = false;
|
||||
|
||||
resetNetworkScript = pkgs.writeScriptBin "reset-network" ''
|
||||
#!/usr/bin/env bash
|
||||
@@ -33,6 +34,8 @@ in
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./boot.nix
|
||||
./filesystems.nix
|
||||
# ../../cachix/cachix.nix
|
||||
../default.nix
|
||||
];
|
||||
@@ -46,44 +49,6 @@ in
|
||||
|
||||
apps.discover-wrapped.enable = plasma;
|
||||
|
||||
# Configure bootloader with lanzaboot and secureboot
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = false;
|
||||
configurationLimit = 2;
|
||||
};
|
||||
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
};
|
||||
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
settings = {
|
||||
default = "@saved";
|
||||
console-mode = "max";
|
||||
};
|
||||
configurationLimit = 5;
|
||||
};
|
||||
|
||||
# Override kernel to latest
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
# needed cause ssd powersaving is broken af I guess
|
||||
"nvme_core.default_ps_max_latency_us=0"
|
||||
"pcie_aspm=off"
|
||||
];
|
||||
|
||||
consoleLogLevel = 3;
|
||||
bootspec.enable = true;
|
||||
};
|
||||
|
||||
# Services configs
|
||||
services = {
|
||||
# Enable the X11 windowing system.
|
||||
@@ -102,11 +67,14 @@ in
|
||||
displayManager = {
|
||||
sddm.enable = plasma;
|
||||
sddm.wayland.enable = plasma;
|
||||
defaultSession = if plasma then "plasma" else "gnome";
|
||||
# defaultSession = if plasma then "plasma" else "gnome";
|
||||
};
|
||||
|
||||
desktopManager.plasma6.enable = plasma;
|
||||
|
||||
desktopManager.cosmic.enable = cosmic;
|
||||
displayManager.cosmic-greeter.enable = cosmic;
|
||||
|
||||
# enable auto discovery of printers
|
||||
avahi = {
|
||||
enable = true;
|
||||
@@ -117,17 +85,32 @@ in
|
||||
# Enable Flatpak
|
||||
flatpak.enable = true;
|
||||
|
||||
flatpak.packages = [
|
||||
"com.discordapp.Discord"
|
||||
"com.spotify.Client"
|
||||
"com.visualstudio.code"
|
||||
"it.mijorus.gearlever"
|
||||
"org.libreoffice.LibreOffice"
|
||||
"net.davidotek.pupgui2" # Proton-Up Qt
|
||||
"io.github.prateekmedia.appimagepool"
|
||||
"org.freedesktop.Piper"
|
||||
"com.usebottles.bottles"
|
||||
];
|
||||
borgbackup.jobs.home-matt = {
|
||||
encryption.mode = "repokey";
|
||||
encryption.passCommand = "cat /root/borg";
|
||||
environment.BORG_RSH = "ssh -i /home/matt/.ssh/id_ed25519";
|
||||
repo = "/media/nas/backup/desktop-nix/borg/home";
|
||||
compression = "auto,zstd";
|
||||
inhibitsSleep = true;
|
||||
paths = "/home/matt";
|
||||
exclude = [
|
||||
"/home/matt/Games"
|
||||
"/home/matt/1TB"
|
||||
];
|
||||
};
|
||||
|
||||
btrfs = {
|
||||
autoScrub.enable = true;
|
||||
autoScrub.fileSystems = [
|
||||
"/nix"
|
||||
"/root"
|
||||
"/etc"
|
||||
"/var/log"
|
||||
"/home"
|
||||
];
|
||||
};
|
||||
|
||||
ratbagd.enable = true;
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
@@ -224,80 +207,6 @@ in
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
services = {
|
||||
borgbackup.jobs.home-matt = {
|
||||
encryption.mode = "repokey";
|
||||
encryption.passCommand = "cat /root/borg";
|
||||
environment.BORG_RSH = "ssh -i /home/matt/.ssh/id_ed25519";
|
||||
repo = "/media/nas/backup/desktop-nix/borg/home";
|
||||
compression = "auto,zstd";
|
||||
inhibitsSleep = true;
|
||||
paths = "/home/matt";
|
||||
exclude = [
|
||||
"/home/matt/Games"
|
||||
"/home/matt/1TB"
|
||||
];
|
||||
};
|
||||
|
||||
btrfs = {
|
||||
autoScrub.enable = true;
|
||||
autoScrub.fileSystems = [
|
||||
"/nix"
|
||||
"/root"
|
||||
"/etc"
|
||||
"/var/log"
|
||||
"/home"
|
||||
];
|
||||
};
|
||||
|
||||
ratbagd.enable = true;
|
||||
};
|
||||
|
||||
fileSystems."/media/nas/backup" = {
|
||||
device = "//10.0.1.18/Backup";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"sec=none"
|
||||
"x-systemd.automount"
|
||||
"auto"
|
||||
"rw"
|
||||
"file_mode=0775"
|
||||
"dir_mode=0775"
|
||||
"uid=matt"
|
||||
"gid=wheel"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/media/nas/isos" = {
|
||||
device = "//10.0.1.18/isos";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"sec=none"
|
||||
"x-systemd.automount"
|
||||
"auto"
|
||||
"rw"
|
||||
"file_mode=0775"
|
||||
"dir_mode=0775"
|
||||
"uid=matt"
|
||||
"gid=wheel"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/media/nas/3d_printer" = {
|
||||
device = "//10.0.1.18/3d_printer";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"sec=none"
|
||||
"x-systemd.automount"
|
||||
"auto"
|
||||
"rw"
|
||||
"file_mode=0775"
|
||||
"dir_mode=0775"
|
||||
"uid=matt"
|
||||
"gid=wheel"
|
||||
];
|
||||
};
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user