diff options
Diffstat (limited to 'modules/hosts')
-rw-r--r-- | modules/hosts/X230/configuration.nix | 14 | ||||
-rw-r--r-- | modules/hosts/X230/hardware-configuration.nix | 48 | ||||
-rw-r--r-- | modules/hosts/X230/home.nix | 18 | ||||
-rw-r--r-- | modules/hosts/hp-envy-office/home.nix | 4 | ||||
-rw-r--r-- | modules/hosts/libreX60/bios-flashing.nix | 8 | ||||
-rw-r--r-- | modules/hosts/libreX60/configuration.nix | 20 | ||||
-rw-r--r-- | modules/hosts/libreX60/home.nix | 4 | ||||
-rw-r--r-- | modules/hosts/libreX60/powertop-auto-tune.nix | 17 | ||||
-rw-r--r-- | modules/hosts/optiplex/configuration.nix | 4 |
9 files changed, 121 insertions, 16 deletions
diff --git a/modules/hosts/X230/configuration.nix b/modules/hosts/X230/configuration.nix new file mode 100644 index 0000000..385b383 --- /dev/null +++ b/modules/hosts/X230/configuration.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: { + imports = [ + ./hardware-configuration.nix + ]; + bootloader.mode = "efi"; + + # Enable extra software pkgs + software.desktop = { + crypto.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/home.nix b/modules/hosts/hp-envy-office/home.nix index ed02130..2e4f61f 100644 --- a/modules/hosts/hp-envy-office/home.nix +++ b/modules/hosts/hp-envy-office/home.nix @@ -5,8 +5,8 @@ theme.mint.icons.color = "Green"; wallpapers.enable = true; - additional-gtk-bookmarks = with userDetails; [ - "file://${home.documents}/src/sites/admin Admin" + 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 index b2acd8c..55f1774 100644 --- a/modules/hosts/libreX60/configuration.nix +++ b/modules/hosts/libreX60/configuration.nix @@ -1,5 +1,10 @@ { config, lib, pkgs, ... }: { - imports = [ ./hardware-configuration.nix ]; + imports = [ + ./hardware-configuration.nix + ./powertop-auto-tune.nix + # Uncomment this module and reboot to enable bios flashing + #./bios-flashing.nix + ]; # Use grub bootloader = { @@ -17,18 +22,5 @@ # i915 Gpu requires intel driver services.xserver.videoDrivers = [ "intel" ]; - # Tamzen font in st - nixpkgs.overlays = [ - (final: prev: { - st = prev.st.overrideAttrs (old: { - buildInputs = old.buildInputs or [] ++ [ pkgs.makeWrapper ]; - postInstall = old.postInstall or "" + '' - wrapProgram $out/bin/st \ - --add-flags '-fTamzen:pixelsize=14' - ''; - }); - }) - ]; - system.stateVersion = "24.11"; } diff --git a/modules/hosts/libreX60/home.nix b/modules/hosts/libreX60/home.nix index 01496db..5b35457 100644 --- a/modules/hosts/libreX60/home.nix +++ b/modules/hosts/libreX60/home.nix @@ -10,5 +10,9 @@ 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 index d018c02..16ba475 100644 --- a/modules/hosts/optiplex/configuration.nix +++ b/modules/hosts/optiplex/configuration.nix @@ -14,6 +14,9 @@ office.enable = true; utilities.enable = true; }; + software.development = { + docker.enable = true; + }; # Install more programs environment.systemPackages = with pkgs; [ @@ -36,6 +39,7 @@ 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 |