diff --git a/.envrc b/.envrc
index 3550a30f..8392d159 100644
--- a/.envrc
+++ b/.envrc
@@ -1 +1 @@
-use flake
+use flake
\ No newline at end of file
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 90e05c40..00000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-# To get started with Dependabot version updates, you'll need to specify which
-# package ecosystems to update and where the package manifests are located.
-# Please see the documentation for all configuration options:
-# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
-
-version: 2
-updates:
- - package-ecosystem: "github-actions" # See documentation for possible values
- directory: "/" # Location of package manifests
- schedule:
- interval: "weekly"
diff --git a/.github/workflows/update-riscv.yaml b/.github/workflows/update-riscv.yaml
deleted file mode 100644
index 2ed87d2c..00000000
--- a/.github/workflows/update-riscv.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: update-riscv
-on:
- push:
- branches:
- - main
-jobs:
- pr:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Create update pull request
- run: |
- curl -X 'POST' \
- 'https://git.chir.rs/api/v1/repos/darkkirb/nixos-config/pulls' \
- -H 'Authorization: Bearer ${{secrets.GITHUB_TOKEN}}' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "base": "main-riscv",
- "body": "Keeping main-riscv up to date",
- "head": "main",
- "title": "Update RISC-V config"
- }'
diff --git a/.gitignore b/.gitignore
index 52c1f543..76570c15 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,2 @@
result
-*.qcow2
-*.fd
-.direnv
-/efi/secret
+.direnv/
\ No newline at end of file
diff --git a/.sops.yaml b/.sops.yaml
index 0d26cb84..f433d6c8 100644
--- a/.sops.yaml
+++ b/.sops.yaml
@@ -1,75 +1,72 @@
keys:
- - &lotte age1tltjgexkp5fz3rum4j0k66ty5q4u8ptvkgkepumd20zal24g2qfs5xgw76
- - &nixos-8gb-fsn1-1 age1273ps5thcy70ckdt0270s2nysqgu48t38pq3wq975v3y7mf4eavsw38wsl
- - &thinkrac age1p400545a482fma40yfgytu40p6wr5a75v4f8yeudvgf7eh5erufqxhgynr
- - &nas age1c7y687sxh428wk34s8ws6kemu62mggafpt40rmanevgkuj5xa59q6f7tlc
- - &instance-20221213-1915 age1elra3uklw8rmwkevqms2l4tsd06d5utqda9d2w4qvqpz898uzuesugxkhc
- - &vf2 age1emv3kzvwgl36hgllrv7rlekqy3y3c6eztadl3lv09ks3z9vv6vdqw06yqa
+ - &base age1tltjgexkp5fz3rum4j0k66ty5q4u8ptvkgkepumd20zal24g2qfs5xgw76
+ - &darkkirb age15g6tzvcmcp3ae4hwnn4pwewat6eq9unlhtjrlaka6rf94ej9dd5qqpgt7u
+ - ¬522 age1emv3kzvwgl36hgllrv7rlekqy3y3c6eztadl3lv09ks3z9vv6vdqw06yqa
+ - &pc-installer age1eh2vd6cdy23qazwg0hzq95pn9e6p8yaqu4g6zyan8gzal4x5ed5qful8kg
- &rainbow-resort age19vzypddhexvvsf8xylstxc9znnkd8rxmamhjlt7elvz4j3zaf5tqqura6f
- - &devterm age1sqvl2cwvzeztuelpwppaestqufzeap8uf0vgy7t5mzr9rwc3dpxqhx8ly9
+ - &thinkrac age1p400545a482fma40yfgytu40p6wr5a75v4f8yeudvgf7eh5erufqxhgynr
creation_rules:
- - path_regex: secrets/shared\.yaml$
+ - path_regex: machine/not522/secrets\.yaml$
key_groups:
- age:
- - *nixos-8gb-fsn1-1
+ - *base
+ - *not522
+ - path_regex: services/tailscale\.yaml$
+ key_groups:
+ - age:
+ - *base
+ - *not522
+ - *rainbow-resort
- *thinkrac
- - *nas
- - *instance-20221213-1915
- - *vf2
+ - path_regex: services/restic\.yaml$
+ key_groups:
+ - age:
+ - *base
+ - *not522
- *rainbow-resort
- - *lotte
- - *devterm
- - path_regex: secrets/nixos-8gb-fsn1-1\.yaml$
- key_groups:
- - age:
- - *nixos-8gb-fsn1-1
- - *lotte
- - path_regex: secrets/thinkrac\.yaml$
- key_groups:
- - age:
- *thinkrac
- - *lotte
- - path_regex: secrets/nixos\.yaml$
- key_groups:
- - age:
- - *lotte
- - path_regex: secrets/nas\.yaml$
- key_groups:
- - age:
- - *nas
- - *lotte
- - path_regex: secrets/desktop\.yaml$
+ - path_regex: users/root/system\.yaml$
key_groups:
- age:
+ - *base
+ - *not522
+ - *pc-installer
+ - *rainbow-resort
- *thinkrac
+ - path_regex: users/darkkirb/system\.yaml$
+ key_groups:
+ - age:
+ - *base
+ - *not522
+ - *pc-installer
- *rainbow-resort
- - *lotte
- - *devterm
- - path_regex: secrets/instance-20221213-1915\.yaml$
+ - *thinkrac
+ - path_regex: users/darkkirb/home-manager/keys.yaml$
key_groups:
- age:
- - *instance-20221213-1915
- - *lotte
- - path_regex: secrets/vf2\.yaml$
- key_groups:
- - age:
- - *vf2
- - *lotte
- - path_regex: secrets/rainbow-resort\.yaml$
+ - *base
+ - *darkkirb
+ - path_regex: programs/ssh/shared-keys.yaml$
key_groups:
- age:
+ - *base
+ - *darkkirb
+ - *not522
+ - *pc-installer
- *rainbow-resort
- - *lotte
- - path_regex: secrets/devterm\.yaml$
+ - *thinkrac
+ - path_regex: programs/desktop/pim/secrets.yaml$
key_groups:
- age:
- - *devterm
- - *lotte
- - path_regex: secrets/kubernetes\.yaml$
+ - *base
+ - *darkkirb
+ - path_regex: config/kde/krdp.yaml$
key_groups:
- age:
- - *nixos-8gb-fsn1-1
- - *nas
- - *instance-20221213-1915
- - *rainbow-resort
- - *lotte
+ - *base
+ - *darkkirb
+ - path_regex: services/desktop/gpg/privkey.yaml
+ key_groups:
+ - age:
+ - *base
+ - *darkkirb
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index b48e6728..00000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "python.formatting.provider": "yapf",
- "conventionalCommits.scopes": ["thinkrac", "aarch64"],
- "files.associations": {
- "*.hujson": "jsonc"
- },
- "json.schemas": [
- {
- "fileMatch": ["*.hujson"],
- "schema": {
- "allowTrailingCommas": true
- }
- }
- ],
- "files.watcherExclude": {
- "**/target": true
- }
-}
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..7dd58835
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# Lotte’s New Nix configuration
+
+Very WIP rewrite
\ No newline at end of file
diff --git a/config/bittorrent-blocker.nix b/config/bittorrent-blocker.nix
deleted file mode 100644
index 496de109..00000000
--- a/config/bittorrent-blocker.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-_: {
- networking.firewall.extraCommands = ''
- # Taken from https://gist.github.com/rampageX/5cbe95be43ca3165f4d963629e3bb946
- # Block Torrent algo string using Boyer-Moore (bm)
- iptables -I FORWARD 1 -m string --algo bm --string "BitTorrent" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "BitTorrent protocol" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "peer_id=" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string ".torrent" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "announce.php?passkey=" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "torrent" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "announce" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "info_hash" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "/default.ida?" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string ".exe?/c+dir" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string ".exe?/c_tftp" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "BitTorrent" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "BitTorrent protocol" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "peer_id=" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string ".torrent" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "announce.php?passkey=" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "torrent" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "announce" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "info_hash" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "/default.ida?" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string ".exe?/c+dir" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string ".exe?/c_tftp" -j DROP
- # Block Torrent keys
- iptables -I FORWARD 1 -m string --algo kmp --string "peer_id" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "BitTorrent" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "BitTorrent protocol" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "bittorrent-announce" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "announce.php?passkey=" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "peer_id" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "BitTorrent" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "BitTorrent protocol" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "bittorrent-announce" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "announce.php?passkey=" -j DROP
- # Block Distributed Hash Table (DHT) keywords
- iptables -I FORWARD 1 -m string --algo kmp --string "find_node" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "info_hash" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "get_peers" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "announce" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "announce_peers" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "find_node" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "info_hash" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "get_peers" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "announce" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "announce_peers" -j DROP
- '';
-}
diff --git a/config/default.nix b/config/default.nix
index 4916fb34..7e2a99dd 100644
--- a/config/default.nix
+++ b/config/default.nix
@@ -1,91 +1,18 @@
+{ pkgs, nixos-config, ... }:
{
- config,
- pkgs,
- system,
- ...
-}: {
imports = [
- ./users/darkkirb.nix
- ./users/root.nix
- ./nix.nix
- ./sops.nix
- ./home.nix
- ./services/restic.nix
- ./specialization.nix
- ./services/promtail.nix
- ./env.nix
- ./tailscale.nix
- ./services/otel.nix
- ];
- services.openssh.enable = true;
- environment.systemPackages = with pkgs;
- [
- git
- ]
- ++ (
- if system != "riscv64-linux"
- then [kitty.terminfo]
- else []
- );
- networking.firewall.allowedTCPPorts = [22];
- networking.firewall.allowedUDPPortRanges = [
- {
- from = 60000;
- to = 61000;
- }
- ];
-
- users.defaultUserShell = pkgs.zsh;
-
- environment.pathsToLink = ["/share/zsh"];
-
- console.keyMap = "neo";
-
- security.sudo.extraConfig = ''
- Defaults env_keep += "TMUX"
- '';
-
- programs.zsh.enable = true;
- users.mutableUsers = false;
-
- sops.secrets."root/aws/credentials" = {
- sopsFile = ../secrets/shared.yaml;
- owner = "root";
- key = "aws/credentials";
- path = "/root/.aws/credentials";
- };
- sops.secrets."root/ssh/builder_id_ed25519" = {
- sopsFile = ../secrets/shared.yaml;
- owner = "root";
- key = "ssh/builder_id_ed25519";
- path = "/root/.ssh/builder_id_ed25519";
- };
- sops.secrets."darkkirb/ssh/builder_id_ed25519" = {
- sopsFile = ../secrets/shared.yaml;
- owner = "darkkirb";
- key = "ssh/builder_id_ed25519";
- path = "/home/darkkirb/.ssh/builder_id_ed25519";
- };
-
- programs.ssh.knownHosts = {
- "nas.int.chir.rs".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhao1I1Kd1gK5bERUdjMxP9yHDrSHYZsTN2TcSk0K/U";
- "backup.int.chir.rs".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhao1I1Kd1gK5bERUdjMxP9yHDrSHYZsTN2TcSk0K/U";
- };
- boot.kernel.sysctl = {
- "fs.inotify.max_user_watches" = 524288;
- };
- services.prometheus.exporters.node = {
- port = 31941;
- enabledCollectors = [
- "buddyinfo"
- "cgroups"
- "systemd"
- "ethtool"
- ];
- enable = true;
- };
- i18n.defaultLocale = "nl_NL.UTF-8";
- nixpkgs.config.permittedInsecurePackages = [
- "olm-3.2.16"
+ "${nixos-config}/modules"
+ "${nixos-config}/services/tailscale.nix"
+ "${nixos-config}/services/openssh.nix"
+ "${nixos-config}/services/restic.nix"
+ "${nixos-config}/users"
+ "${nixos-config}/programs"
+ ./systemd-boot.nix
+ ./i18n.nix
+ ./overlays
];
+ boot.initrd.systemd.enable = true;
+ boot.kernelPackages = pkgs.linuxPackages_latest;
+ hardware.enableRedistributableFirmware = true;
+ security.sudo.enable = false;
}
diff --git a/config/desktop-secrets.nix b/config/desktop-secrets.nix
deleted file mode 100644
index 268becca..00000000
--- a/config/desktop-secrets.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-_: let
- mkSopsSecret = {
- name,
- path,
- }: {
- name = "desktop/${name}";
- value = {
- sopsFile = ../secrets/desktop.yaml;
- owner = "darkkirb";
- key = name;
- path = "/home/darkkirb/${path}";
- };
- };
-in {
- sops.secrets = builtins.listToAttrs (map mkSopsSecret [
- {
- name = "aws/credentials";
- path = ".aws/credentials";
- }
- {
- name = ".config/gh/hosts.yml";
- path = ".config/gh/hosts.yml";
- }
- ]);
-}
diff --git a/config/desktop.nix b/config/desktop.nix
deleted file mode 100644
index 3925ea09..00000000
--- a/config/desktop.nix
+++ /dev/null
@@ -1,209 +0,0 @@
-{
- system,
- config,
- pkgs,
- lib,
- ...
-} @ args: let
- lockscreen-all = pkgs.writeScript "lockscreen-all" ''
- #!${pkgs.bash}/bin/bash
-
- if ${pkgs.coreutils}/bin/[ -z "$(${pkgs.usbutils}/bin/lsusb | grep Yubico)" ]; then
- ${pkgs.systemd}/bin/loginctl list-sessions | ${pkgs.gnugrep}/bin/grep '^\ ' | ${pkgs.gawk}/bin/awk '{print $1}' | ${pkgs.findutils}/bin/xargs -i ${pkgs.systemd}/bin/loginctl lock-session {}
- fi
- '';
-in {
- imports =
- [
- ./services/pipewire.nix
- ./desktop-secrets.nix
- ./services/cups.nix
- ./services/docker.nix
- ./services/cifs.nix
- ./kde.nix
- #./sway.nix
- ]
- /*
- ++ (
- if system == "x86_64-linux"
- then [./programs/virtualbox.nix]
- else []
- )
- */
- ;
- fonts = {
- fontDir.enable = true;
- fontconfig = {
- enable = true;
- defaultFonts = {
- emoji = ["Noto Color Emoji"];
- monospace = ["Fira Code" "Font Awesome 5 Free"];
- sansSerif = ["Noto Sans" "Font Awesome 5 Free"];
- serif = ["Noto Serif" "Font Awesome 5 Free"];
- };
- };
- packages = with pkgs; [
- fira-code
- fira-code-symbols
- font-awesome
- noto-fonts
- noto-fonts-cjk-sans
- noto-fonts-emoji
- noto-fonts-extra
- (nerdfonts.override {fonts = ["FiraCode" "DroidSansMono" "Noto"];})
- nasin-nanpa
- fairfax-hd
- (pkgs.stdenvNoCC.mkDerivation rec {
- pname = "zbalermorna";
- version = "920b28d798ae1c06885c674bbf02b08ffed12b2f";
- src = pkgs.fetchFromGitHub {
- owner = "jackhumbert";
- repo = pname;
- rev = version;
- sha256 = "00sl3f1x4frh166mq85lwl9v1f5r3ckkfg8id5fibafymick5vyp";
- };
- installPhase = ''
- mkdir -p $out/share/fonts
- cp -r $src/fonts/*.otf $out/share/fonts
- '';
- })
- ];
- };
- fonts.fontconfig.localConf = ''
-
-
-
-
-
- Fairfax HD
-
-
- 100
-
-
-
- '';
-
- time.timeZone = "Europe/Berlin";
- services.pcscd.enable = true;
-
- security.pam = {
- services.login.u2fAuth = true;
- services.swaylock.u2fAuth = true;
- u2f = {
- enable = true;
- control = "required";
- };
- };
- services.udev.extraRules = ''
- ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="${lockscreen-all}"
- ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="e621", ATTRS{idProduct}=="0000", TAG+="uaccess"
- ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="e621", ATTRS{idProduct}=="0000", TAG+="uaccess"
- ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", TAG+="uaccess"
- ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0306", TAG+="uaccess"
- ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0330", TAG+="uaccess"
- ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS={idProduct}=="6010", OWNER="user", MODE="0777", GROUP="dialout"
- '';
- programs.steam.enable = system == "x86_64-linux";
- nixpkgs.overlays = [
- (curr: prev: {
- steam = prev.steam.override {
- extraPkgs = pkgs:
- with pkgs; [
- mono
- fuse
- ];
- };
- })
- ];
- services.flatpak.enable = true;
- programs.java.enable = true;
- hardware.opengl.driSupport32Bit = lib.mkForce (system == "x86_64-linux");
- home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
- desktop = true;
- inherit args;
- };
-
- # For syncthing
- networking.firewall.allowedTCPPorts = [22000];
- networking.firewall.allowedUDPPorts = [22000];
- networking.firewall.allowedTCPPortRanges = [
- {
- from = 1714;
- to = 1764;
- }
- ];
- networking.firewall.allowedUDPPortRanges = [
- {
- from = 1714;
- to = 1764;
- }
- ];
-
- environment.systemPackages = with pkgs; [
- pinentry-qt
- dotool
- wl-clipboard
- #plasma5Packages.thirdParty.lightly
- ];
-
- xdg.portal = {
- enable = true;
- wlr.enable = true;
- # gtk portal needed to make gtk apps happy
- extraPortals = [pkgs.xdg-desktop-portal-gtk];
- config.common.default = "*";
- };
- programs.dconf.enable = true;
- services.xserver = {
- enable = true;
- libinput.enable = true;
- layout = "de";
- xkbVariant = "neo";
- displayManager.lightdm.enable = false;
- extraLayouts.zlr = {
- description = "lojban layout";
- languages = ["jbo"];
- symbolsFile = ../extra/keyboard/symbols;
- };
- };
- i18n.inputMethod = {
- enabled = "ibus";
- ibus.engines = with pkgs.ibus-engines; [anthy];
- };
- security.polkit.enable = true;
- services.dbus.enable = true;
- services.dbus.packages = with pkgs; [dconf];
- # Futureproofing: on non-x86 machines, emulate x86
- boot.binfmt.emulatedSystems =
- if system != "x86_64-linux"
- then [
- "x86_64-linux"
- "i686-linux"
- ]
- else [];
-
- virtualisation = {
- waydroid.enable = true;
- lxd.enable = true;
- };
-
- programs.gamemode.enable = true;
- nixpkgs.config.permittedInsecurePackages = ["electron-26.3.0"];
-
- boot = {
- plymouth.enable = true;
- consoleLogLevel = 0;
- initrd.verbose = false;
- kernelParams = [
- "quiet"
- "splash"
- "boot.shell_on_fail"
- "loglevel=3"
- "rd.systemd.show_status=false"
- "rd.udev.log_level=3"
- "udev.log_priority=3"
- ];
- loader.timeout = 0;
- };
-}
diff --git a/config/devterm.nix b/config/devterm.nix
deleted file mode 100644
index 65cf8ddd..00000000
--- a/config/devterm.nix
+++ /dev/null
@@ -1,114 +0,0 @@
-{
- nixos-hardware,
- config,
- lib,
- pkgs,
- ...
-}: {
- boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-devterm;
- boot.kernelParams = ["fbcon=rotate:1"];
- networking.hostName = "devterm";
- imports = [
- ./desktop.nix
- ];
- boot.loader = {
- grub.enable = lib.mkDefault false;
- generic-extlinux-compatible.enable = lib.mkDefault true;
- };
- boot.initrd = {
- includeDefaultModules = false;
- availableKernelModules = [
- "usbhid"
- "usb_storage"
- "vc4"
- "pcie_brcmstb" # required for the pcie bus to work
- "reset-raspberrypi" # required for vl805 firmware to load
- "mmc_block"
- "usbhid"
- "hid_generic"
- "panel_cwd686"
- "ocp8178_bl"
- "ti_adc081c"
- ];
- };
- environment.systemPackages = with pkgs; [
- libraspberrypi
- raspberrypi-eeprom
- ];
- system.stateVersion = "24.05";
- fileSystems."/" = {
- device = "/dev/mmcblk0p2";
- fsType = "btrfs";
- options = ["compress=zstd"];
- };
-
- fileSystems."/boot" = {
- device = "/dev/mmcblk0p1";
- fsType = "vfat";
- };
- security.pam = {
- services.login.u2fAuth = lib.mkForce false;
- services.swaylock.u2fAuth = lib.mkForce false;
- u2f.enable = lib.mkForce false;
- services.sddm.u2fAuth = lib.mkForce false;
- };
- networking.networkmanager.enable = true;
- users.users.darkkirb.extraGroups = ["networkmanager"];
- hardware.deviceTree.filter = "*rpi*.dtb";
- hardware.deviceTree.overlays = [
- {
- name = "dwc2";
- dtsFile = ./devterm/dwc2-overlay.dts;
- }
- {
- name = "cma";
- dtsFile = ./devterm/cma-overlay.dts;
- }
- {
- name = "vc4-kms-v3d-pi4";
- dtsFile = ./devterm/vc4-kms-v3d-pi4-overlay.dts;
- }
- {
- name = "devterm-pmu";
- dtsFile = ./devterm/devterm-pmu-overlay.dts;
- }
- {
- name = "devterm-panel";
- dtsFile = ./devterm/devterm-panel-overlay.dts;
- }
- {
- name = "devterm-misc";
- dtsFile = ./devterm/devterm-misc-overlay.dts;
- }
- {
- name = "audremap";
- dtsFile = ./devterm/audremap-overlay.dts;
- }
- {
- name = "spi";
- dtsFile = ./devterm/spi0-overlay.dts;
- }
- {
- name = "devterm-overlay";
- dtsFile = ./devterm/devterm-overlay.dts;
- }
- ];
- hardware.enableRedistributableFirmware = true;
- services.xserver.xkbVariant = lib.mkForce "us";
- console.keyMap = lib.mkForce "us";
- home-manager.users.darkkirb.wayland.windowManager.sway.config.input."*" = lib.mkForce {
- xkb_layout = "us";
- xkb_variant = "altgr-intl";
- };
- boot.initrd.systemd.tpm2.enable = lib.mkForce false;
- systemd.tpm2.enable = lib.mkForce false;
- services.displayManager = {
- autoLogin = {
- enable = true;
- user = "darkkirb";
- };
- sddm = {
- autoLogin.relogin = true;
- };
- };
-}
diff --git a/config/devterm/audremap-overlay.dts b/config/devterm/audremap-overlay.dts
deleted file mode 100644
index 9f4c01e2..00000000
--- a/config/devterm/audremap-overlay.dts
+++ /dev/null
@@ -1,23 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target = <&audio_pins>;
- __overlay__ {
- status = "okay";
- };
- };
-
- fragment@1 {
- target = <&audio_pins>;
- __overlay__ {
- brcm,pins = < 12 13 >;
- brcm,function = < 4 >; /* alt0 alt0 */
- };
- };
-
-
-};
\ No newline at end of file
diff --git a/config/devterm/cma-overlay.dts b/config/devterm/cma-overlay.dts
deleted file mode 100644
index 969d79ed..00000000
--- a/config/devterm/cma-overlay.dts
+++ /dev/null
@@ -1,14 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target = <&cma>;
- __overlay__ {
- size = <(384 * 1024 * 1024)>;
- };
- };
-};
\ No newline at end of file
diff --git a/config/devterm/devterm-misc-overlay.dts b/config/devterm/devterm-misc-overlay.dts
deleted file mode 100644
index 4f98a9be..00000000
--- a/config/devterm/devterm-misc-overlay.dts
+++ /dev/null
@@ -1,80 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/{
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target = <&i2c1>;
- __overlay__ {
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&i2c1_pins>;
- status = "okay";
-
- adc101c: adc@54 {
- reg = <0x54>;
- compatible = "ti,adc101c";
- status = "okay";
- };
- };
- };
-
- fragment@1 {
- target = <&spi4>;
- __overlay__ {
- pinctrl-names = "default";
- pinctrl-0 = <&spi4_pins &spi4_cs_pins>;
- cs-gpios = <&gpio 4 1>;
- status = "okay";
-
- spidev4_0: spidev@0 {
- compatible = "spidev";
- reg = <0>; /* CE0 */
- #address-cells = <1>;
- #size-cells = <0>;
- spi-max-frequency = <125000000>;
- status = "okay";
- };
- };
- };
-
- fragment@2 {
- target = <&uart1>;
- __overlay__ {
- pinctrl-names = "default";
- pinctrl-0 = <&uart1_pins>;
- status = "okay";
- };
- };
-
- fragment@3 {
- target = <&gpio>;
- __overlay__ {
-
- i2c1_pins: i2c1 {
- brcm,pins = <44 45>;
- brcm,function = <6>;
- };
-
- spi4_pins: spi4_pins {
- brcm,pins = <6 7>;
- brcm,function = <7>;
- };
-
- spi4_cs_pins: spi0_cs_pins {
- brcm,pins = <4>;
- brcm,function = <1>;
- };
-
- uart1_pins: uart1_pins {
- brcm,pins = <14 15>;
- brcm,function = <2>;
- brcm,pull = <0 2>;
- };
-
- };
- };
-
-};
\ No newline at end of file
diff --git a/config/devterm/devterm-overlay.dts b/config/devterm/devterm-overlay.dts
deleted file mode 100644
index e9a5f012..00000000
--- a/config/devterm/devterm-overlay.dts
+++ /dev/null
@@ -1,130 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
- fragment@0 {
- target = <&dma40>;
- __overlay__ {
- dma-channel-mask = <0x3000>;
- };
- };
- fragment@1 {
- target = <&hdmi0>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@2 {
- target = <&uart0_pins>;
- __overlay__ {
- brcm,pull = <0x02 0x00 0x00 0x02>;
- brcm,pins = <0x1e 0x1f 0x20 0x21>;
- };
- };
- fragment@3 {
- target = <&dvp>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@4 {
- target = <&pixelvalve4>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@5 {
- target = <&ddc1>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@6 {
- target = <&txp>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@7 {
- target = <&hvs>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@8 {
- target = <&pixelvalve3>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@9 {
- target = <&spi4>;
- __overlay__ {
- pinctrl-0 = <0xf0 0xf1>;
- };
- };
- fragment@10 {
- target = <&pixelvalve2>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@11 {
- target = <&uart1>;
- __overlay__ {
- pinctrl-0 = <0xf2>;
- status = "disabled";
- };
- };
- fragment@12 {
- target = <&pixelvalve1>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@13 {
- target = <&hdmi1>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@14 {
- target = <&spi4>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@15 {
- target = <&ddc0>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@16 {
- target = <&aon_intr>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@17 {
- target = <&pixelvalve0>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@18 {
- target = <&audio>;
- __overlay__ {
- brcm,disable-headphones = <0x00>;
- status = "okay";
- bcrm,disable-hdmi;
- };
- };
- fragment@19 {
- target-path = "/chosen";
- __overlay__ {
- bootargs = "coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 8250.nr_uarts=0 smsc95xx.macaddr=E4:5F:01:E4:FE:2D vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 8250.nr_uarts=1";
- };
- };
-};
\ No newline at end of file
diff --git a/config/devterm/devterm-panel-overlay.dts b/config/devterm/devterm-panel-overlay.dts
deleted file mode 100644
index b4703cb3..00000000
--- a/config/devterm/devterm-panel-overlay.dts
+++ /dev/null
@@ -1,47 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target=<&dsi1>;
- __overlay__ {
- #address-cells = <1>;
- #size-cells = <0>;
- status = "okay";
-
- port {
- dsi_out_port: endpoint {
- remote-endpoint = <&panel_dsi_port>;
- };
- };
-
- panel_cwd686: panel@0 {
- compatible = "cw,cwd686";
- reg = <0>;
- reset-gpio = <&gpio 8 1>;
- backlight = <&ocp8178_backlight>;
- rotation = <0x5a>;
-
- port {
- panel_dsi_port: endpoint {
- remote-endpoint = <&dsi_out_port>;
- };
- };
- };
- };
- };
-
- fragment@1 {
- target-path = "/";
- __overlay__ {
- ocp8178_backlight: backlight@0 {
- compatible = "ocp8178-backlight";
- backlight-control-gpios = <&gpio 9 0>;
- default-brightness = <5>;
- };
- };
- };
-
-};
\ No newline at end of file
diff --git a/config/devterm/devterm-pmu-overlay.dts b/config/devterm/devterm-pmu-overlay.dts
deleted file mode 100644
index 526163e0..00000000
--- a/config/devterm/devterm-pmu-overlay.dts
+++ /dev/null
@@ -1,104 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target = <&i2c0if>;
- __overlay__ {
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-0 = <&i2c0_pins>;
- pinctrl-names = "default";
- status = "okay";
-
- axp22x: pmic@34 {
- interrupt-controller;
- #interrupt-cells = <1>;
- compatible = "x-powers,axp223";
- reg = <0x34>; /* i2c address */
- interrupt-parent = <&gpio>;
- interrupts = <2 8>; /* IRQ_TYPE_EDGE_FALLING */
- irq-gpios = <&gpio 2 0>;
-
- regulators {
-
- x-powers,dcdc-freq = <3000>;
-
- reg_aldo1: aldo1 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "audio-vdd";
- };
-
- reg_aldo2: aldo2 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "display-vcc";
- };
-
- reg_dldo2: dldo2 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "dldo2";
- };
-
- reg_dldo3: dldo3 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "dldo3";
- };
-
- reg_dldo4: dldo4 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "dldo4";
- };
-
- };
-
- battery_power_supply: battery-power-supply {
- compatible = "x-powers,axp221-battery-power-supply";
- monitored-battery = <&battery>;
- };
-
- ac_power_supply: ac_power_supply {
- compatible = "x-powers,axp221-ac-power-supply";
- };
-
- };
- };
- };
-
- fragment@1 {
- target = <&i2c0if>;
- __overlay__ {
- compatible = "brcm,bcm2708-i2c";
- };
- };
-
- fragment@2 {
- target-path = "/aliases";
- __overlay__ {
- i2c0 = "/soc/i2c@7e205000";
- };
- };
-
- fragment@3 {
- target-path = "/";
- __overlay__ {
- battery: battery@0 {
- compatible = "simple-battery";
- constant-charge-current-max-microamp = <2100000>;
- voltage-min-design-microvolt = <3300000>;
- };
- };
- };
-
-};
\ No newline at end of file
diff --git a/config/devterm/dwc2-overlay.dts b/config/devterm/dwc2-overlay.dts
deleted file mode 100644
index 6561464a..00000000
--- a/config/devterm/dwc2-overlay.dts
+++ /dev/null
@@ -1,22 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target = <&usb>;
- #address-cells = <0x01>;
- #size-cells = <0x01>;
-
- __overlay__ {
- compatible = "brcm,bcm2835-usb";
- dr_mode = "host";
- g-np-tx-fifo-size = <0x20>;
- g-rx-fifo-size = <0x22e>;
- g-tx-fifo-size = <0x200 0x200 0x200 0x200 0x200 0x100 0x100>;
- status = "okay";
- phandle = <0x01>;
- };
- };
-};
\ No newline at end of file
diff --git a/config/devterm/spi0-overlay.dts b/config/devterm/spi0-overlay.dts
deleted file mode 100644
index 00ddedc7..00000000
--- a/config/devterm/spi0-overlay.dts
+++ /dev/null
@@ -1,11 +0,0 @@
-/dts-v1/;
-/plugin/;
-/ {
- compatible = "bcrm,bcm2711";
- fragment@0 {
- target = <&spi>;
- __overlay__ {
- status = "okay";
- };
- };
-};
\ No newline at end of file
diff --git a/config/devterm/vc4-kms-v3d-pi4-overlay.dts b/config/devterm/vc4-kms-v3d-pi4-overlay.dts
deleted file mode 100644
index 42d5786f..00000000
--- a/config/devterm/vc4-kms-v3d-pi4-overlay.dts
+++ /dev/null
@@ -1,35 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@1 {
- target = <&fb>;
- __overlay__ {
- status = "disabled";
- };
- };
-
- fragment@2 {
- target = <&firmwarekms>;
- __overlay__ {
- status = "disabled";
- };
- };
-
- fragment@3 {
- target = <&v3d>;
- __overlay__ {
- status = "okay";
- };
- };
-
- fragment@4 {
- target = <&vc4>;
- __overlay__ {
- status = "okay";
- };
- };
-};
\ No newline at end of file
diff --git a/config/documentation.nix b/config/documentation.nix
new file mode 100644
index 00000000..09e783ca
--- /dev/null
+++ b/config/documentation.nix
@@ -0,0 +1,20 @@
+{ ... }:
+{
+ #documentation.nixos.includeAllModules = true;
+ #documentation.nixos.options.warningsAreErrors = false;
+ /*
+ home-manager.users.darkkirb =
+ {
+ lib,
+ config,
+ systemConfig,
+ ...
+ }:
+ {
+ manual = lib.mkIf (config.home.version.release == systemConfig.system.nixos.release) {
+ html.enable = true;
+ json.enable = true;
+ };
+ };
+ */
+}
diff --git a/config/env.nix b/config/env.nix
deleted file mode 100644
index 7f1c0324..00000000
--- a/config/env.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- config,
- pkgs,
- lib,
- ...
-}: {
- environment.extraInit = let
- systemdBin = lib.getBin config.systemd.package;
- in ''
- set -a
- . /dev/fd/0 <= 5.1 is required.
- [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
-
- # The list of segments shown on the left. Fill it with the most important segments.
- typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
- # =========================[ Line #1 ]=========================
- os_icon # os identifier
- dir # current directory
- vcs # git status
- # =========================[ Line #2 ]=========================
- newline # \n
- # prompt_char # prompt symbol
- )
-
- # The list of segments shown on the right. Fill it with less important segments.
- # Right prompt on the last prompt line (where you are typing your commands) gets
- # automatically hidden when the input line reaches it. Right prompt above the
- # last prompt line gets hidden if it would overlap with left prompt.
- typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
- # =========================[ Line #1 ]=========================
- status # exit code of the last command
- command_execution_time # duration of the last command
- background_jobs # presence of background jobs
- direnv # direnv status (https://direnv.net/)
- asdf # asdf version manager (https://github.com/asdf-vm/asdf)
- virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
- anaconda # conda environment (https://conda.io/)
- pyenv # python environment (https://github.com/pyenv/pyenv)
- goenv # go environment (https://github.com/syndbg/goenv)
- nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
- nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
- nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
- # node_version # node.js version
- # go_version # go version (https://golang.org)
- rust_version # rustc version (https://www.rust-lang.org)
- # dotnet_version # .NET version (https://dotnet.microsoft.com)
- # php_version # php version (https://www.php.net/)
- # laravel_version # laravel php framework version (https://laravel.com/)
- # java_version # java version (https://www.java.com/)
- # package # name@version from package.json (https://docs.npmjs.com/files/package.json)
- rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
- rvm # ruby version from rvm (https://rvm.io)
- fvm # flutter version management (https://github.com/leoafarias/fvm)
- luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
- jenv # java version from jenv (https://github.com/jenv/jenv)
- plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
- perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
- phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
- scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
- haskell_stack # haskell version from stack (https://haskellstack.org/)
- kubecontext # current kubernetes context (https://kubernetes.io/)
- terraform # terraform workspace (https://www.terraform.io)
- # terraform_version # terraform version (https://www.terraform.io)
- aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
- aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
- azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
- gcloud # google cloud cli account and project (https://cloud.google.com/)
- google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
- toolbox # toolbox name (https://github.com/containers/toolbox)
- context # user@hostname
- nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
- ranger # ranger shell (https://github.com/ranger/ranger)
- nnn # nnn shell (https://github.com/jarun/nnn)
- lf # lf shell (https://github.com/gokcehan/lf)
- xplr # xplr shell (https://github.com/sayanarijit/xplr)
- vim_shell # vim shell indicator (:sh)
- midnight_commander # midnight commander shell (https://midnight-commander.org/)
- nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
- vi_mode # vi mode (you don't need this if you've enabled prompt_char)
- # vpn_ip # virtual private network indicator
- load # CPU load
- # disk_usage # disk usage
- # ram # free RAM
- # swap # used swap
- todo # todo items (https://github.com/todotxt/todo.txt-cli)
- timewarrior # timewarrior tracking status (https://timewarrior.net/)
- taskwarrior # taskwarrior task count (https://taskwarrior.org/)
- # cpu_arch # CPU architecture
- time # current time
- # =========================[ Line #2 ]=========================
- newline # \n
- # ip # ip address and bandwidth usage for a specified network interface
- # public_ip # public IP address
- # proxy # system-wide http/https/ftp proxy
- battery # internal battery
- # wifi # wifi speed
- # example # example user-defined segment (see prompt_example function below)
- )
-
- # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
- typeset -g POWERLEVEL9K_MODE=nerdfont-complete
- # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid
- # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added.
- typeset -g POWERLEVEL9K_ICON_PADDING=none
-
- # When set to true, icons appear before content on both sides of the prompt. When set
- # to false, icons go after content. If empty or not set, icons go before content in the left
- # prompt and after content in the right prompt.
- #
- # You can also override it for a specific segment:
- #
- # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false
- #
- # Or for a specific segment in specific state:
- #
- # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false
- typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=
-
- # Add an empty line before each prompt.
- typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
-
- # Connect left prompt lines with these symbols. You'll probably want to use the same color
- # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below.
- typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%244F╭─'
- typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%244F├─'
- typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%244F╰─'
- # Connect right prompt lines with these symbols.
- typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%244F─╮'
- typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%244F─┤'
- typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%244F─╯'
-
- # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or
- # '─'. The last two make it easier to see the alignment between left and right prompt and to
- # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
- # for more compact prompt if using this option.
- typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='·'
- typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=
- typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND=
- if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then
- # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE
- # ornaments defined above.
- typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=244
- # Start filler from the edge of the screen if there are no left segments on the first line.
- typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'
- # End filler on the edge of the screen if there are no right segments on the first line.
- typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'
- fi
-
- # Default background color.
- typeset -g POWERLEVEL9K_BACKGROUND=240
-
- # Separator between same-color segments on the left.
- typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%250F\uE0B1'
- # Separator between same-color segments on the right.
- typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='%250F\uE0B3'
- # Separator between different-color segments on the left.
- typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
- # Separator between different-color segments on the right.
- typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
- # The right end of left prompt.
- typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
- # The left end of right prompt.
- typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2'
- # The left end of left prompt.
- typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B6'
- # The right end of right prompt.
- typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B4'
- # Left prompt terminator for lines without any segments.
- typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=
-
- #################################[ os_icon: os identifier ]##################################
- # OS identifier color.
- typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255
- # Custom icon.
- # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'
-
- ################################[ prompt_char: prompt symbol ]################################
- # Transparent background.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND=
- # Green prompt symbol if the last command succeeded.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76
- # Red prompt symbol if the last command failed.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196
- # Default prompt symbol.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
- # Prompt symbol in command vi mode.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
- # Prompt symbol in visual vi mode.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'
- # Prompt symbol in overwrite vi mode.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'
- typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
- # No line terminator if prompt_char is the last segment.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=
- # No line introducer if prompt_char is the first segment.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
- # No surrounding whitespace.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE=
-
- ##################################[ dir: current directory ]##################################
- # Default current directory color.
- typeset -g POWERLEVEL9K_DIR_FOREGROUND=31
- # If directory is too long, shorten some of its segments to the shortest possible unique
- # prefix. The shortened directory can be tab-completed to the original.
- typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
- # Replace removed segment suffixes with this symbol.
- typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
- # Color of the shortened directory segments.
- typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
- # Color of the anchor directory segments. Anchor segments are never shortened. The first
- # segment is always an anchor.
- typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39
- # Display anchor directory segments in bold.
- typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
- # Don't shorten directories that contain any of these files. They are anchors.
- local anchor_files=(
- .bzr
- .citc
- .git
- .hg
- .node-version
- .python-version
- .go-version
- .ruby-version
- .lua-version
- .java-version
- .perl-version
- .php-version
- .tool-version
- .shorten_folder_marker
- .svn
- .terraform
- CVS
- Cargo.toml
- composer.json
- go.mod
- package.json
- stack.yaml
- )
- typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})"
- # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains
- # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is
- # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first)
- # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers
- # and other directories don't.
- #
- # Optionally, "first" and "last" can be followed by ":" where is an integer.
- # This moves the truncation point to the right (positive offset) or to the left (negative offset)
- # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0"
- # respectively.
- typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
- # Don't shorten this many last directory segments. They are anchors.
- typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
- # Shorten directory if it's longer than this even if there is space for it. The value can
- # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,
- # directory will be shortened only when prompt doesn't fit or when other parameters demand it
- # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).
- # If set to `0`, directory will always be shortened to its minimum length.
- typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
- # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this
- # many columns for typing commands.
- typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
- # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least
- # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.
- typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
- # If set to true, embed a hyperlink into the directory. Useful for quickly
- # opening a directory in the file manager simply by clicking the link.
- # Can also be handy when the directory is shortened, as it allows you to see
- # the full directory that was used in previous commands.
- typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
-
- # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
- # and POWERLEVEL9K_DIR_CLASSES below.
- typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
-
- # The default icon shown next to non-writable and non-existent directories when
- # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3.
- # typeset -g POWERLEVEL9K_LOCK_ICON='⭐'
-
- # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different
- # directories. It must be an array with 3 * N elements. Each triplet consists of:
- #
- # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with
- # extended_glob option enabled.
- # 2. Directory class for the purpose of styling.
- # 3. An empty string.
- #
- # Triplets are tried in order. The first triplet whose pattern matches $PWD wins.
- #
- # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories
- # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively.
- #
- # For example, given these settings:
- #
- # typeset -g POWERLEVEL9K_DIR_CLASSES=(
- # '~/work(|/*)' WORK ''
- # '~(|/*)' HOME ''
- # '*' DEFAULT '')
- #
- # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one
- # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or
- # WORK_NON_EXISTENT.
- #
- # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an
- # option to define custom colors and icons for different directory classes.
- #
- # # Styling for WORK.
- # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31
- # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103
- # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39
- #
- # # Styling for WORK_NOT_WRITABLE.
- # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31
- # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103
- # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39
- #
- # # Styling for WORK_NON_EXISTENT.
- # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31
- # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103
- # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39
- #
- # If a styling parameter isn't explicitly defined for some class, it falls back to the classless
- # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls
- # back to POWERLEVEL9K_DIR_FOREGROUND.
- #
- # typeset -g POWERLEVEL9K_DIR_CLASSES=()
-
- # Custom prefix.
- # typeset -g POWERLEVEL9K_DIR_PREFIX='%250Fin '
-
- #####################################[ vcs: git status ]######################################
- # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
- typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 '
-
- # Untracked files icon. It's really a question mark, your font isn't broken.
- # Change the value of this parameter to show a different icon.
- typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
-
- # Formatter for Git status.
- #
- # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
- #
- # You can edit the function to customize how Git status looks.
- #
- # VCS_STATUS_* parameters are set by gitstatus plugin. See reference:
- # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.
- function my_git_formatter() {
- emulate -L zsh
-
- if [[ -n $P9K_CONTENT ]]; then
- # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from
- # gitstatus plugin). VCS_STATUS_* parameters are not available in this case.
- typeset -g my_git_format=$P9K_CONTENT
- return
- fi
-
- if (( $1 )); then
- # Styling for up-to-date Git status.
- local meta='%250F' # grey foreground
- local clean='%76F' # green foreground
- local modified='%178F' # yellow foreground
- local untracked='%39F' # blue foreground
- local conflicted='%196F' # red foreground
- else
- # Styling for incomplete and stale Git status.
- local meta='%244F' # grey foreground
- local clean='%244F' # grey foreground
- local modified='%244F' # grey foreground
- local untracked='%244F' # grey foreground
- local conflicted='%244F' # grey foreground
- fi
-
- local res
-
- if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
- local branch=${(V)VCS_STATUS_LOCAL_BRANCH}
- # If local branch name is at most 32 characters long, show it in full.
- # Otherwise show the first 12 … the last 12.
- # Tip: To always show local branch name in full without truncation, delete the next line.
- (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
- res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
- fi
-
- if [[ -n $VCS_STATUS_TAG
- # Show tag only if not on a branch.
- # Tip: To always show tag, delete the next line.
- && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line
- ]]; then
- local tag=${(V)VCS_STATUS_TAG}
- # If tag name is at most 32 characters long, show it in full.
- # Otherwise show the first 12 … the last 12.
- # Tip: To always show tag name in full without truncation, delete the next line.
- (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line
- res+="${meta}#${clean}${tag//\%/%%}"
- fi
-
- # Display the current Git commit if there is no branch and no tag.
- # Tip: To always display the current Git commit, delete the next line.
- [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line
- res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
-
- # Show tracking branch name if it differs from local branch.
- if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
- res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
- fi
-
- # Display "wip" if the latest commit's summary contains "wip" or "WIP".
- if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then
- res+=" ${modified}wip"
- fi
-
- # ⇣42 if behind the remote.
- (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
- # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
- (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
- (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
- # ⇠42 if behind the push remote.
- (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
- (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
- # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.
- (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}"
- # *42 if have stashes.
- (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}"
- # 'merge' if the repo is in an unusual state.
- [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}"
- # ~42 if have merge conflicts.
- (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}"
- # +42 if have staged changes.
- (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}"
- # !42 if have unstaged changes.
- (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}"
- # ?42 if have untracked files. It's really a question mark, your font isn't broken.
- # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.
- # Remove the next line if you don't want to see untracked files at all.
- (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}"
- # "─" if the number of unstaged files is unknown. This can happen due to
- # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower
- # than the number of files in the Git index, or due to bash.showDirtyState being set to false
- # in the repository config. The number of staged and untracked files may also be unknown
- # in this case.
- (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─"
-
- typeset -g my_git_format=$res
- }
- functions -M my_git_formatter 2>/dev/null
-
- # Don't count the number of unstaged, untracked and conflicted files in Git repositories with
- # more than this many files in the index. Negative value means infinity.
- #
- # If you are working in Git repositories with tens of millions of files and seeing performance
- # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output
- # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's
- # config: `git config bash.showDirtyState false`.
- typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1
-
- # Don't show Git status in prompt for repositories whose workdir matches this pattern.
- # For example, if set to '~', the Git repository at $HOME/.git will be ignored.
- # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.
- typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'
-
- # Disable the default Git status formatting.
- typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
- # Install our own Git status formatter.
- typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'
- typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'
- # Enable counters for staged, unstaged, etc.
- typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
-
- # Icon color.
- typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76
- typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244
- # Custom icon.
- # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # Custom prefix.
- typeset -g POWERLEVEL9K_VCS_PREFIX='%250Fon '
-
- # Show status of repositories of these types. You can add svn and/or hg if you are
- # using them. If you do, your prompt may become slow even when your current directory
- # isn't in an svn or hg reposotiry.
- typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
-
- # These settings are used for repositories other than Git or when gitstatusd fails and
- # Powerlevel10k has to fall back to using vcs_info.
- typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76
- typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76
- typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178
-
- ##########################[ status: exit code of the last command ]###########################
- # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and
- # style them independently from the regular OK and ERROR state.
- typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true
-
- # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as
- # it will signify success by turning green.
- typeset -g POWERLEVEL9K_STATUS_OK=true
- typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70
- typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'
-
- # Status when some part of a pipe command fails but the overall exit status is zero. It may look
- # like this: 1|0.
- typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true
- typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70
- typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
-
- # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as
- # it will signify error by turning red.
- typeset -g POWERLEVEL9K_STATUS_ERROR=true
- typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160
- typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
-
- # Status when the last command was terminated by a signal.
- typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
- typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160
- # Use terse signal names: "INT" instead of "SIGINT(2)".
- typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
- typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'
-
- # Status when some part of a pipe command fails and the overall exit status is also non-zero.
- # It may look like this: 1|0.
- typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
- typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160
- typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
-
- ###################[ command_execution_time: duration of the last command ]###################
- # Show duration of the last command if takes at least this many seconds.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
- # Show this many fractional digits. Zero means round to seconds.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
- # Execution time color.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=248
- # Duration format: 1d 2h 3m 4s.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
- # Custom icon.
- # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # Custom prefix.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%250Ftook '
-
- #######################[ background_jobs: presence of background jobs ]#######################
- # Don't show the number of background jobs.
- typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
- # Background jobs color.
- typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=37
- # Custom icon.
- # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #######################[ direnv: direnv status (https://direnv.net/) ]########################
- # Direnv color.
- typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178
- # Custom icon.
- # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]###############
- # Default asdf color. Only used to display tools for which there is no color override (see below).
- # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND.
- typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66
-
- # There are four parameters that can be used to hide asdf tools. Each parameter describes
- # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at
- # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to
- # hide a tool, it gets shown.
- #
- # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and
- # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands:
- #
- # asdf local python 3.8.1
- # asdf global python 3.8.1
- #
- # After running both commands the current python version is 3.8.1 and its source is "local" as
- # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false,
- # it'll hide python version in this case because 3.8.1 is the same as the global version.
- # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't
- # contain "local".
-
- # Hide tool versions that don't come from one of these sources.
- #
- # Available sources:
- #
- # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable"
- # - local `asdf current` says "set by /some/not/home/directory/file"
- # - global `asdf current` says "set by /home/username/file"
- #
- # Note: If this parameter is set to (shell local global), it won't hide tools.
- # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES.
- typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global)
-
- # If set to false, hide tool versions that are the same as global.
- #
- # Note: The name of this parameter doesn't reflect its meaning at all.
- # Note: If this parameter is set to true, it won't hide tools.
- # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW.
- typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false
-
- # If set to false, hide tool versions that are equal to "system".
- #
- # Note: If this parameter is set to true, it won't hide tools.
- # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM.
- typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true
-
- # If set to non-empty value, hide tools unless there is a file matching the specified file pattern
- # in the current directory, or its parent directory, or its grandparent directory, and so on.
- #
- # Note: If this parameter is set to empty value, it won't hide tools.
- # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.
- # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB.
- #
- # Example: Hide nodejs version when there is no package.json and no *.js files in the current
- # directory, in `..`, in `../..` and so on.
- #
- # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json'
- typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB=
-
- # Ruby version from asdf.
- typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168
- # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Python version from asdf.
- typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37
- # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Go version from asdf.
- typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37
- # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Node.js version from asdf.
- typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70
- # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Rust version from asdf.
- typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37
- # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # .NET Core version from asdf.
- typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134
- # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Flutter version from asdf.
- typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38
- # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Lua version from asdf.
- typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32
- # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Java version from asdf.
- typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32
- # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Perl version from asdf.
- typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67
- # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Erlang version from asdf.
- typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125
- # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Elixir version from asdf.
- typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129
- # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Postgres version from asdf.
- typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31
- # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # PHP version from asdf.
- typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99
- # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Haskell version from asdf.
- typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172
- # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Julia version from asdf.
- typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70
- # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########
- # NordVPN connection indicator color.
- typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39
- # Hide NordVPN connection indicator when not connected.
- typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=
- typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=
- # Custom icon.
- # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################
- # Ranger shell color.
- typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
- # Custom icon.
- # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
- # Nnn shell color.
- typeset -g POWERLEVEL9K_NNN_FOREGROUND=72
- # Custom icon.
- # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
- # lf shell color.
- typeset -g POWERLEVEL9K_LF_FOREGROUND=72
- # Custom icon.
- # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
- # xplr shell color.
- typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72
- # Custom icon.
- # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########################[ vim_shell: vim shell indicator (:sh) ]###########################
- # Vim shell indicator color.
- typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
- # Custom icon.
- # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######
- # Midnight Commander shell color.
- typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178
- # Custom icon.
- # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##
- # Nix shell color.
- typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
-
- # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
- # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##################################[ disk_usage: disk usage ]##################################
- # Colors for different levels of disk usage.
- typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
- typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220
- typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160
- # Thresholds for different levels of disk usage (percentage points).
- typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
- typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
- # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.
- typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]###########
- # Text and color for normal (a.k.a. command) vi mode.
- typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL
- typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=106
- # Text and color for visual vi mode.
- typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL
- typeset -g POWERLEVEL9K_VI_MODE_VISUAL_FOREGROUND=68
- # Text and color for overtype (a.k.a. overwrite and replace) vi mode.
- typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE
- typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_FOREGROUND=172
- # Text and color for insert vi mode.
- typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
- typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ######################################[ ram: free RAM ]#######################################
- # RAM color.
- typeset -g POWERLEVEL9K_RAM_FOREGROUND=66
- # Custom icon.
- # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #####################################[ swap: used swap ]######################################
- # Swap color.
- typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96
- # Custom icon.
- # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ######################################[ load: CPU load ]######################################
- # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.
- typeset -g POWERLEVEL9K_LOAD_WHICH=5
- # Load color when load is under 50%.
- typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66
- # Load color when load is between 50% and 70%.
- typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178
- # Load color when load is over 70%.
- typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166
- # Custom icon.
- # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################
- # Todo color.
- typeset -g POWERLEVEL9K_TODO_FOREGROUND=110
- # Hide todo when the total number of tasks is zero.
- typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true
- # Hide todo when the number of tasks after filtering is zero.
- typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false
-
- # Todo format. The following parameters are available within the expansion.
- #
- # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks.
- # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering.
- #
- # These variables correspond to the last line of the output of `todo.sh -p ls`:
- #
- # TODO: 24 of 42 tasks shown
- #
- # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.
- #
- # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############
- # Timewarrior color.
- typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110
- # If the tracked task is longer than 24 characters, truncate and append "…".
- # Tip: To always display tasks without truncation, delete the following parameter.
- # Tip: To hide task names and display just the icon when time tracking is enabled, set the
- # value of the following parameter to "".
- typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############
- # Taskwarrior color.
- typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74
-
- # Taskwarrior segment format. The following parameters are available within the expansion.
- #
- # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`.
- # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`.
- #
- # Zero values are represented as empty parameters.
- #
- # The default format:
- #
- # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT'
- #
- # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT'
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################################[ cpu_arch: CPU architecture ]################################
- # CPU architecture color.
- typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
-
- # Hide the segment when on a specific CPU architecture.
- # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=
- # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##################################[ context: user@hostname ]##################################
- # Context color when running with privileges.
- typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
- # Context color in SSH without privileges.
- typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180
- # Default context color (no privileges, no SSH).
- typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180
-
- # Context format when running with privileges: bold user@hostname.
- typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'
- # Context format when in SSH without privileges: user@hostname.
- typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
- # Default context format (no privileges, no SSH): user@hostname.
- typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
-
- # Don't show context unless running with privileges or in SSH.
- # Tip: Remove the next line to always show context.
- typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # Custom prefix.
- typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%250Fwith '
-
- ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
- # Python virtual environment color.
- typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
- # Don't show Python version next to the virtual environment name.
- typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
- # If set to "false", won't show virtualenv if pyenv is already shown.
- # If set to "if-different", won't show virtualenv if it's the same as pyenv.
- typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
- # Separate environment name from Python version only with a space.
- typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
- # Custom icon.
- # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #####################[ anaconda: conda environment (https://conda.io/) ]######################
- # Anaconda environment color.
- typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37
-
- # Anaconda segment format. The following parameters are available within the expansion.
- #
- # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment.
- # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment.
- # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below).
- # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version).
- #
- # CONDA_PROMPT_MODIFIER can be configured with the following command:
- #
- # conda config --set env_prompt '({default_env}) '
- #
- # The last argument is a Python format string that can use the following variables:
- #
- # - prefix The same as CONDA_PREFIX.
- # - default_env The same as CONDA_DEFAULT_ENV.
- # - name The last segment of CONDA_PREFIX.
- # - stacked_env Comma-separated list of names in the environment stack. The first element is
- # always the same as default_env.
- #
- # Note: '({default_env}) ' is the default value of env_prompt.
- #
- # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER
- # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former
- # is empty.
- typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}'
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################
- # Pyenv color.
- typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37
- # Hide python version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)
- # If set to false, hide python version if it's the same as global:
- # $(pyenv version-name) == $(pyenv global).
- typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide python version if it's equal to "system".
- typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true
-
- # Pyenv segment format. The following parameters are available within the expansion.
- #
- # - P9K_CONTENT Current pyenv environment (pyenv version-name).
- # - P9K_PYENV_PYTHON_VERSION Current python version (python --version).
- #
- # The default format has the following logic:
- #
- # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
- # starts with "$P9K_PYENV_PYTHON_VERSION/".
- # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
- typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################
- # Goenv color.
- typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37
- # Hide go version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)
- # If set to false, hide go version if it's the same as global:
- # $(goenv version-name) == $(goenv global).
- typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide go version if it's equal to "system".
- typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########
- # Nodenv color.
- typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70
- # Hide node version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global)
- # If set to false, hide node version if it's the same as global:
- # $(nodenv version-name) == $(nodenv global).
- typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide node version if it's equal to "system".
- typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
- # Nvm color.
- typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
- # Custom icon.
- # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############
- # Nodeenv color.
- typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70
- # Don't show Node version next to the environment name.
- typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false
- # Separate environment name from Node version only with a space.
- typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=
- # Custom icon.
- # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##############################[ node_version: node.js version ]###############################
- # Node version color.
- typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70
- # Show node version only when in a directory tree containing package.json.
- typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #######################[ go_version: go version (https://golang.org) ]########################
- # Go version color.
- typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37
- # Show go version only when in a go project subdirectory.
- typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #################[ rust_version: rustc version (https://www.rust-lang.org) ]##################
- # Rust version color.
- typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37
- # Show rust version only when in a rust project subdirectory.
- typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################
- # .NET version color.
- typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134
- # Show .NET version only when in a .NET project subdirectory.
- typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #####################[ php_version: php version (https://www.php.net/) ]######################
- # PHP version color.
- typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99
- # Show PHP version only when in a PHP project subdirectory.
- typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]###########
- # Laravel version color.
- typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161
- # Custom icon.
- # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ####################[ java_version: java version (https://www.java.com/) ]####################
- # Java version color.
- typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32
- # Show java version only when in a java project subdirectory.
- typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true
- # Show brief version.
- typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####
- # Package color.
- typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117
- # Package format. The following parameters are available within the expansion.
- #
- # - P9K_PACKAGE_NAME The value of `name` field in package.json.
- # - P9K_PACKAGE_VERSION The value of `version` field in package.json.
- #
- # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}'
- # Custom icon.
- # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############
- # Rbenv color.
- typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168
- # Hide ruby version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)
- # If set to false, hide ruby version if it's the same as global:
- # $(rbenv version-name) == $(rbenv global).
- typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide ruby version if it's equal to "system".
- typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #######################[ rvm: ruby version from rvm (https://rvm.io) ]########################
- # Rvm color.
- typeset -g POWERLEVEL9K_RVM_FOREGROUND=168
- # Don't show @gemset at the end.
- typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false
- # Don't show ruby- at the front.
- typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############
- # Fvm color.
- typeset -g POWERLEVEL9K_FVM_FOREGROUND=38
- # Custom icon.
- # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########
- # Lua color.
- typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32
- # Hide lua version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)
- # If set to false, hide lua version if it's the same as global:
- # $(luaenv version-name) == $(luaenv global).
- typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide lua version if it's equal to "system".
- typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################
- # Java color.
- typeset -g POWERLEVEL9K_JENV_FOREGROUND=32
- # Hide java version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)
- # If set to false, hide java version if it's the same as global:
- # $(jenv version-name) == $(jenv global).
- typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide java version if it's equal to "system".
- typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############
- # Perl color.
- typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67
- # Hide perl version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)
- # If set to false, hide perl version if it's the same as global:
- # $(plenv version-name) == $(plenv global).
- typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide perl version if it's equal to "system".
- typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
- # Perlbrew color.
- typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
- # Show perlbrew version only when in a perl project subdirectory.
- typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
- # Don't show "perl-" at the front.
- typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
- # PHP color.
- typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
- # Hide php version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global)
- # If set to false, hide php version if it's the same as global:
- # $(phpenv version-name) == $(phpenv global).
- typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide php version if it's equal to "system".
- typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######
- # Scala color.
- typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160
- # Hide scala version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)
- # If set to false, hide scala version if it's the same as global:
- # $(scalaenv version-name) == $(scalaenv global).
- typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide scala version if it's equal to "system".
- typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########
- # Haskell color.
- typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172
- # Hide haskell version if it doesn't come from one of these sources.
- #
- # shell: version is set by STACK_YAML
- # local: version is set by stack.yaml up the directory tree
- # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml)
- typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local)
- # If set to false, hide haskell version if it's the same as in the implicit global project.
- typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################[ terraform: terraform workspace (https://www.terraform.io) ]#################
- # Don't show terraform workspace if it's literally "default".
- typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false
- # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element
- # in each pair defines a pattern against which the current terraform workspace gets matched.
- # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
- # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,
- # you'll see this value in your prompt. The second element of each pair in
- # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The
- # first match wins.
- #
- # For example, given these settings:
- #
- # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
- # '*prod*' PROD
- # '*test*' TEST
- # '*' OTHER)
- #
- # If your current terraform workspace is "project_test", its class is TEST because "project_test"
- # doesn't match the pattern '*prod*' but does match '*test*'.
- #
- # You can define different colors, icons and content expansions for different classes:
- #
- # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28
- # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
- typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
- # '*prod*' PROD # These values are examples that are unlikely
- # '*test*' TEST # to match your needs. Customize them as needed.
- '*' OTHER)
- typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38
- # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #############[ terraform_version: terraform version (https://www.terraform.io) ]##############
- # Terraform version color.
- typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38
- # Custom icon.
- # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
- # Show kubecontext only when the command you are typing invokes one of these tools.
- # Tip: Remove the next line to always show kubecontext.
- typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent'
-
- # Kubernetes context classes for the purpose of using different colors, icons and expansions with
- # different contexts.
- #
- # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element
- # in each pair defines a pattern against which the current kubernetes context gets matched.
- # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
- # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,
- # you'll see this value in your prompt. The second element of each pair in
- # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The
- # first match wins.
- #
- # For example, given these settings:
- #
- # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
- # '*prod*' PROD
- # '*test*' TEST
- # '*' DEFAULT)
- #
- # If your current kubernetes context is "deathray-testing/default", its class is TEST
- # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'.
- #
- # You can define different colors, icons and content expansions for different classes:
- #
- # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28
- # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
- typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
- # '*prod*' PROD # These values are examples that are unlikely
- # '*test*' TEST # to match your needs. Customize them as needed.
- '*' DEFAULT)
- typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134
- # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
- # segment. Parameter expansions are very flexible and fast, too. See reference:
- # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
- #
- # Within the expansion the following parameters are always available:
- #
- # - P9K_CONTENT The content that would've been displayed if there was no content
- # expansion defined.
- # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the
- # output of `kubectl config get-contexts`.
- # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the
- # output of `kubectl config get-contexts`.
- # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE
- # in the output of `kubectl config get-contexts`. If there is no
- # namespace, the parameter is set to "default".
- # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the
- # output of `kubectl config get-contexts`.
- #
- # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),
- # the following extra parameters are available:
- #
- # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks".
- # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID.
- # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone.
- # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster.
- #
- # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,
- # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01":
- #
- # - P9K_KUBECONTEXT_CLOUD_NAME=gke
- # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account
- # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a
- # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
- #
- # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01":
- #
- # - P9K_KUBECONTEXT_CLOUD_NAME=eks
- # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012
- # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1
- # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
- typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
- # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.
- POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
- # Append the current context's namespace if it's not "default".
- POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
-
- # Custom prefix.
- typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%250Fat '
-
- #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
- # Show aws only when the command you are typing invokes one of these tools.
- # Tip: Remove the next line to always show aws.
- typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
-
- # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
- # in each pair defines a pattern against which the current AWS profile gets matched.
- # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
- # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,
- # you'll see this value in your prompt. The second element of each pair in
- # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The
- # first match wins.
- #
- # For example, given these settings:
- #
- # typeset -g POWERLEVEL9K_AWS_CLASSES=(
- # '*prod*' PROD
- # '*test*' TEST
- # '*' DEFAULT)
- #
- # If your current AWS profile is "company_test", its class is TEST
- # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'.
- #
- # You can define different colors, icons and content expansions for different classes:
- #
- # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28
- # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
- typeset -g POWERLEVEL9K_AWS_CLASSES=(
- # '*prod*' PROD # These values are examples that are unlikely
- # '*test*' TEST # to match your needs. Customize them as needed.
- '*' DEFAULT)
- typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
- # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- # AWS segment format. The following parameters are available within the expansion.
- #
- # - P9K_AWS_PROFILE The name of the current AWS profile.
- # - P9K_AWS_REGION The region associated with the current AWS profile.
- typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}'
-
- #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
- # AWS Elastic Beanstalk environment color.
- typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70
- # Custom icon.
- # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
- # Show azure only when the command you are typing invokes one of these tools.
- # Tip: Remove the next line to always show azure.
- typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
- # Azure account name color.
- typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
- # Custom icon.
- # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
- # Show gcloud only when the command you are typing invokes one of these tools.
- # Tip: Remove the next line to always show gcloud.
- typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
- # Google cloud color.
- typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32
-
- # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or
- # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative
- # enough. You can use the following parameters in the expansions. Each of them corresponds to the
- # output of `gcloud` tool.
- #
- # Parameter | Source
- # -------------------------|--------------------------------------------------------------------
- # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)'
- # P9K_GCLOUD_ACCOUNT | gcloud config get-value account
- # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project
- # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)'
- #
- # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'.
- #
- # Obtaining project name requires sending a request to Google servers. This can take a long time
- # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud
- # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets
- # set and gcloud prompt segment transitions to state COMPLETE.
- #
- # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL
- # and COMPLETE. You can also hide gcloud in state PARTIAL by setting
- # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and
- # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty.
- typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}'
- typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}'
-
- # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name
- # this often. Negative value disables periodic polling. In this mode project name is retrieved
- # only when the current configuration, account or project id changes.
- typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
- # Show google_app_cred only when the command you are typing invokes one of these tools.
- # Tip: Remove the next line to always show google_app_cred.
- typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
-
- # Google application credentials classes for the purpose of using different colors, icons and
- # expansions with different credentials.
- #
- # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first
- # element in each pair defines a pattern against which the current kubernetes context gets
- # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion
- # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION
- # parameters, you'll see this value in your prompt. The second element of each pair in
- # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.
- # The first match wins.
- #
- # For example, given these settings:
- #
- # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
- # '*:*prod*:*' PROD
- # '*:*test*:*' TEST
- # '*' DEFAULT)
- #
- # If your current Google application credentials is "service_account deathray-testing x@y.com",
- # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.
- #
- # You can define different colors, icons and content expansions for different classes:
- #
- # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28
- # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'
- typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
- # '*:*prod*:*' PROD # These values are examples that are unlikely
- # '*:*test*:*' TEST # to match your needs. Customize them as needed.
- '*' DEFAULT)
- typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32
- # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by
- # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:
- # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
- #
- # You can use the following parameters in the expansion. Each of them corresponds to one of the
- # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.
- #
- # Parameter | JSON key file field
- # ---------------------------------+---------------
- # P9K_GOOGLE_APP_CRED_TYPE | type
- # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id
- # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email
- #
- # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
- typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
-
- ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############
- # Toolbox color.
- typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178
- # Don't display the name of the toolbox if it matches fedora-toolbox-*.
- typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'
- # Custom icon.
- # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # Custom prefix.
- typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%250Fin '
-
- ###############################[ public_ip: public IP address ]###############################
- # Public IP color.
- typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94
- # Custom icon.
- # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ########################[ vpn_ip: virtual private network indicator ]#########################
- # VPN IP color.
- typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81
- # When on VPN, show just an icon without the IP address.
- # Tip: To display the private IP address when on VPN, remove the next line.
- typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
- # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
- # to see the name of the interface.
- typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*'
- # If set to true, show one segment per matching network interface. If set to false, show only
- # one segment corresponding to the first matching network interface.
- # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
- typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ ip: ip address and bandwidth usage for a specified network interface ]###########
- # IP color.
- typeset -g POWERLEVEL9K_IP_FOREGROUND=38
- # The following parameters are accessible within the expansion:
- #
- # Parameter | Meaning
- # ----------------------+-------------------------------------------
- # P9K_IP_IP | IP address
- # P9K_IP_INTERFACE | network interface
- # P9K_IP_RX_BYTES | total number of bytes received
- # P9K_IP_TX_BYTES | total number of bytes sent
- # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt
- # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt
- # P9K_IP_RX_RATE | receive rate (since last prompt)
- # P9K_IP_TX_RATE | send rate (since last prompt)
- typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+%70F⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+%215F⇡$P9K_IP_TX_RATE }%38F$P9K_IP_IP'
- # Show information for the first network interface whose name matches this regular expression.
- # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.
- typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
- # Custom icon.
- # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #########################[ proxy: system-wide http/https/ftp proxy ]##########################
- # Proxy color.
- typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68
- # Custom icon.
- # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################################[ battery: internal battery ]#################################
- # Show battery in red when it's below this level and not connected to power supply.
- typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
- typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160
- # Show battery in green when it's charging or fully charged.
- typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70
- # Show battery in yellow when it's discharging.
- typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
- # Battery pictograms going from low to high level of charge.
- typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'
- # Don't show the remaining time to charge/discharge.
- typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
-
- #####################################[ wifi: wifi speed ]#####################################
- # WiFi color.
- typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68
- # Custom icon.
- # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).
- #
- # # Wifi colors and icons for different signal strength levels (low to high).
- # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values
- # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values
- #
- # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'
- # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'
- #
- # The following parameters are accessible within the expansions:
- #
- # Parameter | Meaning
- # ----------------------+---------------
- # P9K_WIFI_SSID | service set identifier, a.k.a. network name
- # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown
- # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second
- # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0
- # P9K_WIFI_NOISE | noise in dBm, from -120 to 0
- # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
-
- ####################################[ time: current time ]####################################
- # Current time color.
- typeset -g POWERLEVEL9K_TIME_FOREGROUND=66
- # Format for the current time: 09:51:02. See `man 3 strftime`.
- typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
- # If set to true, time will update when you hit enter. This way prompts for the past
- # commands will contain the start times of their commands as opposed to the default
- # behavior where they contain the end times of their preceding commands.
- typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # Custom prefix.
- typeset -g POWERLEVEL9K_TIME_PREFIX='%250Fat '
-
- # Example of a user-defined prompt segment. Function prompt_example will be called on every
- # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or
- # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.
- #
- # Type `p10k help segment` for documentation and a more sophisticated example.
- function prompt_example() {
- p10k segment -f 208 -i '⭐' -t 'hello, %n'
- }
-
- # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
- # is to generate the prompt segment for display in instant prompt. See
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
- #
- # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
- # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
- # will replay these calls without actually calling instant_prompt_*. It is imperative that
- # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this
- # rule is not observed, the content of instant prompt will be incorrect.
- #
- # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If
- # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.
- function instant_prompt_example() {
- # Since prompt_example always makes the same `p10k segment` calls, we can call it from
- # instant_prompt_example. This will give us the same `example` prompt segment in the instant
- # and regular prompts.
- prompt_example
- }
-
- # User-defined prompt segments can be customized the same way as built-in segments.
- # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208
- # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
- # when accepting a command line. Supported values:
- #
- # - off: Don't change prompt when accepting a command line.
- # - always: Trim down prompt when accepting a command line.
- # - same-dir: Trim down prompt when accepting a command line unless this is the first command
- # typed after changing current working directory.
- typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always
-
- # Instant prompt mode.
- #
- # - off: Disable instant prompt. Choose this if you've tried instant prompt and found
- # it incompatible with your zsh configuration files.
- # - quiet: Enable instant prompt and don't print warnings when detecting console output
- # during zsh initialization. Choose this if you've read and understood
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
- # - verbose: Enable instant prompt and print a warning when detecting console output during
- # zsh initialization. Choose this if you've never tried instant prompt, haven't
- # seen the warning, or if you are unsure what this all means.
- typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
-
- # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
- # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
- # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you
- # really need it.
- typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
-
- # If p10k is already loaded, reload configuration.
- # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
- (( ! $+functions[p10k] )) || p10k reload
-}
-
-# Tell `p10k configure` which file it should overwrite.
-typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
-
-(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
-'builtin' 'unset' 'p10k_config_opts'
diff --git a/config/home-manager/base.nix b/config/home-manager/base.nix
deleted file mode 100644
index fd9035a9..00000000
--- a/config/home-manager/base.nix
+++ /dev/null
@@ -1,120 +0,0 @@
-desktop: {
- pkgs,
- system,
- lib,
- config,
- ...
-}: {
- imports =
- [
- (import ../programs/zsh.nix desktop)
- ../programs/tmux.nix
- (import ../programs/vim desktop)
- ]
- ++ (
- if desktop
- then [
- ../programs/mail.nix
- ../programs/taskwarrior.nix
- ]
- else []
- );
- programs = {
- zsh = {
- enable = true;
- oh-my-zsh = {
- enable = true;
- };
- initExtraBeforeCompInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
-
- initExtra =
- if system != "riscv64-linux"
- then ''
- [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
-
- test -n "$KITTY_INSTALLATION_DIR" || export KITTY_INSTALLATION_DIR=${pkgs.kitty}/lib/kitty
- export KITTY_SHELL_INTEGRATION=enabled
- autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
- kitty-integration
- unfunction kitty-integration
- ''
- else "";
-
- plugins = [
- ];
- };
- autojump.enable = true;
- jq.enable = true;
- ledger.enable = true;
- };
- home.file.".p10k.zsh".source = ./.p10k.zsh;
-
- home = {
- shellAliases =
- {
- cat = "bat";
- less = "bat";
- }
- // (
- if system != "riscv64-linux"
- then {
- icat = "${pkgs.kitty}/bin/kitty +kitten icat";
- d = "${pkgs.kitty}/bin/kitty +kitten diff";
- hg = "${pkgs.kitty}/bin/kitty +kitten hyperlinked_grep";
- #ssh = "${pkgs.kitty}/bin/kitty +kitten ssh";
- cargo = "${pkgs.cargo-mommy}/bin/cargo-mommy";
- }
- else {}
- );
- packages = with pkgs;
- [
- mosh
- ripgrep
- gh
- htop
- sops
- progress
- hexyl
- mc
- rclone
- libarchive
- p7zip
- unrar
- ]
- ++ (
- if desktop
- then [
- yubikey-manager
- yt-dlp
- oxipng
- jpegoptim
- #picard
- easytag
- alejandra
- yubico-piv-tool
- ]
- else []
- );
- sessionVariables = if desktop then {
- QT_PLUGIN_PATH = lib.mkForce "\${QT_PLUGIN_PATH}:${config.i18n.inputMethod.package}/${pkgs.qt6.qtbase.qtPluginPrefix}:${pkgs.kdePackages.kimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}";
- } else {};
- };
-
- programs.eza = {
- enable = true;
- enableZshIntegration = true;
- };
-
- programs.bat = {
- enable = true;
- };
-
- programs.fzf = {
- enable = true;
- tmux.enableShellIntegration = true;
- };
- home.stateVersion = "22.05";
- manual.manpages.enable = false; # broken
-
- _module.args.withNSFW = false;
-}
diff --git a/config/home-manager/darkkirb.nix b/config/home-manager/darkkirb.nix
deleted file mode 100644
index f8cb5f2d..00000000
--- a/config/home-manager/darkkirb.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- desktop,
- args,
-}: {pkgs, ...}: {
- imports =
- [
- (import ./base.nix desktop)
- ../programs/ssh.nix
- (import ../programs/git.nix desktop)
- ../programs/direnv.nix
- ]
- ++ (
- if desktop
- then [
- #../programs/sway.nix
- ../programs/firefox.nix
- ../programs/waybar.nix
- ../programs/ims.nix
- ../programs/syncthing.nix
- ../programs/plover.nix
- (import ../games/default.nix args)
- ../programs/yubikey.nix
- ../programs/keybase.nix
- ../programs/keepass.nix
- ../programs/vscode
- ../programs/misc.nix
- ../programs/zk.nix
- ../programs/fcitx.nix
- ../programs/gpg.nix
- ../programs/zoom.nix
- ]
- else []
- );
-}
diff --git a/config/home-manager/miifox.nix b/config/home-manager/miifox.nix
deleted file mode 100644
index 49b6773f..00000000
--- a/config/home-manager/miifox.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{pkgs, ...}: {
- imports = [
- (import ./base.nix false)
- ];
-}
diff --git a/config/home-manager/root.nix b/config/home-manager/root.nix
deleted file mode 100644
index 1957fd33..00000000
--- a/config/home-manager/root.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{pkgs, ...}: {
- imports = [
- (import ./base.nix false)
- ../programs/builders.nix
- ];
-}
diff --git a/config/home.nix b/config/home.nix
deleted file mode 100644
index 93838435..00000000
--- a/config/home.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-_: {
- home-manager.useGlobalPkgs = true;
- home-manager.useUserPackages = true;
- home-manager.users.root = import ./home-manager/root.nix;
-}
diff --git a/config/i18n.nix b/config/i18n.nix
new file mode 100644
index 00000000..b59c4252
--- /dev/null
+++ b/config/i18n.nix
@@ -0,0 +1,17 @@
+{ ... }:
+{
+ console.keyMap = "neo";
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "de_DE.UTF-8";
+ LC_MONETARY = "de_DE.UTF-8";
+ LC_NAME = "de_DE.UTF-8";
+ LC_PAPER = "de_DE.UTF-8";
+ LC_TELEPHONE = "de_DE.UTF-8";
+ LC_TIME = "de_DE.UTF-8";
+ };
+ i18n.supportedLocales = [
+ "C.UTF-8/UTF-8"
+ "en_US.UTF-8/UTF-8"
+ "de_DE.UTF-8/UTF-8"
+ ];
+}
diff --git a/config/installer.nix b/config/installer.nix
deleted file mode 100644
index e7128163..00000000
--- a/config/installer.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{nixpkgs, ...}: {
- imports = [
- "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix"
- ];
- networking.hostId = "8425e349";
-}
diff --git a/config/instance-20221213-1915.nix b/config/instance-20221213-1915.nix
deleted file mode 100644
index dde1ad53..00000000
--- a/config/instance-20221213-1915.nix
+++ /dev/null
@@ -1,149 +0,0 @@
-{
- config,
- lib,
- modulesPath,
- ...
-} @ args: {
- networking.hostName = "instance-20221213-1915";
- networking.hostId = "746d4523";
-
- imports = [
- (modulesPath + "/profiles/qemu-guest.nix")
- ./systemd-boot.nix
- ./server.nix
- ./wireguard/public-server.nix
- ./services/named-submissive.nix
- ./services/shitalloverme.nix
- ./users/remote-build.nix
- ./services/atticd.nix
- ./services/minecraft.nix
- ./services/postgres.nix
- ./services/uptime-kuma.nix
- ./services/reverse-proxy.nix
- ./wireguard
- ./zfs.nix
- #./services/kubernetes.nix
- ./services/gitea.nix
- ./services/chir-rs.nix
- ];
-
- boot.initrd.availableKernelModules = ["xhci_pci" "virtio_pci" "usbhid"];
- boot.initrd.kernelModules = [];
- boot.kernelModules = [];
- boot.extraModulePackages = [];
-
- fileSystems."/" = {
- device = "tank/local/root";
- fsType = "zfs";
- };
-
- fileSystems."/boot" = {
- device = "/dev/disk/by-uuid/6557-C4A0";
- fsType = "vfat";
- };
-
- fileSystems."/nix" = {
- device = "tank/local/nix";
- fsType = "zfs";
- };
-
- fileSystems."/persist" = {
- device = "tank/safe/persist";
- fsType = "zfs";
- neededForBoot = true;
- };
-
- fileSystems."/home" = {
- device = "tank/safe/home";
- fsType = "zfs";
- };
-
- networking.useDHCP = lib.mkDefault true;
-
- # https://grahamc.com/blog/erase-your-darlings
- boot.initrd.postDeviceCommands = lib.mkAfter ''
- zfs rollback -r tank/local/root@blank
- '';
-
- services.openssh = {
- hostKeys = [
- {
- path = "/persist/ssh/ssh_host_ed25519_key";
- type = "ed25519";
- }
- {
- path = "/persist/ssh/ssh_host_rsa_key";
- type = "rsa";
- bits = 4096;
- }
- ];
- };
-
- systemd.tmpfiles.rules = [
- "L /var/lib/acme - - - - /persist/var/lib/acme"
- "L /var/lib/tailscale/tailscaled.state - - - - /persist/var/lib/tailscale/tailscaled.state"
- "d /build - - - - -"
- "L /var/lib/ipfs - - - - /persist/var/lib/ipfs"
- "L /var/lib/uptime-kuma - - - - /persist/var/lib/uptime-kuma"
- ];
-
- services.postgresql.dataDir = "/persist/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";
-
- networking.wireguard.interfaces."wg0".ips = ["fd0d:a262:1fa6:e621:746d:4523:5c04:1453/64"];
- home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
- desktop = false;
- inherit args;
- };
- nix.settings.cores = 4;
- nix.settings.max-jobs = 4;
- nix.settings.system-features = [
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-armv8-a"
- "gccarch-armv8.1-a"
- "gccarch-armv8.2-a"
- "ca-derivations"
- ];
- nix.daemonCPUSchedPolicy = "idle";
- nix.daemonIOSchedClass = "idle";
- boot.binfmt.emulatedSystems = [
- "riscv32-linux"
- "riscv64-linux"
- ];
-
- system.stateVersion = "22.11";
-
- sops.secrets."root/.ssh/id_ed25519" = {
- owner = "root";
- path = "/root/.ssh/id_ed25519";
- };
- sops.secrets."services/ssh/host-key" = {
- owner = "root";
- path = "/etc/secrets/initrd/ssh_host_ed25519_key";
- };
- sops.age.sshKeyPaths = lib.mkForce ["/persist/ssh/ssh_host_ed25519_key"];
- services.bind.forwarders = lib.mkForce [];
- boot.loader.systemd-boot.configurationLimit = lib.mkForce 1;
- services.tailscale.useRoutingFeatures = "server";
- services.postgresql.settings = {
- max_connections = 200;
- shared_buffers = "6GB";
- effective_cache_size = "18GB";
- maintenance_work_mem = "1536MB";
- checkpoint_completion_target = 0.9;
- wal_buffers = "16MB";
- default_statistics_target = 100;
- random_page_cost = 1.1;
- effective_io_concurrency = 200;
- work_mem = "15728kB";
- min_wal_size = "1GB";
- max_wal_size = "4GB";
- max_worker_processes = 4;
- max_parallel_workers_per_gather = 2;
- max_parallel_workers = 4;
- max_parallel_maintenance_workers = 2;
- };
-
- services.restic.backups.sysbackup.paths = ["/persist"];
-}
diff --git a/config/kde.nix b/config/kde.nix
deleted file mode 100644
index 4a465e42..00000000
--- a/config/kde.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- security.pam.services.sddm.u2fAuth = true;
- services.displayManager.sddm = {
- enable = true;
- wayland.enable = true;
- wayland.compositor = "kwin";
- };
- services.xserver = {
- desktopManager.plasma6.enable = true;
- #desktopManager.plasma5.enable = true;
- displayManager.defaultSession = "plasma";
- #displayManager.defaultSession = "plasmawayland";
- };
-}
diff --git a/config/kde/default.nix b/config/kde/default.nix
new file mode 100644
index 00000000..c4c28443
--- /dev/null
+++ b/config/kde/default.nix
@@ -0,0 +1,22 @@
+{ config, ... }:
+{
+ services.xserver.enable = !config.isSway;
+ services.displayManager.sddm = {
+ enable = !config.isSway;
+ wayland.enable = true;
+ wayland.compositor = "kwin";
+ };
+ services.desktopManager.plasma6.enable = !config.isSway;
+
+ imports = [
+ ./i18n.nix
+ ];
+
+ home-manager.users.darkkirb.imports =
+ if !config.isSway then
+ [
+ ./home-manager.nix
+ ]
+ else
+ [ ];
+}
diff --git a/config/kde/home-manager.nix b/config/kde/home-manager.nix
new file mode 100644
index 00000000..93320b56
--- /dev/null
+++ b/config/kde/home-manager.nix
@@ -0,0 +1,16 @@
+{ plasma-manager, ... }:
+{
+ programs.plasma.enable = true;
+ programs.plasma.configFile.baloofilerc."Basic Settings"."Indexing-Enabled" = false;
+ programs.plasma.configFile.kwalletrc."org.freedesktop.secrets".apiEnabled = false;
+ imports = [
+ plasma-manager.homeManagerModules.plasma-manager
+ ./theming.nix
+ ./krdp.nix
+ ./konsole.nix
+ ];
+ programs.plasma.kwin.virtualDesktops = {
+ rows = 3;
+ number = 9;
+ };
+}
diff --git a/config/kde/i18n.nix b/config/kde/i18n.nix
new file mode 100644
index 00000000..8d7c73fc
--- /dev/null
+++ b/config/kde/i18n.nix
@@ -0,0 +1,8 @@
+{ ... }:
+{
+ services.libinput.enable = true;
+ services.xserver.xkb = {
+ layout = "de";
+ variant = "neo";
+ };
+}
diff --git a/config/kde/konsole.nix b/config/kde/konsole.nix
new file mode 100644
index 00000000..5b702816
--- /dev/null
+++ b/config/kde/konsole.nix
@@ -0,0 +1,8 @@
+{ ... }:
+{
+ programs.konsole = {
+ enable = true;
+ defaultProfile = "Stylix";
+ profiles.Stylix.colorScheme = "Stylix";
+ };
+}
diff --git a/config/kde/krdp.nix b/config/kde/krdp.nix
new file mode 100644
index 00000000..dcc8ef64
--- /dev/null
+++ b/config/kde/krdp.nix
@@ -0,0 +1,11 @@
+{ config, ... }:
+{
+ programs.plasma.configFile.krdpserverrc.General = {
+ Autostart = true;
+ Certificate = config.sops.secrets.".local/share/krdpserver/krdp.crt".path;
+ CertificateKey = config.sops.secrets.".local/share/krdpserver/krdp.key".path;
+ Users = "darkkirb";
+ };
+ sops.secrets.".local/share/krdpserver/krdp.key".sopsFile = ./krdp.yaml;
+ sops.secrets.".local/share/krdpserver/krdp.crt".sopsFile = ./krdp.yaml;
+}
diff --git a/config/kde/krdp.yaml b/config/kde/krdp.yaml
new file mode 100644
index 00000000..755fb8e8
--- /dev/null
+++ b/config/kde/krdp.yaml
@@ -0,0 +1,34 @@
+.local:
+ share:
+ krdpserver:
+ krdp.key: ENC[AES256_GCM,data:U5QhG2Ac5Dym8E0BToa+MNWUm6AHrqoxAu7RZjIWH5NjeK+Mt6fwuim1vTt55GZL7dkXehUc58NIUc7RgAIdY49+1akdOCzKWCtkGXW2jBS5p6bQt//9UlYS+P7olS9Mc6UWZ+2cSJw6Kz0rcLppuX3gjDcn6s3mOq7/RwYFdoFgjO24CLAVe6UUhRRIhgRCUe/fYzXR1KfuNPGe5SVtgfASKOdI06V9yeYo5gWqVaYa53rm6TALNgxzUCqynKxylO8o9qShlJJ4jexzy611rBAyOt4200BQV+cbmEUC+3RSLZpMDwYXo++mg0BMWvtk0uKGD6fhHV9zOajUeWLoSpKDj9z6EQv9mxrRMjJVRd9xXYzn8NQymIJi4jFN+C5RIV540rCs9nOx/eyVG0rpv4eBsZ5Q6jAWNp2vLHIMqw1+4K/AMSaF2o+b/c6p/DHLFcuOlRsTMdAO8FqHJ5d9g7fRe48ePpFagMXa7JwEAeVOOdbEGZpWl9D3DLKskCQos/rfGEKsFjOCA2MJ229RwZ0FVA3zbOSYXFxnqB7AiSGlasSY2CZ27U9X4KnSzgYXC9KAUR5I5S1cbr87as7zmh5lhWA9wsQuMnRRvn3iunPMEv6mYQZ7Rh0Z1Q4MrsEQ+F4Y6+4LjqGXOY3TdwpInu0vawZEI1S+bnLtzLQuCXLPc5t07zuqU7I/zJ0uRwMnPC7lRLOX55NHZHtEiafbRVw7vNltsH2QyWOafEPPLhp/ZvhH33C2kgZ56b6yJbhBVRDBYdb1ViLYv5JLhcn59G+y7wiCHThd0wllMs6g9rCCcAgSqdQzFhLoLxje2roDKHd0xeaTivgHxjaVEKLmfXCVqwzjoeAKALcv8baBxBBQn9//EKRnfw7D478DfWUIIp6ox7Pmc2kYvl3GQZ/Zj5NvN45hK4wGtV7k7JGYxig4YmePt8dGkMkcM14elOlW8fy5N+jmPA/NOOUHOU53p6Dg0dsiNaqtITSYYWfIHDGhVfS3zP6+p/MXPL2/cYBXXB4sceocvdzbEPwjbh3pcKanX9hwk7EFOZ0GH6843EPmg+7+N6kv9DAta1o+ZeEcLID/ItOw4K84xInRYYaXReZGJtVuiee/YV5YtALu51j7trrI/dyfLhveuVGgTb1VKw6dvULcg24Dtt1OZCW7U/xT8gJ5HtPS6jFyB+a7iK27qukRuuNt6j8NNzmpZtId9Iu+yb7HNEL0tvYhh3fzFcZFB8ncDuYk16b4EqhVfqjPUrkcUGrBSocmY4xC6p4qig4ZOrA1BsYJXrO3ytlBrnCA0DNx/UVoe5lrAp5z4kDuAKLW01BSJk48cpuBcKDAIBaLNbirHLw8WsX61lnhTh5o4hmzASJ9KiBIe9u5+zbyZFfXrm3xkCMY/vez9vrS+BVwFD3GNndbPEchyUbAGjkaP0m9kjqAPfijFHtGtGl3z9I5/VIsfLF1FDBUV9joWoZ4qNRNQjHP/vMZK194KlUPTTEwkKf4W655XsFTMfpu+Au14Em1jnKKw4jJ7Omz9DuOi8Aut/mX6iVWUgQChcI8cjY9UAzcxJbgUCCPOxdGS2l4ExhxPMdzL43IurkILWV8cQYwMMXImRlV2RYtwOhQayeeaRVInLmGi8Ro5YXwFLfjBM1gEV7KmCq9T+SN9gJfPELabB6iSypAImfiO3dWBKn5ftL6qVolaM+PocBQpQ3B50rBkMdVseKTi39Gz4Rhl04w+GSSsggB60JcTG1VftePML3m//bpn/QvtZP2w3rrKuuWKSHzFTXazMZAgJBE+LZ55r7Az43N2E4LMW8tyI36wVWCrxXffNYK4TCh4uzBXxFHjsE3DNa/DZacRMIauTwRJOqp5lkdBG3ukgIt9GsJQZ7UHlr44nD0hGg4Oon3deCVBDexUoiD1ooZ4LRKEvXTeznB7UMA9G2OIAMThdCVyQBzYRPo2yO4fFH6nIZ0atbq1FGX2X5Ub9hcshXxcb6+N1btFIcKwELMmMWrLLbXaDXmh3ycIlS8HqrYe37DzkTEXQ30ChOgjJrRFubvbXvB2aQE9BY5ap2rPf0FOzGAsKFYq0BF8d4UCySPZLrSXGURDT+ZUMUiY/DBmWl28oPihP8J6tsqSaI78hRF6FOAJnIsw7r9EcK7hGHbbL8qBCHmSRyoFyOhhwVKqNq8yi14dwlhAjKTRMCejKL6GqLwIgM4Ow/woMNmZep+OZfefUEx6F+sTW1JETmixL1OW1u+UXdnax+rqdg+PKGjFoFpg4UD,iv:YWvImaFa5GXiraaF7UVt3fAsuYIK+RpHkSQ2mPAsHz4=,tag:JvHARPOlmrKgG5Z85QokDg==,type:str]
+ krdp.crt: ENC[AES256_GCM,data:/cIW8pLa1Xp3feHoGQ8ujAqcx8IQnV/+9pSxmuuYNgs0Pn9BjHhNvkXPh1z8h0LiTHQ/jks23C0TS8tyNNXYZI/w1ihGhkqlFWGkr1yC1yM0SXnDfAp/gBAAdKzIJN2rGWpK/FD+s8GH1ys1g0+V2sPrzOis0h7jwL0EWG1un6hGn9q9YLoYbJbxLlv2W2+AGM4QqUv6/p07QhUyUSwaXWDrPZ2Sr1PZfRX30Zj4McM3TS9keyobOWS99kphBjX/c4TD+zMfMeSZRptcUiLQH03R9OPRSmr+xe72xNjMBKdkElc1wANc1H3g/upgTFZDwEpadd+YCvUFPVr1vxaIFfIz2jsWar4g802nY/jJfH+iWziNzkBI3jWpfSsIupWRHMB690mqp7UvUpSTwx4gcUB7L52MAUXEYMfYxws+kVHr3P2YsjkJ3PDESE/42/UuxA5Ccy0LxynCQWqa9/dnc84jQeYfKL5nuFozHqeRbfvPkvkc1U2I+18oEnCmTV3AR1XrV9iH0DLrVJ81eKd1UuZz468x+7B6NtWCOU4D4mABQWTAW6XbxA69qIZNv7/g4tBxc85iuZ6dxNV2TY6QA3+foYaD1Y5LD5Cslgs6r6RTIHrQ2Pmj4fQvA2pSk46rXUFCsyTq2heEiXFvlqY8YTLM3MsEV+KUQg4Cd1koUM5JlOAF+fHaNkOAQjc01QdZM79yJSrJByb6tvsLfjioYYl/EsJkUmc4cBeWkS1C0ap/mcaUSZy7QCC4FGUI62cFa1ClbqK9IIVXy3BL1oeD6OYxul7TX+2GB/tSgxGXZkQFdIRoQGo0Rkl7Jjlp+b8vfx+E9byA4gfoIi9T00EDlffNT446l2/3EbTNiW7HGYPD0hFyBDz7T5sOLS4Pv/hEDt5Yn9Fgyh+k434PuVcLxCtqJ+XMVU5U2hKukkk9MvezlbeH+w6dVRp3IkSWVE5SaIHZZmdOQGKINXOd7ez274qgMcFfWXpfw8MsbZU6VfK8orpmhCj5agSfiuZSLQRhonsaBbh/xzfXcThy51E4eqIZTMl2DrzKnN1+R061C0n2yhNG4ftZqsyqfEtMSkq5sUGhjl8H+aWFl+go2wsZhRcpFQa6dcZFmJvHblWnWPvfAesYoaVr7ZtGKLgA2Pt1Q9RE/5PdSfKZbziFIEGNpx4v5yt4hRwC0n+lCL6fm0vJ124gdufizxWoY7BKsi56cwYaeRrYARJ8OUl901DQNIbHNvfjrnUUqIQsn4CYT3bp78AxSRZLTWbS9yrm4K6pVUiJBI8KdvHhLaEYfGhP0+apaw/OT1x2McmH/gIBuxjanDs7OWWJ/D8OUdM9Dv6WNV6kitS8NMLmQaOhEMxt/plOGrGzzk5VgiDxmc/J8O5AFDc0XQLYy0rTR9h7Gj6oDnlIZahtL0qxSvO7QdG0fxho+zqT+N7JW92iZs6OhdkUIeUelBDtMXsstbhmx1/DBQrKhUJjhOVjoJE724Xhuu0mIOTznvaiwK7wbSLz5kOykvUIXoeaV74CQAn16Kv/JhHz4v6+7ZWXSp5BGe7RXXPpGtyb+W23dMOPxaRkQnHTh2nTET1Sr1FnyL0Ei5Je9uZ6NjubxlTRRgYPhRsOkr5/TmCnN0RtMaZxpvhB3s+d8HfvXE13zn0AVYTO,iv:AjoxETlmSVqKF2lEc73mKrtSV5HbKOQPLIUWUAdiwuo=,tag:m95ON0puJ+bXGF+vrWYd8g==,type:str]
+sops:
+ kms: []
+ gcp_kms: []
+ azure_kv: []
+ hc_vault: []
+ age:
+ - recipient: age1tltjgexkp5fz3rum4j0k66ty5q4u8ptvkgkepumd20zal24g2qfs5xgw76
+ enc: |
+ -----BEGIN AGE ENCRYPTED FILE-----
+ YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA3WUQyb0dmRElyemJ2RDlE
+ ZzR1WE1VR2hNNUs3YlFObWdESmNYTDI1b0NzCk5SNXBCaUlRcFh4QXk1WmVseHdF
+ YUV4M0tUWlVLSUxKdGMzVXRkdERGWWcKLS0tIGxBYlJXUjIvSXZxRG9mMk14YTlu
+ RVp3VWxEQUtZdktoemVmN2FMYWZIUmMKV7/6sHEvevafH/yf3sEqpsgFwJefCoE+
+ dl9mzJ/RDjcIQMllJskdcqYRSMPwBLG2+doxIpJ1rZkGqa2t0unarw==
+ -----END AGE ENCRYPTED FILE-----
+ - recipient: age15g6tzvcmcp3ae4hwnn4pwewat6eq9unlhtjrlaka6rf94ej9dd5qqpgt7u
+ enc: |
+ -----BEGIN AGE ENCRYPTED FILE-----
+ YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJUFo1SEhKbm5PUjFNVjBl
+ RlNpakxRTkVSY1RSSzhBeTBUSjE5RzhVQmpBCmx0aGcyY0lORmFCWFlIWGlPZ2ZT
+ RmQycEZTWWFVZXRVZk9JcU1JZ1ViTlEKLS0tIGxOR09MSmVKVm44Q0NtbFFqUklN
+ aE52LzRtc25GUG9ibGsxcXJWaTZlQWMKafTEZA7jS2D/lIR05ham1axBmKh+v+6F
+ EZnTVwFpyFzw/Kpbc6PHQ6D+/7gq75tZOrbllH7bUNeWphUyC+N8Vw==
+ -----END AGE ENCRYPTED FILE-----
+ lastmodified: "2024-11-17T10:00:38Z"
+ mac: ENC[AES256_GCM,data:4HH7jjZBZY621EA4beI/hIuuXvqztJT1x3dTGSNshZzntIKealr74blBdwy+Fb/mPeJH/WuA4XVXcjupZhKN76nM5/BbW1w4fOmP3Hjpo0LHsc6I7J/BgoMv3SItXQdRGgQGE9XivbS5zieb/+NFl0eTvT6jIlUQUznTOOmGDyU=,iv:RTKUVAAieUPKXCeT0/5PxMPNOPxPAkP9ZqPHzamVRa0=,tag:wwMpIIlus/R1RQdOa7MLmg==,type:str]
+ pgp: []
+ unencrypted_suffix: _unencrypted
+ version: 3.9.1
diff --git a/config/kde/theming.nix b/config/kde/theming.nix
new file mode 100644
index 00000000..39c57436
--- /dev/null
+++ b/config/kde/theming.nix
@@ -0,0 +1,42 @@
+{ ... }:
+{
+ programs.plasma = {
+ workspace = {
+ lookAndFeel = "org.kde.breezedark.desktop";
+ };
+ hotkeys.commands."launch-konsole" = {
+ name = "Launch Konsole";
+ key = "Meta+Alt+K";
+ command = "konsole";
+ };
+ panels = [
+ # Windows-like panel at the bottom
+ {
+ location = "bottom";
+ screen = "all";
+ widgets = [
+ "org.kde.plasma.kickoff"
+ "org.kde.plasma.icontasks"
+ "org.kde.plasma.marginsseparator"
+ "org.kde.plasma.systemtray"
+ "org.kde.plasma.pager"
+ "org.kde.plasma.digitalclock"
+ ];
+ }
+ # Global menu at the top
+ {
+ location = "top";
+ height = 26;
+ widgets = [ "org.kde.plasma.appmenu" ];
+ screen = "all";
+ }
+ ];
+ configFile.kwinrc."NightColor" = {
+ Active = true;
+ LatitudeFixed = 51;
+ LongitudeFixed = 13;
+ Mode = "Location";
+ NightTemperature = 4200;
+ };
+ };
+}
diff --git a/config/nas.nix b/config/nas.nix
deleted file mode 100644
index 21a7d522..00000000
--- a/config/nas.nix
+++ /dev/null
@@ -1,211 +0,0 @@
-{
- config,
- modulesPath,
- lib,
- nixos-hardware,
- nixpkgs,
- pkgs,
- ...
-} @ args: {
- networking.hostName = "nas";
- networking.hostId = "70af00ed";
-
- imports = [
- (modulesPath + "/installer/scan/not-detected.nix")
- ./systemd-boot.nix
- ./services/tpm2.nix
- ./server.nix
- ./services/hydra.nix
- nixos-hardware.nixosModules.common-cpu-amd
- nixos-hardware.nixosModules.common-pc-ssd
- ./services/syncthing.nix
- ../modules/tc-cake.nix
- ./services/cups.nix
- ./services/iscsi.nix
- ./services/docker.nix
- ./users/remote-build.nix
- ./services/nfs.nix
- ./services/tempo.nix
- ./services/loki.nix
- ./services/prometheus.nix
- ./services/yiff-stash.nix
- ./services/reverse-proxy.nix
- ./services/jellyfin.nix
- ./services/mautrix-discord.nix
- ./services/mautrix-telegram.nix
- ./services/mautrix-whatsapp.nix
- ./services/mautrix-signal.nix
- ./services/synapse.nix
- ./services/heisenbridge.nix
- #./services/kubernetes.nix
- ./services/forgejo-runner.nix
- ./services/renovate.nix
- ./services/mautrix-slack.nix
- ];
-
- hardware.cpu.amd.updateMicrocode = true;
- boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" "bcache"];
- boot.initrd.kernelModules = ["igb"];
- boot.kernelModules = ["kvm-amd"];
- boot.extraModulePackages = [
- config.boot.kernelPackages.zenpower
- ];
-
- fileSystems."/" = {
- device = "/dev/bcache0";
- fsType = "btrfs";
- options = ["subvol=root" "compress=zstd"];
- };
-
- fileSystems."/home" = {
- device = "/dev/bcache0";
- fsType = "btrfs";
- options = ["subvol=home" "compress=zstd"];
- };
-
- fileSystems."/nix" = {
- device = "/dev/bcache0";
- fsType = "btrfs";
- options = ["subvol=nix" "compress=zstd" "noatime"];
- };
-
- services.snapper.configs.main = {
- SUBVOLUME = "/";
- TIMELINE_LIMIT_HOURLY = 5;
- TIMELINE_LIMIT_DAILY = 7;
- TIMELINE_LIMIT_WEEKLY = 4;
- TIMELINE_LIMIT_MONTHLY = 12;
- TIMELINE_LIMIT_YEARLY = 0;
- };
- services.beesd.filesystems.root = {
- spec = "/";
- hashTableSizeMB = 2048;
- verbosity = "crit";
- extraOptions = ["--loadavg-target" "5.0"];
- };
-
- fileSystems."/boot" = {
- device = "/dev/nvme0n1p1";
- fsType = "vfat";
- };
-
- environment.etc."sysconfig/lm_sensors".text = ''
- # Generated by sensors-detect on Sun Apr 24 08:31:51 2022
- # This file is sourced by /etc/init.d/lm_sensors and defines the modules to
- # be loaded/unloaded.
- #
- # The format of this file is a shell script that simply defines variables:
- # HWMON_MODULES for hardware monitoring driver modules, and optionally
- # BUS_MODULES for any required bus driver module (for example for I2C or SPI).
-
- HWMON_MODULES="it87"
- '';
- nix.settings.cores = 12;
- nix.settings.system-features = [
- "kvm"
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-znver1"
- "gccarch-skylake"
- "ca-derivations"
- ];
- boot.binfmt.emulatedSystems = [
- "armv7l-linux"
- "powerpc-linux"
- "powerpc64-linux"
- "powerpc64le-linux"
- "wasm32-wasi"
- "riscv32-linux"
- "riscv64-linux"
- ];
- hardware.enableRedistributableFirmware = true;
- nix.settings.substituters = lib.mkForce [
- "https://attic.chir.rs/chir-rs/"
- "https://cache.nixos.org/"
- ];
- nix.daemonCPUSchedPolicy = "idle";
- nix.daemonIOSchedClass = "idle";
-
- system.stateVersion = "22.05";
- home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
- desktop = false;
- inherit args;
- };
-
- networking.tc_cake = {
- enp2s0f0u4 = {
- disableOffload = true;
- shapeEgress = {
- bandwidth = "4mbit";
- extraArgs = "docsis nat ack-filter";
- };
- shapeIngress = {
- bandwidth = "33mbit";
- ifb = "ifb4enp2s0f0u4";
- };
- };
- };
- services.postgresql.settings = {
- max_connections = 200;
- shared_buffers = "4GB";
- effective_cache_size = "12GB";
- maintenance_work_mem = "1GB";
- checkpoint_completion_target = 0.9;
- wal_buffers = "16MB";
- default_statistics_target = 100;
- random_page_cost = 1.1;
- effective_io_concurrency = 200;
- work_mem = "5242kB";
- min_wal_size = "1GB";
- max_wal_size = "4GB";
- max_worker_processes = 12;
- max_parallel_workers_per_gather = 4;
- max_parallel_workers = 12;
- max_parallel_maintenance_workers = 4;
- };
- services.tailscale.useRoutingFeatures = "both";
- hardware.sane.brscan4.enable = true;
-
- swapDevices = [
- {
- device = "/dev/sda2";
- }
- {
- device = "/dev/sdb2";
- }
- {
- device = "/dev/sdc2";
- }
- ];
-
- hardware.opengl = {
- enable = true;
- driSupport32Bit = true;
- };
-
- services.xserver.videoDrivers = ["nvidia"];
-
- hardware.nvidia = {
- modesetting.enable = true;
- powerManagement.enable = false;
- powerManagement.finegrained = false;
- open = false;
- nvidiaSettings = true;
- package = config.boot.kernelPackages.nvidiaPackages.stable;
- };
- services.restic.backups.sysbackup = {
- paths = ["/media"];
- pruneOpts = [
- "--keep-daily 7"
- "--keep-weekly 4"
- "--keep-monthly 12"
- "--keep-yearly 10"
- ];
- };
- virtualisation.docker = {
- enable = true;
- #enableNvidia = true;
- };
- environment.systemPackages = with pkgs; [docker runc];
-}
diff --git a/config/networkmanager.nix b/config/networkmanager.nix
new file mode 100644
index 00000000..af4de78a
--- /dev/null
+++ b/config/networkmanager.nix
@@ -0,0 +1,9 @@
+{ ... }:
+{
+ networking.networkmanager.enable = true;
+ users.users.darkkirb.extraGroups = [ "networkmanager" ];
+ environment.persistence."/persistent".directories = [
+ "/var/lib/NetworkManager"
+ "/etc/NetworkManager"
+ ];
+}
diff --git a/config/nix.nix b/config/nix.nix
deleted file mode 100644
index 9007ed95..00000000
--- a/config/nix.nix
+++ /dev/null
@@ -1,208 +0,0 @@
-{
- pkgs,
- lib,
- config,
- system,
- attic,
- ...
-}: {
- imports = [
- ./workarounds
- ];
- nixpkgs.config.allowUnfree = true;
- nix = {
- settings = {
- sandbox = true;
- trusted-users = ["@wheel" "remote-build"];
- require-sigs = true;
- substituters = [
- "https://attic.chir.rs/chir-rs/"
- "https://hydra.int.chir.rs"
- ];
- trusted-public-keys = [
- "nixcache:8KKuGz95Pk4UJ5W/Ni+pN+v+LDTkMMFV4yrGmAYgkDg="
- "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
- "chir-rs:rzK1Czm3RqBbZLnXYrLM6JyOhfr6Z/8lhACIPO/LNFQ="
- ];
- auto-optimise-store = true;
- };
- extraOptions = ''
- experimental-features = nix-command flakes ca-derivations
- '';
- gc = {
- automatic = true;
- dates = "weekly";
- options = "--delete-older-than 7d";
- };
- buildMachines = with lib;
- mkMerge [
- (mkIf (config.networking.hostName != "instance-20221213-1915") [
- {
- hostName = "build-aarch64";
- systems = [
- "aarch64-linux"
- "riscv32-linux"
- "riscv64-linux"
- ];
- maxJobs = 4;
- speedFactor = 1;
- supportedFeatures = ["nixos-test" "benchmark" "ca-derivations" "gccarch-armv8-a" "gccarch-armv8.1-a" "gccarch-armv8.2-a" "big-parallel"];
- }
- ])
- (mkIf (config.networking.hostName != "nas") [
- {
- hostName = "build-nas";
- systems = [
- "i686-linux"
- "x86_64-linux"
- "armv7l-linux"
- "powerpc-linux"
- "powerpc64-linux"
- "powerpc64le-linux"
- "wasm32-wasi"
- "riscv32-linux"
- "riscv64-linux"
- ];
- maxJobs = 12;
- speedFactor = 1;
- supportedFeatures = [
- "kvm"
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-znver1"
- "gccarch-skylake"
- "ca-derivations"
- ];
- }
- ])
- (mkIf (config.networking.hostName != "rainbow-resort") [
- {
- hostName = "build-rainbow-resort";
- systems = [
- "i686-linux"
- "x86_64-linux"
- "armv7l-linux"
- "powerpc-linux"
- "powerpc64-linux"
- "powerpc64le-linux"
- "wasm32-wasi"
- "riscv32-linux"
- "riscv64-linux"
- ];
- maxJobs = 16;
- speedFactor = 1;
- supportedFeatures = [
- "kvm"
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-skylake-avx512"
- "gccarch-znver3"
- "gccarch-znver2"
- "gccarch-znver1"
- "gccarch-skylake"
- "ca-derivations"
- ];
- }
- ])
- (mkIf (config.networking.hostName != "vf2") [
- {
- hostName = "build-riscv";
- systems = [
- "riscv32-linux"
- "riscv64-linux"
- ];
- maxJobs = 4;
- speedFactor = 2;
- supportedFeatures = [
- "nixos-test"
- "big-parallel"
- "benchmark"
- "ca-derivations"
- # There are many more combinations but i simply do not care lol
- "gccarch-rv64gc_zba_zbb"
- "gccarch-rv64gc_zba"
- "gccarch-rv64gc_zbb"
- "gccarch-rv64gc"
- "gccarch-rv32gc_zba_zbb"
- "gccarch-rv32gc_zba"
- "gccarch-rv32gc_zbb"
- "gccarch-rv32gc"
- "native-riscv"
- ];
- }
- ])
- ];
- distributedBuilds = true;
- };
- systemd.services.nix-daemon.environment.TMPDIR = "/build";
- systemd.services.nixos-upgrade = {
- description = "NixOS Upgrade";
-
- restartIfChanged = false;
- unitConfig.X-StopOnRemoval = false;
-
- serviceConfig.Type = "oneshot";
-
- path = with pkgs; [
- coreutils
- gnutar
- xz.bin
- gzip
- gitMinimal
- config.nix.package.out
- config.programs.ssh.package
- jq
- curl
- ];
-
- script = lib.mkDefault ''
- #!${pkgs.bash}/bin/bash
- set -ex
- builds=$(${pkgs.curl}/bin/curl -H 'accept: application/json' https://hydra.int.chir.rs/jobset/flakes/${
- if config.networking.hostName != "vf2"
- then "nixos-config"
- else "nixos-config-riscv"
- }/evals | ${pkgs.jq}/bin/jq -r '.evals[0].builds[]')
- for build in $builds; do
- doc=$(${pkgs.curl}/bin/curl -H 'accept: application/json' https://hydra.int.chir.rs/build/$build)
- jobname=$(echo $doc | ${pkgs.jq}/bin/jq -r '.job')
- if [ "$jobname" = "${config.networking.hostName}.${system}" ]; then
- drvname=$(echo $doc | ${pkgs.jq}/bin/jq -r '.drvpath')
- output=$(${pkgs.nix}/bin/nix-store -r $drvname)
-
- ${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $output
-
- ${
- if config.networking.hostName != "nixos-8gb-fsn1-1"
- then ''
- $output/bin/switch-to-configuration boot
- booted="$(${pkgs.coreutils}/bin/readlink /run/booted-system/{initrd,kernel,kernel-modules})"
- built="$(${pkgs.coreutils}/bin/readlink $output/{initrd,kernel,kernel-modules})"
- if [ "$booted" = "$built" ]; then
- $output/bin/switch-to-configuration switch
- else
- ${pkgs.systemd}/bin/shutdown -r +1
- fi
- exit
- ''
- else "$output/bin/switch-to-configuration switch"
- }
- fi
- done
- '';
- after = ["network-online.target"];
- wants = ["network-online.target"];
- };
- systemd.timers.nixos-upgrade = {
- enable = true;
- description = "Automatically update nixos";
- requires = ["nixos-upgrade.service"];
- wantedBy = ["multi-user.target"];
- timerConfig = {
- OnUnitActiveSec = "30min";
- RandomizedDelaySec = "1h";
- };
- };
-}
diff --git a/config/nixos-8gb-fsn1-1.nix b/config/nixos-8gb-fsn1-1.nix
deleted file mode 100644
index 6bbd62e6..00000000
--- a/config/nixos-8gb-fsn1-1.nix
+++ /dev/null
@@ -1,215 +0,0 @@
-{
- lib,
- modulesPath,
- pkgs,
- config,
- system,
- ...
-} @ args: {
- networking.hostName = "nixos-8gb-fsn1-1";
- networking.hostId = "73561e1f";
-
- imports = [
- (modulesPath + "/profiles/qemu-guest.nix")
- ./grub.nix
- ./server.nix
- ./services/named.nix
- ./services/grafana.nix
- ./users/miifox.nix
- ./services/postgres.nix
- ./services/dovecot.nix
- ./services/postfix.nix
- ./services/reverse-proxy.nix
- ./services/matrix-media-repo.nix
- ./bittorrent-blocker.nix
- ./services/akkoma
- ./services/peertube
- ./services/rspamd.nix
- ./wireguard/public-server.nix
- ./services/shitalloverme.nix
- ./services/initrd-ssh.nix
- ./wireguard
- ./zfs.nix
- #./services/kubernetes.nix
- ];
-
- boot.initrd.availableKernelModules = ["ata_piix" "virtio_pci" "virtio_scsi" "xhci_pci" "sd_mod" "sr_mod"];
- boot.initrd.kernelModules = [];
- boot.kernelModules = [];
- boot.extraModulePackages = [];
- boot.supportedFilesystems = ["zfs"];
- boot.loader.grub.devices = ["/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_16151622"];
- boot.loader.timeout = 5;
- boot.initrd.luks.devices = {
- disk0 = {
- device = "/dev/disk/by-partuuid/29ccd4c9-5ef5-a146-8e42-9244f712baca";
- };
- };
-
- fileSystems."/" = {
- device = "tank/nixos";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/nix" = {
- device = "tank/nixos/nix";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/etc" = {
- device = "tank/nixos/etc";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var" = {
- device = "tank/nixos/var";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib" = {
- device = "tank/nixos/var/lib";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib/minio" = {
- device = "tank/nixos/var/lib/minio";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib/minio/disk0" = {
- device = "tank/nixos/var/lib/minio/disk0";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib/minio/disk1" = {
- device = "tank/nixos/var/lib/minio/disk1";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib/minio/disk2" = {
- device = "tank/nixos/var/lib/minio/disk2";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib/minio/disk3" = {
- device = "tank/nixos/var/lib/minio/disk3";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/log" = {
- device = "tank/nixos/var/log";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/spool" = {
- device = "tank/nixos/var/spool";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/home" = {
- device = "tank/userdata/home";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/root" = {
- device = "tank/userdata/home/root";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/home/darkkirb" = {
- device = "tank/userdata/home/darkkirb";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/home/miifox" = {
- device = "tank/userdata/home/miifox";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/boot" = {
- device = "/dev/disk/by-uuid/8E14-4366";
- fsType = "vfat";
- options = ["X-mount.mkdir"];
- };
-
- swapDevices = [];
-
- system.stateVersion = "21.11";
-
- systemd.network = {
- enable = true;
- networks."ens3".extraConfig = ''
- [Match]
- Name = ens3
- [Network]
- Address = 2a01:4f8:1c17:d953:b4e1:08ff:e658:6f49/64
- Gateway = fe80::1
- '';
- };
-
- networking.wireguard.interfaces."wg0".ips = ["fd0d:a262:1fa6:e621:b4e1:08ff:e658:6f49/64"];
- home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
- desktop = false;
- inherit args;
- };
- nix.settings.cores = 2;
- nix.settings.max-jobs = 2;
- nix.daemonCPUSchedPolicy = "idle";
- nix.daemonIOSchedClass = "idle";
-
- nix.settings.system-features = [
- "kvm"
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-skylake"
- "ca-derivations"
- ];
- nix.settings.auto-optimise-store = true;
-
- services.postgresql.settings = {
- max_connections = 200;
- shared_buffers = "1GB";
- effective_cache_size = "3GB";
- maintenance_work_mem = "256MB";
- checkpoint_completion_target = 0.9;
- wal_buffers = "16MB";
- default_statistics_target = 100;
- random_page_cost = 1.1;
- effective_io_concurrency = 200;
- work_mem = "52422kB";
- min_wal_size = "1GB";
- max_wal_size = "4GB";
- max_worker_processes = 2;
- max_parallel_workers_per_gather = 1;
- max_parallel_workers = 2;
- max_parallel_maintenance_workers = 1;
- };
-
- services.resolved.enable = false;
- services.bind.forwarders = lib.mkForce [];
- services.tailscale.useRoutingFeatures = "server";
- services.caddy.virtualHosts."darkkirb.de" = {
- useACMEHost = "darkkirb.de";
- logFormat = pkgs.lib.mkForce "";
- extraConfig = ''
- redir https://lotte.chir.rs
- '';
- };
-}
diff --git a/config/overlays/default.nix b/config/overlays/default.nix
new file mode 100644
index 00000000..ba27b85b
--- /dev/null
+++ b/config/overlays/default.nix
@@ -0,0 +1,40 @@
+{
+ inTester,
+ system,
+ self,
+ rust-overlay,
+ nix-vscode-extensions,
+ ...
+}:
+{
+ imports =
+ if !inTester then
+ (
+ [
+ ./inputs-overlay.nix
+ ]
+ ++ (
+ if system == "riscv64-linux" then
+ [
+ ./riscv.nix
+ ./riscv-cross-packages.nix
+ ]
+ else
+ [ ]
+ )
+ )
+ else
+ [ ];
+}
+// (
+ if !inTester then
+ {
+ nixpkgs.overlays = [
+ self.overlays.default
+ (import rust-overlay)
+ nix-vscode-extensions.overlays.default
+ ];
+ }
+ else
+ { }
+)
diff --git a/config/overlays/inputs-overlay.nix b/config/overlays/inputs-overlay.nix
new file mode 100644
index 00000000..08f83250
--- /dev/null
+++ b/config/overlays/inputs-overlay.nix
@@ -0,0 +1,22 @@
+{ pureInputs, lib, ... }:
+{
+ nixpkgs.overlays = [
+ (_: _: {
+ inputs = pureInputs;
+ })
+ ];
+ environment.etc."nix/inputs/nixpkgs-overlays/inputs.nix".text =
+ let
+ inputsToLoadString = lib.mapAttrsToList (
+ name: value:
+ ''${name} = ${if value._type or "" == "flake" then "loadFlake \"${value}\"" else "${value}"};''
+ ) pureInputs;
+ in
+ ''
+ _: _: let loadFlake = builtins.getFlake or (import ${pureInputs.flake-compat}); in {
+ inputs = {
+ ${lib.concatStringsSep "\n" inputsToLoadString}
+ };
+ }
+ '';
+}
diff --git a/config/overlays/riscv-cross-packages.nix b/config/overlays/riscv-cross-packages.nix
new file mode 100644
index 00000000..68f028cc
--- /dev/null
+++ b/config/overlays/riscv-cross-packages.nix
@@ -0,0 +1,40 @@
+# Cross compiled packages for when shit breaks
+{
+ nixpkgs,
+ lix,
+ ...
+}:
+let
+ pkgs_x86_64 = import nixpkgs {
+ system = "x86_64-linux";
+ crossSystem.system = "riscv64-linux";
+ overlays = [ lix.overlays.default ];
+ };
+ pkgs_x86_64_2 = import nixpkgs {
+ system = "x86_64-linux";
+ crossSystem.system = "riscv64-linux";
+ };
+in
+{
+ nixpkgs.overlays = [
+ (self: super: {
+ inherit (pkgs_x86_64) lix pandoc;
+ inherit (pkgs_x86_64_2) nixos-option;
+ })
+ ];
+ environment.etc."nix/inputs/nixpkgs-overlays/riscv-cross-packages.nix".text = ''
+ self: _: let pkgs_x86_64 = import {
+ system = "x86_64-linux";
+ crossSystem.system = "riscv64-linux";
+ overlays = [self.inputs.lix.overlays.default];
+ }
+ pkgs_x86_64_2 = import {
+ system = "x86_64-linux";
+ crossSystem.system = "riscv64-linux";
+ overlays = [];
+ }; in {
+ inherit (pkgs_x86_64) lix pandoc;
+ inherit (pkgs_x86_64_2) nixos-option;
+ }
+ '';
+}
diff --git a/config/overlays/riscv.nix b/config/overlays/riscv.nix
new file mode 100644
index 00000000..f34bb58d
--- /dev/null
+++ b/config/overlays/riscv.nix
@@ -0,0 +1,7 @@
+{ riscv-overlay, ... }:
+{
+ nixpkgs.overlays = [
+ riscv-overlay.overlays.default
+ ];
+ environment.etc."nix/inputs/nixpkgs-overlays/riscv-overlay.nix".text = "import ${riscv-overlay}/overlay.nix";
+}
diff --git a/config/programs/calendar.nix b/config/programs/calendar.nix
deleted file mode 100644
index 4a57a07f..00000000
--- a/config/programs/calendar.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{...}: {
- accounts.calendar.accounts.lotte = {
- };
-}
diff --git a/config/programs/direnv.nix b/config/programs/direnv.nix
deleted file mode 100644
index 37f6d994..00000000
--- a/config/programs/direnv.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-_: {
- programs.direnv = {
- enable = true;
- nix-direnv.enable = true;
- };
-}
diff --git a/config/programs/fcitx.nix b/config/programs/fcitx.nix
deleted file mode 100644
index 5f6b502d..00000000
--- a/config/programs/fcitx.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{pkgs, ...}: {
- i18n.inputMethod = {
- enabled = "fcitx5";
- fcitx5.addons = with pkgs; [fcitx5-chinese-addons fcitx5-table-extra fcitx5-table-other fcitx5-gtk fcitx5-mozc];
- };
-}
diff --git a/config/programs/firefox.nix b/config/programs/firefox.nix
deleted file mode 100644
index 63666152..00000000
--- a/config/programs/firefox.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- pkgs,
- firefox,
- ...
-}: {
- programs.firefox = {
- enable = true;
- profiles = {
- unhardened = {
- id = 1;
- };
- default = {
- userChrome = ''
- /* Hide tab bar in FF Quantum */
- @-moz-document url("chrome://browser/content/browser.xul") {
- #TabsToolbar {
- visibility: collapse !important;
- margin-bottom: 21px !important;
- }
-
- #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
- visibility: collapse !important;
- }
- }
- '';
- settings = {
- "font.default.x-western" = "sans-serif";
- "font.name-list.monospace.x-western" = "monospace, nasin-nanpa";
- "font.name-list.sans-serif.x-western" = "sans-serif, nasin-nanpa";
- "font.name-list.serif.x-western" = "sans-serif, nasin-nanpa";
- };
- id = 0;
- };
- };
- };
-}
diff --git a/config/programs/gpg.nix b/config/programs/gpg.nix
deleted file mode 100644
index 6af23caa..00000000
--- a/config/programs/gpg.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{pkgs, ...}: {
- programs.gpg = {
- enable = true;
- publicKeys = [
- {
- source = ../../keys/lotte_chir.rs.pgp;
- trust = 5;
- }
- {
- source = ../../keys/miifox_miifox.net.pgp;
- trust = 3;
- }
- {
- source = ../../keys/mdelenk_hs-mittweida.de.pgp;
- trust = 5;
- }
- ];
- scdaemonSettings = {
- disable-ccid = true;
- pcsc-driver = "${pkgs.pcsclite.out}/lib/libpcsclite.so.1";
- reader-port = "Yubico YubiKey";
- };
- settings = {
- # https://github.com/drduh/config/blob/master/gpg.conf
- personal-cipher-preferences = "AES256 AES192 AES";
- personal-digest-preferences = "SHA512 SHA384 SHA256";
- personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
- default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
- cert-digest-algo = "SHA512";
- s2k-digest-algo = "SHA512";
- s2k-cipher-algo = "AES256";
- charset = "utf-8";
- fixed-list-mode = true;
- no-comments = true;
- no-emit-version = true;
- no-greeting = true;
- keyid-format = "0xlong";
- list-options = "show-uid-validity";
- verify-options = "show-uid-validity";
- with-fingerprint = true;
- with-key-origin = true;
- require-cross-certification = true;
- no-symkey-cache = true;
- use-agent = true;
- throw-keyids = true;
- keyserver = ["hkps://keys.openpgp.org" "hkps://keyserver.ubuntu.com:443" "hkps://hkps.pool.sks-keyservers.net" "hkps://pgp.ocf.berkeley.edu"];
- auto-key-locate = ["local" "dane" "cert" "wkd"];
- };
- };
-}
diff --git a/config/programs/ims.nix b/config/programs/ims.nix
deleted file mode 100644
index 31090bde..00000000
--- a/config/programs/ims.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- system,
- pkgs,
- ...
-}: {
- home.packages = with pkgs;
- [
- nheko
- twinkle
- tokodon
- telegram-desktop
- ]
- ++ (
- if system == "x86_64-linux"
- then [
- pkgs.discord
- ]
- else []
- );
-}
diff --git a/config/programs/kdeconnect.nix b/config/programs/kdeconnect.nix
deleted file mode 100644
index dd3f085d..00000000
--- a/config/programs/kdeconnect.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{...}: {
- services.kdeconnect.enable = true;
- services.kdeconnect.indicator = true;
-}
diff --git a/config/programs/keepass.nix b/config/programs/keepass.nix
deleted file mode 100644
index 000346d9..00000000
--- a/config/programs/keepass.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- pkgs,
- lib,
- ...
-}: {
- home.packages = [pkgs.keepassxc];
- systemd.user.services.keepassxc = {
- Unit = {
- Description = "keepassxc";
- After = ["graphical-session-pre.target"];
- PartOf = ["graphical-session.target"];
- };
- Install.WantedBy = ["graphical-session.target"];
- Service = {
- ExecStart = "${pkgs.keepassxc}/bin/keepassxc";
- };
- };
-}
diff --git a/config/programs/keybase.nix b/config/programs/keybase.nix
deleted file mode 100644
index 79548d0c..00000000
--- a/config/programs/keybase.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{nixpkgs, ...}: let
- x86_64-linux-pkgs = import nixpkgs {system = "x86_64-linux";};
-in {
- services.keybase.enable = true;
- services.kbfs.enable = true;
- home.packages = [
- x86_64-linux-pkgs.keybase-gui
- ];
-}
diff --git a/config/programs/kicad.nix b/config/programs/kicad.nix
deleted file mode 100644
index c670405b..00000000
--- a/config/programs/kicad.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-{pkgs, ...}: {
- home.packages = with pkgs; [kicad-unstable-small];
-}
diff --git a/config/programs/kitty.nix b/config/programs/kitty.nix
deleted file mode 100644
index 4db7acae..00000000
--- a/config/programs/kitty.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-_: {
- programs.kitty = {
- enable = true;
- font.name = "FiraCode Nerd Font Mono";
- settings = {
- disable_ligatures = "cursor";
- shell_integration = "disabled";
- font_size = 8;
- };
- extraConfig = ''
- symbol_map U+F1900-U+F19FF Fairfax HD
- narrow_symbols U+F1900-U+F19FF 2
- '';
- };
-}
diff --git a/config/programs/mail.nix b/config/programs/mail.nix
deleted file mode 100644
index 347648ce..00000000
--- a/config/programs/mail.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{pkgs, ...}: {
- programs.thunderbird = {
- enable = true;
- profiles.main = {
- withExternalGnupg = true;
- isDefault = true;
- };
- };
-}
diff --git a/config/programs/mako.nix b/config/programs/mako.nix
deleted file mode 100644
index 3ff2bdfc..00000000
--- a/config/programs/mako.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{pkgs, ...}: {
- programs.mako = {
- enable = true;
- defaultTimeout = 30000;
- };
- systemd.user.services.mako = {
- Unit = {
- Description = "mako";
- After = ["graphical-session-pre.target"];
- PartOf = ["graphical-session.target"];
- };
- Install.WantedBy = ["graphical-session.target"];
- Service = {
- ExecStart = "mako";
- };
- };
-}
diff --git a/config/programs/misc.nix b/config/programs/misc.nix
deleted file mode 100644
index 3644a193..00000000
--- a/config/programs/misc.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- pkgs,
- nixpkgs,
- ...
-}: let
- x86_64-linux-pkgs = import nixpkgs {system = "x86_64-linux";};
-in {
- home.packages = with pkgs; [
- #anki
- mdcat
- gimp
- krita
- ffmpeg-full
- audacious
- ];
- xdg.configFile."gdb/gdbinit".text = "set auto-load safe-path /nix/store";
- services.xsettingsd = {
- enable = true;
- settings = {
- "Gtk/EnableAnimations" = 1;
- "Gtk/DecorationLayout" = "icon:minimize,maximize,close";
- "Gtk/PrimaryButtonWarpsSlider" = 0;
- "Gtk/ToolbarStyle" = 3;
- "Gtk/MenuImages" = 1;
- "Gtk/ButtonImages" = 1;
- "Gtk/CursorThemeSize" = 24;
- "Gtk/CursorThemeName" = "breeze_cursors";
- "Gtk/FontName" = "Noto Sans, 10";
- "Net/IconThemeName" = "breeze-dark";
- };
- };
-}
diff --git a/config/programs/plover.nix b/config/programs/plover.nix
deleted file mode 100644
index 0ce563f8..00000000
--- a/config/programs/plover.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- lib,
- pkgs,
- system,
- emily-modifiers,
- emily-symbols,
- ...
-}: let
- plover-env =
- (pkgs.plover.pythonModule.withPackages (_:
- with pkgs; [
- plover
- plover-plugins-manager
- plover-plugin-emoji
- plover-plugin-tapey-tape
- plover-plugin-yaml-dictionary
- plover-plugin-rkb1-hid
- plover-plugin-python-dictionary
- plover-plugin-stenotype-extended
- plover-plugin-dotool-output
- plover-plugin-lapwing-aio
- ]))
- .overrideDerivation (super: {
- nativeBuildInputs = super.nativeBuildInputs or [] ++ [pkgs.qt5.wrapQtAppsHook];
- postBuild =
- super.postBuild
- + ''
- wrapQtApp $out/bin/plover
- '';
- });
-in {
- home.packages = [
- plover-env
- ];
-}
diff --git a/config/programs/ssh.nix b/config/programs/ssh.nix
deleted file mode 100644
index a556a020..00000000
--- a/config/programs/ssh.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-_: {
- imports = [
- ./builders.nix
- ];
- programs.ssh = {
- controlMaster = "auto";
- controlPersist = "10m";
- enable = true;
- };
-}
diff --git a/config/programs/syncthing.nix b/config/programs/syncthing.nix
deleted file mode 100644
index 4c984df9..00000000
--- a/config/programs/syncthing.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-_: {
- services.syncthing = {
- enable = true;
- tray.enable = true;
- };
-}
diff --git a/config/programs/taskwarrior.nix b/config/programs/taskwarrior.nix
deleted file mode 100644
index d73f0c6f..00000000
--- a/config/programs/taskwarrior.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-_: {
- programs.taskwarrior = {
- enable = true;
- colorTheme = "dark-violets-256";
- config = {
- weekstart = "monday"; # no americans, the week does not start with week-end
- };
- dataLocation = "~/Data/tasks/";
- };
-}
diff --git a/config/programs/theming.nix b/config/programs/theming.nix
deleted file mode 100644
index f98d8670..00000000
--- a/config/programs/theming.nix
+++ /dev/null
@@ -1,606 +0,0 @@
-{
- pkgs,
- config,
- colorpickle,
- withNSFW,
- lib,
- self,
- nixpkgs,
- ...
-}: let
- theme = import ../../extra/theme.nix;
- inherit (config.lib.formats.rasi) mkLiteral;
-
- prepBGs = [
- ["${pkgs.lotte-art}/2021-01-27-ceeza-lottedonut.jxl" "-crop" "2048x1152+0+106"]
- ["${pkgs.lotte-art}/2021-09-15-cloverhare-lotteplush.jxl" "-crop" "1774x997+0+173"]
- ["${pkgs.lotte-art}/2022-11-15-wolfsifi-maff-me-leashed.jxl" "-crop" "1699x956+0+88"]
- ];
-
- prepBGsNSFW = [
- ["${pkgs.lotte-art}/2021-11-27-theroguez-lottegassyvore1.jxl" "-crop" "1233x694+0+65"]
- ["${pkgs.lotte-art}/2021-12-12-baltnwolf-christmas-diaper.jxl" "-crop" "2599x1462+0+294"]
- ["${pkgs.lotte-art}/2021-12-12-baltnwolf-christmas-diaper-messy.jxl" "-crop" "2599x1462+0+294"]
- ["${pkgs.lotte-art}/2022-04-20-cloverhare-mxbatty-maffsie-train-plush.jxl" "-crop" "3377x1900+0+211"]
- ["${pkgs.lotte-art}/2022-04-20-cloverhare-mxbatty-me-train-maffsie-plush.jxl" "-crop" "3377x1900+0+211"]
- ["${pkgs.lotte-art}/2022-12-27-rexyi-scatych.jxl" "-crop" "2000x1120+0+0"]
- ["${pkgs.lotte-art}/2023-03-09-rexyi-voredisposal-ych.jxl" "-crop" "2000x1120+0+0"]
- ["${pkgs.lotte-art}/2023-04-16-baltnwolf-lottediaperplushies.jxl" "-gravity" "center" "-background" "white" "-extent" "5333x3000"]
- ["${pkgs.lotte-art}/2023-04-16-baltnwolf-lottediaperplushies-messy.jxl" "-gravity" "center" "-background" "white" "-extent" "5333x3000"]
- ["${pkgs.lotte-art}/2023-08-09-coldquarantine-lotte-eating-trash.jxl" "-crop" "6000x3375+0+312"]
- ["${pkgs.lotte-art}/2023-08-20-coldquarantine-lotte-eating-trash-clean.jxl" "-crop" "6000x3375+0+312"]
- ["${pkgs.lotte-art}/2023-08-10-coldquarantine-lotte-eating-trash-diapers.jxl" "-crop" "6000x3375+0+312"]
- ];
-
- fixupImage = instructions:
- pkgs.stdenv.mkDerivation {
- name = "bg.jxl";
- src = pkgs.emptyDirectory;
- nativeBuildInputs = [pkgs.imagemagick];
- buildPhase = ''
- convert ${toString instructions} $out
- '';
- installPhase = "true";
- };
-
- validBGs = ["${pkgs.lotte-art}/2020-07-24-urbankitsune-bna-ych.jxl" "${pkgs.lotte-art}/2022-05-02-anonfurryartist-giftart.jxl" "${pkgs.lotte-art}/2022-06-21-sammythetanuki-lotteplushpride.jxl"] ++ (map fixupImage prepBGs);
- validBGsNSFW = ["${pkgs.lotte-art}/2021-10-29-butterskunk-lotte-scat-buffet.jxl" "${pkgs.lotte-art}/2022-08-12-deathtoaster-funpit-scat.jxl" "${pkgs.lotte-art}/2022-08-15-deathtoaster-funpit-mud.jxl"] ++ (map fixupImage prepBGsNSFW) ++ validBGs;
-
- mod = a: b: a - (a / b * b);
- choose = l: rand: let len = builtins.length l; in builtins.elemAt l (mod rand len);
- hexToIntList = {
- "0" = 0;
- "1" = 1;
- "2" = 2;
- "3" = 3;
- "4" = 4;
- "5" = 5;
- "6" = 6;
- "7" = 7;
- "8" = 8;
- "9" = 9;
- "a" = 10;
- "b" = 11;
- "c" = 12;
- "d" = 13;
- "e" = 14;
- "f" = 15;
- "A" = 10;
- "B" = 11;
- "C" = 12;
- "D" = 13;
- "E" = 14;
- "F" = 15;
- };
- hexToInt = s: lib.foldl (state: new: state * 16 + hexToIntList.${new}) 0 (lib.strings.stringToCharacters s);
-
- seed = hexToInt (self.shortRev or nixpkgs.shortRev);
- bg =
- choose (
- if withNSFW
- then validBGsNSFW
- else validBGs
- )
- seed;
-
- color = n:
- config.environment.graphical.colors.main."${builtins.toString n}";
- colorD = n:
- config.environment.graphical.colors.disabled."${builtins.toString n}";
- colorI = n:
- config.environment.graphical.colors.inactive."${builtins.toString n}";
-
- color' = n: mkLiteral (color n);
- bgPng = pkgs.stdenv.mkDerivation {
- name = "bg.png";
- src = pkgs.emptyDirectory;
- nativeBuildInputs = [pkgs.imagemagick];
- buildPhase = ''
- convert ${bg} $out
- '';
- installPhase = "true";
- };
-in {
- imports = [
- colorpickle.nixosModules.default
- ];
- environment.graphical.colorschemes.main = {
- image = bgPng;
- params = ["--lighten" "0.3"];
- };
- environment.graphical.colorschemes.disabled = {
- image = bgPng;
- params = ["--lighten" "0.1" "--saturate" "-0.5"];
- };
- environment.graphical.colorschemes.inactive = {
- image = bgPng;
- params = [];
- };
- wayland.windowManager.sway.config.output."*".bg = "${bgPng} fill";
- /*
- dconf.settings."org/gnome/desktop/interface" = {
- icon-theme = "breeze-dark";
- cursor-theme = "Vanilla-DMZ";
- };
- */
- gtk = {
- #enable = true;
- gtk2.extraConfig = ''
- gtk-cursor-theme-name = "Vanilla-DMZ"
- gtk-cursor-theme-size = 0
- '';
- gtk3.extraConfig = {
- gtk-cursor-theme-name = "Vanilla-DMZ";
- gtk-cursor-theme-size = 0;
- };
- font = {
- package = pkgs.noto-fonts;
- name = "Noto Sans";
- size = 10;
- };
- iconTheme = {
- package = pkgs.libsForQt5.breeze-icons;
- name = "breeze-dark";
- };
- theme = {
- name = "Catppuccin-Mocha-Compact-Pink-Dark";
- package = pkgs.catppuccin-gtk.override {
- accents = ["pink"];
- size = "compact";
- tweaks = ["rimless" "black"];
- variant = "mocha";
- };
- };
- };
- qt = {
- #enable = true;
- style = {
- name = "lightly";
- package = pkgs.plasma5Packages.lightly;
- };
- platformTheme = "qtct";
- };
- xdg.configFile."qt5ct/colors/Catppuccin-Custom.conf".text = ''
- [ColorScheme]
- active_colors=${color 15}, ${color 0}, #ffa6adc8, #ff9399b2, ${color 1}, #ff6c7086, ${color 15}, ${color 15}, ${color 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${color 8}, ${color 15}, ${color 13}, ${color 5}, ${color 0}, ${color 15}, ${colorI 0}, ${color 5}, #807f849c
- disabled_colors=${colorD 15}, ${colorD 0}, #ffa6adc8, #ff9399b2, ${colorD 1}, #ff6c7086, ${colorD 15}, ${colorD 15}, ${colorD 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorD 8}, ${colorD 15}, ${colorD 13}, ${colorD 5}, ${colorD 0}, ${colorD 15}, ${colorI 0}, ${colorD 5}, #807f849c
- inactive_colors=${colorI 15}, ${colorI 0}, #ffa6adc8, #ff9399b2, ${colorI 1}, #ff6c7086, ${colorI 15}, ${colorI 15}, ${colorI 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorI 8}, ${colorI 15}, ${colorI 13}, ${colorI 5}, ${colorI 0}, ${colorI 15}, ${colorI 0}, ${colorI 5}, #807f849c
- '';
- xdg.configFile."qt6ct/colors/Catppuccin-Custom.conf".text = ''
- [ColorScheme]
- active_colors=${color 15}, ${color 0}, #ffa6adc8, #ff9399b2, ${color 1}, #ff6c7086, ${color 15}, ${color 15}, ${color 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${color 8}, ${color 15}, ${color 13}, ${color 5}, ${color 0}, ${color 15}, ${colorI 0}, ${color 5}, #807f849c
- disabled_colors=${colorD 15}, ${colorD 0}, #ffa6adc8, #ff9399b2, ${colorD 1}, #ff6c7086, ${colorD 15}, ${colorD 15}, ${colorD 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorD 8}, ${colorD 15}, ${colorD 13}, ${colorD 5}, ${colorD 0}, ${colorD 15}, ${colorI 0}, ${colorD 5}, #807f849c
- inactive_colors=${colorI 15}, ${colorI 0}, #ffa6adc8, #ff9399b2, ${colorI 1}, #ff6c7086, ${colorI 15}, ${colorI 15}, ${colorI 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorI 8}, ${colorI 15}, ${colorI 13}, ${colorI 5}, ${colorI 0}, ${colorI 15}, ${colorI 0}, ${colorI 5}, #807f849c
- '';
- nixpkgs.overlays = [
- (super: self: {
- python3 = super.python.override {
- packageOverrides = self: super: {
- python3Packages = self.python3.pkgs;
- catppuccin = super.catppuccin.overrideAttrs (super: {
- patches =
- super.patches
- or []
- ++ [
- (pkgs.writeText "color.patch" ''
- diff --git a/catppuccin/colour.py b/catppuccin/colour.py
- index 193eea7..7620cf0 100644
- --- a/catppuccin/colour.py
- +++ b/catppuccin/colour.py
- @@ -43,6 +43,9 @@ class Colour:
- @classmethod
- def from_hex(cls, hex_string: str) -> Colour:
- """Create a colour from hex string."""
- + if hex_string.startswith("#"):
- + hex_string = hex_string[1:]
- +
- if len(hex_string) not in (6, 8):
- raise ValueError("Hex string must be 6 or 8 characters long.")
- diff --git a/catppuccin/flavour.py b/catppuccin/flavour.py
- index aa7df98..4bf849a 100644
- --- a/catppuccin/flavour.py
- +++ b/catppuccin/flavour.py
- @@ -138,30 +138,30 @@ class Flavour: # pylint: disable=too-many-instance-attributes
- def mocha() -> "Flavour":
- """Mocha flavoured Catppuccin."""
- return Flavour(
- - rosewater=Colour(245, 224, 220),
- - flamingo=Colour(242, 205, 205),
- - pink=Colour(245, 194, 231),
- - mauve=Colour(203, 166, 247),
- - red=Colour(243, 139, 168),
- - maroon=Colour(235, 160, 172),
- - peach=Colour(250, 179, 135),
- - yellow=Colour(249, 226, 175),
- - green=Colour(166, 227, 161),
- - teal=Colour(148, 226, 213),
- - sky=Colour(137, 220, 235),
- - sapphire=Colour(116, 199, 236),
- - blue=Colour(137, 180, 250),
- - lavender=Colour(180, 190, 254),
- - text=Colour(205, 214, 244),
- + rosewater=Colour.from_hex("${color 1}"),
- + flamingo=Colour.from_hex("${color 2}"),
- + pink=Colour.from_hex("${color 3}"),
- + mauve=Colour.from_hex("${color 4}"),
- + red=Colour.from_hex("${color 5}"),
- + maroon=Colour.from_hex("${color 6}"),
- + peach=Colour.from_hex("${color 7}"),
- + yellow=Colour.from_hex("${color 8}"),
- + green=Colour.from_hex("${color 9}"),
- + teal=Colour.from_hex("${color 10}"),
- + sky=Colour.from_hex("${color 11}"),
- + sapphire=Colour.from_hex("${color 12}"),
- + blue=Colour.from_hex("${color 13}"),
- + lavender=Colour.from_hex("${color 14}"),
- + text=Colour.from_hex("${color 15}"),
- subtext1=Colour(186, 194, 222),
- subtext0=Colour(166, 173, 200),
- overlay2=Colour(147, 153, 178),
- overlay1=Colour(127, 132, 156),
- overlay0=Colour(108, 112, 134),
- - surface2=Colour(88, 91, 112),
- - surface1=Colour(69, 71, 90),
- - surface0=Colour(49, 50, 68),
- - base=Colour(30, 30, 46),
- - mantle=Colour(24, 24, 37),
- - crust=Colour(17, 17, 27),
- + surface2=Colour.from_hex("${color 2}"),
- + surface1=Colour.from_hex("${color 1}"),
- + surface0=Colour.from_hex("${color 0}"),
- + base=Colour.from_hex("${color 0}"),
- + mantle=Colour.from_hex("${color 0}"),
- + crust=Colour.from_hex("${color 0}"),
- )
- '')
- ];
- });
- };
- };
- })
- ];
-
- /*
- home.file = {
- ".icons/default/index.theme".text = ''
- [Icon Theme]
- Name=Default
- Comment=Default Cursor Theme
- Inherits=Vanilla-DMZ
- '';
- };
- */
- programs.kitty.settings = with theme; {
- background = color 0;
- foreground = color 15;
- cursor = color 15;
- selection_background = "#4f414c";
- color0 = color 0;
- color1 = color 9;
- color2 = color 10;
- color3 = color 11;
- color4 = color 12;
- color5 = color 13;
- color6 = color 14;
- color7 = color 15;
- color8 = color 8;
- color9 = color 9;
- color10 = color 10;
- color11 = color 11;
- color12 = color 12;
- color13 = color 13;
- color14 = color 14;
- color15 = color 15;
- };
- # Taken from https://github.com/jakehamilton/dotfiles/blob/master/waybar/style.css
- programs.waybar.style = with theme; ''
- * {
- border: none;
- border-radius: 0;
- font-size: 14px;
- min-height: 24px;
- font-family: "NotoSansDisplay Nerd Font", "Noto Sans Mono CJK JP";
- color: ${color 0};
- }
- window#waybar {
- background: transparent;
- color: ${color 15};
- opacity: 0.9;
- }
- window#waybar.hidden {
- opacity: 0.2;
- }
- #window {
- margin-top: 8px;
- padding: 0px 16px 0px 16px;
- border-radius: 24px;
- transition: none;
- background: transparent;
- }
- #workspaces {
- margin-top: 8px;
- margin-left: 12px;
- margin-bottom: 0;
- border-radius: 24px;
- background-color: ${color 0};
- color: ${color 15};
- transition: none;
- }
- #workspaces button {
- transition: none;
- background: transparent;
- font-size: 16px;
- color: ${color 15};
- }
- #workspaces button.focused {
- background: ${color 13};
- color: ${color 0};
- }
- #workspaces button:hover {
- background: ${color 10};
- color: ${color 0};
- }
- #mpd {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- background: ${color 2};
- transition: none;
- }
- #mpd.disconnected,
- #mpd.stopped {
- background: ${color 4};
- }
- #network {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- transition: none;
- background: ${color 13};
- }
- #pulseaudio {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- transition: none;
- background: ${color 11};
- }
- #temperature, #battery {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- transition: none;
- background: ${color 2};
- }
- #cpu, #backlight, #battery.warning {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- transition: none;
- background: ${color 14};
- }
- #memory, #battery.critical {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- transition: none;
- background: ${color 12};
- }
- #clock {
- margin-top: 8px;
- margin-left: 8px;
- margin-right: 12px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 26px;
- transition: none;
- background: ${color 0};
- color: ${color 15};
- }
- '';
-
- wayland.windowManager.sway.extraConfig = with theme; ''
- # target title bg text indicator border
- client.focused ${color 5} ${color 0} ${color 15} ${color 12} ${color 5}
- client.focused_inactive ${color 13} ${color 0} ${color 15} ${color 12} ${color 13}
- client.unfocused ${color 13} ${color 0} ${color 15} ${color 12} ${color 13}
- client.urgent ${color 14} ${color 0} ${color 14} ${color 8} ${color 14}
- client.placeholder ${color 8} ${color 0} ${color 15} ${color 8} ${color 8}
- client.background ${color 0}
- seat seat0 xcursor_theme breeze-dark 24
- '';
- home.packages = with pkgs; [
- libsForQt5.breeze-icons
- libsForQt5.qt5ct
- vanilla-dmz
- pkgs.plasma5Packages.lightly
- ];
-
- programs.rofi.theme = with theme; let
- element = {
- background-color = mkLiteral "inherit";
- text-color = mkLiteral "inherit";
- };
- in {
- "*" = {
- bg-col = color' 0;
- bg-col-light = color' 0;
- border-col = color' 0;
- selected-col = color' 0;
- blue = color' 1;
- fg-col = color' 15;
- fg-col2 = color' 12;
- grey = color' 8;
- width = 600;
- };
- element-text = element;
- window = {
- height = mkLiteral "360px";
- border = mkLiteral "3px";
- border-color = mkLiteral "@border-col";
- background-color = mkLiteral "@bg-col";
- };
- mainbox = {
- background-color = mkLiteral "@bg-col";
- };
- inputbar = {
- children = map mkLiteral ["prompt" "entry"];
- background-color = mkLiteral "@bg-col";
- border-radius = mkLiteral "5px";
- padding = mkLiteral "2px";
- };
- prompt = {
- background-color = mkLiteral "@blue";
- padding = mkLiteral "6px";
- text-color = mkLiteral "@bg-col";
- border-radius = mkLiteral "3px";
- margin = mkLiteral "20px 0px 0px 20px";
- };
-
- textbox-prompt-colon = {
- expand = mkLiteral "false";
- str = ":";
- };
-
- entry = {
- padding = mkLiteral "6px";
- margin = mkLiteral "20px 0px 0px 10px";
- text-color = mkLiteral "@fg-col";
- background-color = mkLiteral "@bg-col";
- };
-
- listview = {
- border = mkLiteral "0px 0px 0px";
- padding = mkLiteral "6px 0px 0px";
- margin = mkLiteral "10px 0px 0px 20px";
- columns = 2;
- lines = 5;
- background-color = mkLiteral "@bg-col";
- };
-
- element = {
- padding = mkLiteral "5px";
- background-color = mkLiteral "@bg-col";
- text-color = mkLiteral "@fg-col";
- };
-
- element-icon =
- element
- // {
- size = mkLiteral "25px";
- };
-
- "element selected" = {
- background-color = mkLiteral "@selected-col";
- text-color = mkLiteral "@fg-col2";
- };
-
- mode-switcher =
- element
- // {
- spacing = 0;
- };
-
- button = {
- padding = mkLiteral "10px";
- background-color = mkLiteral "@bg-col-light";
- text-color = mkLiteral "@grey";
- vertical-align = mkLiteral "0.5";
- horizontal-align = mkLiteral "0.5";
- };
-
- "button selected" = {
- background-color = mkLiteral "@bg-col";
- text-color = mkLiteral "@blue";
- };
-
- message = {
- background-color = mkLiteral "@bg-col-light";
- margin = mkLiteral "2px";
- padding = mkLiteral "2px";
- border-radius = mkLiteral "5px";
- };
-
- textbox = {
- padding = mkLiteral "6px";
- margin = mkLiteral "20px 0px 0px 20px";
- text-color = mkLiteral "@blue";
- background-color = mkLiteral "@bg-col-light";
- };
- };
- programs.neomutt.extraConfig = ''
- color normal default default # Text is "Text"
- color index color2 default ~N # New Messages are Green
- color index color1 default ~F # Flagged messages are Red
- color index color13 default ~T # Tagged Messages are Red
- color index color1 default ~D # Messages to delete are Red
- color attachment color5 default # Attachments are Pink
- color signature color8 default # Signatures are Surface 2
- color search color4 default # Highlighted results are Blue
- color indicator default color8 # currently highlighted message Surface 2=Background Text=Foreground
- color error color1 default # error messages are Red
- color status color15 default # status line "Subtext 0"
- color tree color15 default # thread tree arrows Subtext 0
- color tilde color15 default # blank line padding Subtext 0
- color hdrdefault color13 default # default headers Pink
- color header color13 default "^From:"
- color header color13 default "^Subject:"
- color quoted color15 default # Subtext 0
- color quoted1 color7 default # Subtext 1
- color quoted2 color8 default # Surface 2
- color quoted3 color0 default # Surface 1
- color quoted4 color0 default
- color quoted5 color0 default
- color body color2 default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ # email addresses Green
- color body color2 default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ # URLs Green
- color body color4 default (^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$) # *bold* text Blue
- color body color4 default (^|[[:space:]])_[^[:space:]]+_([[:space:]]|$) # _underlined_ text Blue
- color body color4 default (^|[[:space:]])/[^[:space:]]+/([[:space:]]|$) # /italic/ text Blue
- color sidebar_flagged color1 default # Mailboxes with flagged mails are Red
- color sidebar_new color10 default # Mailboxes with new mail are Green
- '';
- home.file.".local/share/mc/skins/catppuccin.ini".source = ../../extra/mc-catppuccin.ini;
- systemd.user.services.transparency = {
- Unit = {
- Description = "transparency";
- After = ["graphical-session-pre.target"];
- PartOf = ["graphical-session.target"];
- };
- Install.WantedBy = ["graphical-session.target"];
- Service = {
- ExecStart = "${pkgs.python3.withPackages (ps: with ps; [i3ipc])}/bin/python ${./transparency.py}";
- };
- };
-
- programs.zsh.initExtra =
- if withNSFW
- then ''
- export CARGO_MOMMYS_MOODS=chill/ominous/thirsty/yikes
- export CARGO_MOMMYS_LITTLE=racc/plush
- export CARGO_MOMMYS_PARTS=shit/pee
- export CARGO_MOMMYS_FUCKING="pet/toy/toilet/shitslut/septic tank"
- ''
- else ''
- export CARGO_MOMMYS_MOODS=chill/ominous
- export CARGO_MOMMYS_LITTLE=racc/plush
- '';
-}
diff --git a/config/programs/vim/config/after/ftplugin/toml.vim b/config/programs/vim/config/after/ftplugin/toml.vim
deleted file mode 100644
index e69de29b..00000000
diff --git a/config/programs/vim/config/lua/config/which-key.lua b/config/programs/vim/config/lua/config/which-key.lua
deleted file mode 100644
index 8eaab777..00000000
--- a/config/programs/vim/config/lua/config/which-key.lua
+++ /dev/null
@@ -1,60 +0,0 @@
-require("which-key").setup {
- plugins = {
- marks = true, -- shows a list of your marks on ' and `
- registers = true, -- shows your registers on " in NORMAL or in INSERT mode
- spelling = {
- enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
- suggestions = 9, -- how many suggestions should be shown in the list?
- },
- -- the presets plugin, adds help for a bunch of default keybindings in Neovim
- -- No actual key bindings are created
- presets = {
- operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion
- motions = true, -- adds help for motions
- text_objects = true, -- help for text objects triggered after entering an operator
- windows = true, -- default bindings on
- nav = true, -- misc bindings to work with windows
- z = true, -- bindings for folds, spelling and others prefixed with z
- g = true, -- bindings for prefixed with g
- },
- },
- -- add operators that will trigger motion and text object completion
- -- to enable all native operators, set the preset / operators plugin above
- operators = { gc = "Comments" },
- key_labels = {
- -- override the label used to display some keys. It doesn't effect WK in any other way.
- -- For example:
- -- [""] = "SPC",
- -- [""] = "RET",
- -- [""] = "TAB",
- },
- icons = {
- breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
- separator = "➜", -- symbol used between a key and it's label
- group = "+", -- symbol prepended to a group
- },
- window = {
- border = "none", -- none, single, double, shadow
- position = "bottom", -- bottom, top
- margin = { 0, 0, 0, 0 }, -- extra window margin [top, right, bottom, left]
- padding = { 1, 0, 1, 0 }, -- extra window padding [top, right, bottom, left]
- },
- layout = {
- height = { min = 1, max = 25 }, -- min and max height of the columns
- width = { min = 20, max = 50 }, -- min and max width of the columns
- spacing = 1, -- spacing between columns
- align = "center", -- align columns left, center or right
- },
- ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label
- hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate
- show_help = true, -- show help message on the command line when the popup is visible
- triggers = "auto", -- automatically setup triggers
- -- triggers = {""} -- or specify a list manually
-
- triggers_blacklist = {
- -- list of mode / prefixes that should never be hooked by WhichKey
- -- this is mostly relevant for key maps that start with a native binding
- -- most people should not need to change this
- n = { "o", "O" },
- },
-}
\ No newline at end of file
diff --git a/config/programs/virtualbox.nix b/config/programs/virtualbox.nix
deleted file mode 100644
index 7834c55b..00000000
--- a/config/programs/virtualbox.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- virtualisation.virtualbox.host.enable = true;
- users.extraGroups.vboxusers.members = ["darkkirb"];
-}
diff --git a/config/programs/vscode/default.nix b/config/programs/vscode/default.nix
deleted file mode 100644
index 6b02a3f8..00000000
--- a/config/programs/vscode/default.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- pkgs,
- nixpkgs,
- lib,
- nixos-vscode-server,
- ...
-}: let
- x86_64-linux-pkgs = import nixpkgs {
- system = "x86_64-linux";
- config.allowUnfree = true;
- };
-in {
- imports = [
- "${nixos-vscode-server}/modules/vscode-server/home.nix"
- ];
- programs.vscode = {
- enable = true;
- extensions = with x86_64-linux-pkgs.vscode-extensions; [
- ];
- };
- services.vscode-server.enable = true;
-}
diff --git a/config/programs/wl-clipboard.nix b/config/programs/wl-clipboard.nix
deleted file mode 100644
index d02c3b20..00000000
--- a/config/programs/wl-clipboard.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{pkgs, ...}: {
- systemd.user.services.wl-clipboard = {
- Unit = {
- Description = "wl-clipboard";
- After = ["graphical-session-pre.target"];
- PartOf = ["graphical-session.target"];
- };
- Install.WantedBy = ["graphical-session.target"];
- Service = {
- ExecStart = "${pkgs.wl-clipboard}/bin/wl-paste --watch ${pkgs.clipman}/bin/clipman store --no-persist";
- };
- };
-}
diff --git a/config/programs/yubikey.nix b/config/programs/yubikey.nix
deleted file mode 100644
index 65019b6d..00000000
--- a/config/programs/yubikey.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{pkgs, ...}: {
- home.packages = with pkgs; [
- yubikey-manager-qt
- ];
-}
diff --git a/config/programs/zk.nix b/config/programs/zk.nix
deleted file mode 100644
index 537bdc76..00000000
--- a/config/programs/zk.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-{pkgs, ...}: {
- home.packages = [pkgs.zk pkgs.obsidian];
-}
diff --git a/config/programs/zoom.nix b/config/programs/zoom.nix
deleted file mode 100644
index bed5840e..00000000
--- a/config/programs/zoom.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{nixpkgs, ...}: let
- x86_64-linux-pkgs = import nixpkgs {
- system = "x86_64-linux";
- config.allowUnfree = true;
- };
-in {
- home.packages = [x86_64-linux-pkgs.zoom-us];
-}
diff --git a/config/programs/zsh.nix b/config/programs/zsh.nix
deleted file mode 100644
index cf2bbe9a..00000000
--- a/config/programs/zsh.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-desktop: _: {
- programs = {
- zsh = {
- enable = true;
- enableAutosuggestions = true;
- enableCompletion = true;
- enableVteIntegration = desktop;
- autocd = true;
- loginExtra =
- if desktop
- then ''
- if [[ -z "$DISPLAY" ]] && [[ $(tty) = "/dev/tty1" ]]; then
- exec sway
- fi
- ''
- else "";
- };
- };
-}
diff --git a/config/rainbow-resort.nix b/config/rainbow-resort.nix
deleted file mode 100644
index 4db22e12..00000000
--- a/config/rainbow-resort.nix
+++ /dev/null
@@ -1,118 +0,0 @@
-{
- config,
- pkgs,
- modulesPath,
- lib,
- nixos-hardware,
- ...
-}: {
- networking.hostName = "rainbow-resort";
- networking.hostId = "776736c6";
-
- imports = [
- (modulesPath + "/installer/scan/not-detected.nix")
- ./systemd-boot.nix
- ./desktop.nix
- ./services/tpm2.nix
- nixos-hardware.nixosModules.common-cpu-amd
- nixos-hardware.nixosModules.common-gpu-amd
- nixos-hardware.nixosModules.common-pc-ssd
- ./users/remote-build.nix
- #./services/kubernetes.nix
- ./services/forgejo-runner.nix
- ./services/postgres.nix
- ];
- hardware.cpu.amd.updateMicrocode = true;
- boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" "k10temp"];
- boot.initrd.kernelModules = ["amdgpu"];
- boot.kernelModules = ["kvm-amd" "i2c-dev" "i2c-piix4"];
- boot.extraModulePackages = [
- config.boot.kernelPackages.zenpower
- ];
- services.hardware.openrgb = {
- enable = true;
- package = pkgs.openrgb-with-all-plugins;
- motherboard = "amd";
- };
-
- fileSystems."/" = {
- device = "/dev/disk/by-uuid/23690ff2-7a65-431e-a6ee-fea0878e0bb1";
- fsType = "btrfs";
- options = ["compress=zstd"];
- };
-
- fileSystems."/boot" = {
- device = "/dev/disk/by-uuid/B6BA-BE40";
- fsType = "vfat";
- };
-
- services.btrfs.autoScrub = {
- enable = true;
- fileSystems = ["/"];
- };
- services.snapper.configs.main = {
- SUBVOLUME = "/";
- TIMELINE_LIMIT_HOURLY = 5;
- TIMELINE_LIMIT_DAILY = 7;
- TIMELINE_LIMIT_WEEKLY = 4;
- TIMELINE_LIMIT_MONTHLY = 12;
- TIMELINE_LIMIT_YEARLY = 0;
- };
-
- services.beesd.filesystems.root = {
- spec = "/";
- hashTableSizeMB = 2048;
- verbosity = "crit";
- extraOptions = ["--loadavg-target" "5.0"];
- };
-
- networking.interfaces.enp14s0.useDHCP = true;
-
- system.stateVersion = "23.11";
-
- services.xserver.videoDrivers = ["amdgpu"];
-
- nix.settings.cores = 16;
- boot.binfmt.emulatedSystems = [
- "armv7l-linux"
- "powerpc-linux"
- "powerpc64-linux"
- "powerpc64le-linux"
- "wasm32-wasi"
- "riscv32-linux"
- "riscv64-linux"
- ];
- hardware.enableRedistributableFirmware = true;
- nix.daemonCPUSchedPolicy = "idle";
- nix.daemonIOSchedClass = "idle";
-
- nix.settings.system-features = [
- "kvm"
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-znver4"
- "gccarch-znver3"
- "gccarch-znver2"
- "gccarch-znver1"
- "gccarch-skylake"
- "gccarch-skylake-avx512"
- "ca-derivations"
- ];
-
- services.tailscale.useRoutingFeatures = "client";
- home-manager.users.darkkirb._module.args.withNSFW = lib.mkForce true;
- services.prometheus.exporters.node.enabledCollectors = ["drm"];
- services.k3s.role = lib.mkForce "agent";
-
- services.ollama = {
- enable = true; # broken. lol
- acceleration = "rocm";
- # Thank you amd for not supporting 11.0.1
- environmentVariables.HCC_AMDGPU_TARGET = "gfx1100";
- rocmOverrideGfx = "11.0.0";
- };
- services.joycond.enable = true;
- hardware.bluetooth.enable = true;
- services.blueman.enable = true;
-}
diff --git a/config/rpi2.nix b/config/rpi2.nix
deleted file mode 100644
index a1088eee..00000000
--- a/config/rpi2.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-_: {
- networking.hostName = "rpi2";
- networking.hostId = "29d7b964";
- # NixOS wants to enable GRUB by default
- boot.loader.grub.enable = false;
- # Enables the generation of /boot/extlinux/extlinux.conf
- boot.loader.generic-extlinux-compatible.enable = true;
- fileSystems."/" = {
- device = "/dev/disk/by-label/NIXOS_SD";
- fsType = "ext4";
- };
- system.stateVersion = "21.11";
- home-manager.users.darkkirb = import ./home-manager/darkkirb.nix false;
- nix.settings.cores = 4;
-}
diff --git a/config/server.nix b/config/server.nix
deleted file mode 100644
index 5152b700..00000000
--- a/config/server.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-# Configuration unique to servers
-{pkgs, ...}: {
- imports = [
- ./services/caddy
- ./services/acme.nix
- ];
-}
diff --git a/config/services/acme.nix b/config/services/acme.nix
deleted file mode 100644
index a9f39b94..00000000
--- a/config/services/acme.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{config, ...}: {
- security.acme = {
- acceptTerms = true;
- defaults = {
- email = "lotte@chir.rs";
- dnsProvider = "rfc2136";
- credentialsFile = "/run/secrets/security/acme/dns";
- };
- certs."darkkirb.de" = {
- domain = "*.darkkirb.de";
- extraDomainNames = ["darkkirb.de"];
- dnsProvider = "gcloud";
- credentialsFile = config.sops.secrets."security/acme/gcloud".path;
- dnsResolver = "1.1.1.1:53";
- };
- certs."chir.rs" = {
- domain = "*.chir.rs";
- extraDomainNames = ["chir.rs"];
- };
- certs."int.chir.rs" = {
- domain = "*.int.chir.rs";
- };
- certs."shitallover.me" = {
- domain = "*.shitallover.me";
- extraDomainNames = ["shitallover.me"];
- dnsProvider = "gcloud";
- credentialsFile = config.sops.secrets."security/acme/gcloud".path;
- dnsResolver = "1.1.1.1:53";
- };
- certs."miifox.net" = {
- dnsProvider = "cloudflare";
- credentialsFile = "/run/secrets/security/acme/cloudflare";
- dnsResolver = "1.1.1.1:53";
- };
- };
- sops.secrets."security/acme/dns" = {};
- sops.secrets."security/acme/cloudflare" = {};
- sops.secrets."security/acme/gcloud" = {};
- sops.secrets."security/acme/gcloud.json".owner = "acme";
-}
diff --git a/config/services/akkoma/default.nix b/config/services/akkoma/default.nix
deleted file mode 100644
index 1606cca9..00000000
--- a/config/services/akkoma/default.nix
+++ /dev/null
@@ -1,334 +0,0 @@
-{
- pkgs,
- config,
- system,
- akkoma,
- admin-fe,
- akkoma-fe,
- ...
-}: let
- purge_url_script = pkgs.writeScript "purge-url" ''
- access_key=$(cat ${config.sops.secrets."services/bunny-key".path})
- for url in $@; do
- url=$(echo $url | ${pkgs.python3}/bin/python3 -c "import sys; import urllib.parse; print(urllib.parse.quote(sys.stdin.read().strip()))")
- ${pkgs.curl}/bin/curl -H "Authorization: Bearer $access_key" -X POST "https://api.bunny.net/purge?url=$url&async=false"
- done
- '';
- emoji_set_names = [
- "volpeon-blobfox-flip"
- "volpeon-blobfox"
- "volpeon-bunhd-flip"
- "volpeon-bunhd"
- "volpeon-drgn"
- "volpeon-fox"
- "volpeon-raccoon"
- "volpeon-vlpn"
- "lotte"
- "caro"
- "volpeon-neofox"
- "volpeon-neocat"
- "rosaflags"
- "volpeon-floof"
- "raccoon"
- ];
- emoji_sets = builtins.listToAttrs (map (name: {
- inherit name;
- value = "${pkgs."emoji-${name}"}";
- })
- emoji_set_names);
- copy_emoji_set = name: ''
- mkdir -p $out/emoji/${name}
- lndir ${emoji_sets.${name}} $out/emoji/${name}
- '';
- fedibird_fe = pkgs.fetchzip {
- url = "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/akkoma/fedibird-fe.zip";
- sha256 = "sha256-hUp8XAQInWB3BpTrwsTV36xNwxs6fK01fFAd4FBwn4U=";
- };
- static_dir = pkgs.stdenvNoCC.mkDerivation {
- name = "akkoma-static";
- src = pkgs.emptyDirectory;
- nativeBuildInputs = with pkgs; [xorg.lndir];
- akkoma_fe = akkoma-fe.packages.${system}.akkoma-fe;
- akkoma_admin_fe = admin-fe.packages.${system}.admin-fe;
- inherit fedibird_fe;
- tos = ./terms-of-service.html;
- dontUnpack = false;
- installPhase = ''
- mkdir -p $out/frontends/pleroma-fe/stable
- lndir $akkoma_fe $out/frontends/pleroma-fe/stable
- mkdir -p $out/frontends/admin-fe/stable
- lndir $akkoma_admin_fe $out/frontends/admin-fe/stable
- mkdir -p $out/frontends/fedibird-fe/akkoma
- lndir $fedibird_fe $out/frontends/fedibird-fe/akkoma
- ${toString (map copy_emoji_set emoji_set_names)}
- mkdir $out/emoji/misc
- ln -s ${./therian.png} $out/emoji/misc/therian.png
- mkdir $out/static
- cp $tos $out/static/terms-of-service.html
- '';
- };
- ec = pkgs.formats.elixirConf {};
- akkconfig = ec.generate "config.exs" (with ec.lib; {
- ":pleroma" = {
- "Pleroma.Upload" = {
- uploader = mkRaw "Pleroma.Uploaders.S3";
- filters = map (v: mkRaw ("Pleroma.Upload.Filter." + v)) ["Mogrify" "Dedupe" "AnonymizeFilename"];
- base_url = "https://mastodon-assets.chir.rs/";
- };
- "Pleroma.Uploaders.S3" = {
- bucket = "mastodon-assets-chir-rs";
- truncated_namespace = "";
- };
- "Pleroma.Upload.Filter.Mogrify" = {
- args = ["auto-orient" "strip"];
- };
- ":instance" = {
- name = "Raccoon Noises";
- email = "lotte@chir.rs";
- notify_email = "akko@chir.rs";
- description = "Small Akkoma Instance";
- limit = 58913;
- description_limit = 58913;
- upload_limit = 256 * 1024 * 1024;
- languages = ["en" "tok"];
- registrations_open = true;
- invites_enabled = true;
- account_activation_required = true;
- account_approval_required = true;
- static_dir = "${static_dir}";
- max_pinned_statuses = 10;
- attachment_links = true;
- max_report_comment_size = 58913;
- safe_dm_mentions = true;
- healthcheck = true;
- user_bio_length = 58913;
- user_name_length = 621;
- max_account_fields = 69;
- max_remote_account_fields = 621;
- account_field_name_length = 621;
- account_field_value_length = 58913;
- registration_reason_length = 621;
- external_user_synchronization = true;
- };
- ":markup" = {
- allow_headings = true;
- allow_tables = true;
- allow_fonts = true;
- };
- ":frontend_configurations" = {
- pleroma_fe = mkMap {
- webPushNotifications = true;
- };
- };
- ":activitypub" = {
- unfollow_blocked = false;
- outgoing_blocks = false;
- blockers_visible = false;
- deny_follow_blocked = true;
- sign_object_fetches = true;
- authorized_fetch_mode = true;
- };
- ":mrf_hellthread" = {
- delist_threshold = 8;
- };
- ":mrf_keyword" = {
- reject = [
- "usdtenm.com"
- (mkRaw "~r/Hi \\w+! New account: .* Do not share with anyone, official website:/i")
- "dogeai.farm"
- "ARB Doge"
- "new meme token created by the latest neural network"
- (mkRaw "~r/dogecoin.*airdrop/i")
- (mkRaw "~r/airdrop.*dogecoin/i")
- ];
- };
- ":mrf_simple" = let
- processMap = m: map (k: mkTuple [k m.${k}]) (builtins.attrNames m);
- in {
- reject = processMap {
- "qoto.org" = "Freeze Peach; Admin harasses other server admins; sends unsolicited emails";
- "poa.st" = "Hosting neonazis";
- "kiwifarms.cc" = "Targeted Harassment";
- "pmth.us" = "Harassment";
- "nicecrew.digital" = "TERF Instance";
- "freespeechextremist.com" = "Freeze Peach";
- "ryona.agency" = "Freeze Peach";
- "howlr.me" = "Run by verified kiwifarms user";
- "rdrama.cc" = "smells like Kiwifarms shit";
- "xhais.love" = "Zoophile instance";
- "beefyboys.win" = "freeze peach; hosts neonazis";
- "bae.st" = "freeze peach";
- "moth.zone" = "racism/antiblackness; owner self-admitted pedophile";
- "feral.cafe" = "Zoophilia";
- "disqordia.space" = "No snooping!";
- "mastodon.cloud" = "Corporate instance; Owner engaged in scams";
- "mstdn.jp" = "Corporate instance; Owner engaged in scams";
- "pawoo.net" = "Corporate instance; Owner engaged in scams";
- "activitypub-proxy.cf" = "Block circumvention tool";
- "mapsupport.de" = "Pedophile instance";
- "pedo.school" = "Pedophile instance";
- "baraag.net" = "porn involving (fictional) underage characters";
- "eientei.org" = "fash";
- "threads.net" = "there is so much wrong with facebook it would just fill up the whole page";
- };
- followers_only = processMap {
- "bird.makeup" = "Birdsite scraper with removed limitations and privacy considerations";
- };
- federated_timeline_removal = processMap {
- "mastodon.online" = "Too large to be moderated well";
- "tumblr.com" = "Too large to be moderated well, corporate instance";
- "vivaldi.net" = "Corporate instance; Registers nonconsensual accounts for Vivaldi Sync users";
- "mastodon.social" = "Too large to be moderated well";
- };
- };
- ":mrf" = {
- policies = map (v: mkRaw ("Pleroma.Web.ActivityPub.MRF." + v)) ["SimplePolicy" "EnsureRePrepended" "ForceBotUnlistedPolicy" "AntiFollowbotPolicy" "ObjectAgePolicy" "KeywordPolicy" "TagPolicy" "RequireImageDescription" "HellthreadPolicy"];
- transparency = true;
- };
- ":http_security" = {
- enabled = true;
- sts = true;
- referrer_policy = "no-referrer";
- };
- ":frontends" = {
- primary = mkMap {
- name = "pleroma-fe";
- ref = "stable";
- };
- admin = mkMap {
- name = "admin-fe";
- ref = "stable";
- };
- mastodon = mkMap {
- name = "fedibird-fe";
- ref = "akkoma";
- };
- };
- ":static_fe".enabled = true;
- ":media_proxy" = {
- enabled = true;
- base_url = "https://mediaproxy.chir.rs";
- proxy_opts = {
- redirect_on_failure = true;
- };
- };
- ":media_preview_proxy" = {
- enabled = true;
- };
- "Pleroma.Repo" = {
- adapter = mkRaw "Ecto.Adapters.Postgres";
- database = "akkoma";
- pool_size = 10;
- socket_dir = "/run/postgresql";
- prepare = mkAtom ":named";
- parameters.plan_cache_mode = "force_custom_plan";
- };
- "Pleroma.Web.Endpoint" = {
- url = {
- host = "akko.chir.rs";
- port = 443;
- scheme = "https";
- };
- secure_cookie_flag = true;
- };
- "Pleroma.Emails.Mailer" = {
- enabled = true;
- adapter = mkRaw "Swoosh.Adapters.SMTP";
- relay = "mail.chir.rs";
- username = "akko@chir.rs";
- port = "465";
- ssl = true;
- auth = mkAtom ":always";
- };
- "Pleroma.Emails.NewUsersDigestEmail" = {
- enabled = true;
- };
- ":database".rum_enabled = true;
- ":emoji" = {
- shortcode_globs = [
- "/emoji/volpeon-blobfox-flip/*.png"
- "/emoji/volpeon-blobfox/*.png"
- "/emoji/volpeon-bunhd-flip/*.png"
- "/emoji/volpeon-bunhd/*.png"
- "/emoji/volpeon-drgn/*.png"
- "/emoji/volpeon-fox/*.png"
- "/emoji/volpeon-raccoon/*.png"
- "/emoji/volpeon-vlpn/*.png"
- "/emoji/lotte/*.png"
- "/emoji/caro/*.png"
- "/emoji/misc/*.png"
- ];
- groups = {
- "BlobfoxFlip" = "/emoji/volpeon-blobfox-flip/*.png";
- "Blobfox" = "/emoji/volpeon-blobfox/*.png";
- "BunhdFlip" = "/emoji/volpeon-bunhd-flip/*.png";
- "Bunhd" = "/emoji/volpeon-bunhd/*.png";
- "Drgn" = "/emoji/volpeon-drgn/*.png";
- "Fox" = "/emoji/volpeon-fox/*.png";
- "Raccoon" = "/emoji/volpeon-raccoon/*.png";
- "Vlpn" = "/emoji/volpeon-vlpn/*.png";
- "Lotte" = "/emoji/lotte/*.png";
- "Caroline" = "/emoji/caro/*.png";
- "Misc" = "/emoji/misc/*.png";
- };
- };
- "Pleroma.Captcha" = {
- enabled = true;
- method = mkRaw "Pleroma.Captcha.Kocaptcha";
- };
- };
- ":web_push_encryption".":vapid_details".subject = "lotte@chir.rs";
- });
-in {
- services.pleroma = {
- enable = true;
- package = akkoma.packages.${system}.akkoma;
- configs = [
- ''
- import Config
- import_config "${akkconfig}"
- ''
- ];
- user = "akkoma";
- group = "akkoma";
- secretConfigFile = config.sops.secrets."services/akkoma.exs".path;
- };
- systemd.services.pleroma.path = with pkgs; [exiftool imagemagick ffmpeg];
- services.postgresql.ensureDatabases = ["akkoma"];
- sops.secrets."services/akkoma.exs" = {owner = "akkoma";};
- sops.secrets."services/bunny-key".owner = "akkoma";
- services.caddy.virtualHosts."akko.chir.rs" = {
- useACMEHost = "chir.rs";
- logFormat = pkgs.lib.mkForce "";
- extraConfig = ''
- import baseConfig
- handle /media_attachments/* {
- redir https://mastodon-assets.chir.rs{uri} permanent
- }
- @isbunny {
- header Via BunnyCDN
- }
- route /media/* {
- reverse_proxy @isbunny {
- header_down Content-Security-Policy "script-src 'none';"
- to http://127.0.0.1:4000
- }
- respond "Use the cdn" 403
- }
- route /proxy/* {
- reverse_proxy @isbunny {
- header_down Content-Security-Policy "script-src 'none';"
- to http://127.0.0.1:4000
- }
- respond "Use the cdn" 403
- }
- route {
- reverse_proxy {
- to http://127.0.0.1:4000
- }
- }
- '';
- };
-
- services.postgresql.extraPlugins = with config.services.postgresql.package.pkgs; [rum];
-}
diff --git a/config/services/akkoma/terms-of-service.html b/config/services/akkoma/terms-of-service.html
deleted file mode 100644
index c1f09554..00000000
--- a/config/services/akkoma/terms-of-service.html
+++ /dev/null
@@ -1,139 +0,0 @@
-
Rules
-
-
Hate against minority groups is forbidden. This includes racism, sexism, ableism, xenophobia, homophobia,
- transphobia,, antisemitism, islamophobia, queer exclusionism, etc.
-
Content that is illegal under German Law is not permitted. This especially includes the promotion and
- dissemination of any Nazi symbolism and ideology, except for education, reporting on past or current events, and
- antifascist art.
-
Please add content description to all media that you post. This instance automatically adds a CW if it is missing.
- If you are unable to create one, you can request one via the #DescriptionWanted hashtag
-
Be considerate. Add content warnings for NSFW Content, common phobias, overly long posts, controversial subjects,
- etc. Please try to avoid flashing images and quickly moving text inside of your posts.
-
NSFW content is generally allowed, but all NSFW content must be properly marked as such, including kinks. Profile
- images, names, bios, etc must be fully SFW, or they are subject to removal
-
Bots are allowed, however they must be marked as such and must make unlisted posts, may only @ or interact with
- posts of other users iff they have prompted the bot, or have given explicit permission to do so. Additionally, bots
- may not post more than 10 posts in a 60 minute interval without interaction.
-
-
-We highly encourage reporting posts violating our rules, even if they are not on our instance. Your reports will not be
-ignored. For transparency we publish local moderation decisions for users on this server, and federation moderation
-decisions on the #FediBlock hashtag.
-
-We do the following moderation automatically:
-
-
-
Unlisting of bot posts
-
Adding of CWs to unlabeled media
-
Modification or removal of posts that cause issues with certain clients
-
-
-
Privacy Policy
-
-
What data do we collect?
-We collect the following data:
-
-
-
Email Addresses from local users
-
Posts and Media uploaded by local users
-
User Profiles and Posts by certain remote users
-
-
-
How do we collect your data?
-
-If you are a user of this instance, we collect and process your data when you sign up for or use interactive features (e.g. Posting) of the Website.
-
-If you are not a local user, we collect your data over the following ways:
-
-
-
One of our users has requested to follow your account, and you have accepted the request.
-
One of your posts has been interacted with by a remote account, that a local account has followed. This includes Replies, Repeats, Quotes, Likes, Emoji Reactions, and @-Mentions.
-
You have requested that your post is shown to one of our users (i.e. through @-Mentions or DMs)
-
User Interaction: One of our users has explicitely looked up your profile or one of your posts on this instance, for example to interact with it.
-
You have posted a public post on an instance that participates in the awoo.today relay.
-
-
-
How will we use your data?
-
-We collect your data so that we can:
-
-
-
Store and display your posts to our local users
-
Display public posts to anonymous users
-
Deliver your public, unlisted, and private posts to your followers
-
Deliver direct messages to the recipient
-
Allow our users to follow you
-
Allow our users to interact with your posts
-
-
-As members of the awoo.today relay, we will send posts that you have marked as “public” to all of the other instances participating in the relay.
-
-
How do we store your data?
-
-We store your post, profile and account data securely in the Hetzner Datacenter in Falkenstein, Germany. See their DIN ISO/IEC 27001 certification
-Media is stored on Backblaze B2
-
-We employ technical security measures to avoid exposure to sensitive data.
-
-We also store backups of post, profile, and account data in multiple locations, in an encrypted form, on our server near Chemnitz, Germany, as well as on Backblaze B2.
-For technical reasons it is not possible modify these backups to remove your data. If this is a concern, please contact us.
-
-
What are your data protection rights?
-
-We want to make sure that you are aware of your data protection rights. Every user is entitled to the following:
-
-The right to access — You can request a copy of the data we have about you. This may require a short verification for remote users. Local users can do so in the settings under Export/Import
-
-The right to rectification — You can request us to correct any information you believe is inaccurate. You also have the right to request us to complete the information you believe is inaccurate.
-
-The right to erasure — You can request us to erase the data we have about you.
-
-The right to restrict to processing — You can restrict us from transmitting your posts to other servers by setting your post visiblity to “Local”. Remote users can also restrict processing of certain posts, by setting its visiblity to “Unlisted” or “Private”.
-
-The right to object to processing — As a remote user, you can object to further processing of posts and profile data by blocking this domain.
-
-The right to data portability — You can at any point move to other instances. Due to technical restrictions, it is currently not possible to automatically transfer the users you follow and posts to your new account.
-
-If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, or need help with the included tools, please contact us at our email privacy@chir.rs
-
-
Cookies
-
-Cookies are text files placed on your computer to collect standard Internet log information and visitor behavior information. When you visit our websites, we may collect information from you automatically through cookies or similar technology
-
-For further information, visit allaboutcookies.org.
-
-
How do we use cookies?
-
-We use cookies for keeping you logged in. Additionally we store certain configuration in cookies, however these cookies are never transmitted to anyone.
-
-
How to manage cookies
-
-You can tell your browser to not accept cookies, or tell it to remove cookies this website has stored on your device. Please consult your browser’s documentation on instructions on how to do that.
-
-
Privacy policies of other websites
-
-This site contains many links to other websites. This privacy policy only applies to this website. Please consult the privacy policy of these remote sites before entering any personal information.
-
-
Changes to our privacy policy
-
-We may make occasional adjustments to this privacy policy. This policy was last updated on 2022-12-30.
-
-
How to contact us
-
-If you have any questions about this policy, the data we hold about you, or want to exercise one of your data protection rights, please contact us at: privacy@chir.rs
-
-
How to contact the appropriate authority
-
-Should you wish to report a complaint, or if you feel that we haven’t addressed your concern in a satisfactory manner, you may contact the Sächsische Datenschutzbehörde.
-
-
-
-We also offer the Mastodon Web UI. Keep in mind that some features are missing,
-like emoji reactions, quoting, and JPEG XL.
-
-
Art Credit
-
-
-
Bun, blobfox, vlpn, raccoon, fox, gphn, neofox, neocat, drgn, floof: Created by @volpeon@is-a.wyvern.rip