Merge branch 'split-config' into 'main'

Split config

See merge request ahoneybun/nyxi-installer!6
This commit is contained in:
Aaron Honeycutt 2022-05-31 16:54:39 +00:00
commit 37a5cffc39
3 changed files with 31 additions and 28 deletions

View file

@ -7,6 +7,7 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
./plasma.nix
]; ];
boot.loader = { 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 # Name your host machine
networking.hostName = "NixOS"; networking.hostName = "NixOS";
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -68,22 +63,12 @@
fish fish
flatpak flatpak
git git
libsForQt5.bismuth
libsForQt5.kde-gtk-config
libsForQt5.plasma-nm
libsForQt5.plasma-pa
libsForQt5.sddm
steam steam
thunderbird thunderbird
]; ];
# Enable the OpenSSH daemon # Enable the OpenSSH daemon
services.openssh.enable = true; services.openssh.enable = true;
# Plasma
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Enable Pipewire # Enable Pipewire
security.rtkit.enable = true; security.rtkit.enable = true;
@ -101,6 +86,7 @@
services.printing.enable = true; services.printing.enable = true;
# System # System
system.stateVersion = "22.05";
system.autoUpgrade.enable = true; system.autoUpgrade.enable = true;
system.autoUpgrade.allowReboot = true; system.autoUpgrade.allowReboot = true;

View file

@ -43,11 +43,6 @@ echo ""
echo "Which is the root partition?" echo "Which is the root partition?"
read rootName read rootName
echo ""
echo "Which is your username?"
read userName
echo ""
# Create EFI partition # Create EFI partition
sudo mkfs.fat -F32 -n EFI $efiName sudo mkfs.fat -F32 -n EFI $efiName
@ -80,10 +75,10 @@ sudo btrfs subvolume create /mnt/@home
sudo umount /mnt sudo umount /mnt
# Mount the subvolumes. # 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 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. # Mount the EFI partition.
sudo mkdir /mnt/boot/ sudo mkdir /mnt/boot/
@ -92,11 +87,8 @@ sudo mount $efiName /mnt/boot
# Generate Nix configuration # Generate Nix configuration
sudo nixos-generate-config --root /mnt 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/ 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/
# 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
# Install # Install
sudo nixos-install sudo nixos-install

25
plasma.nix Normal file
View file

@ -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
];
}