diff --git a/README.org b/README.org index efd52f6..aa4aa49 100644 --- a/README.org +++ b/README.org @@ -86,25 +86,6 @@ My profile can be conveniently selected in [[./flake.nix][my flake.nix]] by sett More detailed information on these profiles is in the [[./profiles][profiles directory]]. -** Nix Wrapper Script -Some Nix commands are confusing, really long to type out, or require me to be in the directory with my dotfiles. To solve this, I wrote a [[./system/bin/phoenix.nix][wrapper script called phoenix]], which calls various scripts in the root of this directory. - -TLDR: -- =phoenix sync= - Synchronize system and home-manager state with config files (essentially =nixos-rebuild switch= + =home-manager switch=) - - =phoenix sync system= - Only synchronize system state (essentially =nixos-rebuild switch=) - - =phoenix sync user= - Only synchronize home-manager state (essentially =home-manager switch=) -- =phoenix update= - Update all flake inputs without synchronizing system and home-manager states -- =phoenix upgrade= - Update flake.lock and synchronize system and home-manager states (=phoenix update= + =phoenix sync=) -- =phoenix refresh= - Call synchronization posthooks (mainly to refresh stylix and some dependent daemons) -- =phoenix pull= - Pull changes from upstream git and attempt to merge local changes (I use this to update systems other than my main system) -- =phoenix harden= - Ensure that all "system-level" files cannot be edited by an unprivileged user -- =phoenix soften= - Relax permissions so all dotfiles can be edited by a normal user (use temporarily for git or other operations) -- =phoenix gc= - Garbage collect the system and user nix stores - - =phoenix gc full= - Delete everything not currently in use - - =phoenix gc 15d= - Delete everything older than 15 days - - =phoenix gc 30d= - Delete everything older than 30 days - - =phoenix gc Xd= - Delete everything older than X days - ** Star History Didn't think this would get that many [[https://star-history.com/#librephoenix/nixos-config&Date][stars on GitHub]], yet here we are: [[https://api.star-history.com/svg?repos=librephoenix/nixos-config&type=Date.png]] diff --git a/install.org b/install.org index 771fff8..ac901b6 100644 --- a/install.org +++ b/install.org @@ -24,7 +24,7 @@ nix run git+https://codeberg.org/librephoenix/nixos-config This will install the dotfiles to =~/.dotfiles=, but if you'd like to install to a custom directory, just supply it as a positional argument, i.e: #+BEGIN_SRC sh :noeval # Install from gitlab -nix run gitlab:librephoenix/nixos-config -- /your/custom/directory +nix run gitlab:librephoenix/nixos-config /your/custom/directory #+END_SRC The script will ask for sudo permissions at certain points, /but you should not run the script as root/. @@ -45,7 +45,7 @@ nix-shell -p git --command "nix run --experimental-features 'nix-command flakes' This /should/ still work with a custom dotfiles directory too, i.e: #+begin_src sh :noeval -nix-shell -p git --command "nix run --experimental-features 'nix-command flakes' gitlab:librephoenix/nixos-config -- /your/custom/directory" +nix-shell -p git --command "nix run --experimental-features 'nix-command flakes' gitlab:librephoenix/nixos-config /your/custom/directory" #+end_src At a certain point in the install script it will open =nano= (or whatever your $EDITOR is set to) and ask you to edit the =flake.nix=. You can edit as much or as little of the config variables as you like, and it will continue the install after you exit the editor. @@ -104,6 +104,7 @@ git clone https://gitlab.com/librephoenix/nixos-config.git ~/.dotfiles Any custom directory should also work: #+BEGIN_SRC sh :noeval git clone https://gitlab.com/librephoenix/nixos-config.git /your/custom/directory +/your/custom/directory/install.sh #+END_SRC If you install to a custom directory, make sure to edit the =userSettings.dotfilesDir= in the beginning [[./flake.nix][flake.nix]], or else my [[./system/bin/phoenix.nix][phoenix wrapper script]] won't work. diff --git a/install.sh b/install.sh index c167cf4..cb1ec55 100755 --- a/install.sh +++ b/install.sh @@ -3,7 +3,9 @@ # Automated script to install my dotfiles # Clone dotfiles -if [ $# -gt 0 ] +# TODO make ~/.dotfiles path arbitrary and make all other scripts conform to this +# using SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +if [ -z "$1" ] then SCRIPT_DIR=$1 else diff --git a/system/README.org b/system/README.org index f304994..6a6690a 100644 --- a/system/README.org +++ b/system/README.org @@ -20,10 +20,14 @@ My system-level Nix modules are organized into this directory: - [[./wm][wm]] - Necessary system-level configuration to get various window managers, wayland compositors, and/or desktop environments working ** Variables imported from flake.nix +# TODO update this Variables can be imported from [[../flake.nix][flake.nix]] by setting the =specialArgs= block inside the flake (see [[../flake.nix][my flake]] for more details). This allows variables to merely be managed in one place ([[../flake.nix][flake.nix]]) rather than having to manage them in multiple locations. -I use this to pass a few attribute sets: -- =userSettings= - Settings for the normal user (see [[../flake.nix][flake.nix]] for more details) -- =systemSettings= - Settings for the system (see [[../flake.nix][flake.nix]] for more details) -- =inputs= - Flake inputs (see [[../flake.nix][flake.nix]] for more details) -- =pkgs-stable= - Allows me to include stable versions of packages along with (my default) unstable versions of packages +I currently import the following variables to the system config: +- =username= - Username +- =hostname= - Hostname for machine +- =timezone= - Timezone for machine +- =locale= - Locale for machine +- =theme= - base16 theme stored in ../themes to be used +- =backgroundUrl= - Direct link to background wallpaper (used for login screen) +- =backgroundSha256= - Checksum for background image used when downloading diff --git a/user/README.org b/user/README.org index d6e1a6e..a449dca 100644 --- a/user/README.org +++ b/user/README.org @@ -31,17 +31,20 @@ My user-level Nix modules are organized into this directory: - [[./shell/cli-collection.nix][cli-collection]] - Curated useful CLI utilities - [[./style][style]] - Stylix setup (system-wide base16 theme generation) - [[./wm][wm]] - Window manager, compositor, wayland compositor, and/or desktop environment setups - - [[./wm/hyprland][hyprland]] - [[./wm/xmonad][xmonad]] - [[./wm/picom][picom]] ** Variables imported from flake.nix +# TODO update this Variables can be imported from [[../flake.nix][flake.nix]] by setting the =extraSpecialArgs= block inside the flake (see [[../flake.nix][my flake]] for more details). This allows variables to merely be managed in one place ([[../flake.nix][flake.nix]]) rather than having to manage them in multiple locations. -I use this to pass a few attribute sets: -- =userSettings= - Settings for the normal user (see [[../flake.nix][flake.nix]] for more details) -- =systemSettings= - Settings for the system (see [[../flake.nix][flake.nix]] for more details) -- =inputs= - Flake inputs (see [[../flake.nix][flake.nix]] for more details) -- =pkgs-stable= - Allows me to include stable versions of packages along with (my default) unstable versions of packages -- =pkgs-emacs= - Pinned version of nixpkgs I use for Emacs and its dependencies -- =pkgs-kdenlive= - Pinned version of nixpkgs I use for kdenlive +I currently import the following variables to the system config: +- =username= - Username +- =hostname= - Hostname for machine +- =myHomeDir= - Absolute path to home directory derived from =username= +- =email= - Email +- =dotfilesDir= - Path to my dotfiles directory on the system +- =theme= - base16 theme stored in ../themes to be used +- =themePolarity= - whether theme is =light= or =dark= +- =backgroundUrl= - Direct link to background wallpaper (used for login screen) +- =backgroundSha256= - Checksum for background image used when downloading diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index 9409433..89d0615 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -1244,11 +1244,7 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)." "C-=" 'text-scale-increase :desc "Decrease font size" - "C--" 'text-scale-decrease - - :desc "Jump to dired" - "M-f" 'dired-jump -) + "C--" 'text-scale-decrease) ;;;------ ranger configuration ------;;; @@ -1258,7 +1254,9 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)." :desc "Toggle mark on current file" "x" 'ranger-toggle-mark -) + + :desc "Open ranger" + "o d" 'ranger) ;;;-- hledger-mode configuration ;;;-- diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index 1fc0260..2151480 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -1435,12 +1435,7 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)." "C-=" 'text-scale-increase :desc "Decrease font size" - "C--" 'text-scale-decrease - - :desc "Jump to dired" - "M-f" 'dired-jump -) - + "C--" 'text-scale-decrease) #+END_SRC ** Ranger Configuration @@ -1453,7 +1448,9 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)." :desc "Toggle mark on current file" "x" 'ranger-toggle-mark -) + + :desc "Open ranger" + "o d" 'ranger) #+END_SRC ** hledger-mode Configuration