diff --git a/.github/README.md b/.github/README.md index db500e8..29c6d49 100644 --- a/.github/README.md +++ b/.github/README.md @@ -28,7 +28,7 @@ That being said, there is a lot of general configuration that you *probably* can - Literate configuration for Nix and Emacs ([SwarselSystems.org](../SwarselSystems.org)) - Configuration based on flakes for personal hosts as well as servers on: - - [NixOS](https://github.com/NixOS/nixpkgs)) + - [NixOS](https://github.com/NixOS/nixpkgs) - [home-manager](https://github.com/nix-community/home-manager) only (no full NixOS) with support from [nixGL](https://github.com/nix-community/nixGL) - [nix-darwin](https://github.com/LnL7/nix-darwin) - [nix-on-droid](https://github.com/nix-community/nix-on-droid) @@ -39,7 +39,7 @@ That being said, there is a lot of general configuration that you *probably* can - Fully autonomous remote deployment using [nixos-anywhere](https://github.com/nix-community/nixos-anywhere) and [disko](https://github.com/nix-community/disko) (with secrets handling) - Improved nix tooling - Support for advanced features: - - Secrets handling using [sops-nix](https://github.com/Mic92/sops-nix) (pls don't pwn ❤️) + - Secrets handling using [sops-nix](https://github.com/Mic92/sops-nix) (pls no pwn ❤️) - Management of non-file-based secrets using private repo - Full Yubikey support - LUKS-encryption @@ -66,56 +66,69 @@ Otherwise, the files that are possibly of biggest interest are found here: ## Getting started ### Demo configuration + If you just want to see if this configuration is for you, run this command on any system that has `nix` installed: ``` shell -nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles#install -- -u +nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles#rebuild -- -u ``` -This will install the `chaostheatre` configuration on your system, which is a de-facto mirror of my main configuration with secret-based settings removed. +This will activate the `chaostheatre` configuration on your system, which is a de-facto mirror of my main configuration with secret-based settings removed. Please keep in mind that this limited installer will make local changes to the cloned repository in order to be able to install it (otherwise the builder would fail at fetching my private secrets repository). As such, this should only be used to evaluate the system - if you want to use it longterm, you will need to create a fork and make some changes. ## Deployment -The deployment process for this configuration is mostly automated, there are only a few steps that are needed to be done manually: +The deployment process for this configuration is mostly automated, there are only a few steps that are needed to be done manually. You can choose between a remote deployment strategy that is also able to deploy new age keys for sops for you and a local installer that will only install the system without any secret handling. + +### Remote deployment (recommended if you have at least one running system) -0) Fork this repo, and write your own host config at `hosts/nixos//default.nix` (you can use one of the other configurations as a template. Also see https://github.com/Swarsel/.dotfiles/tree/main/modules for a list of all additional options). At the very least, you should replace the `secrets/` directory with your own secrets and replace the SSH public keys with your own ones. I personally recommend to use the literate configuration and `org-babel-tangle-file` in Emacs, but you can also simply edit the separate `.nix` files. +0) Fork this repo, and write your own host config at `hosts/nixos//default.nix` (you can use one of the other configurations as a template. Also see https://github.com/Swarsel/.dotfiles/tree/main/modules for a list of all additional options). At the very least, you should replace the `secrets/` directory with your own secrets and replace the SSH public keys with your own ones (otherwise I will come visit you!🔓❤️). I personally recommend to use the literate configuration and `org-babel-tangle-file` in Emacs, but you can also simply edit the separate `.nix` files. 1) Have a system with `nix` available booted (this does not need to be installed, i.e. you can use a NixOS installer image; a custom minimal installer ISO can be built by running `just iso` in the root of this repo) 2) Make sure that your Yubikey is plugged in or that you have your SSH key available (and configured) -3) Run - -``` shell -nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles#install -- -n -d -``` - -Alternatively (if you already have this configuration installed), you can also run `bootstrap -n -d ` (this runs the same program as the command above). +3) Run `bootstrap -n -d ` on your existing system. + - Alternatively (if you run this on a system that is not yet running this configuration), you can also run `nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles -- -n -d ` (this runs the same program as the command above). 4) Follow the installers instructions: - you will have to choose a disk encryption password (if you want that feature) - you will have to confirm once that the target system has rebooted - you will have to enter the root password once during the final system install 5) That should be it! The installer will take care of setting up disks, secrets, and the rest of the hardware configuration! You will still have to sign in manually to some webservices etc. -## General Nix tips 8 useful links -Below is a small list of tips that should be helpful no matter if you are new to the nix ecosystem: +### Local deployment (recommended for setting up the first system) + +1) Boot the latest install ISO from this repository on an UEFI system. +2) Run `swarsel-install -d -f ` +3) Reboot + +Alternatively, to install this from any NixOS live ISO, run `nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles#install -- -d -f ` at step 2. + +## General Nix tips & useful links +- Below is a small list of tips that should be helpful if you are new to the nix ecosystem: + + - Once you have the experimental feature `nix-command` enabled, you can temporarily install any package using `nix shell nixpkgs#` - this can be e.g. useful if you accidentally removed home-manager from your packages on a non-NixOS machine. + - The `nix [...]` commands are generally very useful, more info can be found here: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix + - When you are trying to setup a new configuration part, GitHub code search can really help you to find a working configuration. Just filter for `.nix` files and the options you are trying to set up. + - getting packages at a different version than your target (or not packaged at all) can be done in most cases easily with fetchFromGithub (https://ryantm.github.io/nixpkgs/builders/fetchers/) + - you can easily install old revisions of packages using https://lazamar.co.uk/nix-versions/. You can conveniently spawn a shell with a chosen package available using `vershell `. Just make sure to pick a revision that has flakes enabled, otherwise you will need the legacy way of spawning the shell (see the link for more info) -- Once you have the experimental feature `nix-command` enabled, you can temporarily install any package using `nix shell nixpkgs#` - this can be e.g. useful if you accidentally removed home-manager from your packages on a non-NixOS machine. - - The `nix [...]` commands are generally very useful, more info can be found here: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix - These links are your best friends: - - https://search.nixos.org/packages - - https://search.nixos.org/options - - https://nix-community.github.io/home-manager/options.html / https://mipmip.github.io/home-manager-option-search/ -- Flake output reference: https://nixos-and-flakes.thiscute.world/other-usage-of-flakes/outputs - - or more general, the [NixOS & Flakes Book](https://nixos-and-flakes.thiscute.world/) -- Also useful is the [NixOS wiki](https://nixos.wiki/wiki/Main_Page), but some pages are outdated, so use with some care -- You can find public repositories with modules at https://nur.nix-community.org/ (you should check what you are installing however): - - I like to use this for rycee's firefox extensions: https://nur.nix-community.org/repos/rycee/ -- When you are trying to setup a new configuration part, GitHub code search can really help you to find a working configuration. -- getting packages at a different version than your target (or not packaged at all) can be done in most cases easily with fetchFromGithub (https://ryantm.github.io/nixpkgs/builders/fetchers/) -- you can easily install old revisions of packages using https://lazamar.co.uk/nix-versions/. You can conveniently spawn a shell with a chosen package available using `vershell `. Just make sure to pick a revision that has flakes enabled, otherwise you will need the legacy way of spawning the shell (see the link for more info) -- List of nerdfonts: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/data/fonts/nerd-fonts/manifests/fonts.json -- List of pre-commit-hooks: https://devenv.sh/reference/options/#pre-commithooks -- Stylix configuration options: https://danth.github.io/stylix/ -- Waybar configuration: https://github.com/Alexays/Waybar/wiki + - The nixpkgs reference manual: https://nixos.org/manual/nixpkgs/unstable/#buildpythonapplication-function + - The NixOS manual: https://nixos.org/manual/nixos/stable/ + - The NixOS package search: https://search.nixos.org/packages + - The NixOS option search https://search.nixos.org/options + - [mipmip](https://github.com/mipmip)'s home-manager option search: https://mipmip.github.io/home-manager-option-search/ + - [Alan Pearce](https://alanpearce.eu/)'s nix-darwin search: https://searchix.alanpearce.eu/options/darwin/search (which supports all of the other versions as well :o) +- But that is not all: + - Flake output reference: https://nixos-and-flakes.thiscute.world/other-usage-of-flakes/outputs + - or more general, the [NixOS & Flakes Book](https://nixos-and-flakes.thiscute.world/) + - Also useful is the [NixOS wiki](https://nixos.wiki/wiki/Main_Page), but some pages are outdated, so use with some care + - You can find public repositories with modules at https://nur.nix-community.org/ (you should check what you are installing however): + - I like to use this for rycee's firefox extensions: https://nur.nix-community.org/repos/rycee/ + - List of nerdfonts: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/data/fonts/nerd-fonts/manifests/fonts.json + - Stylix configuration options: https://danth.github.io/stylix/ + - nix-on-droid options: https://nix-community.github.io/nix-on-droid/nix-on-droid-options.html#sec-options +- And a few links that are not directly nix-related, but may still serve you well: + - List of pre-commit-hooks: https://devenv.sh/reference/options/#pre-commithooks + - Waybar configuration: https://github.com/Alexays/Waybar/wiki ## Attributions, Acknowledgements, Inspirations, etc. diff --git a/index.html b/index.html index 6731700..d62b08a 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + SwarselSystems: NixOS + Emacs Configuration @@ -237,7 +237,7 @@

Table of Contents

  • 4.1.2. Virtual hosts @@ -275,10 +275,12 @@

    Table of Contents

  • 4.2.1.15. github-notifications
  • 4.2.1.16. screenshare
  • 4.2.1.17. bootstrap
  • -
  • 4.2.1.18. swarsel-install
  • -
  • 4.2.1.19. t2ts
  • -
  • 4.2.1.20. ts2t
  • -
  • 4.2.1.21. vershell
  • +
  • 4.2.1.18. swarsel-rebuild
  • +
  • 4.2.1.19. swarsel-install
  • +
  • 4.2.1.20. t2ts
  • +
  • 4.2.1.21. ts2t
  • +
  • 4.2.1.22. vershell
  • +
  • 4.2.1.23. eontimer
  • 4.2.2. Overlays (additions, overrides, nixpkgs-stable)
  • @@ -681,7 +683,7 @@

    Table of Contents

    -This file has 56301 words spanning 14353 lines and was last revised on 2024-12-19 14:30:50 +0100. +This file has 57205 words spanning 14594 lines and was last revised on 2024-12-21 04:32:38 +0100.

    @@ -734,7 +736,7 @@

    1

    -My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-12-19 14:30:50 +0100) +My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-12-21 04:32:38 +0100)

    @@ -1629,6 +1631,11 @@

    3 type = "app"; program = "${self.packages.${system}.swarsel-install}/bin/swarsel-install"; }; + + rebuild = { + type = "app"; + program = "${self.packages.${system}.swarsel-rebuild}/bin/swarsel-rebuild"; + }; }); devShells = forAllSystems ( system: @@ -2065,6 +2072,11 @@

    3 type = "app"; program = "${self.packages.${system}.swarsel-install}/bin/swarsel-install"; }; + + rebuild = { + type = "app"; + program = "${self.packages.${system}.swarsel-rebuild}/bin/swarsel-rebuild"; + }; }); devShells = forAllSystems ( system: @@ -2637,8 +2649,8 @@

    4 I have removed most of the machines from this section. What remains are some hosts that I have deployed on OCI (mostly sync for medium-important data) and one other machine that I left for now as a reference.

    -
    -
    4.1.2.1. Toto (QEMU VM)
    +
    +
    4.1.2.1. Toto (QEMU VM)
    { self, inputs, outputs, config, pkgs, lib, ... }:
    @@ -2856,8 +2868,8 @@ 
    4
    -
    -

    4.1.3. Utility hosts

    +
    +

    4.1.3. Utility hosts

    @@ -2876,14 +2888,14 @@
    4 imports = [ - inputs.lanzaboote.nixosModules.lanzaboote - inputs.disko.nixosModules.disko - inputs.impermanence.nixosModules.impermanence - inputs.sops-nix.nixosModules.sops - "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" - "${modulesPath}/installer/cd-dvd/channel.nix" + inputs.lanzaboote.nixosModules.lanzaboote + inputs.disko.nixosModules.disko + inputs.impermanence.nixosModules.impermanence + inputs.sops-nix.nixosModules.sops + "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" + "${modulesPath}/installer/cd-dvd/channel.nix" - "${self}/profiles/iso/minimal.nix" + "${self}/profiles/iso/minimal.nix" ]; @@ -2905,7 +2917,7 @@
    4 users = { allowNoPasswordLogin = true; - groups.swarsel = {}; + groups.swarsel = { }; users = { swarsel = { name = "swarsel"; @@ -2927,6 +2939,18 @@
    4 loader.efi.canTouchEfiVariables = true; }; + programs.bash.shellAliases = { + "swarsel-install" = "nix run github:Swarsel/.dotfiles#install --"; + }; + + system.activationScripts.cache = { + text = '' + mkdir -p /home/swarsel/.local/share/nix/ + printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' | tee /home/swarsel/.local/share/nix/trusted-settings.json > /dev/null + mkdir -p /root/.local/share/nix/ + printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' | tee /root/.local/share/nix/trusted-settings.json > /dev/null + ''; + }; systemd = { services.sshd.wantedBy = lib.mkForce [ "multi-user.target" ]; targets = { @@ -3020,11 +3044,15 @@
    4
    -
    -
    4.1.3.3. ChaosTheatre (Demo)
    +
    +
    4.1.3.3. ChaosTheatre (Demo)

    -My work machine. Built for more security, this is the gold standard of my configurations at the moment. +This is just a demo host. It applies all the configuration found in the common parts of the flake, but disables all secrets-related features (as they would not work without the proper SSH keys). +

    + +

    +I also set the WLR_RENDERER_ALLOW_SOFTWARE=1 to allow this configuration to run in a virtualized environment. I also enable qemuGuest for a smoother experience when testing on QEMU.

    @@ -3043,7 +3071,7 @@
    4.1.3.3. ChaosTheatre inputs.home-manager.nixosModules.home-manager { - home-manager.users.swarsel.imports = outputs.mixedModules ++ (builtins.attrValues outputs.homeManagerModules); + home-manager.users.swarsel.imports = outputs.mixedModules ++ (builtins.attrValues outputs.homeManagerModules); } ] ++ (builtins.attrValues outputs.nixosModules); @@ -3055,6 +3083,11 @@
    4.1.3.3. ChaosTheatre }; }; + environment.variables = { + WLR_RENDERER_ALLOW_SOFTWARE = 1; + }; + + services.qemuGuest.enable = true; boot = { loader.systemd-boot.enable = lib.mkForce true; @@ -3143,6 +3176,7 @@

    4 "t2ts" "ts2t" "vershell" + "eontimer" ]; mkPackages = names: builtins.listToAttrs (map (name: { inherit name; @@ -4080,8 +4114,8 @@
    4

    -
    -
    4.2.1.18. swarsel-install
    +
    +
    4.2.1.18. swarsel-rebuild

    This program sets up a new NixOS host. @@ -4108,6 +4142,12 @@

    4.2.1.18. swarsel-inst exit 0 } +function red() { + echo -e "\x1B[31m[!] $1 \x1B[0m" + if [ -n "${2-}" ]; then + echo -e "\x1B[31m[!] $($2) \x1B[0m" + fi +} function green() { echo -e "\x1B[32m[+] $1 \x1B[0m" if [ -n "${2-}" ]; then @@ -4145,6 +4185,9 @@
    4.2.1.18. swarsel-inst if [ ! -d /home/"$target_user"/.dotfiles ]; then green "Cloning repository from GitHub" git clone https://github.com/Swarsel/.dotfiles.git +else + red "A .dotfiles repository is in the way. Please (re-)move the repository and try again." + exit 1 fi local_keys=$(ssh-add -L || true) @@ -4157,18 +4200,155 @@
    4.2.1.18. swarsel-inst green "Adjusting flake.nix so that the configuration is buildable" sed -i '/nix-secrets = {/,/^[[:space:]]*};/d' flake.nix git add flake.nix +else + green "Valid SSH key found! Continuing with installation" fi sudo nixos-generate-config --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/ git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/hardware-configuration.nix -sudo mkdir -p /root/.local/share/nix/ -printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' > /root/.local/share/nix/trusted-settings.json + green "Installing flake $target_flake" sudo nixos-rebuild --show-trace --flake .#"$target_flake" boot yellow "Please keep in mind that this is only a demo of the configuration. Things might break unexpectedly." -git restore --staged /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/hardware-configuration.nix -git restore /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/hardware-configuration.nix -git restore --staged /home/"$target_user"/.dotfiles/flake.nix -git restore /home/"$target_user"/.dotfiles/flake.nix + +
    + + + +
    +
    { writeShellApplication, git }:
    +
    +writeShellApplication {
    +  name = "swarsel-rebuild";
    +  runtimeInputs = [ git ];
    +  text = builtins.readFile ../../scripts/swarsel-rebuild.sh;
    +}
    +
    +
    +
    +
    +
    +
    4.2.1.19. swarsel-install
    +
    +

    +This program sets up a new NixOS host. +

    + +
    +
    set -eo pipefail
    +
    +target_flake="chaostheatre"
    +target_user="swarsel"
    +fs_type="ext4"
    +disk=""
    +
    +function help_and_exit() {
    +    echo
    +    echo "Remotely installs NixOS on a target machine using this nix-config."
    +    echo
    +    echo "USAGE: $0 -d <disk> [OPTIONS]"
    +    echo
    +    echo "ARGS:"
    +    echo "  -d <disk>                               specify disk to install on."
    +    echo "  -f <target_flake>                       specify flake to deploy the nixos config of."
    +    echo "                                          Default: chaostheatre"
    +    echo "  -u <target_user>                        specify user to deploy for."
    +    echo "                                          Default: swarsel"
    +    echo "  -t <fs_type>                            specify file system type to deploy for."
    +    echo "                                          Default: ext4"
    +    echo "  -h | --help                             Print this help."
    +    exit 0
    +}
    +
    +function green() {
    +    echo -e "\x1B[32m[+] $1 \x1B[0m"
    +    if [ -n "${2-}" ]; then
    +        echo -e "\x1B[32m[+] $($2) \x1B[0m"
    +    fi
    +}
    +function yellow() {
    +    echo -e "\x1B[33m[*] $1 \x1B[0m"
    +    if [ -n "${2-}" ]; then
    +        echo -e "\x1B[33m[*] $($2) \x1B[0m"
    +    fi
    +}
    +
    +while [[ $# -gt 0 ]]; do
    +    case "$1" in
    +    -f)
    +        shift
    +        target_flake=$1
    +        ;;
    +    -u)
    +        shift
    +        target_user=$1
    +        ;;
    +    -t)
    +        shift
    +        fs_type=$1
    +        ;;
    +    -d)
    +        shift
    +        disk=$1
    +        ;;
    +    -h | --help) help_and_exit ;;
    +    *)
    +        echo "Invalid option detected."
    +        help_and_exit
    +        ;;
    +    esac
    +    shift
    +done
    +
    +cd /home/"$target_user"
    +
    +sudo rm -rf .cache/nix
    +sudo rm -rf .dotfiles
    +
    +green "Cloning repository from GitHub"
    +git clone https://github.com/Swarsel/.dotfiles.git
    +
    +local_keys=$(ssh-add -L || true)
    +pub_key=$(cat /home/"$target_user"/.dotfiles/secrets/keys/ssh/nbl-imba-2.pub)
    +read -ra pub_arr <<< "$pub_key"
    +
    +cd .dotfiles
    +if [[ $local_keys != *"${pub_arr[1]}"* ]]; then
    +    yellow "The ssh key for this configuration is not available."
    +    green "Adjusting flake.nix so that the configuration is buildable"
    +    sed -i '/nix-secrets = {/,/^[[:space:]]*};/d' flake.nix
    +    git add flake.nix
    +else
    +    green "Valid SSH key found! Continuing with installation"
    +fi
    +
    +green "Creating /boot partition"
    +sudo parted -a optimal --script "$disk" mklabel gpt
    +sudo parted -a optimal --script "$disk" mkpart "boot" fat32 1MiB 1025MiB
    +sudo parted -a optimal --script "$disk" set 1 esp on
    +
    +green "Creating / partition"
    +sudo parted -a optimal --script "$disk" mkpart "root" "$fs_type" 1025MiB 100%
    +sudo parted -a optimal --script "$disk" type 2 4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709
    +
    +green "Ensuring proper file systems"
    +sudo mkfs.fat -F32 "$disk"1
    +sudo mkfs."${fs_type}" -F "$disk"2
    +
    +green "Generating hardware configuration"
    +sudo mount "$disk"2 /mnt
    +sudo mkdir -p /mnt/boot
    +sudo mount "$disk"1 /mnt/boot
    +sudo nixos-generate-config --root /mnt --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/
    +
    +git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/hardware-configuration.nix
    +# sudo rm -rf /root/.nix-defexpr/channels
    +# sudo rm -rf /nix/var/nix/profiles/per-user/channels
    +sudo mkdir -p /root/.local/share/nix/
    +printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' | sudo tee /root/.local/share/nix/trusted-settings.json > /dev/null
    +green "Installing flake $target_flake"
    +sudo nixos-install --flake .#"$target_flake"
    +yellow "Please keep in mind that this is only a demo of the configuration. Things might break unexpectedly."
    +green "Installation finished! Reboot to see changes"
     
    @@ -4187,7 +4367,7 @@
    4.2.1.18. swarsel-inst
    -
    4.2.1.19. t2ts
    +
    4.2.1.20. t2ts

    This script allows for quick git branch switching. @@ -4209,7 +4389,7 @@

    4
    -
    4.2.1.20. ts2t
    +
    4.2.1.21. ts2t

    This script allows for quick git branch switching. @@ -4230,9 +4410,9 @@

    4
    -
    -
    4.2.1.21. vershell
    -
    +
    +
    4.2.1.22. vershell
    +

    This script allows for quick git branch switching.

    @@ -4248,6 +4428,68 @@
    4.2.1.21. vershell
    +
    +
    +
    +
    +
    4.2.1.23. eontimer
    +
    +

    +This script allows for quick git branch switching. +

    + +
    +
    { pkgs, python3Packages }:
    +
    +python3Packages.buildPythonApplication rec {
    +  pname = "eontimer";
    +  version = "3.0.0";
    +  pyproject = true;
    +
    +  src = pkgs.fetchFromGitHub {
    +    owner = "DasAmpharos";
    +    repo = "EonTimer";
    +    rev = "9449e6158f0aa6eaa24b3b1d0a427aa198b5c0e4";
    +    hash = "sha256-+XN/VGGlEg2gVncRZrWDOZ2bfxt8xyIu22F2wHlG6YI=";
    +  };
    +
    +  build-system = with python3Packages; [
    +    setuptools
    +  ];
    +
    +  dependencies = with python3Packages; [
    +    altgraph
    +    certifi
    +    charset-normalizer
    +    idna
    +    libsass
    +    macholib
    +    packaging
    +    pillow
    +    pipdeptree
    +    platformdirs
    +    pyinstaller
    +    pyinstaller-hooks-contrib
    +    pyside6
    +    requests
    +    setuptools
    +    shiboken6
    +    urllib3
    +  ];
    +
    +  buildPhase = ''
    +    ${pkgs.python3Packages.pyinstaller}/bin/pyinstaller EonTimer.spec
    +  '';
    +
    +  installPhase = ''
    +    mkdir -p $out/bin
    +    cp dist/EonTimer $out/bin/
    +  '';
    +
    +
    +}
    +
     
    @@ -4282,6 +4524,17 @@

    4 ]; }; + retroarch = _prev.retroarch.withCores (cores: with cores; [ + snes9x # snes + nestopia # nes + dosbox # dos + scummvm # scumm + vba-m # gb/a + mgba # gb/a + melonds # ds + dolphin # gc/wii + ]); + # prismlauncher = _prev.prismlauncher.override { # glfw = _prev.glfw-wayland-minecraft; # }; @@ -5229,6 +5482,8 @@
    4 # secure boot sbctl + libsForQt5.qt5.qtwayland + # nix package database nix-index nixos-generators @@ -6475,6 +6730,7 @@
    4 libvpx libxkbcommon libxml2 + libz mesa nspr nss @@ -6687,6 +6943,7 @@
    4 export SDL_VIDEODRIVER=wayland export QT_QPA_PLATFORM=wayland-egl export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 + export QT_QPA_PLATFORM_PLUGIN_PATH="${pkgs.libsForQt5.qt5.qtbase.bin}/lib/qt-${pkgs.libsForQt5.qt5.qtbase.version}/plugins"; export MOZ_ENABLE_WAYLAND=1 export MOZ_DISABLE_RDD_SANDBOX=1 ''; @@ -9345,6 +9602,7 @@
    4 t2ts ts2t vershell + eontimer bootstrap @@ -11983,28 +12241,31 @@
    4 { # specialisation = { # gaming.configuration = { - home.packages = with pkgs; [ - stable.lutris - wine - libudev-zero - dwarfs - fuse-overlayfs - # steam - # steam-run - patchelf - gamescope - vulkan-tools - moonlight-qt - ns-usbloader - - quark-goldleaf - # gog games installing - heroic - - # minecraft - prismlauncher # has overrides - temurin-bin-17 - ]; + home.packages = with pkgs; [ + stable.lutris + wine + libudev-zero + dwarfs + fuse-overlayfs + # steam + # steam-run + patchelf + gamescope + vulkan-tools + moonlight-qt + ns-usbloader + + quark-goldleaf + # gog games installing + heroic + + # minecraft + prismlauncher # has overrides + temurin-bin-17 + + pokefinder + retroarch + ]; # }; # }; } @@ -16292,7 +16553,7 @@

    5

    Author: Leon Schwarzäugl

    -

    Created: 2024-12-19 Do 14:30

    +

    Created: 2024-12-21 Sa 04:32

    Validate