diff --git a/modules/hosts/hades3/configuration.nix b/modules/hosts/hades/configuration.nix similarity index 55% rename from modules/hosts/hades3/configuration.nix rename to modules/hosts/hades/configuration.nix index 1fd49c1..971157e 100644 --- a/modules/hosts/hades3/configuration.nix +++ b/modules/hosts/hades/configuration.nix @@ -1,11 +1,19 @@ { self, ... }: + { + + # defines a module flake.nixosModules.hadesConfig = { pkgs, + lib, + self, ... }: + { + + # other modules to import imports = [ self.nixosModules.hadesHardware self.nixosModules.coreConfig @@ -13,8 +21,19 @@ self.nixosModules.niri ]; + # set hostname + networking.hostName = "hades"; + + # specify kernel to use + boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest; + + # enable printing support services.printing.enable = true; + # fstrim for ssd + services.fstrim.enable = true; + + # nixify this more betterer users.users.serenity = { shell = pkgs.fish; ignoreShellProgramCheck = true; @@ -28,26 +47,32 @@ "video" "input" ]; + + # user specific packages packages = with pkgs; [ tree ]; }; + + # enable firefox programs.firefox.enable = true; + # other packages to include environment.systemPackages = with pkgs; [ - vim - wget + + # tools and utilities git - curl - bat - xclip - ddcutil - unzip - ripgrep - tealdeer - chezmoi + helix + + # packages for hades peripherals + input-remapper + razergenie + openrazer-daemon + openrgb-with-all-plugins ]; + # dont touch this system.stateVersion = "24.11"; + }; } diff --git a/modules/hosts/hades/default.nix b/modules/hosts/hades/default.nix index 570f27e..828134b 100644 --- a/modules/hosts/hades/default.nix +++ b/modules/hosts/hades/default.nix @@ -1,25 +1,22 @@ -{ - pkgs, - lib, - self, - ... -}: -{ +{ self, inputs, config, ... }: { - # module paths to import - imports = [ - ./hardware - ./network - ./radeon - ]; + flake.nixosConfigurations.hades = inputs.nixpkgs.lib.nixosSystem { + modules = [ + self.nixosModules.hadesHardware + self.nixosModules.hadesConfig + self.nixosModules.coreConfig - # select kernel to use - boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest; - - # set hostname - networking.hostName = "hades"; - - # for ssd - services.fstrim.enable = true; + inputs.home-manager.nixosModules.home-manager + { + home-manager.backupFileExtension = "bak"; + home-manager.users.serenity = { + imports = [ + config.flake.homeModules.base + config.flake.homeModules.hadesHome + ]; + }; + } + ]; + }; } diff --git a/modules/hosts/hades/hardware.nix b/modules/hosts/hades/hardware.nix index e69de29..e2d749a 100644 --- a/modules/hosts/hades/hardware.nix +++ b/modules/hosts/hades/hardware.nix @@ -0,0 +1,54 @@ +{ ... }: + +{ + # defines a module + flake.nixosModules.hadesHardware = + { + config, + lib, + modulesPath, + ... + }: + + { + + # important i think lol + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + # shrug + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usbhid" + "usb_storage" + "sd_mod" + ]; + + # enable amdgpu at boot + boot.initrd.kernelModules = [ "amdgpu" ]; + + # root partition + fileSystems."/" = { + device = "/dev/disk/by-uuid/2f4a231c-04a1-4bb9-9370-c207573be881"; + fsType = "ext4"; + }; + + # boot partition + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/7D2E-5F33"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + # swap + swapDevices = [ ]; + + # specifies x64 uArch + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/modules/hosts/hades/network.nix b/modules/hosts/hades/network.nix deleted file mode 100644 index e69de29..0000000 diff --git a/modules/hosts/hades/radeon.nix b/modules/hosts/hades/radeon.nix deleted file mode 100644 index e69de29..0000000 diff --git a/modules/hosts/hades2/configuration.nix b/modules/hosts/hades2/configuration.nix deleted file mode 100644 index 524ea42..0000000 --- a/modules/hosts/hades2/configuration.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ self, inputs, ... }: { - - flake.nixosModules.hadesConfiguration = { pkgs, lib, ... }: { - # import any other modules from here - imports = [ - self.nixosModules.hadesHardware - self.nixosModules.niri - ]; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - # Packages - environment.systemPackages = with pkgs; [ - # peripherals & Input - input-remapper # Input control - razergenie # Razer frontend - openrazer-daemon # Razer daemon - openrgb-with-all-plugins # RGB control - ]; - }; - -} diff --git a/modules/hosts/hades2/default.nix b/modules/hosts/hades2/default.nix deleted file mode 100644 index d63326a..0000000 --- a/modules/hosts/hades2/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ self, inputs, ... }: { - flake.nixosConfigurations.hades = inputs.nixpkgs.lib.nixosSystem { - modules = [ - self.nixosModules.hadesConfiguration - ]; - }; -} diff --git a/modules/hosts/hades3/default.nix b/modules/hosts/hades3/default.nix deleted file mode 100644 index 828134b..0000000 --- a/modules/hosts/hades3/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ self, inputs, config, ... }: { - - flake.nixosConfigurations.hades = inputs.nixpkgs.lib.nixosSystem { - modules = [ - self.nixosModules.hadesHardware - self.nixosModules.hadesConfig - self.nixosModules.coreConfig - - inputs.home-manager.nixosModules.home-manager - { - home-manager.backupFileExtension = "bak"; - home-manager.users.serenity = { - imports = [ - config.flake.homeModules.base - config.flake.homeModules.hadesHome - ]; - }; - } - - ]; - }; -} diff --git a/modules/hosts/hades3/hardware.nix b/modules/hosts/hades3/hardware.nix deleted file mode 100644 index 6f1f1ee..0000000 --- a/modules/hosts/hades3/hardware.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ ... }: -{ - flake.nixosModules.desktopHardware = - { - config, - lib, - modulesPath, - ... - }: - { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ahci" - "nvme" - "usbhid" - "usb_storage" - "sd_mod" - ]; - boot.initrd.kernelModules = [ "amdgpu" ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/2f4a231c-04a1-4bb9-9370-c207573be881"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/7D2E-5F33"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - swapDevices = [ ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - }; -} diff --git a/modules/system/core.nix b/modules/system/core.nix index 49bd214..a904a27 100644 --- a/modules/system/core.nix +++ b/modules/system/core.nix @@ -11,6 +11,14 @@ self.nixosModules.corePackages ]; + # extra features + nix.settings.experimental-features = [ + # flake based config requires flakes + "flakes" + #fancier nix usage + "nix-command" + ]; + # compresses half the ram for use as swap zramSwap.enable = true;