mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-19 07:05:51 +05:30
Compare commits
No commits in common. "7c457d29de9064dc29a5803262d0f1836fc19a4e" and "58d3d160f5472e1d23baaa413e67fa17d1091254" have entirely different histories.
7c457d29de
...
58d3d160f5
|
@ -118,7 +118,8 @@
|
||||||
user = home-manager.lib.homeManagerConfiguration {
|
user = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
(./. + "/profiles" + ("/" + systemSettings.profile) + "/home.nix") # load home.nix from selected PROFILE
|
(./. + "/profiles" + ("/" + systemSettings.profile)
|
||||||
|
+ "/home.nix") # load home.nix from selected PROFILE
|
||||||
];
|
];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
# pass config variables from above
|
# pass config variables from above
|
||||||
|
@ -135,8 +136,8 @@
|
||||||
system = lib.nixosSystem {
|
system = lib.nixosSystem {
|
||||||
system = systemSettings.system;
|
system = systemSettings.system;
|
||||||
modules = [
|
modules = [
|
||||||
(./. + "/profiles" + ("/" + systemSettings.profile) + "/configuration.nix")
|
(./. + "/profiles" + ("/" + systemSettings.profile)
|
||||||
./system/bin/phoenix.nix
|
+ "/configuration.nix")
|
||||||
]; # load configuration.nix from selected PROFILE
|
]; # load configuration.nix from selected PROFILE
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
# pass config variables from above
|
# pass config variables from above
|
||||||
|
|
|
@ -14,11 +14,11 @@
|
||||||
# After running this, the command `nix flake update` will require root
|
# After running this, the command `nix flake update` will require root
|
||||||
|
|
||||||
if [ "$#" = 1 ]; then
|
if [ "$#" = 1 ]; then
|
||||||
SCRIPT_DIR=$1;
|
dotfilesDir=$1;
|
||||||
else
|
else
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
dotfilesDir=$(pwd);
|
||||||
fi
|
fi
|
||||||
pushd $SCRIPT_DIR &> /dev/null;
|
pushd $dotfilesDir &> /dev/null;
|
||||||
chown 0:0 .;
|
chown 0:0 .;
|
||||||
chown 0:0 profiles/*;
|
chown 0:0 profiles/*;
|
||||||
chown -R 0:0 system;
|
chown -R 0:0 system;
|
||||||
|
|
46
install.org
46
install.org
|
@ -21,12 +21,6 @@ nix run github:librephoenix/nixos-config
|
||||||
nix run git+https://codeberg.org/librephoenix/nixos-config
|
nix run git+https://codeberg.org/librephoenix/nixos-config
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
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
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
The script will ask for sudo permissions at certain points, /but you should not run the script as root/.
|
The script will ask for sudo permissions at certain points, /but you should not run the script as root/.
|
||||||
|
|
||||||
If the above =nix run= command gives you an error, odds are you either don't have =git= installed, or you haven't enabled the experimental features in your Nix config (=nix-command= and =flakes=). To get the command to install properly, you can first enter a shell with =git= available using:
|
If the above =nix run= command gives you an error, odds are you either don't have =git= installed, or you haven't enabled the experimental features in your Nix config (=nix-command= and =flakes=). To get the command to install properly, you can first enter a shell with =git= available using:
|
||||||
|
@ -43,11 +37,6 @@ And if you want a single copy-paste solution:
|
||||||
nix-shell -p git --command "nix run --experimental-features 'nix-command flakes' gitlab:librephoenix/nixos-config"
|
nix-shell -p git --command "nix run --experimental-features 'nix-command flakes' gitlab:librephoenix/nixos-config"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
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"
|
|
||||||
#+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.
|
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.
|
||||||
|
|
||||||
Potential Errors: I've only tested it working on UEFI with the default EFI mount point of =/boot=. I've added experimental legacy (BIOS) boot support, but it does rely on a quick and dirty script to find the grub device. If you are testing it using some weird boot configuration for whatever reason, try modifying =bootMountPath= (UEFI) or =grubDevice= (legacy BIOS) in =flake.nix= before install, or else it will complain about not being able to install the bootloader.
|
Potential Errors: I've only tested it working on UEFI with the default EFI mount point of =/boot=. I've added experimental legacy (BIOS) boot support, but it does rely on a quick and dirty script to find the grub device. If you are testing it using some weird boot configuration for whatever reason, try modifying =bootMountPath= (UEFI) or =grubDevice= (legacy BIOS) in =flake.nix= before install, or else it will complain about not being able to install the bootloader.
|
||||||
|
@ -64,13 +53,6 @@ The dotfiles can be installed after cloning the repo into =~/.dotfiles= using:
|
||||||
git clone https://gitlab.com/librephoenix/nixos-config.git ~/.dotfiles
|
git clone https://gitlab.com/librephoenix/nixos-config.git ~/.dotfiles
|
||||||
~/.dotfiles/install.sh
|
~/.dotfiles/install.sh
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
or with a custom directory:
|
|
||||||
#+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 [[./flake.nix][flake.nix]], or else my [[./system/bin/phoenix.nix][phoenix wrapper script]] won't work.
|
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
@ -101,22 +83,6 @@ Start by cloning the repo:
|
||||||
git clone https://gitlab.com/librephoenix/nixos-config.git ~/.dotfiles
|
git clone https://gitlab.com/librephoenix/nixos-config.git ~/.dotfiles
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
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.
|
|
||||||
#+BEGIN_SRC nix :noeval
|
|
||||||
...
|
|
||||||
let
|
|
||||||
...
|
|
||||||
# ----- USER SETTINGS ----- #
|
|
||||||
dotfilesDir = "/your/custom/directory"; # username
|
|
||||||
...
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
To get the hardware configuration on a new system, either copy from =/etc/nixos/hardware-configuration.nix= or run:
|
To get the hardware configuration on a new system, either copy from =/etc/nixos/hardware-configuration.nix= or run:
|
||||||
#+BEGIN_SRC sh :noeval
|
#+BEGIN_SRC sh :noeval
|
||||||
sudo nixos-generate-config --show-hardware-config > ~/.dotfiles/system/hardware-configuration.nix
|
sudo nixos-generate-config --show-hardware-config > ~/.dotfiles/system/hardware-configuration.nix
|
||||||
|
@ -140,10 +106,10 @@ The build will fail if you are booting from BIOS instead of UEFI, unless change
|
||||||
...
|
...
|
||||||
let
|
let
|
||||||
# ---- SYSTEM SETTINGS ---- #
|
# ---- SYSTEM SETTINGS ---- #
|
||||||
...
|
systemSettings = {
|
||||||
bootMode = "bios"; # uefi or bios
|
bootMode = "bios"; # uefi or bios
|
||||||
grubDevice = "/dev/vda"; # device identifier for grub; find this by running lsblk
|
grubDevice = "/dev/vda"; # device identifier for grub; find this by running lsblk
|
||||||
...
|
};
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Note: If you're installing this to a VM, Hyprland won't work unless 3D acceleration is enabled.
|
Note: If you're installing this to a VM, Hyprland won't work unless 3D acceleration is enabled.
|
||||||
|
@ -157,20 +123,12 @@ Once the variables are set, then switch into the system configuration by running
|
||||||
#+BEGIN_SRC sh :noeval
|
#+BEGIN_SRC sh :noeval
|
||||||
sudo nixos-rebuild switch --flake ~/.dotfiles#system
|
sudo nixos-rebuild switch --flake ~/.dotfiles#system
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
or for your own custom directory:
|
|
||||||
#+BEGIN_SRC sh :noeval
|
|
||||||
sudo nixos-rebuild switch --flake /your/custom/directory#system
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
*** Intall and Switch Home Manager Config
|
*** Intall and Switch Home Manager Config
|
||||||
Home manager can be installed and the configuration activated with:
|
Home manager can be installed and the configuration activated with:
|
||||||
#+BEGIN_SRC sh :noeval
|
#+BEGIN_SRC sh :noeval
|
||||||
nix run home-manager/master -- switch --flake ~/.dotfiles#user
|
nix run home-manager/master -- switch --flake ~/.dotfiles#user
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
or for your own custom directory:
|
|
||||||
#+BEGIN_SRC sh :noeval
|
|
||||||
nix run home-manager/master -- switch --flake /your/custom/directory#user
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** FAQ
|
** FAQ
|
||||||
*** =home-manager switch --flake .#user= Command Fails
|
*** =home-manager switch --flake .#user= Command Fails
|
||||||
|
|
32
install.sh
32
install.sh
|
@ -5,43 +5,37 @@
|
||||||
# Clone dotfiles
|
# Clone dotfiles
|
||||||
# TODO make ~/.dotfiles path arbitrary and make all other scripts conform to this
|
# TODO make ~/.dotfiles path arbitrary and make all other scripts conform to this
|
||||||
# using SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
# using SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
if [ -z "$1" ]
|
nix-shell -p git --command "git clone https://gitlab.com/librephoenix/nixos-config ~/.dotfiles"
|
||||||
then
|
|
||||||
SCRIPT_DIR=$1
|
|
||||||
else
|
|
||||||
SCRIPT_DIR=~/.dotfiles
|
|
||||||
fi
|
|
||||||
nix-shell -p git --command "git clone https://gitlab.com/librephoenix/nixos-config $SCRIPT_DIR"
|
|
||||||
|
|
||||||
# Generate hardware config for new system
|
# Generate hardware config for new system
|
||||||
sudo nixos-generate-config --show-hardware-config > $SCRIPT_DIR/system/hardware-configuration.nix
|
sudo nixos-generate-config --show-hardware-config > ~/.dotfiles/system/hardware-configuration.nix
|
||||||
|
|
||||||
# Check if uefi or bios
|
# Check if uefi or bios
|
||||||
if [ -d /sys/firmware/efi/efivars ]; then
|
if [ -d /sys/firmware/efi/efivars ]; then
|
||||||
sed -i "0,/bootMode.*=.*\".*\";/s//bootMode = \"uefi\";/" $SCRIPT_DIR/flake.nix
|
sed -i "0,/bootMode.*=.*\".*\";/s//bootMode = \"uefi\";/" ~/.dotfiles/flake.nix
|
||||||
else
|
else
|
||||||
sed -i "0,/bootMode.*=.*\".*\";/s//bootMode = \"bios\";/" $SCRIPT_DIR/flake.nix
|
sed -i "0,/bootMode.*=.*\".*\";/s//bootMode = \"bios\";/" ~/.dotfiles/flake.nix
|
||||||
grubDevice=$(findmnt / | awk -F' ' '{ print $2 }' | sed 's/\[.*\]//g' | tail -n 1 | lsblk -no pkname | tail -n 1 )
|
grubDevice=$(findmnt / | awk -F' ' '{ print $2 }' | sed 's/\[.*\]//g' | tail -n 1 | lsblk -no pkname | tail -n 1 )
|
||||||
sed -i "0,/grubDevice.*=.*\".*\";/s//grubDevice = \"\/dev\/$grubDevice\";/" $SCRIPT_DIR/flake.nix
|
sed -i "0,/grubDevice.*=.*\".*\";/s//grubDevice = \"\/dev\/$grubDevice\";/" ~/.dotfiles/flake.nix
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Patch flake.nix with different username/name and remove email by default
|
# Patch flake.nix with different username/name and remove email by default
|
||||||
sed -i "0,/emmet/s//$(whoami)/" $SCRIPT_DIR/flake.nix
|
sed -i "0,/emmet/s//$(whoami)/" ~/.dotfiles/flake.nix
|
||||||
sed -i "0,/Emmet/s//$(getent passwd $(whoami) | cut -d ':' -f 5 | cut -d ',' -f 1)/" $SCRIPT_DIR/flake.nix
|
sed -i "0,/Emmet/s//$(getent passwd $(whoami) | cut -d ':' -f 5 | cut -d ',' -f 1)/" ~/.dotfiles/flake.nix
|
||||||
sed -i "s/emmet@librephoenix.com//" $SCRIPT_DIR/flake.nix
|
sed -i "s/emmet@librephoenix.com//" ~/.dotfiles/flake.nix
|
||||||
sed -i "s+~/.dotfiles+$SCRIPT_DIR+g" $SCRIPT_DIR/flake.nix
|
|
||||||
|
|
||||||
# Open up editor to manually edit flake.nix before install
|
# Open up editor to manually edit flake.nix before install
|
||||||
if [ -z "$EDITOR" ]; then
|
if [ -z "$EDITOR" ]; then
|
||||||
EDITOR=nano;
|
EDITOR=nano;
|
||||||
fi
|
fi
|
||||||
$EDITOR $SCRIPT_DIR/flake.nix;
|
$EDITOR ~/.dotfiles/flake.nix;
|
||||||
|
|
||||||
# Permissions for files that should be owned by root
|
# Permissions for files that should be owned by root
|
||||||
sudo $SCRIPT_DIR/harden.sh $SCRIPT_DIR;
|
sudo ~/.dotfiles/harden.sh ~/.dotfiles;
|
||||||
|
|
||||||
# Rebuild system
|
# Rebuild system
|
||||||
sudo nixos-rebuild switch --flake $SCRIPT_DIR#system;
|
sudo nixos-rebuild switch --flake ~/.dotfiles#system;
|
||||||
|
|
||||||
# Install and build home-manager configuration
|
# Install and build home-manager configuration
|
||||||
nix run home-manager/master --extra-experimental-features nix-command --extra-experimental-features flakes -- switch --flake $SCRIPT_DIR#user;
|
nix run home-manager/master --extra-experimental-features nix-command --extra-experimental-features flakes -- switch --flake ~/.dotfiles#user;
|
||||||
|
|
||||||
|
|
15
pull.sh
15
pull.sh
|
@ -1,20 +1,21 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Automated script to update my non-primary systems
|
# Automated script to update my non-primary systems
|
||||||
# config to be in sync with upstream git repo while
|
# to be in sync with upstream git repo while
|
||||||
# preserving local edits to dotfiles via git stash
|
# preserving local edits to dotfiles via git stash
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
||||||
|
|
||||||
# Relax permissions temporarily so git can work
|
# Relax permissions temporarily so git can work
|
||||||
sudo $SCRIPT_DIR/soften.sh $SCRIPT_DIR;
|
sudo ~/.dotfiles/soften.sh ~/.dotfiles;
|
||||||
|
|
||||||
# Stash local edits, pull changes, and re-apply local edits
|
# Stash local edits, pull changes, and re-apply local edits
|
||||||
pushd $SCRIPT_DIR &> /dev/null;
|
pushd ~/.dotfiles;
|
||||||
git stash;
|
git stash;
|
||||||
git pull;
|
git pull;
|
||||||
git stash apply;
|
git stash apply;
|
||||||
popd &> /dev/null;
|
popd;
|
||||||
|
|
||||||
# Permissions for files that should be owned by root
|
# Permissions for files that should be owned by root
|
||||||
sudo $SCRIPT_DIR/harden.sh $SCRIPT_DIR;
|
sudo ~/.dotfiles/harden.sh ~/.dotfiles;
|
||||||
|
|
||||||
|
# Synchronize system
|
||||||
|
~/.dotfiles/sync.sh;
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
# RUNNING nixos-rebuild switch!
|
# RUNNING nixos-rebuild switch!
|
||||||
|
|
||||||
if [ "$#" = 1 ]; then
|
if [ "$#" = 1 ]; then
|
||||||
SCRIPT_DIR=$1;
|
dotfilesDir=$1;
|
||||||
else
|
else
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
dotfilesDir=$(pwd);
|
||||||
fi
|
fi
|
||||||
pushd $SCRIPT_DIR &> /dev/null;
|
pushd $dotfilesDir &> /dev/null;
|
||||||
chown -R 1000:users .;
|
chown -R 1000:users .;
|
||||||
popd &> /dev/null;
|
popd &> /dev/null;
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Script to synchronize system state
|
|
||||||
# with configuration files for nixos system
|
|
||||||
# and home-manager
|
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
||||||
|
|
||||||
# Rebuild system
|
|
||||||
sudo nixos-rebuild switch --flake $SCRIPT_DIR#system;
|
|
12
sync-user.sh
12
sync-user.sh
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Script to synchronize system state
|
|
||||||
# with configuration files for nixos system
|
|
||||||
# and home-manager
|
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
||||||
|
|
||||||
# Install and build home-manager configuration
|
|
||||||
home-manager switch --flake $SCRIPT_DIR#user;
|
|
||||||
|
|
||||||
$SCRIPT_DIR/sync-posthook.sh
|
|
9
sync.sh
9
sync.sh
|
@ -4,7 +4,10 @@
|
||||||
# with configuration files for nixos system
|
# with configuration files for nixos system
|
||||||
# and home-manager
|
# and home-manager
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
# Rebuild system
|
||||||
|
sudo nixos-rebuild switch --flake ~/.dotfiles#system;
|
||||||
|
|
||||||
$SCRIPT_DIR/sync-system.sh
|
# Install and build home-manager configuration
|
||||||
$SCRIPT_DIR/sync-user.sh
|
home-manager switch --flake ~/.dotfiles#user;
|
||||||
|
|
||||||
|
~/.dotfiles/sync-posthook.sh
|
||||||
|
|
|
@ -11,8 +11,6 @@ imports = [ import1.nix
|
||||||
|
|
||||||
My system-level Nix modules are organized into this directory:
|
My system-level Nix modules are organized into this directory:
|
||||||
- [[./hardware-configuration.nix][hardware-configuration]] - Default hardware config generated for my system
|
- [[./hardware-configuration.nix][hardware-configuration]] - Default hardware config generated for my system
|
||||||
- [[./bin][bin]] - My own scripts
|
|
||||||
- [[./bin/phoenix.nix][phoenix]] - My nix command wrapper
|
|
||||||
- [[./app][app]] - Necessary system-level configuration to get various apps working
|
- [[./app][app]] - Necessary system-level configuration to get various apps working
|
||||||
- [[./hardware][hardware]] - Hardware configurations I may need to use
|
- [[./hardware][hardware]] - Hardware configurations I may need to use
|
||||||
- [[./security][security]] - System-level security stuff
|
- [[./security][security]] - System-level security stuff
|
||||||
|
@ -20,7 +18,6 @@ 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
|
- [[./wm][wm]] - Necessary system-level configuration to get various window managers, wayland compositors, and/or desktop environments working
|
||||||
|
|
||||||
** Variables imported from flake.nix
|
** 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.
|
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 currently import the following variables to the system config:
|
I currently import the following variables to the system config:
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
{ pkgs, userSettings, ... }:
|
|
||||||
let myScript = ''
|
|
||||||
if [ "$1" = "sync" ]; then
|
|
||||||
if [ "$#" = 1 ]; then
|
|
||||||
''+userSettings.dotfilesDir+''/sync.sh;
|
|
||||||
exit 0;
|
|
||||||
elif [ "$2" = "user" ]; then
|
|
||||||
''+userSettings.dotfilesDir+''/sync-user.sh;
|
|
||||||
exit 0;
|
|
||||||
elif [ "$2" = "system" ]; then
|
|
||||||
''+userSettings.dotfilesDir+''/sync-system.sh;
|
|
||||||
exit 0;
|
|
||||||
else
|
|
||||||
echo "Please pass 'system' or 'user' if supplying a second argument"
|
|
||||||
fi
|
|
||||||
elif [ "$1" = "refresh" ]; then
|
|
||||||
if [ "$#" -gt 1 ]; then
|
|
||||||
echo "Warning: The 'refresh' command has no subcommands (no $2 subcommand)";
|
|
||||||
fi
|
|
||||||
''+userSettings.dotfilesDir+''/sync-posthook.sh;
|
|
||||||
exit 0;
|
|
||||||
elif [ "$1" = "update" ]; then
|
|
||||||
if [ "$#" -gt 1 ]; then
|
|
||||||
echo "Warning: The 'update' command has no subcommands (no $2 subcommand)";
|
|
||||||
fi
|
|
||||||
''+userSettings.dotfilesDir+''/update.sh;
|
|
||||||
exit 0;
|
|
||||||
elif [ "$1" = "upgrade" ]; then
|
|
||||||
if [ "$#" -gt 1 ]; then
|
|
||||||
echo "Warning: The 'update' command has no subcommands (no $2 subcommand)";
|
|
||||||
fi
|
|
||||||
''+userSettings.dotfilesDir+''/upgrade.sh;
|
|
||||||
exit 0;
|
|
||||||
elif [ "$1" = "pull" ]; then
|
|
||||||
if [ "$#" -gt 1 ]; then
|
|
||||||
echo "Warning: The 'upgrade' command has no subcommands (no $2 subcommand)";
|
|
||||||
fi
|
|
||||||
''+userSettings.dotfilesDir+''/pull.sh;
|
|
||||||
exit 0;
|
|
||||||
elif [ "$1" = "harden" ]; then
|
|
||||||
if [ "$#" -gt 1 ]; then
|
|
||||||
echo "Warning: The 'harden' command has no subcommands (no $2 subcommand)";
|
|
||||||
fi
|
|
||||||
''+userSettings.dotfilesDir+''/harden.sh;
|
|
||||||
exit 0;
|
|
||||||
elif [ "$1" = "soften" ]; then
|
|
||||||
if [ "$#" -gt 1 ]; then
|
|
||||||
echo "Warning: The 'soften' command has no subcommands (no $2 subcommand)";
|
|
||||||
fi
|
|
||||||
''+userSettings.dotfilesDir+''/soften.sh;
|
|
||||||
exit 0;
|
|
||||||
elif [ "$1" = "gc" ]; then
|
|
||||||
if [ "$#" -gt 2 ]; then
|
|
||||||
echo "Warning: The 'gc' command only accepts one argument (collect_older_than)";
|
|
||||||
fi
|
|
||||||
if [ "$2" = "full" ]; then
|
|
||||||
sudo nix-collect-garbage --delete-old;
|
|
||||||
nix-collect-garbage --delete-old;
|
|
||||||
elif [ "$2" ]; then
|
|
||||||
sudo nix-collect-garbage --delete-older-than $2;
|
|
||||||
nix-collect-garbage --delete-older-than $2;
|
|
||||||
else
|
|
||||||
sudo nix-collect-garbage --delete-older-than 30d;
|
|
||||||
nix-collect-garbage --delete-older-than 30d;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.writeScriptBin "phoenix" myScript)
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,18 +1,18 @@
|
||||||
scheme: "UwUnicorn"
|
scheme: "UwUnicorn"
|
||||||
author: "Fernando Marques (https://github.com/RakkiUwU) and Gabriel Fontes (https://github.com/Misterio77), modified by me (https://librephoenix.com)"
|
author: "Fernando Marques (https://github.com/RakkiUwU) and Gabriel Fontes (https://github.com/Misterio77)"
|
||||||
base00: "241b26"
|
base00: "241b26"
|
||||||
base01: "2f2a3f"
|
base01: "2f2a3f"
|
||||||
base02: "46354a"
|
base02: "46354a"
|
||||||
base03: "6c3c62"
|
base03: "6c3cb2"
|
||||||
base04: "7e5f83"
|
base04: "7e5f83"
|
||||||
base05: "eed5d9"
|
base05: "eed5d9"
|
||||||
base06: "d9c2c6"
|
base06: "d9c2c6"
|
||||||
base07: "e4ccd0"
|
base07: "e4ccd0"
|
||||||
base08: "de5b44"
|
base08: "877bb6"
|
||||||
base09: "e39755"
|
base09: "de5b44"
|
||||||
base0A: "a84a73"
|
base0A: "a84a73"
|
||||||
base0B: "c965bf"
|
base0B: "c965bf"
|
||||||
base0C: "9c5fce"
|
base0C: "9c5fce"
|
||||||
base0D: "6a9eb5"
|
base0D: "6a9eb5"
|
||||||
base0E: "6ac38f"
|
base0E: "78a38f"
|
||||||
base0F: "a3ab5a"
|
base0F: "a3a079"
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
scheme: "UwUnicorn"
|
scheme: "UwUnicorn"
|
||||||
author: "Fernando Marques (https://github.com/RakkiUwU) and Gabriel Fontes (https://github.com/Misterio77), modified by me (https://librephoenix.com)"
|
author: "Fernando Marques (https://github.com/RakkiUwU) and Gabriel Fontes (https://github.com/Misterio77)"
|
||||||
base00: "241b26"
|
base00: "241b26"
|
||||||
base01: "2f2a3f"
|
base01: "2f2a3f"
|
||||||
base02: "46354a"
|
base02: "46354a"
|
||||||
base03: "6c3c62"
|
base03: "6c3cb2"
|
||||||
base04: "7e5f83"
|
base04: "7e5f83"
|
||||||
base05: "eed5d9"
|
base05: "eed5d9"
|
||||||
base06: "d9c2c6"
|
base06: "d9c2c6"
|
||||||
base07: "e4ccd0"
|
base07: "e4ccd0"
|
||||||
base08: "de5b44"
|
base08: "877bb6"
|
||||||
base09: "e39755"
|
base09: "de5b44"
|
||||||
base0A: "a84a73"
|
base0A: "a84a73"
|
||||||
base0B: "c965bf"
|
base0B: "c965bf"
|
||||||
base0C: "9c5fce"
|
base0C: "9c5fce"
|
||||||
base0D: "6a9eb5"
|
base0D: "6a9eb5"
|
||||||
base0E: "6ac38f"
|
base0E: "78a38f"
|
||||||
base0F: "a3ab5a"
|
base0F: "a3a079"
|
||||||
|
|
|
@ -3,7 +3,5 @@
|
||||||
# Script to update my flake without
|
# Script to update my flake without
|
||||||
# synchronizing configuration
|
# synchronizing configuration
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
||||||
|
|
||||||
# Update flake
|
# Update flake
|
||||||
sudo nix flake update $SCRIPT_DIR;
|
sudo nix flake update ~/.dotfiles;
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
# Script to update system and sync
|
# Script to update system and sync
|
||||||
# Does not pull changes from git
|
# Does not pull changes from git
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
||||||
|
|
||||||
# Update flake
|
# Update flake
|
||||||
$SCRIPT_DIR/update.sh;
|
~/.dotfiles/update.sh;
|
||||||
|
|
||||||
# Synchronize system
|
# Synchronize system
|
||||||
$SCRIPT_DIR/sync.sh;
|
~/.dotfiles/sync.sh;
|
||||||
|
|
|
@ -21,11 +21,14 @@ My user-level Nix modules are organized into this directory:
|
||||||
- [[./app/ranger][ranger]]
|
- [[./app/ranger][ranger]]
|
||||||
- [[./app/terminal][terminal]] - Configuration for terminal emulators
|
- [[./app/terminal][terminal]] - Configuration for terminal emulators
|
||||||
- [[./app/virtualization][virtualization]] - Virtualization and compatability layers
|
- [[./app/virtualization][virtualization]] - Virtualization and compatability layers
|
||||||
|
- [[./bin][bin]] - My own scripts
|
||||||
|
- [[./bin/phoenix.nix][phoenix]] - My nix command wrapper
|
||||||
- [[./lang][lang]] - Various bundled programming languages
|
- [[./lang][lang]] - Various bundled programming languages
|
||||||
- I will probably get rid of this in favor of a shell.nix for every project, once I learn how that works
|
- I will probably get rid of this in favor of a shell.nix for every project, once I learn how that works
|
||||||
- [[./pkgs][pkgs]] - "Package builds" for packages not in the Nix repositories
|
- [[./pkgs][pkgs]] - "Package builds" for packages not in the Nix repositories
|
||||||
- [[./pkgs/pokemon-colorscripts.nix][pokemon-colorscripts]]
|
- [[./pkgs/pokemon-colorscripts.nix][pokemon-colorscripts]]
|
||||||
- [[./pkgs/rogauracore.nix][rogauracore]] - not working yet
|
- [[./pkgs/rogauracore.nix][rogauracore]] - not working yet
|
||||||
|
- [[./pkgs/ytsub.nix][ytsub]]
|
||||||
- [[./shell][shell]] - My default bash and zsh configs
|
- [[./shell][shell]] - My default bash and zsh configs
|
||||||
- [[./shell/sh.nix][sh]] - bash and zsh configs
|
- [[./shell/sh.nix][sh]] - bash and zsh configs
|
||||||
- [[./shell/cli-collection.nix][cli-collection]] - Curated useful CLI utilities
|
- [[./shell/cli-collection.nix][cli-collection]] - Curated useful CLI utilities
|
||||||
|
@ -35,7 +38,6 @@ My user-level Nix modules are organized into this directory:
|
||||||
- [[./wm/picom][picom]]
|
- [[./wm/picom][picom]]
|
||||||
|
|
||||||
** Variables imported from flake.nix
|
** 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.
|
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 currently import the following variables to the system config:
|
I currently import the following variables to the system config:
|
||||||
|
|
|
@ -434,16 +434,16 @@
|
||||||
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
|
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
|
||||||
dots_center = false
|
dots_center = false
|
||||||
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
|
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
|
||||||
outer_color = rgb(''+config.lib.stylix.colors.base07-rgb-r+'',''+config.lib.stylix.colors.base07-rgb-g+'', ''+config.lib.stylix.colors.base07-rgb-b+'')
|
outer_color = rgb(151515)
|
||||||
inner_color = rgb(''+config.lib.stylix.colors.base00-rgb-r+'',''+config.lib.stylix.colors.base00-rgb-g+'', ''+config.lib.stylix.colors.base00-rgb-b+'')
|
inner_color = rgb(200, 200, 200)
|
||||||
font_color = rgb(''+config.lib.stylix.colors.base07-rgb-r+'',''+config.lib.stylix.colors.base07-rgb-g+'', ''+config.lib.stylix.colors.base07-rgb-b+'')
|
font_color = rgb(10, 10, 10)
|
||||||
fade_on_empty = true
|
fade_on_empty = true
|
||||||
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
|
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
|
||||||
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
|
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
|
||||||
hide_input = false
|
hide_input = false
|
||||||
rounding = -1 # -1 means complete rounding (circle/oval)
|
rounding = -1 # -1 means complete rounding (circle/oval)
|
||||||
check_color = rgb(''+config.lib.stylix.colors.base0A-rgb-r+'',''+config.lib.stylix.colors.base0A-rgb-g+'', ''+config.lib.stylix.colors.base0A-rgb-b+'')
|
check_color = rgb(204, 136, 34)
|
||||||
fail_color = rgb(''+config.lib.stylix.colors.base08-rgb-r+'',''+config.lib.stylix.colors.base08-rgb-g+'', ''+config.lib.stylix.colors.base08-rgb-b+'')
|
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
|
||||||
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
|
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
|
||||||
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
|
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
|
||||||
capslock_color = -1
|
capslock_color = -1
|
||||||
|
@ -460,9 +460,9 @@
|
||||||
label {
|
label {
|
||||||
monitor =
|
monitor =
|
||||||
text = Hello, Emmet
|
text = Hello, Emmet
|
||||||
color = rgb(''+config.lib.stylix.colors.base07-rgb-r+'',''+config.lib.stylix.colors.base07-rgb-g+'', ''+config.lib.stylix.colors.base07-rgb-b+'')
|
color = rgba(200, 200, 200, 1.0)
|
||||||
font_size = 25
|
font_size = 25
|
||||||
font_family = ''+userSettings.font+''
|
font_family = Intel One Mono
|
||||||
rotate = 0 # degrees, counter-clockwise
|
rotate = 0 # degrees, counter-clockwise
|
||||||
|
|
||||||
position = 0, 160
|
position = 0, 160
|
||||||
|
|
Loading…
Reference in a new issue