From 387f90c03ac52bf7dbece52f27b2171249e5c9f0 Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Fri, 16 Feb 2024 23:20:51 -0600 Subject: [PATCH] Improve README & Fix Impermanence Perminently --- README.md | 7 +++++-- config/system/persistence.nix | 4 +--- hardware.nix | 1 + options.nix | 9 +++------ 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ae11aec..8e287fa 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ ZaneyOS is a way of reproducing my configuration on any NixOS system. This inclu If you want to learn more about my system, [this project has a Wiki](https://gitlab.com/Zaney/zaneyos/-/wikis/home) that explains a ton. It even explains what NixOS is why you may want to choose it and so much more. +Please do yourself a favor and [read the wiki](https://gitlab.com/Zaney/zaneyos/-/wikis/home). + # Install / Steps To Reproduce My System - Run this command to ensure Git is installed: @@ -31,7 +33,8 @@ cd zaneyos git switch stable-1.0 ``` -- Change any options in options.nix as needed. +### Change any options in options.nix that you may want / need to + - Generate your hardware.nix like so: ``` @@ -45,7 +48,7 @@ NIX_CONFIG="experimental-features = nix-command flakes" sudo nixos-rebuild switch --flake .#thehostnameyousetinoptions.nix ``` -### You Are Done! +## You Are Done! This Flake's user will have the password be set for them as *password*. If you want to change it run a command replacing password with whatever you want to be your password. You then need to copy the output that it gives you like below into your hashedPassword in the system.nix file. diff --git a/config/system/persistence.nix b/config/system/persistence.nix index 9909523..084e3d1 100644 --- a/config/system/persistence.nix +++ b/config/system/persistence.nix @@ -1,8 +1,6 @@ { config, pkgs, lib, username, ... }: -let - inherit (import ../../options.nix) impermanence; -in lib.mkIf (impermanence == true) { +{ environment.persistence."/nix/persist" = { hideMounts = true; directories = [ diff --git a/hardware.nix b/hardware.nix index eeece50..f9b2a00 100644 --- a/hardware.nix +++ b/hardware.nix @@ -7,6 +7,7 @@ imports = [ (modulesPath + "/installer/scan/not-detected.nix") + ./config/system/persistence.nix ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "nvme" "usbhid" "uas" "usb_storage" "sd_mod" ]; diff --git a/options.nix b/options.nix index 82730b6..2ece519 100644 --- a/options.nix +++ b/options.nix @@ -1,13 +1,14 @@ # PLEASE READ THE WIKI FOR DETERMINING -# VALUES FOR THIS PAGE. +# WHAT TO PUT HERE AS OPTIONS. # https://gitlab.com/Zaney/zaneyos/-/wikis/Setting-Options let + # THINGS YOU NEED TO CHANGE username = "zaney"; hostname = "hyprnix"; userHome = "/home/${username}"; flakeDir = "${userHome}/zaneyos"; - waybarStyle = "default"; # simplebar, slickbar, or default + waybarStyle = "slickbar"; # simplebar, slickbar, or default in { # User Variables username = "${username}"; @@ -38,10 +39,6 @@ in { theTimezone = "America/Chicago"; theShell = "bash"; # Possible options: bash, zsh theKernel = "default"; # Possible options: default, latest, lqx, xanmod, zen - # This is for running NixOS - # On a tmpfs or root on RAM - # You Most Like Want This -> false - impermanence = true; # This should be set to false unless you know what your doing! sdl-videodriver = "x11"; # Either x11 or wayland ONLY. Games might require x11 set here # For Hybrid Systems intel-nvidia # Should Be Used As gpuType