summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/common/default.nix22
-rw-r--r--hosts/common/desktop/default.nix45
-rw-r--r--hosts/common/desktop/gnome.nix30
-rw-r--r--hosts/common/desktop/plasma.nix24
-rw-r--r--hosts/common/documentation.nix12
-rw-r--r--hosts/common/fonts.nix61
-rw-r--r--hosts/common/hardware/default.nix6
-rw-r--r--hosts/common/hardware/nvidia.nix41
-rw-r--r--hosts/common/locale.nix20
-rw-r--r--hosts/common/packages.nix69
-rw-r--r--hosts/common/security.nix54
-rw-r--r--hosts/common/systemd.nix30
-rw-r--r--hosts/common/users.nix31
-rw-r--r--hosts/glados-wsl/default.nix8
-rw-r--r--hosts/glados/boot.nix37
-rw-r--r--hosts/glados/default.nix14
-rw-r--r--hosts/glados/hardware-configuration.nix109
-rw-r--r--hosts/glados/network.nix14
-rw-r--r--hosts/glados/services.nix22
19 files changed, 324 insertions, 325 deletions
diff --git a/hosts/common/default.nix b/hosts/common/default.nix
index 9544b42..df576df 100644
--- a/hosts/common/default.nix
+++ b/hosts/common/default.nix
@@ -1,14 +1,14 @@
_: {
- imports = [
- ./documentation.nix
- ./desktop
- ./fonts.nix
- ./locale.nix
- ./packages.nix
- ./security.nix
- ./systemd.nix
- ./users.nix
- ];
+ imports = [
+ ./documentation.nix
+ ./desktop
+ ./fonts.nix
+ ./locale.nix
+ ./packages.nix
+ ./security.nix
+ ./systemd.nix
+ ./users.nix
+ ];
- # config.services.kmscon.enable = true;
+ # config.services.kmscon.enable = true;
}
diff --git a/hosts/common/desktop/default.nix b/hosts/common/desktop/default.nix
index 3f6aba7..3496df9 100644
--- a/hosts/common/desktop/default.nix
+++ b/hosts/common/desktop/default.nix
@@ -1,25 +1,26 @@
+{ lib
+, desktop
+, ...
+}:
+let
+ gui = desktop != "";
+in
{
- lib,
- desktop,
- ...
-}: let
- gui = desktop != "";
-in {
- imports =
- []
- ++ (
- if (desktop == "gnome")
- then [./gnome.nix]
- else []
- )
- ++ (
- if (desktop == "plasma")
- then [./plasma.nix]
- else []
- );
+ imports =
+ [ ]
+ ++ (
+ if (desktop == "gnome")
+ then [ ./gnome.nix ]
+ else [ ]
+ )
+ ++ (
+ if (desktop == "plasma")
+ then [ ./plasma.nix ]
+ else [ ]
+ );
- environment.noXlibs = lib.mkForce false;
- programs.xwayland.enable = gui;
- services.xserver.enable = gui;
- xdg.portal.enable = gui;
+ environment.noXlibs = lib.mkForce false;
+ programs.xwayland.enable = gui;
+ services.xserver.enable = gui;
+ xdg.portal.enable = gui;
}
diff --git a/hosts/common/desktop/gnome.nix b/hosts/common/desktop/gnome.nix
index e3f8b21..f8d59a5 100644
--- a/hosts/common/desktop/gnome.nix
+++ b/hosts/common/desktop/gnome.nix
@@ -1,17 +1,17 @@
-{pkgs, ...}: {
- environment = {
- gnome.excludePackages = with pkgs; [
- epiphany
- gnome-tour
- ];
- systemPackages = with pkgs; [
- adw-gtk3
- blackbox-terminal
- ];
- };
+{ pkgs, ... }: {
+ environment = {
+ gnome.excludePackages = with pkgs; [
+ epiphany
+ gnome-tour
+ ];
+ systemPackages = with pkgs; [
+ adw-gtk3
+ blackbox-terminal
+ ];
+ };
- services.xserver = {
- displayManager.gdm.enable = true;
- desktopManager.gnome.enable = true;
- };
+ services.xserver = {
+ displayManager.gdm.enable = true;
+ desktopManager.gnome.enable = true;
+ };
}
diff --git a/hosts/common/desktop/plasma.nix b/hosts/common/desktop/plasma.nix
index 80514fd..cd31983 100644
--- a/hosts/common/desktop/plasma.nix
+++ b/hosts/common/desktop/plasma.nix
@@ -1,13 +1,13 @@
-{pkgs, ...}: {
- services.xserver = {
- displayManager.sddm.enable = true;
- desktopManager.plasma5 = {
- enable = true;
- excludePackages = with pkgs.libsForQt5; [
- khelpcenter
- plasma-browser-integration
- print-manager
- ];
- };
- };
+{ pkgs, ... }: {
+ services.xserver = {
+ displayManager.sddm.enable = true;
+ desktopManager.plasma5 = {
+ enable = true;
+ excludePackages = with pkgs.libsForQt5; [
+ khelpcenter
+ plasma-browser-integration
+ print-manager
+ ];
+ };
+ };
}
diff --git a/hosts/common/documentation.nix b/hosts/common/documentation.nix
index ad7300d..64b78a3 100644
--- a/hosts/common/documentation.nix
+++ b/hosts/common/documentation.nix
@@ -1,7 +1,7 @@
-{pkgs, ...}: {
- environment.systemPackages = with pkgs; [man-pages man-pages-posix];
- documentation = {
- dev.enable = true;
- man.enable = true;
- };
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [ man-pages man-pages-posix ];
+ documentation = {
+ dev.enable = true;
+ man.enable = true;
+ };
}
diff --git a/hosts/common/fonts.nix b/hosts/common/fonts.nix
index 78993cf..a9b133c 100644
--- a/hosts/common/fonts.nix
+++ b/hosts/common/fonts.nix
@@ -1,32 +1,33 @@
+{ pkgs
+, desktop
+, ...
+}:
+let
+ gui = desktop != "";
+in
{
- pkgs,
- desktop,
- ...
-}: let
- gui = desktop != "";
-in {
- fonts = {
- enableDefaultFonts = gui;
- fonts =
- if gui
- then
- with pkgs; [
- noto-fonts
- noto-fonts-extra
- noto-fonts-emoji
- noto-fonts-cjk-sans
- fira-code
- (nerdfonts.override {fonts = ["FiraCode"];})
- ]
- else [];
- fontconfig.defaultFonts =
- if gui
- then {
- serif = ["Noto Serif"];
- sansSerif = ["Noto Sans"];
- emoji = ["Noto Color Emoji"];
- monospace = ["Fira Code"];
- }
- else {};
- };
+ fonts = {
+ enableDefaultFonts = gui;
+ fonts =
+ if gui
+ then
+ with pkgs; [
+ noto-fonts
+ noto-fonts-extra
+ noto-fonts-emoji
+ noto-fonts-cjk-sans
+ fira-code
+ (nerdfonts.override { fonts = [ "FiraCode" ]; })
+ ]
+ else [ ];
+ fontconfig.defaultFonts =
+ if gui
+ then {
+ serif = [ "Noto Serif" ];
+ sansSerif = [ "Noto Sans" ];
+ emoji = [ "Noto Color Emoji" ];
+ monospace = [ "Fira Code" ];
+ }
+ else { };
+ };
}
diff --git a/hosts/common/hardware/default.nix b/hosts/common/hardware/default.nix
index 4d54961..a01e1a9 100644
--- a/hosts/common/hardware/default.nix
+++ b/hosts/common/hardware/default.nix
@@ -1,5 +1,5 @@
_: {
- imports = [
- ./nvidia.nix
- ];
+ imports = [
+ ./nvidia.nix
+ ];
}
diff --git a/hosts/common/hardware/nvidia.nix b/hosts/common/hardware/nvidia.nix
index 6308bc5..5306c56 100644
--- a/hosts/common/hardware/nvidia.nix
+++ b/hosts/common/hardware/nvidia.nix
@@ -1,24 +1,23 @@
-{
- config,
- pkgs,
- ...
+{ config
+, pkgs
+, ...
}: {
- hardware = {
- nvidia = {
- package = config.boot.kernelPackages.nvidiaPackages.stable;
- modesetting.enable = true;
- nvidiaPersistenced = true;
- powerManagement.enable = true;
- };
- opengl = {
- enable = true;
- # make steam work
- driSupport32Bit = true;
- extraPackages = with pkgs; [
- vaapiVdpau
- ];
- };
- };
+ hardware = {
+ nvidia = {
+ package = config.boot.kernelPackages.nvidiaPackages.stable;
+ modesetting.enable = true;
+ nvidiaPersistenced = true;
+ powerManagement.enable = true;
+ };
+ opengl = {
+ enable = true;
+ # make steam work
+ driSupport32Bit = true;
+ extraPackages = with pkgs; [
+ vaapiVdpau
+ ];
+ };
+ };
- services.xserver.videoDrivers = ["nvidia"];
+ services.xserver.videoDrivers = [ "nvidia" ];
}
diff --git a/hosts/common/locale.nix b/hosts/common/locale.nix
index 3c2ea9f..3e28cfd 100644
--- a/hosts/common/locale.nix
+++ b/hosts/common/locale.nix
@@ -1,13 +1,13 @@
_: {
- i18n = {
- defaultLocale = "en_US.UTF-8";
- extraLocaleSettings = {
- LC_MESSAGES = "en_US.UTF-8";
- LC_TIME = "en_US.UTF-8";
- };
- };
+ i18n = {
+ defaultLocale = "en_US.UTF-8";
+ extraLocaleSettings = {
+ LC_MESSAGES = "en_US.UTF-8";
+ LC_TIME = "en_US.UTF-8";
+ };
+ };
- time = {
- timeZone = "America/New_York";
- };
+ time = {
+ timeZone = "America/New_York";
+ };
}
diff --git a/hosts/common/packages.nix b/hosts/common/packages.nix
index 174e984..297e9e8 100644
--- a/hosts/common/packages.nix
+++ b/hosts/common/packages.nix
@@ -1,37 +1,38 @@
+{ pkgs
+, desktop
+, ...
+}:
+let
+ gui = desktop != "";
+ pinentry =
+ if desktop == "gnome"
+ then pkgs.pinentry-gnome
+ else pkgs.pinentry-curses;
+in
{
- pkgs,
- desktop,
- ...
-}: let
- gui = desktop != "";
- pinentry =
- if desktop == "gnome"
- then pkgs.pinentry-gnome
- else pkgs.pinentry-curses;
-in {
- environment.systemPackages = with pkgs;
- [
- git
- neofetch
- python311
- vim
- ]
- ++ (
- if gui
- then with pkgs; [firefox]
- else []
- )
- ++ [pinentry];
+ environment.systemPackages = with pkgs;
+ [
+ git
+ neofetch
+ python311
+ vim
+ ]
+ ++ (
+ if gui
+ then with pkgs; [ firefox ]
+ else [ ]
+ )
+ ++ [ pinentry ];
- programs = {
- gnupg = {
- agent = {
- enable = true;
- pinentryFlavor =
- if desktop == "gnome"
- then "gnome3"
- else "curses";
- };
- };
- };
+ programs = {
+ gnupg = {
+ agent = {
+ enable = true;
+ pinentryFlavor =
+ if desktop == "gnome"
+ then "gnome3"
+ else "curses";
+ };
+ };
+ };
}
diff --git a/hosts/common/security.nix b/hosts/common/security.nix
index ed9be36..d150236 100644
--- a/hosts/common/security.nix
+++ b/hosts/common/security.nix
@@ -1,28 +1,28 @@
-{wsl, ...}: {
- security = {
- apparmor.enable = !wsl;
- audit.enable = !wsl;
- auditd.enable = !wsl;
- rtkit.enable = true;
- sudo = {
- configFile = ''
- Defaults env_reset
- Defaults secure_path = /run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
- Defaults editor = /run/current-system/sw/bin/vim,!env_editor
- '';
- execWheelOnly = true;
- extraRules = [
- {
- users = ["root"];
- groups = ["root"];
- commands = ["ALL"];
- }
- {
- users = ["seth"];
- commands = ["ALL"];
- }
- ];
- };
- polkit.enable = true;
- };
+{ wsl, ... }: {
+ security = {
+ apparmor.enable = !wsl;
+ audit.enable = !wsl;
+ auditd.enable = !wsl;
+ rtkit.enable = true;
+ sudo = {
+ configFile = ''
+ Defaults env_reset
+ Defaults secure_path = /run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
+ Defaults editor = /run/current-system/sw/bin/vim,!env_editor
+ '';
+ execWheelOnly = true;
+ extraRules = [
+ {
+ users = [ "root" ];
+ groups = [ "root" ];
+ commands = [ "ALL" ];
+ }
+ {
+ users = [ "seth" ];
+ commands = [ "ALL" ];
+ }
+ ];
+ };
+ polkit.enable = true;
+ };
}
diff --git a/hosts/common/systemd.nix b/hosts/common/systemd.nix
index 9ee7baf..d54a2ed 100644
--- a/hosts/common/systemd.nix
+++ b/hosts/common/systemd.nix
@@ -1,16 +1,16 @@
-{wsl, ...}: {
- services = {
- journald.extraConfig = ''
- MaxRetentionSec=1w
- '';
- resolved = {
- enable = !wsl;
- dnssec = "allow-downgrade";
- extraConfig = ''
- [Resolve]
- DNS=1.1.1.1 1.0.0.1
- DNSOverTLS=yes
- '';
- };
- };
+{ wsl, ... }: {
+ services = {
+ journald.extraConfig = ''
+ MaxRetentionSec=1w
+ '';
+ resolved = {
+ enable = !wsl;
+ dnssec = "allow-downgrade";
+ extraConfig = ''
+ [Resolve]
+ DNS=1.1.1.1 1.0.0.1
+ DNSOverTLS=yes
+ '';
+ };
+ };
}
diff --git a/hosts/common/users.nix b/hosts/common/users.nix
index bc5ef7f..fd31ab0 100644
--- a/hosts/common/users.nix
+++ b/hosts/common/users.nix
@@ -1,19 +1,18 @@
-{
- config,
- pkgs,
- ...
+{ config
+, pkgs
+, ...
}: {
- users = {
- defaultUserShell = pkgs.bash;
- mutableUsers = false;
+ users = {
+ defaultUserShell = pkgs.bash;
+ mutableUsers = false;
- users = {
- root = {
- home = "/root";
- uid = config.ids.uids.root;
- group = "root";
- initialHashedPassword = "***REMOVED***";
- };
- };
- };
+ users = {
+ root = {
+ home = "/root";
+ uid = config.ids.uids.root;
+ group = "root";
+ initialHashedPassword = "***REMOVED***";
+ };
+ };
+ };
}
diff --git a/hosts/glados-wsl/default.nix b/hosts/glados-wsl/default.nix
index d8e9ccb..ec65d48 100644
--- a/hosts/glados-wsl/default.nix
+++ b/hosts/glados-wsl/default.nix
@@ -1,5 +1,5 @@
-{modulesPath, ...}: {
- imports = [
- (modulesPath + "/profiles/minimal.nix")
- ];
+{ modulesPath, ... }: {
+ imports = [
+ (modulesPath + "/profiles/minimal.nix")
+ ];
}
diff --git a/hosts/glados/boot.nix b/hosts/glados/boot.nix
index b56de59..4d905cb 100644
--- a/hosts/glados/boot.nix
+++ b/hosts/glados/boot.nix
@@ -1,24 +1,23 @@
-{
- config,
- lib,
- pkgs,
- ...
+{ config
+, lib
+, pkgs
+, ...
}: {
- environment.systemPackages = with pkgs; [
- sbctl
- ];
+ environment.systemPackages = with pkgs; [
+ sbctl
+ ];
- boot = {
- kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
- kernelParams = ["nohibernate"];
+ boot = {
+ kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
+ kernelParams = [ "nohibernate" ];
- bootspec.enable = true;
- loader.systemd-boot.enable = lib.mkForce false;
+ bootspec.enable = true;
+ loader.systemd-boot.enable = lib.mkForce false;
- lanzaboote = {
- enable = true;
- pkiBundle = "/etc/secureboot";
- };
- supportedFilesystems = ["zfs" "ntfs"];
- };
+ lanzaboote = {
+ enable = true;
+ pkiBundle = "/etc/secureboot";
+ };
+ supportedFilesystems = [ "zfs" "ntfs" ];
+ };
}
diff --git a/hosts/glados/default.nix b/hosts/glados/default.nix
index 7e5c5be..0994349 100644
--- a/hosts/glados/default.nix
+++ b/hosts/glados/default.nix
@@ -1,9 +1,9 @@
_: {
- imports = [
- ../common/hardware/nvidia.nix
- ./boot.nix
- ./hardware-configuration.nix
- ./network.nix
- ./services.nix
- ];
+ imports = [
+ ../common/hardware/nvidia.nix
+ ./boot.nix
+ ./hardware-configuration.nix
+ ./network.nix
+ ./services.nix
+ ];
}
diff --git a/hosts/glados/hardware-configuration.nix b/hosts/glados/hardware-configuration.nix
index 9b000ba..891c896 100644
--- a/hosts/glados/hardware-configuration.nix
+++ b/hosts/glados/hardware-configuration.nix
@@ -1,60 +1,59 @@
# 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,
- ...
+{ config
+, lib
+, pkgs
+, modulesPath
+, ...
}: {
- imports = [
- (modulesPath + "/installer/scan/not-detected.nix")
- ];
-
- boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
- boot.initrd.kernelModules = [];
- boot.kernelModules = ["kvm-amd"];
- boot.extraModulePackages = [];
-
- fileSystems."/" = {
- device = "rpool/nixos/root";
- fsType = "zfs";
- options = ["zfsutil" "X-mount.mkdir"];
- };
-
- fileSystems."/home" = {
- device = "rpool/nixos/home";
- fsType = "zfs";
- options = ["zfsutil" "X-mount.mkdir"];
- };
-
- fileSystems."/nix" = {
- device = "rpool/nixos/nixstore";
- fsType = "zfs";
- options = ["zfsutil" "X-mount.mkdir"];
- };
-
- fileSystems."/var/log" = {
- device = "rpool/nixos/var/log";
- fsType = "zfs";
- options = ["zfsutil" "X-mount.mkdir"];
- };
-
- fileSystems."/boot" = {
- device = "/dev/disk/by-uuid/5B1B-6423";
- fsType = "vfat";
- };
-
- 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.enp4s0.useDHCP = lib.mkDefault true;
-
- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
- hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-amd" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" = {
+ device = "rpool/nixos/root";
+ fsType = "zfs";
+ options = [ "zfsutil" "X-mount.mkdir" ];
+ };
+
+ fileSystems."/home" = {
+ device = "rpool/nixos/home";
+ fsType = "zfs";
+ options = [ "zfsutil" "X-mount.mkdir" ];
+ };
+
+ fileSystems."/nix" = {
+ device = "rpool/nixos/nixstore";
+ fsType = "zfs";
+ options = [ "zfsutil" "X-mount.mkdir" ];
+ };
+
+ fileSystems."/var/log" = {
+ device = "rpool/nixos/var/log";
+ fsType = "zfs";
+ options = [ "zfsutil" "X-mount.mkdir" ];
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/5B1B-6423";
+ fsType = "vfat";
+ };
+
+ 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.enp4s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
diff --git a/hosts/glados/network.nix b/hosts/glados/network.nix
index aef7253..11b2d6f 100644
--- a/hosts/glados/network.nix
+++ b/hosts/glados/network.nix
@@ -1,9 +1,9 @@
_: {
- networking = {
- hostId = "2bf6e602";
- networkmanager = {
- enable = true;
- dns = "systemd-resolved";
- };
- };
+ networking = {
+ hostId = "2bf6e602";
+ networkmanager = {
+ enable = true;
+ dns = "systemd-resolved";
+ };
+ };
}
diff --git a/hosts/glados/services.nix b/hosts/glados/services.nix
index 95a7882..6ed5411 100644
--- a/hosts/glados/services.nix
+++ b/hosts/glados/services.nix
@@ -1,13 +1,13 @@
_: {
- services = {
- dbus.enable = true;
- pipewire = {
- enable = true;
- wireplumber.enable = true;
- alsa.enable = true;
- jack.enable = true;
- pulse.enable = true;
- };
- };
- hardware.pulseaudio.enable = false;
+ services = {
+ dbus.enable = true;
+ pipewire = {
+ enable = true;
+ wireplumber.enable = true;
+ alsa.enable = true;
+ jack.enable = true;
+ pulse.enable = true;
+ };
+ };
+ hardware.pulseaudio.enable = false;
}