diff --git a/config-plasma.nix b/config-plasma.nix new file mode 100644 index 0000000..bbd6398 --- /dev/null +++ b/config-plasma.nix @@ -0,0 +1,57 @@ +{ config, pkgs, ... }: + +{ + # Import other configuration modules + # (hardware-configuration.nix is autogenerated upon installation) + # paths in nix expressions are always relative the file which defines them + imports = + [ + ./hardware-configuration.nix + ]; + + boot.loader = { + systemd-boot.enable = true; + }; + + # Name your host machine + networking.hostName = "NixOS-VM"; + + # Set your time zone. + time.timeZone = "America/Denver"; + + # Enter keyboard layout + services.xserver.layout = "us"; + + # Define user accounts + users.extraUsers = + { + aaronh = + { + home = "/home/aaronh"; + extraGroups = [ "wheel" "networkmanager" ]; + isNormalUser = true; + }; + }; + + # Install some packages + environment.systemPackages = + with pkgs; + [ + thunderbird + firefox + fish + tilix + ]; + + # Enable the OpenSSH daemon + services.openssh.enable = true; + + # Plasma + services.xserver.enable = true; + services.xserver.desktopManager.plasma5.enable = true; + + # System + system.autoUpgrade.enable = true; + system.autoUpgrade.allowReboot = true; + +} diff --git a/install.sh b/install.sh index 725f9ed..48417af 100644 --- a/install.sh +++ b/install.sh @@ -60,17 +60,26 @@ sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName sudo cryptsetup luksOpen $rootName crypt-root sudo mkfs.fat -F32 -n EFI $efiName # EFI partition -sudo mkfs.ext4 -L root /dev/mapper/crypt-root # / partition +mkfs.btrfs -L root /dev/mapper/crypt-root # /root partition sudo mkswap -L swap $swapName # swap partition # 0. Mount the filesystems. sudo mount /dev/disk/by-label/root /mnt sudo swapon $swapName -# 1. Create directory to mount EFI partition. -sudo mkdir /mnt/boot/ +# Create Subvolumes +btrfs subvolume create /mnt/@ +btrfs subvolume create /mnt/@home -# 2.Mount the EFI partition. +# 1. Create directory to mount partitions and subvolume +mkdir /mnt/boot/ +mkdir /mnt/home/ + +# 2. Mount the subvolumes. +mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ $rootName /mnt +mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home + +# 3. Mount the EFI partition. sudo mount $efiName /mnt/boot # Generate Nix configuration