format the repo files
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
# ├─ ./hosts
|
||||
# │ └─ ./laptop
|
||||
# │ ├─ default.nix *
|
||||
# │ └─ hardware-configuration.nix
|
||||
# │ └─ hardware-configuration.nix
|
||||
# └─ ./modules
|
||||
# ├─ ./desktop
|
||||
# │ └─ ./hyprland
|
||||
@@ -16,57 +16,69 @@
|
||||
# └─ ./hardware
|
||||
# └─ default.nix
|
||||
#
|
||||
|
||||
{ config, pkgs, user, ... }:
|
||||
|
||||
{
|
||||
imports = # For now, if applying to other system, swap files
|
||||
[(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
||||
config,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
# For now, if applying to other system, swap files
|
||||
[(import ./hardware-configuration.nix)]
|
||||
++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
||||
|
||||
#[(import ../../modules/wm/hyprland/default.nix)] ++ # Window Manager
|
||||
# [(import ../../modules/wm/sway/default.nix)] ++ # Window Manager
|
||||
[(import ../../modules/wm/virtualisation/docker.nix)] ++ # Docker
|
||||
[(import ../../modules/wm/virtualisation/kvm-intel.nix)] ++ # kvm module options
|
||||
(import ../../modules/hardware) ++
|
||||
(import ../../modules/services/printer); # Hardware devices
|
||||
# [(import ../../modules/wm/sway/default.nix)] ++ # Window Manager
|
||||
[(import ../../modules/wm/virtualisation/docker.nix)]
|
||||
++ # Docker
|
||||
[(import ../../modules/wm/virtualisation/kvm-intel.nix)]
|
||||
++ # kvm module options
|
||||
(import ../../modules/hardware)
|
||||
++ (import ../../modules/services/printer); # Hardware devices
|
||||
|
||||
boot = { # Boot options
|
||||
boot = {
|
||||
# Boot options
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
loader = { # EFI Boot
|
||||
loader = {
|
||||
# EFI Boot
|
||||
systemd-boot.enable = true;
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
timeout = 1; # Grub auto select time
|
||||
timeout = 1; # Grub auto select time
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
intel-media-driver
|
||||
];
|
||||
};
|
||||
|
||||
programs = { # No xbacklight, this is the alterantive
|
||||
programs = {
|
||||
# No xbacklight, this is the alterantive
|
||||
light.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
tlp = {
|
||||
enable = true; # TLP and auto-cpufreq for power management
|
||||
enable = true; # TLP and auto-cpufreq for power management
|
||||
settings = {
|
||||
USB_DENYLIST="fc32:1287 1e7d:2e4a 1d5c:5500 1d5c:5510";
|
||||
USB_DENYLIST = "fc32:1287 1e7d:2e4a 1d5c:5500 1d5c:5510";
|
||||
};
|
||||
};
|
||||
|
||||
logind.lidSwitch = "suspend-then-hibernate"; # Laptop does not go to sleep when lid is closed
|
||||
logind.lidSwitch = "suspend-then-hibernate"; # Laptop does not go to sleep when lid is closed
|
||||
#auto-cpufreq.enable = true;
|
||||
blueman.enable = true;
|
||||
avahi = { # Needed to find wireless printer
|
||||
avahi = {
|
||||
# Needed to find wireless printer
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
publish = { # Needed for detecting the scanner
|
||||
publish = {
|
||||
# Needed for detecting the scanner
|
||||
enable = true;
|
||||
addresses = true;
|
||||
userServices = true;
|
||||
@@ -75,8 +87,8 @@
|
||||
};
|
||||
|
||||
#temporary bluetooth fix
|
||||
# systemd.tmpfiles.rules = [
|
||||
# "d /var/lib/bluetooth 700 root root - -"
|
||||
# ];
|
||||
# systemd.targets."bluetooth".after = ["systemd-tmpfiles-setup.service"];
|
||||
# systemd.tmpfiles.rules = [
|
||||
# "d /var/lib/bluetooth 700 root root - -"
|
||||
# ];
|
||||
# systemd.targets."bluetooth".after = ["systemd-tmpfiles-setup.service"];
|
||||
}
|
||||
|
||||
@@ -10,32 +10,36 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" "rtsx_usb_sdmmc" ];
|
||||
kernelModules = [ "i915" "kvm_intel" ];
|
||||
systemd.enable = true;
|
||||
luks = {
|
||||
devices."root" = {
|
||||
device = "/dev/disk/by-uuid/75eccc7f-30b0-4fe8-8f82-90edaf284cd5";
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
initrd = {
|
||||
availableKernelModules = ["ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" "rtsx_usb_sdmmc"];
|
||||
kernelModules = ["i915" "kvm_intel"];
|
||||
systemd.enable = true;
|
||||
luks = {
|
||||
devices."root" = {
|
||||
device = "/dev/disk/by-uuid/75eccc7f-30b0-4fe8-8f82-90edaf284cd5";
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModprobeConfig = ''
|
||||
options i915 enable_guc=3 enable_fbc=1 fastboot=1
|
||||
'';
|
||||
kernelParams = [ "mitigations=off" "luks.options=fido2-device=auto" ];
|
||||
tmp.useTmpfs = true;
|
||||
kernelModules = ["kvm-intel"];
|
||||
extraModprobeConfig = ''
|
||||
options i915 enable_guc=3 enable_fbc=1 fastboot=1
|
||||
'';
|
||||
kernelParams = ["mitigations=off" "luks.options=fido2-device=auto"];
|
||||
tmp.useTmpfs = true;
|
||||
};
|
||||
|
||||
zramSwap.enable = true;
|
||||
@@ -49,110 +53,108 @@
|
||||
};
|
||||
|
||||
services.btrbk = {
|
||||
instances = {
|
||||
hf = {
|
||||
onCalendar = "hourly";
|
||||
settings = {
|
||||
incremental = "yes";
|
||||
snapshot_create = "ondemand";
|
||||
snapshot_dir = "@snapshots";
|
||||
timestamp_format = "long";
|
||||
instances = {
|
||||
hf = {
|
||||
onCalendar = "hourly";
|
||||
settings = {
|
||||
incremental = "yes";
|
||||
snapshot_create = "ondemand";
|
||||
snapshot_dir = "@snapshots";
|
||||
timestamp_format = "long";
|
||||
|
||||
snapshot_preserve = "2m 2w 5d 5h";
|
||||
snapshot_preserve_min = "latest";
|
||||
|
||||
volume = {
|
||||
"/mnt/snapshots/root" = {
|
||||
snapshot_create = "always";
|
||||
subvolume = {
|
||||
"@home" = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
snapshot_preserve = "2m 2w 5d 5h";
|
||||
snapshot_preserve_min = "latest";
|
||||
|
||||
volume = {
|
||||
"/mnt/snapshots/root" = {
|
||||
snapshot_create = "always";
|
||||
subvolume = {
|
||||
"@home" = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async" ];
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async" ];
|
||||
};
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||
};
|
||||
|
||||
fileSystems."/srv" =
|
||||
{ device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async" ];
|
||||
};
|
||||
fileSystems."/srv" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||
};
|
||||
|
||||
fileSystems."/opt" =
|
||||
{ device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@opt,discard=async" ];
|
||||
};
|
||||
fileSystems."/opt" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@opt,discard=async"];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ];
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/snapshots/root" =
|
||||
{ device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async" ];
|
||||
};
|
||||
fileSystems."/mnt/snapshots/root" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/Pluto" =
|
||||
{ device = "jupiter:/Pluto";
|
||||
fsType = "nfs";
|
||||
options = [ "noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2" ];
|
||||
};
|
||||
fileSystems."/mnt/Pluto" = {
|
||||
device = "jupiter:/Pluto";
|
||||
fsType = "nfs";
|
||||
options = ["noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/Mars" =
|
||||
{ device = "jupiter:/Mars";
|
||||
fsType = "nfs";
|
||||
options = [ "noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2" ];
|
||||
};
|
||||
fileSystems."/mnt/Mars" = {
|
||||
device = "jupiter:/Mars";
|
||||
fsType = "nfs";
|
||||
options = ["noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
||||
};
|
||||
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
networking = {
|
||||
useDHCP = false; # Deprecated
|
||||
useDHCP = false; # Deprecated
|
||||
hostName = "nbf5";
|
||||
wireless = {
|
||||
iwd.enable = true;
|
||||
interfaces = [ "wlan0" ];
|
||||
interfaces = ["wlan0"];
|
||||
};
|
||||
interfaces = {
|
||||
wlan0 = {
|
||||
useDHCP = true; # For versatility sake, manually edit IP on nm-applet.
|
||||
useDHCP = true; # For versatility sake, manually edit IP on nm-applet.
|
||||
};
|
||||
};
|
||||
firewall = {
|
||||
enable = true;
|
||||
#allowedUDPPorts = [ 53 67 ];
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
allowedTCPPorts = [80 443];
|
||||
};
|
||||
};
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
powerManagement = {
|
||||
cpuFreqGovernor = lib.mkDefault "schedutil";
|
||||
powertop.enable = true;
|
||||
powertop.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,26 +10,23 @@
|
||||
# └─ ./hyprland
|
||||
# └─ hyprland.nix
|
||||
#
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
#../../modules/wm/hyprland/home.nix # Window Manager
|
||||
#../../modules/wm/sway/home.nix # Window Manager
|
||||
../../modules/home.nix # Window Manager
|
||||
];
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
#../../modules/wm/hyprland/home.nix # Window Manager
|
||||
#../../modules/wm/sway/home.nix # Window Manager
|
||||
../../modules/home.nix # Window Manager
|
||||
];
|
||||
|
||||
home = { # Specific packages for laptop
|
||||
home = {
|
||||
# Specific packages for laptop
|
||||
packages = with pkgs; [
|
||||
# Applications
|
||||
firefox
|
||||
intel-gpu-tools
|
||||
pulsemixer
|
||||
|
||||
|
||||
# Display
|
||||
light # xorg.xbacklight not supported. Other option is just use xrandr.
|
||||
light # xorg.xbacklight not supported. Other option is just use xrandr.
|
||||
|
||||
# Power Management
|
||||
#auto-cpufreq # Power management
|
||||
@@ -41,11 +38,11 @@
|
||||
alacritty.settings.font.size = 11;
|
||||
};
|
||||
|
||||
services = { # Applets
|
||||
blueman-applet.enable = true; # Bluetooth
|
||||
network-manager-applet.enable = true; # Network
|
||||
services = {
|
||||
# Applets
|
||||
blueman-applet.enable = true; # Bluetooth
|
||||
network-manager-applet.enable = true; # Network
|
||||
};
|
||||
|
||||
xsession.preferStatusNotifierItems = true;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user