diff options
| author | Preston Pan <ret2pop@nullring.xyz> | 2026-03-02 00:03:12 -0800 |
|---|---|---|
| committer | Preston Pan <ret2pop@nullring.xyz> | 2026-03-02 00:03:12 -0800 |
| commit | 9484c4ec525c02caa8a65ecfe37ed24f1d4b321d (patch) | |
| tree | 676712a1504939b37a69fbee9c235dc61917cd65 /nix/systems | |
| parent | a05e0614c1bb75f77717a943dc4ac75a0cca4652 (diff) | |
Remove local nix directory to prepare for submodule
Diffstat (limited to 'nix/systems')
| -rw-r--r-- | nix/systems/affinity/default.nix | 16 | ||||
| -rw-r--r-- | nix/systems/affinity/home.nix | 6 | ||||
| -rw-r--r-- | nix/systems/common.nix | 8 | ||||
| -rw-r--r-- | nix/systems/continuity/default.nix | 19 | ||||
| -rw-r--r-- | nix/systems/continuity/home.nix | 6 | ||||
| -rw-r--r-- | nix/systems/home-common.nix | 7 | ||||
| -rw-r--r-- | nix/systems/home.nix | 15 | ||||
| -rw-r--r-- | nix/systems/installer/commits.nix | 5 | ||||
| -rw-r--r-- | nix/systems/installer/default.nix | 156 | ||||
| -rw-r--r-- | nix/systems/rpi-skepticism/default.nix | 7 | ||||
| -rw-r--r-- | nix/systems/rpi-zero/default.nix | 21 | ||||
| -rw-r--r-- | nix/systems/rpi-zero/home.nix | 7 | ||||
| -rw-r--r-- | nix/systems/spontaneity/default.nix | 28 | ||||
| -rw-r--r-- | nix/systems/spontaneity/hardware-configuration.nix | 23 | ||||
| -rw-r--r-- | nix/systems/spontaneity/home.nix | 6 |
15 files changed, 0 insertions, 330 deletions
diff --git a/nix/systems/affinity/default.nix b/nix/systems/affinity/default.nix deleted file mode 100644 index 33d6bc6..0000000 --- a/nix/systems/affinity/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, lib, home-manager, ... }: -{ - imports = [ - ../common.nix - ../../disko/drive-simple.nix - ]; - config = { - monorepo = { - vars.device = "/dev/nvme0n1"; - profiles = { - cuda.enable = true; - workstation.enable = true; - }; - }; - }; -} diff --git a/nix/systems/affinity/home.nix b/nix/systems/affinity/home.nix deleted file mode 100644 index 59b05fc..0000000 --- a/nix/systems/affinity/home.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ lib, config, pkgs, ... }: -{ - imports = [ - ../home-common.nix - ]; -} diff --git a/nix/systems/common.nix b/nix/systems/common.nix deleted file mode 100644 index c122b0d..0000000 --- a/nix/systems/common.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, lib, ... }: -{ - imports = [ - ./home.nix - ../modules/default.nix - ]; - # Put configuration (e.g. monorepo variable configuration) common to all configs here -} diff --git a/nix/systems/continuity/default.nix b/nix/systems/continuity/default.nix deleted file mode 100644 index d4da62f..0000000 --- a/nix/systems/continuity/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ ... }: -{ - imports = [ - ../../disko/btrfs-simple.nix - ../common.nix - ]; - config = { - monorepo = { - profiles = { - impermanence.enable = true; - desktop.enable = true; - }; - vars = { - device = "/dev/sda"; - fileSystem = "btrfs"; - }; - }; - }; -} diff --git a/nix/systems/continuity/home.nix b/nix/systems/continuity/home.nix deleted file mode 100644 index 59b05fc..0000000 --- a/nix/systems/continuity/home.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ lib, config, pkgs, ... }: -{ - imports = [ - ../home-common.nix - ]; -} diff --git a/nix/systems/home-common.nix b/nix/systems/home-common.nix deleted file mode 100644 index ba0e6f2..0000000 --- a/nix/systems/home-common.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ lib, config, ... }: -{ - imports = [ - ../modules/home/default.nix - ]; - # Put configuration (e.g. monorepo variable configuration) common to all configs here -} diff --git a/nix/systems/home.nix b/nix/systems/home.nix deleted file mode 100644 index 1e86ebb..0000000 --- a/nix/systems/home.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, sops-nix, ... }: -{ - home-manager = { - backupFileExtension = "backup"; - sharedModules = [ - sops-nix.homeManagerModules.sops - ]; - extraSpecialArgs = { - super = config; - }; - useGlobalPkgs = true; - useUserPackages = true; - users."${config.monorepo.vars.userName}" = (import (./. + "/${config.networking.hostName}/home.nix")); - }; -} diff --git a/nix/systems/installer/commits.nix b/nix/systems/installer/commits.nix deleted file mode 100644 index 27e6aab..0000000 --- a/nix/systems/installer/commits.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - diskoCommitHash = "c8a0e78d86b12ea67be6ed0f7cae7f9bfabae75a"; - monorepoCommitHash = "7d8501ebc97fc238d73dee4638ab58eb32a11dc1"; - monorepoUrl = "https://github.com/ret2pop/monorepo"; -} diff --git a/nix/systems/installer/default.nix b/nix/systems/installer/default.nix deleted file mode 100644 index e9232cb..0000000 --- a/nix/systems/installer/default.nix +++ /dev/null @@ -1,156 +0,0 @@ -{ pkgs, config, lib, modulesPath, ... }: -let - commits = import ./commits.nix; -in -{ - imports = [ - (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") - ]; - - networking = { - networkmanager = { - enable = true; - }; - firewall = { - allowedTCPPorts = [ 22 ]; - allowedUDPPorts = [ ]; - }; - wireless.enable = false; - }; - services.openssh = { - enable = true; - ports = [ 22 ]; - settings = { - PasswordAuthentication = false; - AllowUsers = null; - UseDns = true; - PermitRootLogin = lib.mkForce "prohibit-password"; - }; - }; - - users.extraUsers.root.password = "nixos"; - users.extraUsers.nixos.password = "nixos"; - users.users = { - root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell" - ]; - nixos = { - packages = with pkgs; [ - gitFull - curl - gum - (writeShellScriptBin "nix_installer" - '' -#!/usr/bin/env bash - -set -euo pipefail - -if [ "$(id -u)" -eq 0 ]; then - echo "ERROR! $(basename "$0") should be run as a regular user" - exit 1 -fi - -cd "$HOME" - -ping -q -c1 google.com &>/dev/null && echo "online! Proceeding with the installation..." || nmtui - -if [ ! -d "$HOME/monorepo/" ]; then - git clone ${commits.monorepoUrl} - cd "$HOME/monorepo" - git checkout "${commits.monorepoCommitHash}" - cd "$HOME" -fi - -gum style --border normal --margin "1" --padding "1 2" "Enter a password for the encrypted disk. If you're not installing a profile with an encrypted disk, you can leave this blank." -echo "$(gum input --password)" > /tmp/secret.key - -gum style --border normal --margin "1" --padding "1 2" "Choose a system to install or select \`new\` in order to create a new system." - -SYSTEM="$(gum choose $(find "$HOME/monorepo/nix/systems" -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | grep -v -E 'installer'; printf "New"))" - -if [[ "$SYSTEM" == "New" ]]; then - gum style --border normal --margin "1" --padding "1 2" "Choose a system name" - SYSTEM="$(gum input --placeholder "system name")" - - gum style --border normal --margin "1" --padding "1 2" "Select a drive file or create a new drive file." - DRIVE="$(gum choose $(find "$HOME/monorepo/nix/disko" -mindepth 1 -maxdepth 1 -type f -printf "%f\n"; printf "New"))" - - if [[ "$DRIVE" == "New" ]]; then - gum style --border normal --margin "1" --padding "1 2" "Choose a name to call your drive file." - DRIVE="$(gum input --placeholder "drive file name (ex: partition_scheme.nix)")" - fi -fi - - -if [ ! -d "$HOME/monorepo/nix/systems/$SYSTEM" ]; then - mkdir -p "$HOME/monorepo/nix/systems/$SYSTEM" - cp "$HOME/monorepo/nix/systems/continuity/home.nix" "$HOME/monorepo/nix/systems/$SYSTEM/home.nix" - cat > "$HOME/monorepo/nix/systems/$SYSTEM/default.nix" <<EOF -{ ... }: -{ - imports = [ - ../includes.nix - ../../disko/$DRIVE - ]; - # CHANGEME - config.monorepo.vars.drive = "/dev/sda"; -} -EOF - - gum style --border normal --margin "1" --padding "1 2" "Edit the system default.nix with options." - gum input --placeholder "Press Enter to continue" >/dev/null - vim "$HOME/monorepo/nix/systems/$SYSTEM/default.nix" - - gum style --border normal --margin "1" --padding "1 2" "Edit the home default.nix with options." - gum input --placeholder "Press Enter to continue" >/dev/null - vim "$HOME/monorepo/nix/systems/$SYSTEM/home.nix" - - sed -i "/hostnames = \[/,/];/ s/];/ \"$1\"\n ];/" "$HOME/monorepo/nix/flake.nix" - - if [ ! -f "$HOME/monorepo/nix/disko/$DRIVE" ]; then - cp "$HOME/monorepo/nix/disko/drive-simple.nix" "$HOME/monorepo/nix/disko/$DRIVE" - gum style --border normal --margin "1" --padding "1 2" "Edit the drive file with your preferred partitioning scheme." - gum input --placeholder "Press Enter to continue" >/dev/null - vim "$HOME/monorepo/nix/disko/$DRIVE" - fi - cd "$HOME/monorepo" && git add . && cd "$HOME" -fi - -nix --extra-experimental-features 'nix-command flakes' eval "$HOME/monorepo/nix#evalDisko.$SYSTEM" > "$HOME/drive.nix" - -gum style --border normal --margin "1" --padding "1 2" "Formatting the drive is destructive!" -if gum confirm "Are you sure you want to continue?"; then - echo "Proceeding..." -else - echo "Aborting." - exit 1 -fi - -sudo nix --experimental-features "nix-command flakes" run "github:nix-community/disko/${commits.diskoCommitHash}" -- --mode destroy,format,mount "$HOME/drive.nix" - -cd /mnt -sudo nixos-install --flake "$HOME/monorepo/nix#$SYSTEM" - -target_user="$(ls /mnt/home | head -n1)" -if [ -z "$target_user" ]; then - echo "No user directories found in /mnt/home" - exit 1 -fi -sudo cp -r "$HOME/monorepo" "/mnt/home/$target_user/" - -echo "rebooting..."; sleep 3; reboot -'') - ]; - }; - }; - - systemd = { - services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ]; - targets = { - sleep.enable = false; - suspend.enable = false; - hibernate.enable = false; - hybrid-sleep.enable = false; - }; - }; -} diff --git a/nix/systems/rpi-skepticism/default.nix b/nix/systems/rpi-skepticism/default.nix deleted file mode 100644 index ec9ff9f..0000000 --- a/nix/systems/rpi-skepticism/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ lib, config, ... }: -{ - imports = [ - ../common.nix - ../../disko/btrfs-simple.nix - ]; -} diff --git a/nix/systems/rpi-zero/default.nix b/nix/systems/rpi-zero/default.nix deleted file mode 100644 index bb56332..0000000 --- a/nix/systems/rpi-zero/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, config, home-manager, ... }: -{ - imports = [ - ../common.nix - ]; - config = { - zramSwap = { - enable = true; - algorithm = "zstd"; - memoryPercent = 100; - }; - boot.loader.grub.enable = false; - boot.loader.generic-extlinux-compatible.enable = true; - monorepo = { - vars.device = "/dev/mmcblk0"; - profiles = { - ttyonly.enable = true; - }; - }; - }; -} diff --git a/nix/systems/rpi-zero/home.nix b/nix/systems/rpi-zero/home.nix deleted file mode 100644 index 205ea02..0000000 --- a/nix/systems/rpi-zero/home.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ lib, config, pkgs, ... }: -{ - imports = [ - ../home-common.nix - ]; - config.monorepo.profiles.enable = false; -} diff --git a/nix/systems/spontaneity/default.nix b/nix/systems/spontaneity/default.nix deleted file mode 100644 index 823c7b9..0000000 --- a/nix/systems/spontaneity/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config, lib, ... }: -{ - imports = [ - ../common.nix - ../../disko/drive-bios.nix - - # nixos-anywhere generates this file - ./hardware-configuration.nix - ]; - config = { - monorepo = { - vars.device = "/dev/vda"; - profiles = { - server = { - enable = true; - ipv4 = "66.42.84.130"; - gateway = "66.42.84.1"; - ipv6 = "2001:19f0:5401:10d0:5400:5ff:fe4a:7794"; - interface = "ens3"; - }; - grub.enable = true; - pipewire.enable = false; - tor.enable = false; - }; - }; - boot.loader.grub.device = "nodev"; - }; -} diff --git a/nix/systems/spontaneity/hardware-configuration.nix b/nix/systems/spontaneity/hardware-configuration.nix deleted file mode 100644 index 050ed23..0000000 --- a/nix/systems/spontaneity/hardware-configuration.nix +++ /dev/null @@ -1,23 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = [ ]; - - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens3.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - virtualisation.hypervGuest.enable = true; -} diff --git a/nix/systems/spontaneity/home.nix b/nix/systems/spontaneity/home.nix deleted file mode 100644 index 59b05fc..0000000 --- a/nix/systems/spontaneity/home.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ lib, config, pkgs, ... }: -{ - imports = [ - ../home-common.nix - ]; -} |
