diff --git a/flake.nix b/flake.nix index 964066c..9abdc9d 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,27 @@ ./themes/sandstone-forest ]; }; + + Blackbird = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/Blackbird + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = inputs; + + home-manager.users.panotaka = { + imports = [ ./home ./home/shell ./home/desktop ]; + }; + } + inputs.stylix.nixosModules.stylix + ./themes/targets/all.nix + ./themes/spaceduck + ]; + }; }; homeConfigurations.panotaka = home-manager.lib.homeManagerConfiguration { diff --git a/hosts/Blackbird/default.nix b/hosts/Blackbird/default.nix new file mode 100644 index 0000000..1977838 --- /dev/null +++ b/hosts/Blackbird/default.nix @@ -0,0 +1,76 @@ +{ config, pkgs, inputs, lib, ... }: + +let + hostname = "Blackbird"; +in +{ + + + # System version + system.stateVersion = "23.11"; + + + imports = [ + # Import hardware configuration + inputs.nixos-hardware.nixosModules.gpd-pocket-3 + inputs.disko.nixosModules.disko + ./disko.nix + + + # Import system configuration + ../../modules/system.nix + ../../modules/harden.nix + ../../modules/kde.nix + ]; + + + # Set networking + hardware.enableRedistributableFirmware = true; + networking.hostName = hostname; + networking.networkmanager.enable = true; + networking.useDHCP = lib.mkDefault true; + + + # Bootloader configuration + boot = { + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + + initrd = { + kernelModules = [ ]; + availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "vmd" + "nvme" + "usb_storage" + "sd_mod" + "rtsx_pci_sdmmc" + ]; + }; + + loader = { + systemd-boot.enable = true; + efi = { + canTouchEfiVariables = true; + }; + }; + }; + + + # Setup Audio + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + + # Setup bluetooth + hardware.bluetooth.enable = true; + +} diff --git a/hosts/Blackbird/disko.nix b/hosts/Blackbird/disko.nix new file mode 100644 index 0000000..4d83e71 --- /dev/null +++ b/hosts/Blackbird/disko.nix @@ -0,0 +1,59 @@ +{ + disko.devices = { + disk = { + nvme0n1 = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "defaults" + ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "crypted"; + settings = { + allowDiscards = true; + }; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/root" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/swap" = { + mountpoint = "/.swapvol"; + swap.swapfile.size = "40G"; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}