diff --git a/README.md b/README.md index cba0079..e671ff7 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,8 @@ of this document. #### 1. Clone this repository ```sh -git clone https://github.com/c4em/dotnix.git -cd dotnix +git clone https://github.com/c4em/caenix.git +cd caenix ``` #### 2. Fetch your keys.txt and ssh key diff --git a/assets/README.md b/assets/README.md new file mode 100644 index 0000000..2dce282 --- /dev/null +++ b/assets/README.md @@ -0,0 +1,5 @@ +# assets + +The wallpaper used here is watermarked, the purchased version is stored in the secrets, inaccessible to the public. +If you too want the watermark-free version you can [purchase it from the artist](https://wboss.huotan.com/p/TEcHBI) +for mere ¥12. The artwork looks great, I'd highly recommend it. diff --git a/assets/wallpaper.jpg b/assets/wallpaper.jpg new file mode 100644 index 0000000..77c180b Binary files /dev/null and b/assets/wallpaper.jpg differ diff --git a/install.sh b/install.sh index 6d08f63..a144389 100755 --- a/install.sh +++ b/install.sh @@ -34,7 +34,7 @@ args() { echo " -o|--host [hostname] (required) The host from ./hosts you want to install" echo " -b|--build Build the system without installing" echo "" - echo "origin: https://github.com/c4em/dotnix" + echo "origin: https://github.com/c4em/caenix" echo "" exit 0 ;; @@ -46,7 +46,7 @@ args() { exit 1 fi - DOTNIX_INSTALL_DEVICE="$2" + CAENIX_INSTALL_DEVICE="$2" shift 2 ;; @@ -58,11 +58,11 @@ args() { exit 1 fi - DOTNIX_HOSTNAME="$2" + CAENIX_HOSTNAME="$2" shift 2 ;; "-b" | "--build") - DOTNIX_DO_ONLY_BUILD=1 + CAENIX_DO_ONLY_BUILD=1 shift 1 ;; *) @@ -72,9 +72,9 @@ args() { esac done - args_ensure_is_set "--host" "$DOTNIX_HOSTNAME" - if [ -z "$DOTNIX_DO_ONLY_BUILD" ]; then - args_ensure_is_set "--device" "$DOTNIX_INSTALL_DEVICE" + args_ensure_is_set "--host" "$CAENIX_HOSTNAME" + if [ -z "$CAENIX_DO_ONLY_BUILD" ]; then + args_ensure_is_set "--device" "$CAENIX_INSTALL_DEVICE" fi } @@ -84,13 +84,13 @@ sed_safe () { } update_managed_values() { - sed -i 's/\( *device = \)".*"\(; #.*\)/\1"'"$(sed_safe "$DOTNIX_INSTALL_DEVICE")"'"\2/' "./hosts/$DOTNIX_HOSTNAME/default.nix" - sed -i 's/\( *device = \)".*"\(; #.*\)/\1"'"$(sed_safe "$DOTNIX_INSTALL_DEVICE")"'"\2/' "./hosts/$DOTNIX_HOSTNAME/disko.nix" - sed -i 's/\( *system.stateVersion = \)".*"\(; #.*\)/\1"'"$(sed_safe "$(nixos-version | cut -f1,2 -d '.')")"'"\2/' "./hosts/$DOTNIX_HOSTNAME/default.nix" + sed -i 's/\( *device = \)".*"\(; #.*\)/\1"'"$(sed_safe "$CAENIX_INSTALL_DEVICE")"'"\2/' "./hosts/$DOTNIX_HOSTNAME/default.nix" + sed -i 's/\( *device = \)".*"\(; #.*\)/\1"'"$(sed_safe "$CAENIX_INSTALL_DEVICE")"'"\2/' "./hosts/$DOTNIX_HOSTNAME/disko.nix" + sed -i 's/\( *system.stateVersion = \)".*"\(; #.*\)/\1"'"$(sed_safe "$(nixos-version | cut -f1,2 -d '.')")"'"\2/' "./hosts/$CAENIX_HOSTNAME/default.nix" } build() { - nix build ".#nixosConfigurations.${DOTNIX_HOSTNAME}.config.system.build.toplevel" + nix build ".#nixosConfigurations.${CAENIX_HOSTNAME}.config.system.build.toplevel" } permissions() { @@ -105,11 +105,11 @@ permissions() { ensure_confirmation() { printf "\e[1;31m=== ARE YOU SURE YOU WANT TO CONTINUE WITH THE INSTALLATION ===\e[0m\n\n" - printf "This will \e[1;31mIRREVERSIBLY\e[0m wipe all data in '%s'\n" "$DOTNIX_INSTALL_DEVICE" + printf "This will \e[1;31mIRREVERSIBLY\e[0m wipe all data in '%s'\n" "$CAENIX_INSTALL_DEVICE" printf "This disk contains following partitions:\n\n" - lsblk -o NAME,SIZE,TYPE,FSTYPE "$DOTNIX_INSTALL_DEVICE" + lsblk -o NAME,SIZE,TYPE,FSTYPE "$CAENIX_INSTALL_DEVICE" printf "\n" - lsblk -no NAME "$DOTNIX_INSTALL_DEVICE" | tail -n +2 | tr -cd '[:alnum:][:space:]' | xargs -I {} -- df -h "/dev/{}" + lsblk -no NAME "$CAENIX_INSTALL_DEVICE" | tail -n +2 | tr -cd '[:alnum:][:space:]' | xargs -I {} -- df -h "/dev/{}" printf "\n" printf "Please write 'Yes, do as I say!' to continue with the installation\n> " @@ -118,14 +118,14 @@ ensure_confirmation() { echo "Cancelling installation" exit 0 else - DOTNIX_CONFIRM_DISK_NUKE="yes" + CAENIX_CONFIRM_DISK_NUKE="yes" fi } partition_disk() { - if [ "$DOTNIX_CONFIRM_DISK_NUKE" = "yes" ]; then + if [ "$CAENIX_CONFIRM_DISK_NUKE" = "yes" ]; then sudo nix --experimental-features 'flakes nix-command' run github:nix-community/disko/latest -- \ - --mode destroy,format,mount --yes-wipe-all-disks "./hosts/$DOTNIX_HOSTNAME/disko.nix" + --mode destroy,format,mount --yes-wipe-all-disks "./hosts/$CAENIX_HOSTNAME/disko.nix" else >&2 echo "Aborted installation due to invalid state in the partitioning step." exit 1 @@ -133,7 +133,7 @@ partition_disk() { } install() { - yes | sudo nixos-install --no-root-passwd --flake ".#$DOTNIX_HOSTNAME" + yes | sudo nixos-install --no-root-passwd --flake ".#$CAENIX_HOSTNAME" } copy_files_to_new_install() { @@ -145,7 +145,7 @@ copy_files_to_new_install() { sudo cp -vr . /mnt/nix/config sudo mkdir -p "/mnt/nix/persist/home/$username/programming" - sudo ln -svf /nix/config "/mnt/nix/persist/home/$username/programming/dotnix" + sudo ln -svf /nix/config "/mnt/nix/persist/home/$username/programming/caenix" sudo chown -R 1000:100 "/mnt/nix/persist/home/$username" sudo chown -R 1000:100 "/mnt/nix/config" } @@ -162,8 +162,8 @@ main () { args "$@" permissions - if [ -n "$DOTNIX_DO_ONLY_BUILD" ]; then - if [ -n "$DOTNIX_INSTALL_DEVICE" ]; then + if [ -n "$CAENIX_DO_ONLY_BUILD" ]; then + if [ -n "$CAENIX_INSTALL_DEVICE" ]; then update_managed_values fi diff --git a/modules/home/caem/desktop/gnome/default.nix b/modules/home/caem/desktop/gnome/default.nix index 7b46087..f73dc47 100644 --- a/modules/home/caem/desktop/gnome/default.nix +++ b/modules/home/caem/desktop/gnome/default.nix @@ -1,9 +1,14 @@ -{ pkgs, lib, ... }: +{ pkgs, lib, inputs, ... }: -{ +let + picture-uri = if builtins.hasAttr "wallpaper" inputs.secrets.assets + then inputs.exrets.assets.wallpaper + else ../../../../../assets/wallpaper.jpg; +in{ dconf.settings = { - "org/gnome/desktop/background".picture-uri = builtins.toString ../../../../../assets/wallpaper.png; - "org/gnome/desktop/screensaver".picture-uri = builtins.toString ../../../../../assets/wallpaper.png; + "org/gnome/desktop/background".picture-uri = picture-uri; + "org/gnome/desktop/background".picture-uri-dark = picture-uri; + "org/gnome/desktop/screensaver".picture-uri = picture-uri; "org/gnome/desktop/interface" = { accent-color = "slate"; color-scheme = "prefer-dark"; @@ -31,6 +36,22 @@ "org.gnome.Nautilus.desktop" ]; }; + "org/gnome/shell/extensions/just-perfection" = { + calendar = false; + events-button = false; + quick-settings-dark-mode = false; + world-clock = false; + }; + "org/gnome/shell/extensions/quick-settings-tweaks" = { + notifications-enabled = false; + }; + "org/gnome/desktop/wm/preferences" = { + audible-bell = false; + num-workspaces = 9; + }; + "org/gnome/mutter" = { + dynamic-workspaces = false; + }; "org/gnome/shell/keybindings" = { switch-to-application-1 = []; switch-to-application-2 = []; @@ -42,13 +63,6 @@ switch-to-application-8 = []; switch-to-application-9 = []; }; - "org/gnome/desktop/wm/preferences" = { - audible-bell = false; - num-workspaces = 9; - }; - "org/gnome/mutter" = { - dynamic-workspaces = false; - }; "org/gnome/desktop/wm/keybindings" = { switch-to-workspace-1 = ["1"]; switch-to-workspace-2 = ["2"];