From 6804636ce55c5cc2a64aada0b2381d32e6ba949c Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Fri, 15 Dec 2023 13:13:23 -0800 Subject: [PATCH] imperium: initialize config --- flake.nix | 7 +++ machine/imperium/default.nix | 61 +++++++++++++++++++++ machine/imperium/hardware-configuration.nix | 40 ++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 machine/imperium/default.nix create mode 100644 machine/imperium/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 19f5475..adefb03 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,13 @@ ./machine/empyrean ]; }; + imperium = nixpkgs-2311.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + self.nixosModules.beatific + ./machine/imperium + ]; + }; stagirite = nixpkgs-2305.lib.nixosSystem { system = "x86_64-linux"; modules = [ diff --git a/machine/imperium/default.nix b/machine/imperium/default.nix new file mode 100644 index 0000000..be83a1c --- /dev/null +++ b/machine/imperium/default.nix @@ -0,0 +1,61 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ]; + + beatific.hostName = "imperium"; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.networkmanager.enable = true; + + time.timeZone = "America/Los_Angeles"; + + services.xserver = { + enable = true; + displayManager.gdm.enable = true; + desktopManager.gnome.enable = true; + + # keyboard + layout = "us"; + xkbVariant = ""; + }; + + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + users.users.tvb = { + extraGroups = [ "networkmanager" ]; + }; + + environment.systemPackages = with pkgs; [ + firefox + libreoffice + mpv + syncthing + unzip + ]; + + networking.firewall = { + enable = false; + }; + + # This value governs how some stateful data, like databases, are handled + # across different versions of NixOS. This should not be changed to a new + # release unless the sysadmin has determined that no services would be + # adversely affected by changing this. + system.stateVersion = "23.11"; +} diff --git a/machine/imperium/hardware-configuration.nix b/machine/imperium/hardware-configuration.nix new file mode 100644 index 0000000..64232f6 --- /dev/null +++ b/machine/imperium/hardware-configuration.nix @@ -0,0 +1,40 @@ +# 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" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/75addc56-2a0d-431e-a0c5-f6ee0e370e61"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/610F-1EB7"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/cc464bb4-e1c8-46c0-adbb-ea1a3cfa5b03"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}