diff options
| author | Devin Finlinson <devin.finlinson@pm.me> | 2023-12-17 18:56:12 -0700 |
|---|---|---|
| committer | Devin Finlinson <devin.finlinson@pm.me> | 2023-12-17 18:56:12 -0700 |
| commit | 371b3653826488565e238ad253734cb01196372e (patch) | |
| tree | 07a0ebef0d81191aef23564a25080274b22d015f /machines | |
| parent | 932d5256735a0c67f09e06f71b44a99cf7f45b41 (diff) | |
| parent | d706c05080026e66971e6267167483800cb1b8a9 (diff) | |
Merge branch 'master' of ssh://git.wormcar.gay:2200/devinf/nix-config
Diffstat (limited to 'machines')
| -rw-r--r-- | machines/doretta/hardware-configuration.nix | 10 | ||||
| -rw-r--r-- | machines/khad/configuration.nix | 96 | ||||
| -rw-r--r-- | machines/khad/hardware-configuration.nix | 26 | ||||
| -rw-r--r-- | machines/zenbook/configuration.nix | 6 |
4 files changed, 70 insertions, 68 deletions
diff --git a/machines/doretta/hardware-configuration.nix b/machines/doretta/hardware-configuration.nix index f768a3f..70fb758 100644 --- a/machines/doretta/hardware-configuration.nix +++ b/machines/doretta/hardware-configuration.nix @@ -1,4 +1,4 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ +# Do not modxxify 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, ... }: @@ -14,8 +14,14 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/9fb0c7c8-8ee8-48ca-bd3a-3246838d3780"; + { device = "/dev/disk/by-uuid/036e01ab-d0ae-46c3-a9c8-d0e94d83cdde"; fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/F97F-258C"; + fsType = "vfat"; }; swapDevices = [ ]; diff --git a/machines/khad/configuration.nix b/machines/khad/configuration.nix index 7527c7d..b0f8490 100644 --- a/machines/khad/configuration.nix +++ b/machines/khad/configuration.nix @@ -10,16 +10,21 @@ ./hardware-configuration.nix ]; - # Use the systemd-boot EFI boot loader. - # boot.loader.grub.enable = true; - # boot.loader.grub.efiSupport = true; - # boot.loader.grub.devices = [ - # "/dev/sda" - # ]; - # boot.loader.grub.theme = pkgs.nixos-grub2-theme; + # Bootloader. boot.loader.systemd-boot.enable = true; - # boot.loader.efi.canTouchEfiVariables = true; - boot.loader.systemd-boot.graceful = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Setup keyfile + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; + }; + + # Enable swap on luks + boot.initrd.luks.devices."luks-12daadca-e9a9-413b-9286-017b3038e5ba".device = "/dev/disk/by-uuid/12daadca-e9a9-413b-9286-017b3038e5ba"; + boot.initrd.luks.devices."luks-12daadca-e9a9-413b-9286-017b3038e5ba".keyFile = "/crypto_keyfile.bin"; + + boot.initrd.luks.devices."luks-02516df1-d33b-4c83-90f8-4be7b918132e".keyFile = "/crypto_keyfile.bin"; + networking.hostName = "khad"; # Define your hostname. # Pick only one of the below networking options. @@ -32,7 +37,7 @@ config.allowUnfree = true; }; - services.xserver.videoDrivers = [ "nvidia" ]; + # services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.displayManager.sddm.autoNumlock = true; hardware.opengl = { enable = true; @@ -41,31 +46,31 @@ # needed by nvidia-docker driSupport32Bit = true; }; - hardware.nvidia = { - # Optionally, you may need to select the appropriate driver version for your specific GPU. - # packge = config.boot.kernelPackages.nvidiaPackages.stable; - - # Modesetting is needed for most Wayland compositors - modesetting.enable = true; - # Use the open source version of the kernel module - # Only available on driver 515.53.04+ - open = false; - - # powerManagement.enable = true; - }; - # virtualization.docker.enableNvidia = true; # for nvidia-docker environment.shellInit = ''export NIXPATH="/nix/var/nix/profiles/per-user/$USER/channels:nixos-config=/etc/nixos/machines/khad/configuration.nix"''; # Set your time zone. - time.timeZone = "US/Mountain"; + time.timeZone = "America/Denver"; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + # console = { # font = "Lat2-Terminus16"; # keyMap = "us"; @@ -73,49 +78,36 @@ # }; # # Enable the X11 windowing system. - # services.xserver.enable = true; + services.xserver.enable = true; # # Enable the Plasma 5 Desktop Environment. - # services.xserver.displayManager.sddm.enable = true; - # services.xserver.desktopManager.plasma5.enable = true; + services.xserver.displayManager.sddm.enable = true; + services.xserver.desktopManager.plasma5.enable = true; # Configure keymap in X11 - # services.xserver.layout = "us"; + services.xserver.layout = "us"; # services.xserver.xkbOptions = "eurosign:e,caps:escape"; # Enable CUPS to print documents. - # services.printing.enable = true; + services.printing.enable = true; # Enable sound. sound.enable = true; - # hardware.pulseaudio.enable = true; + security.rtkit.enable = true; #not sure what this does + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use Jack applications, uncomment this + jack.enable = true; + }; # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. - # users.users.defin= { - # isNormalUser = true; - # description = "Devin finlinson"; - # extraGroups = [ "wheel" "builders" "video" "input"]; # Enable ‘sudo’ for the user. - # shell = pkgs.nushell; - # hashedPassword = "$6$UljPNAdxZ22lP3Bc$8VaEAacZxtXM3Zji2IA7Jf5fXs9pFnAVQff1d8IbfFOKCvjibceyopOAjRXa8lXtpOSJgPW1OO1dzOspqhWnz0"; - # packages = with pkgs; [ - # firefox - # nushell - # tree - # ]; - # }; - - # List packages installed in system profile. To search, run: - # $ nix search wget - # environment.systemPackages = with pkgs; [ - # # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # helix - # wget - # ]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. diff --git a/machines/khad/hardware-configuration.nix b/machines/khad/hardware-configuration.nix index dc32bab..9807d16 100644 --- a/machines/khad/hardware-configuration.nix +++ b/machines/khad/hardware-configuration.nix @@ -8,33 +8,33 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "sd_mod" "sr_mod" ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/d7025289-0e65-4ff8-a774-1a8a7b104858"; - fsType = "ext4"; + { device = "/dev/disk/by-uuid/360dd54b-c347-4ca9-adfd-3891414eeef6"; + fsType = "btrfs"; + options = [ "subvol=@" ]; }; + boot.initrd.luks.devices."luks-f6d45986-2c3d-4c6a-bc73-6753d182fef9".device = "/dev/disk/by-uuid/f6d45986-2c3d-4c6a-bc73-6753d182fef9"; + fileSystems."/boot" = - { device = "/dev/disk/by-uuid/B741-9318"; + { device = "/dev/disk/by-uuid/CE2A-4E2F"; fsType = "vfat"; }; fileSystems."/home" = - { device = "/dev/disk/by-uuid/9aa90dd0-4123-4caf-ac6e-8a299dda3ad4"; - fsType = "ext4"; + { device = "/dev/disk/by-uuid/ce569948-e98c-47e0-9a1b-1e33fc1f0664"; + fsType = "btrfs"; }; - fileSystems."/home/defin/Drives" = - { device = "/dev/disk/by-uuid/ba4e233d-d31a-4e5a-9054-0241bd58ba8e"; - fsType = "ext4"; - }; + boot.initrd.luks.devices."luks-02516df1-d33b-4c83-90f8-4be7b918132e".device = "/dev/disk/by-uuid/02516df1-d33b-4c83-90f8-4be7b918132e"; swapDevices = - [ { device = "/dev/disk/by-uuid/e75daaf1-d6c6-43c3-8a61-ff26b4304f71"; } + [ { device = "/dev/disk/by-uuid/8f615eac-c1a1-48c6-8d34-8059732527c0"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -46,5 +46,5 @@ # networking.interfaces.enp0s20u4.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/machines/zenbook/configuration.nix b/machines/zenbook/configuration.nix index d1e57c9..b1135a9 100644 --- a/machines/zenbook/configuration.nix +++ b/machines/zenbook/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running `nixos-help`). -{ config, ... }: +{ config, pkgs, ... }: { imports = [ @@ -22,6 +22,10 @@ }; environment.shellInit = ''export NIXPATH="/nix/var/nix/profiles/per-user/$USER/channels:nixos-config=/etc/nixos/machines/zenbook/configuration.nix"''; + environment.systemPackages = with pkgs; [ + # for battery utils + acpi + ]; services.xserver.displayManager.sddm = { enableHidpi = true; |
