diff --git a/config.nix b/configuration.nix similarity index 80% rename from config.nix rename to configuration.nix index 355f9c9..39ebe77 100644 --- a/config.nix +++ b/configuration.nix @@ -7,6 +7,7 @@ imports = [ ./hardware-configuration.nix + ./plasma.nix ]; boot.loader = { @@ -20,12 +21,6 @@ }; }; - # Allow Unfree - nixpkgs.config.allowUnfree = true; - - # Enable 32 Bit libraries for applications like Steam - hardware.opengl.driSupport32Bit = true; - # Name your host machine networking.hostName = "NixOS"; networking.networkmanager.enable = true; @@ -68,22 +63,12 @@ fish flatpak git - libsForQt5.bismuth - libsForQt5.kde-gtk-config - libsForQt5.plasma-nm - libsForQt5.plasma-pa - libsForQt5.sddm steam thunderbird ]; # Enable the OpenSSH daemon services.openssh.enable = true; - - # Plasma - services.xserver.enable = true; - services.xserver.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma5.enable = true; # Enable Pipewire security.rtkit.enable = true; @@ -101,6 +86,7 @@ services.printing.enable = true; # System + system.stateVersion = "22.05"; system.autoUpgrade.enable = true; system.autoUpgrade.allowReboot = true; diff --git a/install.sh b/install.sh index 1559872..37f3420 100644 --- a/install.sh +++ b/install.sh @@ -43,11 +43,6 @@ echo "" echo "Which is the root partition?" read rootName -echo "" -echo "Which is your username?" -read userName -echo "" - # Create EFI partition sudo mkfs.fat -F32 -n EFI $efiName @@ -80,10 +75,10 @@ sudo btrfs subvolume create /mnt/@home sudo umount /mnt # Mount the subvolumes. -sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/lvm/root /mnt +sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@ /dev/lvm/root /mnt sudo mkdir /mnt/home/ -sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home /dev/lvm/root /mnt/home +sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home # Mount the EFI partition. sudo mkdir /mnt/boot/ @@ -92,11 +87,8 @@ sudo mount $efiName /mnt/boot # Generate Nix configuration sudo nixos-generate-config --root /mnt -curl https://gitlab.com/ahoneybun/nyxi-installer/-/raw/main/config.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ - -# Replacing username -sudo sed -i "s/aaronh/$userName/g" /mnt/etc/nixos/configuration.nix -sudo sed -i "s/\/home\/aaronh/\/home\/$userName/g" /mnt/etc/nixos/configuration.nix +curl https://gitlab.com/ahoneybun/nyxi-installer/-/raw/split-config/plasma.nix > plasma.nix; sudo mv -f plasma.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nyxi-installer/-/raw/split-config/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install sudo nixos-install diff --git a/plasma.nix b/plasma.nix new file mode 100644 index 0000000..165a398 --- /dev/null +++ b/plasma.nix @@ -0,0 +1,25 @@ +{ config, pkgs, ... }: + +{ + # Allow Unfree + nixpkgs.config.allowUnfree = true; + + # Enable 32 Bit libraries for applications like Steam + hardware.opengl.driSupport32Bit = true; + + # Plasma + services.xserver.enable = true; + services.xserver.displayManager.sddm.enable = true; + services.xserver.desktopManager.plasma5.enable = true; + + # Install some packages + environment.systemPackages = + with pkgs; + [ + libsForQt5.bismuth + libsForQt5.kde-gtk-config + libsForQt5.plasma-nm + libsForQt5.plasma-pa + libsForQt5.sddm + ]; +}