diff --git a/desktop.nix b/desktop.nix new file mode 100644 index 0000000..d395c98 --- /dev/null +++ b/desktop.nix @@ -0,0 +1,39 @@ +{ pkgs, ... }: { + ## Boot, drivers, and host name + # Use grub + boot.loader = { + grub = { + enable = true; + version = 2; + efiSupport = true; + # Go efi only + device = "nodev"; + # Use os-prober + useOSProber = true; + }; + efi = { + efiSysMountPoint = "/boot/"; + canTouchEfiVariables = true; + }; + }; + # Enable AMD gpu drivers early + boot.initrd.kernelModules = [ "amdgpu" ]; + # Use the zen kernel + boot.kernelPackages = pkgs.linuxPackages_zen; + # Define the hostname, enable dhcp + networking = { + hostName = "levitation"; + domain = "mccarty.io"; + useDHCP = false; + interfaces.enp5s0.useDHCP = true; + }; + ## System specific configuration + programs = { + steam.enable = true; + adb.enable = true; + }; + ## Left over uncategorized packages + environment.systemPackages = with pkgs; [ + firefox-wayland + ]; +} diff --git a/flake.nix b/flake.nix index 9908205..257c4ad 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,31 @@ }; outputs = { self, nixpkgs, nixpkgs-unstable, fenix, emacs }: - + let + coreModules = [ + ./modules/user.nix + ./modules/common.nix + ./modules/ssh.nix + ./applications/utils-core.nix + ]; + desktopModules = coreModules ++ [ + ./modules/audio.nix + ./modules/sway.nix + ./modules/fonts.nix + ./modules/gpg.nix + ./modules/logitech.nix + ./modules/qemu.nix + ./modules/docker.nix + ./applications/communications.nix + ./applications/devel-core.nix + ./applications/devel-rust.nix + ./applications/emacs.nix + ./applications/image-editing.nix + ./applications/media.nix + ./applications/syncthing.nix + ./desktop.nix + ]; + in { nixosConfigurations.levitation = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -27,66 +51,7 @@ }; fenix = fenix.packages.x86_64-linux; }; - modules = [ - ./hardware/levitation.nix - ./modules/user.nix - ./modules/common.nix - ./modules/audio.nix - ./modules/sway.nix - ./modules/fonts.nix - ./modules/gpg.nix - ./modules/logitech.nix - ./modules/qemu.nix - ./modules/docker.nix - ./modules/ssh.nix - ./applications/utils-core.nix - ./applications/communications.nix - ./applications/devel-core.nix - ./applications/devel-rust.nix - ./applications/emacs.nix - ./applications/image-editing.nix - ./applications/media.nix - ./applications/syncthing.nix - ({ pkgs, ... }: { - ## Boot, drivers, and host name - # Use grub - boot.loader = { - grub = { - enable = true; - version = 2; - efiSupport = true; - # Go efi only - device = "nodev"; - # Use os-prober - useOSProber = true; - }; - efi = { - efiSysMountPoint = "/boot/"; - canTouchEfiVariables = true; - }; - }; - # Enable AMD gpu drivers early - boot.initrd.kernelModules = [ "amdgpu" ]; - # Use the zen kernel - boot.kernelPackages = pkgs.linuxPackages_zen; - # Define the hostname, enable dhcp - networking = { - hostName = "levitation"; - domain = "mccarty.io"; - useDHCP = false; - interfaces.enp5s0.useDHCP = true; - }; - ## System specific configuration - programs = { - steam.enable = true; - adb.enable = true; - }; - ## Left over uncategorized packages - environment.systemPackages = with pkgs; [ - firefox-wayland - ]; - }) - ]; + modules = [ ./hardware/levitation.nix ] ++ desktopModules; }; }; }