diff --git a/flake.nix b/flake.nix index ae3b0e1..19cf6f5 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,15 @@ ./hosts/nixos/configuration.nix inputs.home-manager.nixosModules.default inputs.sops-nix.nixosModules.sops + ]; + }; + nixosConfigurations.light = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + ./hosts/light/configuration.nix + inputs.home-manager.nixosModules.default + inputs.sops-nix.nixosModules.sops ]; }; diff --git a/hosts/light/configuration.nix b/hosts/light/configuration.nix new file mode 100644 index 0000000..d00ee07 --- /dev/null +++ b/hosts/light/configuration.nix @@ -0,0 +1,68 @@ +{ config, pkgs, inputs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ./modules.nix + ]; + + # Bootloader + boot = { + loader = { + systemd-boot = { + enable = true; + }; + efi = { + canTouchEfiVariables = true; + }; + }; + }; + + # Networking + networking = { + hostname = "light"; + networkmanager = { + enable = true; + }; + }; + + # Services + services = { + # Desktop Environment/Greeter + xserver = { + enable = true; + displayManager = { + defaultSession = "xfce"; + lightdm = { + enable = true; + }; + }; + desktopManager = { + xfce = { + enable = true; + }; + xterm = { + enable = true; + }; + }; + }; + }; + + # General nix settings + nix = { + settings = { + experimental-features = [ "nix-command" "flakes" ]; + }; + }; + + # Nixpkgs config + nixpkgs = { + config = { + allowUnfree = true; + }; + }; + + system = { + stateVersion = "24.11"; + }; +} diff --git a/hosts/light/hardware-configuration.nix b/hosts/light/hardware-configuration.nix new file mode 100644 index 0000000..4a63206 --- /dev/null +++ b/hosts/light/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 = [ "ahci" "ehci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/04221613-07f9-4a50-adc5-53ccf1056a32"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-5f8f7a58-4fbe-4dd5-9572-7dbdf286978d".device = "/dev/disk/by-uuid/5f8f7a58-4fbe-4dd5-9572-7dbdf286978d"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/8B5B-FC36"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # 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.enp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/light/home.nix b/hosts/light/home.nix new file mode 100644 index 0000000..e69de29 diff --git a/hosts/light/modules.nix b/hosts/light/modules.nix new file mode 100644 index 0000000..e69de29