diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index 69e427e..fbc0a1d 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -1,25 +1,6 @@ -{ - lib, - pkgs, - ... -}: let +{lib, ...}: let inherit (lib.marleyos) enabled; in { - imports = [./autorandr.nix]; - - home.keyboard.options = ["apple:alupckeys"]; - - # FIXME: Remove once we are on NixOS - targets.genericLinux = enabled; - - # FIXME: Remove this once nvim is set up - home.packages = with pkgs; [ - alejandra - nil - statix - manix - ]; - marleyos = { isDesktop = true; nixGL = enabled; @@ -74,10 +55,10 @@ in { # kanata = enabled; syncthing = enabled; }; - xorg = { - xsession = enabled; - i3 = enabled; - }; + #xorg = { + # xsession = enabled; + # i3 = enabled; + #}; }; home.stateVersion = "24.05"; diff --git a/modules/home/base/nix/default.nix b/modules/home/base/nix/default.nix index cabaffe..8453ea3 100644 --- a/modules/home/base/nix/default.nix +++ b/modules/home/base/nix/default.nix @@ -2,11 +2,12 @@ pkgs, inputs, config, + lib, ... }: { config = { nix = { - package = pkgs.lix; + package = lib.mkForce pkgs.lix; # Pin system to flake nixpkgs version. # i.e. for use in pkgs = import {}. diff --git a/homes/x86_64-linux/marley@nyx/autorandr.nix b/systems/x86_64-linux/nyx/autorandr.nix similarity index 85% rename from homes/x86_64-linux/marley@nyx/autorandr.nix rename to systems/x86_64-linux/nyx/autorandr.nix index 88c3e3e..0e80c40 100644 --- a/homes/x86_64-linux/marley@nyx/autorandr.nix +++ b/systems/x86_64-linux/nyx/autorandr.nix @@ -1,5 +1,5 @@ _: { - programs.autorandr = { + services.autorandr = { enable = true; profiles = { @@ -16,10 +16,6 @@ _: { mode = "1920x1200"; position = "0x0"; rate = "59.95"; - extraConfig = # sh - '' - x-prop-non_desktop 0 - ''; }; "HDMI-0" = { enable = true; @@ -27,10 +23,6 @@ _: { mode = "1680x1050"; position = "1920x0"; rate = "59.97"; - extraConfig = # sh - '' - x-prop-non_desktop 0 - ''; }; }; }; diff --git a/systems/x86_64-linux/nyx/default.nix b/systems/x86_64-linux/nyx/default.nix new file mode 100644 index 0000000..f362793 --- /dev/null +++ b/systems/x86_64-linux/nyx/default.nix @@ -0,0 +1,71 @@ +{ + lib, + pkgs, + ... +}: let + inherit (lib.marleyos) enabled; +in { + imports = [./hardware-configuration.nix ./autorandr.nix]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "nyx"; + + networking.networkmanager.enable = true; + + time.timeZone = "America/Los_Angeles"; + + 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"; + }; + + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + + services = { + xserver = { + enable = true; + + displayManager.lightdm.enable = true; + desktopManager.deepin.enable = true; + + xkb = { + layout = "us"; + variant = ""; + }; + }; + + printing.enable = true; + + pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + }; + }; + + users.users.marley = { + isNormalUser = true; + description = "Marley Rae"; + extraGroups = ["networkmanager" "wheel"]; + }; + + programs.firefox.enable = true; + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = [pkgs.vim pkgs.git]; + + system.stateVersion = "24.05"; +} diff --git a/systems/x86_64-linux/nyx/hardware-configuration.nix b/systems/x86_64-linux/nyx/hardware-configuration.nix new file mode 100644 index 0000000..a717d1b --- /dev/null +++ b/systems/x86_64-linux/nyx/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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" "uas" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/7c6b8929-607a-4c3c-bf1f-93c78854f48e"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/492C-D0DF"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/327c1e55-b66b-4751-816a-b39610658a2b"; } + ]; + + # 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.enp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}