summaryrefslogtreecommitdiff
path: root/modules/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'modules/hosts')
-rw-r--r--modules/hosts/T430/configuration.nix1
-rw-r--r--modules/hosts/T430/home.nix1
-rw-r--r--modules/hosts/T495/configuration.nix8
-rw-r--r--modules/hosts/T495/home.nix10
-rw-r--r--modules/hosts/X230/configuration.nix15
-rw-r--r--modules/hosts/X230/hardware-configuration.nix48
-rw-r--r--modules/hosts/X230/home.nix18
-rw-r--r--modules/hosts/hp-envy-office/configuration.nix5
-rw-r--r--modules/hosts/hp-envy-office/home.nix7
-rw-r--r--modules/hosts/libreX60/bios-flashing.nix8
-rw-r--r--modules/hosts/libreX60/configuration.nix26
-rw-r--r--modules/hosts/libreX60/hardware-configuration.nix46
-rw-r--r--modules/hosts/libreX60/home.nix18
-rw-r--r--modules/hosts/libreX60/powertop-auto-tune.nix17
-rw-r--r--modules/hosts/optiplex/configuration.nix49
-rw-r--r--modules/hosts/optiplex/hardware-configuration.nix45
-rw-r--r--modules/hosts/optiplex/home.nix7
17 files changed, 313 insertions, 16 deletions
diff --git a/modules/hosts/T430/configuration.nix b/modules/hosts/T430/configuration.nix
index 282515d..7910275 100644
--- a/modules/hosts/T430/configuration.nix
+++ b/modules/hosts/T430/configuration.nix
@@ -1,6 +1,5 @@
{ config, lib, pkgs, ... }: {
imports = [ ./hardware-configuration.nix ];
- networking.hostName = "T430";
# TODO this does not function
#boot.initrd.systemd.extraBin = {
diff --git a/modules/hosts/T430/home.nix b/modules/hosts/T430/home.nix
index 9885a06..15df79a 100644
--- a/modules/hosts/T430/home.nix
+++ b/modules/hosts/T430/home.nix
@@ -1,6 +1,5 @@
{ ... }: {
imports = [ ../../home ];
- alacritty.font.size = 9;
wallpapers.enable = true;
}
diff --git a/modules/hosts/T495/configuration.nix b/modules/hosts/T495/configuration.nix
index 526b7bb..6ee62e9 100644
--- a/modules/hosts/T495/configuration.nix
+++ b/modules/hosts/T495/configuration.nix
@@ -2,11 +2,9 @@
imports = [
./hardware-configuration.nix
./games.nix
- ./input-leap.nix
+ #./input-leap.nix
./wg.nix
];
- networking.hostName = "T495";
-
bootloader.mode = "efi";
# Enable extra software pkgs
@@ -27,10 +25,6 @@
nas.office.enable = true;
nas.office.automount = false;
- networking.hosts = {
- "192.168.77.3" = [ "devel" ];
- };
-
# Use amdgpu driver for x11
services.xserver.videoDrivers = [ "amdgpu" ];
diff --git a/modules/hosts/T495/home.nix b/modules/hosts/T495/home.nix
index 817b0c0..4fac32b 100644
--- a/modules/hosts/T495/home.nix
+++ b/modules/hosts/T495/home.nix
@@ -1,8 +1,14 @@
{ ... }: {
imports = [ ../../home ];
- theme.mint.theme.color = "Dark-Purple";
- theme.mint.icons.color = "Purple";
+ theme = {
+ mint.theme.color = "Dark-Purple";
+ mint.icons.color = "Purple";
+ st = {
+ enable = true;
+ font = "Tamzen:pixelsize=20";
+ };
+ };
wallpapers.enable = true;
home.file.input-leap-config = {
diff --git a/modules/hosts/X230/configuration.nix b/modules/hosts/X230/configuration.nix
new file mode 100644
index 0000000..9a8e6b4
--- /dev/null
+++ b/modules/hosts/X230/configuration.nix
@@ -0,0 +1,15 @@
+{ config, lib, pkgs, ... }: {
+ imports = [
+ ./hardware-configuration.nix
+ ];
+ bootloader.mode = "efi";
+
+ # Enable extra software pkgs
+ software.desktop = {
+ crypto.enable = true;
+ graphics.enable = true;
+ office.enable = true;
+ };
+
+ system.stateVersion = "24.05";
+}
diff --git a/modules/hosts/X230/hardware-configuration.nix b/modules/hosts/X230/hardware-configuration.nix
new file mode 100644
index 0000000..0791585
--- /dev/null
+++ b/modules/hosts/X230/hardware-configuration.nix
@@ -0,0 +1,48 @@
+# 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")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/41036740-73bc-4004-a302-01233b4d83b8";
+ fsType = "btrfs";
+ options = [ "subvol=@" ];
+ };
+
+ boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/6019772f-4a1c-4abd-9c70-b1d71cc2de65";
+
+ fileSystems."/home" =
+ { device = "/dev/disk/by-uuid/41036740-73bc-4004-a302-01233b4d83b8";
+ fsType = "btrfs";
+ options = [ "subvol=@home" ];
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/72D4-F66A";
+ fsType = "vfat";
+ options = [ "fmask=0022" "dmask=0022" ];
+ };
+
+ swapDevices = [ ];
+
+ # 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.enp0s25.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/modules/hosts/X230/home.nix b/modules/hosts/X230/home.nix
new file mode 100644
index 0000000..87a16ea
--- /dev/null
+++ b/modules/hosts/X230/home.nix
@@ -0,0 +1,18 @@
+{ ... }: {
+ imports = [ ../../home ];
+
+ theme = {
+ mint.theme.color = "Dark-Teal";
+ mint.icons.color = "Teal";
+ font = {
+ monospace = "Tamzen";
+ gtk.name = "monospace";
+ gtk.size = 8;
+ };
+ cursor.size = 24;
+ st = {
+ enable = true;
+ font = "Tamzen:pixelsize=14";
+ };
+ };
+}
diff --git a/modules/hosts/hp-envy-office/configuration.nix b/modules/hosts/hp-envy-office/configuration.nix
index 9a7a43a..fdff4f0 100644
--- a/modules/hosts/hp-envy-office/configuration.nix
+++ b/modules/hosts/hp-envy-office/configuration.nix
@@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }: {
- imports = [
- ./hardware-configuration.nix
- ];
- networking.hostName = "hp-envy-office";
+ imports = [ ./hardware-configuration.nix ];
# Enable extra software pkgs
software.desktop = {
diff --git a/modules/hosts/hp-envy-office/home.nix b/modules/hosts/hp-envy-office/home.nix
index ee56dc6..2e4f61f 100644
--- a/modules/hosts/hp-envy-office/home.nix
+++ b/modules/hosts/hp-envy-office/home.nix
@@ -1,7 +1,12 @@
-{ ... }: {
+{ userDetails, ... }: {
imports = [ ../../home ];
theme.mint.theme.color = "Dark-Green";
theme.mint.icons.color = "Green";
wallpapers.enable = true;
+
+ additional-gtk-bookmarks = with userDetails.userDirs; [
+ "file://${documents}/src/sites/admin Admin"
+ "file:///media/chexx/chexx cHEXx"
+ ];
}
diff --git a/modules/hosts/libreX60/bios-flashing.nix b/modules/hosts/libreX60/bios-flashing.nix
new file mode 100644
index 0000000..6117813
--- /dev/null
+++ b/modules/hosts/libreX60/bios-flashing.nix
@@ -0,0 +1,8 @@
+# https://libreboot.org/docs/install/#thinkpad-t60x60x60tabletx60s
+
+{ pkgs, ... }: {
+ environment.systemPackages = [ pkgs.flashprog ];
+
+ boot.kernelParams = [ "iomem=relaxed" ];
+}
+
diff --git a/modules/hosts/libreX60/configuration.nix b/modules/hosts/libreX60/configuration.nix
new file mode 100644
index 0000000..55f1774
--- /dev/null
+++ b/modules/hosts/libreX60/configuration.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }: {
+ imports = [
+ ./hardware-configuration.nix
+ ./powertop-auto-tune.nix
+ # Uncomment this module and reboot to enable bios flashing
+ #./bios-flashing.nix
+ ];
+
+ # Use grub
+ bootloader = {
+ loader = "grub";
+ mode = "bios";
+ grub.biosDevice = "/dev/sda";
+ };
+
+ # Use bootloader
+ boot.kernelPackages = pkgs.linuxPackages-libre;
+
+ # Enable network drives
+ nas.enable = true;
+
+ # i915 Gpu requires intel driver
+ services.xserver.videoDrivers = [ "intel" ];
+
+ system.stateVersion = "24.11";
+}
diff --git a/modules/hosts/libreX60/hardware-configuration.nix b/modules/hosts/libreX60/hardware-configuration.nix
new file mode 100644
index 0000000..b0a7868
--- /dev/null
+++ b/modules/hosts/libreX60/hardware-configuration.nix
@@ -0,0 +1,46 @@
+# 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")
+ ];
+
+ boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "ahci" "firewire_ohci" "usb_storage" "sd_mod" "sdhci_pci" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/91572803-436d-4f43-b41f-dfba2103752e";
+ fsType = "btrfs";
+ options = [ "subvol=@" ];
+ };
+
+ fileSystems."/home" =
+ { device = "/dev/disk/by-uuid/91572803-436d-4f43-b41f-dfba2103752e";
+ fsType = "btrfs";
+ options = [ "subvol=@home" ];
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/F618-D6C2";
+ fsType = "vfat";
+ options = [ "fmask=0022" "dmask=0022" ];
+ };
+
+ swapDevices = [ ];
+
+ # 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.wlp2s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/modules/hosts/libreX60/home.nix b/modules/hosts/libreX60/home.nix
new file mode 100644
index 0000000..5b35457
--- /dev/null
+++ b/modules/hosts/libreX60/home.nix
@@ -0,0 +1,18 @@
+{ ... }: {
+ imports = [ ../../home ];
+
+ theme = {
+ mint.theme.color = "Dark-Red";
+ mint.icons.color = "Red";
+ font = {
+ monospace = "Tamzen";
+ gtk.name = "monospace";
+ gtk.size = 8;
+ };
+ cursor.size = 24;
+ st = {
+ enable = true;
+ font = "Tamzen:pixelsize=14";
+ };
+ };
+}
diff --git a/modules/hosts/libreX60/powertop-auto-tune.nix b/modules/hosts/libreX60/powertop-auto-tune.nix
new file mode 100644
index 0000000..0eb9578
--- /dev/null
+++ b/modules/hosts/libreX60/powertop-auto-tune.nix
@@ -0,0 +1,17 @@
+# https://en.wikibooks.org/wiki/Libreboot/ThinkPad_X60#Remove_High_Pitched_Whining_Noise
+# TLDR; running `powertop --auto-tune` is supposed to kill the high pitched noises produced by the X60
+
+{ pkgs, ... }: {
+ environment.systemPackages = [ pkgs.powertop ];
+
+ # Create systemd service
+ systemd.services.powertop-autotune = {
+ description = "Powertop Auto-Tune";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${pkgs.powertop}/bin/powertop --auto-tune";
+ };
+ };
+}
diff --git a/modules/hosts/optiplex/configuration.nix b/modules/hosts/optiplex/configuration.nix
new file mode 100644
index 0000000..16ba475
--- /dev/null
+++ b/modules/hosts/optiplex/configuration.nix
@@ -0,0 +1,49 @@
+{ config, lib, pkgs, ... }: {
+ imports = [ ./hardware-configuration.nix ];
+ bootloader.mode = "efi";
+
+ # Allow unfree for nvidia + others
+ nixpkgs.config.allowUnfree = true;
+
+ # Enable extra software pkgs
+ software.desktop = {
+ chromium.enable = true;
+ cad.enable = true;
+ crypto.enable = true;
+ graphics.enable = true;
+ office.enable = true;
+ utilities.enable = true;
+ };
+ software.development = {
+ docker.enable = true;
+ };
+
+ # Install more programs
+ environment.systemPackages = with pkgs; [
+ prismlauncher
+ spotify
+ #vintagestory
+ ];
+
+ # Enable network drives
+ nas.enable = true;
+
+ # Disable wifi
+ wifi.enable = false;
+
+ # Use nvidia driver
+ services.xserver.videoDrivers = [ "nvidia" ];
+ hardware.nvidia = {
+ modesetting.enable = true; # Required
+ powerManagement.enable = false; # Can cause bugs
+ nvidiaSettings = true;
+ open = false; # Not compatible w/ GTX-1050
+ package = config.boot.kernelPackages.nvidiaPackages.stable; # Still good for 1050
+ forceFullCompositionPipeline = true; # Enables vsync
+ };
+
+ # Disable suspend
+ suspend.enable = false;
+
+ system.stateVersion = "24.11";
+}
diff --git a/modules/hosts/optiplex/hardware-configuration.nix b/modules/hosts/optiplex/hardware-configuration.nix
new file mode 100644
index 0000000..3d9651e
--- /dev/null
+++ b/modules/hosts/optiplex/hardware-configuration.nix
@@ -0,0 +1,45 @@
+# 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")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "firewire_ohci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/a9d54117-31f6-4cad-b1b2-250f6bfd7808";
+ fsType = "btrfs";
+ options = [ "subvol=@" ];
+ };
+
+ fileSystems."/home" =
+ { device = "/dev/disk/by-uuid/a9d54117-31f6-4cad-b1b2-250f6bfd7808";
+ fsType = "btrfs";
+ options = [ "subvol=@home" ];
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/6987-81B6";
+ fsType = "vfat";
+ options = [ "fmask=0022" "dmask=0022" ];
+ };
+
+ swapDevices = [ ];
+
+ # 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.eno1.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/modules/hosts/optiplex/home.nix b/modules/hosts/optiplex/home.nix
new file mode 100644
index 0000000..ee56dc6
--- /dev/null
+++ b/modules/hosts/optiplex/home.nix
@@ -0,0 +1,7 @@
+{ ... }: {
+ imports = [ ../../home ];
+
+ theme.mint.theme.color = "Dark-Green";
+ theme.mint.icons.color = "Green";
+ wallpapers.enable = true;
+}