├── .envrc
├── .gitignore
├── .sops.yaml
├── .vscode
└── settings.json
├── LICENSE
├── README.md
├── flake.lock
├── flake.nix
├── justfile
├── machines
├── common
│ └── default.nix
└── desktop
│ ├── audio.nix
│ ├── default.nix
│ ├── hardware.nix
│ ├── net.nix
│ ├── packages.nix
│ ├── security.nix
│ └── ui.nix
├── secrets.yaml
├── selene.toml
├── stylua.toml
├── users
└── amy
│ ├── apps
│ ├── dedicated
│ │ ├── backup
│ │ │ ├── .gitignore
│ │ │ ├── args.txt
│ │ │ └── run-backup.py
│ │ ├── bspwm-scripts
│ │ │ ├── powermenu.sh
│ │ │ └── sxhkd-help.sh
│ │ ├── default.nix
│ │ ├── emacs-config
│ │ │ ├── .gitignore
│ │ │ ├── Emacs.el
│ │ │ ├── Emacs.org
│ │ │ ├── custom-vars.el
│ │ │ ├── early-init.el
│ │ │ ├── elpa
│ │ │ │ ├── archives
│ │ │ │ │ ├── gnu
│ │ │ │ │ │ ├── archive-contents
│ │ │ │ │ │ └── archive-contents.signed
│ │ │ │ │ └── nongnu
│ │ │ │ │ │ ├── archive-contents
│ │ │ │ │ │ └── archive-contents.signed
│ │ │ │ └── gnupg
│ │ │ │ │ ├── pubring.kbx
│ │ │ │ │ ├── pubring.kbx~
│ │ │ │ │ └── trustdb.gpg
│ │ │ ├── init.el
│ │ │ └── straight
│ │ │ │ ├── .gitignore
│ │ │ │ ├── modified
│ │ │ │ ├── cape
│ │ │ │ ├── yaml-pro
│ │ │ │ └── yasnippet
│ │ │ │ └── versions
│ │ │ │ └── default.el
│ │ ├── nvim-config
│ │ │ ├── init.lua
│ │ │ ├── lazy-lock.json
│ │ │ └── lua
│ │ │ │ ├── config
│ │ │ │ ├── background.lua
│ │ │ │ ├── editor
│ │ │ │ │ ├── autocmd.lua
│ │ │ │ │ ├── direnv.lua
│ │ │ │ │ ├── keys.lua
│ │ │ │ │ ├── project.lua
│ │ │ │ │ └── settings.lua
│ │ │ │ ├── interface
│ │ │ │ │ ├── cmp.lua
│ │ │ │ │ ├── snippets.lua
│ │ │ │ │ ├── telescope.lua
│ │ │ │ │ └── tree.lua
│ │ │ │ ├── lazy.lua
│ │ │ │ ├── navigation
│ │ │ │ │ ├── pairs.lua
│ │ │ │ │ └── scroll.lua
│ │ │ │ ├── neovide.lua
│ │ │ │ ├── text
│ │ │ │ │ ├── autosave.lua
│ │ │ │ │ ├── comment.lua
│ │ │ │ │ ├── cutlass.lua
│ │ │ │ │ ├── icons.lua
│ │ │ │ │ ├── indent.lua
│ │ │ │ │ ├── surround.lua
│ │ │ │ │ └── todo.lua
│ │ │ │ ├── treesitter
│ │ │ │ │ ├── ensure_installed.lua
│ │ │ │ │ ├── incremental_selection.lua
│ │ │ │ │ ├── init.lua
│ │ │ │ │ ├── playground.lua
│ │ │ │ │ ├── rainbow_brackets.lua
│ │ │ │ │ └── textobjects.lua
│ │ │ │ └── visual
│ │ │ │ │ ├── central.lua
│ │ │ │ │ ├── statusline-theme.lua
│ │ │ │ │ ├── statusline.lua
│ │ │ │ │ └── theme.lua
│ │ │ │ └── lib
│ │ │ │ ├── init.lua
│ │ │ │ ├── log.lua
│ │ │ │ └── types.lua
│ │ ├── patch-discord.sh
│ │ ├── vscode-config
│ │ │ ├── default.nix
│ │ │ ├── keybindings.json
│ │ │ ├── packages.nix
│ │ │ └── settings.json
│ │ └── wezterm-config
│ │ │ ├── lua
│ │ │ ├── bar.lua
│ │ │ ├── base.lua
│ │ │ ├── colors.lua
│ │ │ ├── font.lua
│ │ │ ├── keys.lua
│ │ │ └── util.lua
│ │ │ └── wezterm.lua
│ ├── default.nix
│ ├── personal
│ │ ├── default.nix
│ │ └── steam.nix
│ ├── service
│ │ ├── default.nix
│ │ ├── keybase.nix
│ │ └── mpris.nix
│ ├── system
│ │ ├── default.nix
│ │ ├── nixpkgs.nix
│ │ ├── sops.nix
│ │ └── xdg.nix
│ ├── tools
│ │ ├── cargo.nix
│ │ ├── default.nix
│ │ ├── discord.css
│ │ ├── git.nix
│ │ ├── lazygit.nix
│ │ ├── nu
│ │ │ ├── config.nu
│ │ │ ├── default.nix
│ │ │ ├── env.nu
│ │ │ └── ls-colors
│ │ ├── sh.nix
│ │ ├── starship.toml
│ │ └── zsh.nix
│ └── ui
│ │ ├── alacritty.nix
│ │ ├── bspwm.nix
│ │ ├── chromium.nix
│ │ ├── default.nix
│ │ ├── dunst.nix
│ │ ├── flameshot.nix
│ │ ├── gtk.nix
│ │ ├── gtk2.nix
│ │ ├── polybar.nix
│ │ └── rofi.nix
│ ├── config.nix
│ ├── default.nix
│ ├── environment
│ ├── default.nix
│ └── gpg.nix
│ ├── overlays
│ └── default.nix
│ ├── packages
│ ├── apple-music
│ │ └── default.nix
│ ├── cargo
│ │ └── default.nix
│ ├── catppuccin-gtk
│ │ └── default.nix
│ ├── default.nix
│ ├── emacs
│ │ └── default.nix
│ ├── nvim
│ │ └── default.nix
│ └── rescrobbled
│ │ └── default.nix
│ └── wallpapers
│ ├── assets
│ ├── buttons.png
│ ├── caffeine.png
│ ├── ctp-hills.png
│ ├── ctp-mocha-coffee.png
│ ├── ctp-mocha-penguin.png
│ ├── ctp-mocha-rainbow.png
│ ├── ctp-mocha-unicat.png
│ ├── ctp-wavy-calm-ferris.png
│ ├── ctp-wavy-ferris.png
│ ├── dark-ascii-cat.png
│ ├── neomoji-frappe.png
│ ├── neomoji-latte.png
│ ├── neomoji-macchiato.png
│ ├── neomoji-mocha.png
│ ├── nix-black.png
│ ├── nix-gray.png
│ ├── nix-magenta.png
│ └── petals-pink.png
│ ├── buttons.wp
│ ├── caffeine.wp
│ ├── catppuccin-hills.wp
│ ├── catppuccin-mocha-coffee.wp
│ ├── catppuccin-mocha-penguin.wp
│ ├── catppuccin-mocha-rainbow.wp
│ ├── catppuccin-mocha-unicat.wp
│ ├── catppuccin-wavy-ferris-calm.wp
│ ├── catppuccin-wavy-ferris.wp
│ ├── dark-ascii-cat.wp
│ ├── default.nix
│ ├── neomoji-frappe.wp
│ ├── neomoji-latte.wp
│ ├── neomoji-macchiato.wp
│ ├── neomoji-mocha.wp
│ ├── nix-black.wp
│ ├── nix-gray.wp
│ ├── nix-magenta.wp
│ ├── petals-pink.wp
│ └── sh
│ ├── lib.sh
│ ├── random-switch.sh
│ └── select-wallpaper.sh
└── vim.toml
/.envrc:
--------------------------------------------------------------------------------
1 | use flake
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Any result packages
2 | result/
3 | result
4 |
5 | # VM files
6 | *.qcow2
7 |
8 | # Precommit files
9 | .pre-commit-config.yaml
10 |
11 | # Direnv files
12 | .direnv/
13 |
--------------------------------------------------------------------------------
/.sops.yaml:
--------------------------------------------------------------------------------
1 | keys:
2 | - &amy 0014C58BECC51E05AA299EE1210827FF59D814B4
3 | creation_rules:
4 | - key_groups:
5 | - pgp:
6 | - *amy
7 |
8 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "cSpell.enabled": true,
3 | "cSpell.enableFiletypes": [
4 | "nix"
5 | ],
6 | "cSpell.words": [
7 | "catppuccin"
8 | ],
9 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # derivation-station
2 |
3 | Welcome to Derivation Station, where the only way to survive is to embrace the power of NixOS and our handpicked selection of superior software.
4 |
5 | For window management, we trust only the unparalleled expertise of bspwm.
6 | Our terminal editing needs are met with the unparalleled capabilities of neovim, while our code projects are managed with the minimalist perfection of vscode.
7 |
8 | And when it comes to shells, there is no choice but to go with the tried and true zsh.
9 | Our top-notch interface is rounded out with the sleek and efficient polybar, and WezTerm, the ultimate terminal for the discerning user.
10 |
11 | Yes, we know what you're thinking: why bother with anything else? We've tried the rest, and we know that our choices are simply the best.
12 | So join us in our journey into the heart of the NixOS configuration, and see for yourself why there is no other way.
13 |
14 |
15 | And let's not forget about the best and ONLY pastel colorscheme, Catppuccin, which brings an unparalleled level of sophistication and elegance to our desktops.
16 |
17 | To start on your journey, run:
18 | ```sh
19 | git clone https://github.com/nullishamy/derivation-station/ ~/nixos && cd ~/nixos && nix develop -c "just setup"
20 | ```
21 | (above description & repo name written by ChatGPT with the pure intent to shitpost)
22 |
23 | Once the setup process has finished, rebuild the system (`just switch`).
24 |
25 | Wallpapers come from the [Catppuccin Discord](https://discord.gg/catppuccin)!
26 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | inputs = {
3 | nixpkgs.url = "nixpkgs/nixos-24.05";
4 | nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
5 |
6 | home-manager.url = "github:nix-community/home-manager?ref=release-24.05";
7 |
8 | flake-utils.url = "github:numtide/flake-utils";
9 |
10 | nix-index-database.url = "github:Mic92/nix-index-database";
11 |
12 | ghostty.url = "github:ghostty-org/ghostty";
13 |
14 | pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
15 |
16 | sops.url = "github:Mic92/sops-nix";
17 |
18 | nu_scripts = {
19 | type = "git";
20 | url = "https://github.com/nushell/nu_scripts";
21 | submodules = true;
22 | flake = false;
23 | };
24 |
25 | nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
26 | };
27 |
28 | outputs = {
29 | self,
30 | flake-utils,
31 | ...
32 | } @ inputs: let
33 | system = import ./users/amy/config.nix;
34 | inherit inputs;
35 | overlays = final: prev:
36 | {
37 | unstable = import inputs.nixpkgs-unstable {
38 | inherit (prev) system;
39 | config.allowUnfree = true;
40 | };
41 | }
42 | // (import ./users/${system.currentUser}/overlays final prev);
43 | in
44 | {
45 | nixosConfigurations.nixon = inputs.nixpkgs.lib.nixosSystem {
46 | system = "x86_64-linux";
47 | modules = [
48 | ({
49 | config,
50 | pkgs,
51 | lib,
52 | ...
53 | }: (import ./machines/desktop {
54 | inherit config inputs pkgs lib;
55 | }))
56 |
57 | ({config, ...}: {
58 | config = {
59 | nixpkgs.overlays = [overlays];
60 | nixpkgs.config.permittedInsecurePackages = [
61 | # FIXME: For Obsidian Notes.
62 | "electron-25.9.0"
63 | ];
64 | };
65 | })
66 |
67 | inputs.home-manager.nixosModules.home-manager
68 | {
69 | home-manager = {
70 | useGlobalPkgs = true;
71 | useUserPackages = true;
72 | backupFileExtension = "backup";
73 | sharedModules = [
74 | inputs.nix-index-database.hmModules.nix-index
75 | inputs.sops.homeManagerModules.sops
76 | ];
77 | extraSpecialArgs = {
78 | flakePath = "/home/${system.currentUser}/nixos";
79 | inherit (inputs) nu_scripts nix-vscode-extensions ghostty;
80 | inherit system;
81 | };
82 | };
83 | }
84 | ];
85 | };
86 | }
87 | // flake-utils.lib.eachDefaultSystem (system: {
88 | checks = {
89 | pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
90 | src = ./.;
91 | hooks = {
92 | alejandra.enable = true;
93 | editorconfig-checker.enable = true;
94 | deadnix.enable = true;
95 | shellcheck.enable = true;
96 | stylua.enable = true;
97 | };
98 | settings.deadnix = {
99 | noLambdaPatternNames = true;
100 | noLambdaArg = true;
101 | };
102 | };
103 | };
104 | devShell = let
105 | pkgs = inputs.nixpkgs.legacyPackages.${system};
106 | unstable = inputs.nixpkgs-unstable.legacyPackages.${system};
107 | in
108 | pkgs.mkShell {
109 | inherit (self.checks.${system}.pre-commit-check) shellHook;
110 | packages = [
111 | unstable.just
112 | pkgs.sops
113 | pkgs.nixpkgs-fmt
114 | pkgs.nix-output-monitor
115 | pkgs.nvd
116 | pkgs.nixd
117 | ];
118 | };
119 | });
120 | }
121 |
--------------------------------------------------------------------------------
/justfile:
--------------------------------------------------------------------------------
1 | system_name := "nixon"
2 |
3 | # HACK: Use b64 because bash is dumb and stupid
4 | # HACK: Redirect stderr to /dev/null because nixos is dumb and stupid
5 | hardware_config := `sudo nixos-generate-config --show-hardware-config 2>/dev/null | base64 -w0`
6 | dir := justfile_directory()
7 |
8 | [private]
9 | default:
10 | @just --list
11 |
12 | [private]
13 | build-system type:
14 | sudo nixos-rebuild {{type}} --flake "{{dir}}#{{system_name}}" |&nom
15 |
16 | [confirm]
17 | [private]
18 | confirm-switch *args:
19 | @just build-system switch {{args}}
20 |
21 | # Setup the OS for the first time
22 | setup:
23 | #!/usr/bin/env bash
24 |
25 | if [[ -d "{{dir}}/machines/desktop_customised" ]]; then
26 | echo "ERROR: Setup has already completed (custom desktop dir exists)" && exit 1
27 | fi
28 |
29 | read -p "New username? " username
30 | read -p "New password? " password
31 |
32 | echo "Copying desktop files.."
33 | mkdir -p "{{dir}}/machines/desktop_customised"
34 | cp -r "{{dir}}/machines/desktop/"* "{{dir}}/machines/desktop_customised"
35 | echo "Done!"
36 |
37 |
38 | echo "Copying user files.."
39 | mkdir -p "{{dir}}/users/$username/"
40 | cp -r "{{dir}}/users/amy/"* "{{dir}}/users/$username"
41 | echo "Done!"
42 |
43 |
44 | echo "Setting values into config"
45 | sed -i "s/currentUser = \"\w*\"/currentUser = \"${username}\"/g" "{{dir}}/users/$username/config.nix"
46 |
47 | hashedPassword=$(echo "$password" | mkpasswd -m sha-512 --stdin)
48 | sed -i "s&hashedPassword = \".*\"&hashedPassword = \"${hashedPassword}\"&g" "{{dir}}/users/$username/default.nix"
49 |
50 | sed -i "s&system = import .*;&system = import ../../users/${username}/config.nix;&g" "{{dir}}/machines/desktop_customised/default.nix"
51 | sed -i "s&system = import .*;&system = import ../../users/${username}/config.nix;&g" "{{dir}}/flake.nix"
52 | sed -i "s&./machines/desktop&./machines/desktop_customised&g" "{{dir}}/flake.nix"
53 | echo "Done!"
54 |
55 |
56 | echo "Copying hardware config.."
57 | echo "{{hardware_config}}" | base64 -d > {{dir}}/machines/desktop_customised/hardware.nix
58 | echo "Done!"
59 |
60 | # Build the configuration and put its result in ./result
61 | build *args:
62 | @just build-system build {{args}} && nvd diff /run/current-system result
63 |
64 | # Build the configuration and show what would be activated
65 | test: (build-system "dry-activate")
66 |
67 | # Build and switch to the configuration
68 | switch *args:
69 | @just build {{args}}
70 | @just confirm-switch {{args}}
71 |
72 | # Build a VM out of the configuration
73 | vm: (build-system "build-vm")
74 |
75 | # Clean up garbage from the nix store
76 | clean:
77 | sudo nix-collect-garbage -d && sudo nix-store --optimise
78 |
79 | # Upgrade the system
80 | upgrade:
81 | nix flake update && sudo nixos-rebuild switch --flake "{{dir}}#{{system_name}}"
82 |
83 | # Format the configuration
84 | format:
85 | #! /usr/bin/env nix-shell
86 | #! nix-shell -i bash -p alejandra stylua
87 | alejandra -q .
88 | stylua .
89 |
90 | # Edit the sops secrets stored in the config
91 | secrets:
92 | sops secrets.yaml
93 |
--------------------------------------------------------------------------------
/machines/common/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 | with config;
8 | with lib;
9 | with pkgs; {
10 | programs.ladybird = {
11 | enable = true;
12 | };
13 | users = {
14 | defaultUserShell = bash;
15 | mutableUsers = true;
16 |
17 | users = {
18 | root = {
19 | home = "/root";
20 | uid = ids.uids.root;
21 | group = "root";
22 | initialHashedPassword = mkDefault "!";
23 | };
24 | };
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/machines/desktop/audio.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | # Hardware configuration
3 | hardware = {
4 | bluetooth = {
5 | enable = true;
6 | };
7 | };
8 |
9 | # Blueman
10 | services.blueman = {
11 | enable = true;
12 | };
13 |
14 | # Audio
15 | security.rtkit.enable = true;
16 | services.pipewire = {
17 | enable = true;
18 | alsa.enable = true;
19 | alsa.support32Bit = true;
20 | pulse.enable = true;
21 | };
22 | }
23 |
--------------------------------------------------------------------------------
/machines/desktop/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | lib,
5 | inputs,
6 | ...
7 | }: let
8 | system = import ../../users/amy/config.nix;
9 | in {
10 | imports = [
11 | ./hardware.nix
12 |
13 | ../../users/amy
14 | ../common
15 |
16 | ./security.nix
17 | (import ./packages.nix {
18 | inherit system;
19 | inherit pkgs;
20 | })
21 | ./net.nix
22 | ./ui.nix
23 | ./audio.nix
24 | ];
25 |
26 | nixpkgs.overlays = [(import ../../users/${system.currentUser}/overlays)];
27 |
28 | # Enable non-free packages
29 | nixpkgs.config = {
30 | allowUnfree = true;
31 | packageOverrides = pkgs: {
32 | unstable = import {
33 | inherit (config.nixpkgs) config;
34 | };
35 | };
36 | };
37 |
38 | boot.loader = {
39 | systemd-boot = {
40 | enable = true;
41 | };
42 |
43 | efi = {
44 | canTouchEfiVariables = true;
45 | efiSysMountPoint = "/boot/efi";
46 | };
47 | };
48 |
49 | boot.kernelPackages = pkgs.linuxPackages_6_8;
50 |
51 | # Configure nix itself
52 | nix = let
53 | flakeInputs = lib.filterAttrs (name: value: (value ? outputs) && (name != "self")) inputs;
54 | in {
55 | # Automatically run the nix store optimiser
56 | optimise.automatic = true;
57 | optimise.dates = ["12:55"];
58 |
59 | settings = {
60 | # Nix automatically detects files in the store that have identical contents, and replaces them with hard links to a single copy.
61 | auto-optimise-store = true;
62 |
63 | # Maximum number of concurrent tasks during one build
64 | build-cores = 16;
65 |
66 | # Maximum number of jobs that Nix will try to build in parallel
67 | max-jobs = "auto";
68 |
69 | # Perform builds in a sandboxed environment
70 | sandbox = true;
71 |
72 | # Enable flakes
73 | experimental-features = ["nix-command" "flakes" "repl-flake"];
74 |
75 | # Consider downloaded tarballs as fresh for 7 days
76 | tarball-ttl = 604800;
77 |
78 | trusted-users = ["@wheel"];
79 | };
80 |
81 | nixPath = [
82 | "nixpkgs=${inputs.nixpkgs.outPath}"
83 | ];
84 |
85 | registry = builtins.mapAttrs (name: v: {flake = v;}) flakeInputs;
86 | };
87 |
88 | # Set your time zone.
89 | time.timeZone = "Europe/London";
90 |
91 | # Select internationalisation properties.
92 | i18n.defaultLocale = "en_GB.utf8";
93 |
94 | # Configure console keymap
95 | console.keyMap = "us";
96 |
97 | # Enable CUPS to print documents.
98 | services.printing = {
99 | enable = true;
100 | drivers = [pkgs.gutenprint pkgs.hplip];
101 | };
102 |
103 | # Add myself to additional groups
104 | users.extraGroups.docker.members = ["${system.currentUser}"];
105 |
106 | # Enable dockerd at the system level
107 | virtualisation.docker = {
108 | enable = true;
109 | };
110 | virtualisation.virtualbox.host.enable = true;
111 | users.extraGroups.vboxusers.members = ["amy"];
112 |
113 | # Fonts
114 | fonts.packages = with pkgs; [
115 | # Only use the given nerdfonts, saves cloning *everything*
116 | (nerdfonts.override {fonts = ["Hack" "Iosevka" "FantasqueSansMono" "VictorMono" "NerdFontsSymbolsOnly"];})
117 | ];
118 |
119 | environment = {
120 | # Add zsh to /etc/shells
121 | shells = [
122 | pkgs.zsh
123 | ];
124 |
125 | pathsToLink = ["/share/zsh"];
126 | };
127 |
128 | # This value determines the NixOS release from which the default
129 | # settings for stateful data, like file locations and database versions
130 | # on your system were taken. It‘s perfectly fine and recommended to leave
131 | # this value at the release version of the first install of this system.
132 | # Before changing this value read the documentation for this option
133 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
134 | system.stateVersion = "22.11"; # Did you read the comment?
135 | }
136 |
--------------------------------------------------------------------------------
/machines/desktop/hardware.nix:
--------------------------------------------------------------------------------
1 | # Do not modify this file! It was generated by ‘nixos-generate-config’
2 | # and may be overwritten by future invocations. Please make changes
3 | # to /etc/nixos/configuration.nix instead.
4 | {
5 | config,
6 | lib,
7 | pkgs,
8 | modulesPath,
9 | ...
10 | }: {
11 | imports = [
12 | (modulesPath + "/installer/scan/not-detected.nix")
13 | ];
14 |
15 | boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod"];
16 | boot.initrd.kernelModules = [];
17 | boot.kernelModules = ["kvm-amd"];
18 | boot.extraModulePackages = [];
19 |
20 | fileSystems."/" = {
21 | device = "/dev/disk/by-uuid/c84f591f-0536-4870-9296-a36323f56a6a";
22 | fsType = "ext4";
23 | };
24 |
25 | fileSystems."/nix/store" = {
26 | device = "/nix/store";
27 | fsType = "none";
28 | options = ["bind"];
29 | };
30 |
31 | fileSystems."/boot/efi" = {
32 | device = "/dev/disk/by-uuid/8CD9-85D8";
33 | fsType = "vfat";
34 | };
35 |
36 | fileSystems."/home/amy/mnt/vapour" = {
37 | device = "/dev/disk/by-uuid/45aaf11e-d816-41d8-8738-cc01df62d701";
38 | fsType = "ext4";
39 | options = ["defaults" "rw"];
40 | };
41 |
42 | swapDevices = [
43 | {device = "/dev/disk/by-uuid/162ba73f-0a93-4287-b1e9-0945752f3d87";}
44 | ];
45 |
46 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
47 | # (the default) this is the recommended approach. When using systemd-networkd it's
48 | # still possible to use this option, but it's recommended to use it in conjunction
49 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`.
50 | networking.useDHCP = lib.mkDefault true;
51 | # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true;
52 |
53 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
54 | }
55 |
--------------------------------------------------------------------------------
/machines/desktop/net.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | networking = {
3 | useDHCP = true;
4 | useNetworkd = true;
5 | hostName = "nixon";
6 | firewall.enable = false;
7 | };
8 |
9 | # systemd.network.networks = let
10 | # networkConfig = {
11 | # DHCP = "yes";
12 | # };
13 | # in {
14 | # # Config for all useful interfaces
15 | # "40-wired" = {
16 | # enable = true;
17 | # name = "en*";
18 | # inherit networkConfig;
19 | # dhcpV4Config.RouteMetric = 1024; # Better be explicit
20 | # };
21 | # "40-wireless" = {
22 | # enable = true;
23 | # name = "wl*";
24 | # inherit networkConfig;
25 | # dhcpV4Config.RouteMetric = 2048; # Prefer wired
26 | # };
27 | # };
28 |
29 | # Wait for any interface to become available, not for all
30 | # This avoids a hang where wifi isnt available
31 | systemd.services."systemd-networkd-wait-online".serviceConfig.ExecStart = [
32 | ""
33 | "${config.systemd.package}/lib/systemd/systemd-networkd-wait-online --any"
34 | ];
35 | }
36 |
--------------------------------------------------------------------------------
/machines/desktop/packages.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | system,
4 | ...
5 | }: let
6 | rescrobbled = pkgs.callPackage ../../users/${system.currentUser}/packages/rescrobbled {};
7 | in {
8 | imports = [../../users/${system.currentUser}/apps/personal/steam.nix];
9 |
10 | environment.systemPackages = with pkgs; [
11 | wget
12 | wezterm
13 | polybar
14 | chromium
15 | git
16 | redshift
17 | home-manager
18 | pipewire
19 | wireplumber
20 | pulseaudio
21 | zsh
22 | dconf
23 | fontconfig
24 | unzip
25 | gnupg
26 | pinentry-gtk2
27 | ntfsprogs
28 | yubico-pam
29 | yubikey-manager-qt
30 | xclip
31 | yubioath-flutter
32 | i3lock
33 | nano
34 | vim
35 | ];
36 |
37 | systemd.user.services.rescrobbled = {
38 | enable = true;
39 | description = "An MPRIS scrobbler";
40 | wantedBy = ["default.target"];
41 | environment = {
42 | DISPLAY = ":0";
43 | };
44 | serviceConfig = {
45 | ExecStart = "${rescrobbled}/bin/rescrobbled";
46 | };
47 | };
48 |
49 | services.ratbagd.enable = true;
50 | }
51 |
--------------------------------------------------------------------------------
/machines/desktop/security.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | # Pinentry / GPG
3 | programs.gnupg.agent = {
4 | enable = true;
5 | pinentryPackage = pkgs.pinentry-gtk2;
6 | enableSSHSupport = true;
7 | };
8 |
9 | # Increase open file limits
10 | security.pam.loginLimits = [
11 | {
12 | domain = "*";
13 | type = "soft";
14 | item = "nofile";
15 | value = "8192";
16 | }
17 | ];
18 |
19 | # Enable yubikey support for the OS
20 | security.pam.yubico = {
21 | enable = true;
22 | mode = "challenge-response";
23 | control = "sufficient";
24 | };
25 |
26 | # Enable the pcscd daemon for smartcard support
27 | services.pcscd.enable = true;
28 | }
29 |
--------------------------------------------------------------------------------
/machines/desktop/ui.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | ...
5 | }: {
6 | services.picom = {
7 | enable = true;
8 |
9 | settings = {
10 | # -- SHADOWS --
11 | shadow = false;
12 | shadow-radius = 2;
13 | shadow-opacity = .75;
14 | shadow-offset-x = -2;
15 | shadow-offset-y = -2;
16 | shadow-exclude = [];
17 |
18 | # -- FADING --
19 | fading = false;
20 | fade-in-step = 0.03;
21 | fade-out-step = 0.03;
22 | fade-delta = 5;
23 | fade-exclude = [];
24 | no-fading-openclose = 1;
25 |
26 | # -- TRANSPARENCY / OPACITY --
27 | inactive-opacity = 1;
28 | frame-opacity = 1;
29 | inactive-opacity-override = false;
30 | active-opacity = 1;
31 | inactive-dim = 0;
32 | focus-exclude = [];
33 | # inactive-dim-fixed = 1.0;
34 | opacity-rule = [];
35 |
36 | # -- CORNERS --
37 | corner-radius = 10;
38 | round-borders = 1;
39 | rounded-corners-exclude = [];
40 |
41 | # -- GENERAL --
42 | backend = "glx";
43 | glx-no-rebind-pixmap = 1;
44 | };
45 | };
46 |
47 | # Configure X11
48 | services = {
49 | displayManager = {
50 | defaultSession = "none+bspwm";
51 | };
52 | };
53 |
54 | services.xserver = {
55 | enable = true;
56 |
57 | xkb = {
58 | layout = "us";
59 | variant = "";
60 | };
61 |
62 | windowManager.bspwm = {
63 | enable = true;
64 | };
65 |
66 | desktopManager = {
67 | wallpaper = {
68 | mode = "center";
69 | };
70 | };
71 |
72 | xautolock = {
73 | enable = true;
74 |
75 | # Time, in minutes, before the screen automatically locks
76 | time = 60;
77 |
78 | # The command to run when locking
79 | locker = "${pkgs.i3lock}/bin/i3lock -c 282828";
80 | nowlocker = "${pkgs.i3lock}/bin/i3lock -c 282828";
81 | };
82 | };
83 |
84 | fonts = {
85 | enableDefaultPackages = true;
86 |
87 | # Mainly to set the ui font for applications that do not allow it
88 | # *cough* vscode *cough*
89 | fontconfig = {
90 | defaultFonts = let
91 | font = ["FantasqueSansM Nerd Font Mono"];
92 | # font = ["Iosevka Term"];
93 | in {
94 | serif = font;
95 | sansSerif = font;
96 | };
97 | localConf = ''
98 |
99 | 15
100 |
101 | '';
102 | };
103 | };
104 | }
105 |
--------------------------------------------------------------------------------
/secrets.yaml:
--------------------------------------------------------------------------------
1 | ssh-private-key: ENC[AES256_GCM,data:hpzaj7Cfa20Cc1GvIgwXtAoxt4v/hy1ZXR57kJUCFvKPaL2pfo/zx/5+3yjw7OnlI6OQZfwBnKQ4Q/fWsQY8DjdIG6H9nsyXJGOGKKwMiQk7ELXGkC2ZJqP5W1iOlkE/BMa2K5W5/eJxoKwOMK4/cx3q8NQJ2OmT8Skp8TpYOcqqQuQ2kbXYWPpnOlhZB45Vm3TmRDT1KJ3N378HtpTOh4iTc82amkYZ1Ptgoiz57kk4kQqxpc1CUjqrd5rUXTGBq3LsfHKPv9e2dC2N5hbixH7ZPeC7/oaQWjtJxmfepRcFPzr+qEX2G4odt30nkyPtsDhHW05z9j2qjlNKbXjhM7ML9Eo6ppcITy2EUkwKZBVWfrCFZlgGYndtWz++eV1eTHEF14RVATRfdKhWhXJS9fNb2lZbPZIE7EN/WUexpk/GH9/I6514yYyirWtfEHFHkaVZgyER5yFJZZ9o9RE/QXbOX66xIzJ8uQBjvLdcN1cTdVdNgD7MLZkTkwtd/GSEyNoJq+D5kFOh8CLCQjbT3jhjOTmMTDxRnKZMVAsj9HMxYWKtu+na4ZBdVgLa9bO/kzKxfuN/6osXdWsK+chHMzFhyFRZlZAquyvEyDwhTCSMFm9llY+QTYQ2fb+aXIDtWnMdJf028CGTXGQTf5XIN4vNOG1MFQ2WfH9XLHLSEu3w153wWAjlM0+ntuomOlQq6QydmPicGzUS+2YrXA81unAOEzY3Qm4/LkvKvI+eciXGeCeXnrMnpn5V2pY7E7eiqRr80oxxpbqwTZs3FG7Xgp4kObYCNbNUGSealZqGsox6vnK/ogQYYEjr6AO/fYQvAo4Z6thujBsT10BPs3X+O5afEg==,iv:h3CNLYvQBwxlAYcMxLpb5eJqXGFIDvYUmfx7SUEDuJw=,tag:jUzG4g5UIHkS41/srD9nvA==,type:str]
2 | ssh-public-key: ENC[AES256_GCM,data:n9x+gvXpmLr88oPDIn1jUrxd97iE3NjUyK2gsjjvGCkW+RrMWaEDIi6ZHh1zyQ1vvzLOaTnwLnCvAx2bsbSNvioF8p2/tI7OOwG7tsZh+y2zl7FKNLY7Vnj2mBeiw4VT0uMd8K9FScQEdSnd9rNprWNE2DCnJ92yA1VlZCRPFfjuAf+bv8uqqSXloNb+8gv+28JyqMQTg15OUnYmwEmz+hkucvoBknaMDx/4+CPpYdU97yEo5A5YjU0k9F9DxRb/r3WFYMjSXSQDXNmL8hRfwZmEKlE+/d+Q6DffOUezIKBz2lth3lof/5yDkFHw,iv:uNZ/3iD3u49SV5QuyDNA57I64DCthjklQkUyNRn8iKo=,tag:AJkol4Q8vCCpmeSk6bucPw==,type:str]
3 | emacs: ENC[AES256_GCM,data:P3fbsFAnZJRb+lwWzBiWw7pu5jQMGhqROicqgaVx72vqy6mxta64WatAEmPfm60E+c8BID/jnE5EA00owHkHWmyqazP6FsHBc27Moflq67xyoOb2zmDC2O4LM1Ewjgd2fM9gcy7r6FipCB+MNhekDSVzd80rAxRbDPuB3Z4qBCdUdsiIwJeRLuUEl+y/YTBIUrBOhGyQ9XeirPAPBA==,iv:qQC5N+a/VsQLFhsV/+YZOcp16x7a/qT+87JB9DTMXdU=,tag:r8+7UWf7XEwcF/Rw5lRSEg==,type:str]
4 | authinfo: ENC[AES256_GCM,data:Tsx461F90C1AR3FLwhUChBFNpd8V0EqKjVK4+Io/c9gpUw+4ub3qDU9NPbPuN8WFzfTA4HQnQw1MXGT7qUuw3xr14NkrAeyqn+aGVNE5pkszK2ti+PPcNJmgq1p9ku+S,iv:VUoqrHNBEJl9Tq25sKPbk36Dof6Kt5NkLPGWFhSo+xQ=,tag:XGsYmgMIrUgiwruzVflPtw==,type:str]
5 | sops:
6 | kms: []
7 | gcp_kms: []
8 | azure_kv: []
9 | hc_vault: []
10 | age: []
11 | lastmodified: "2024-12-19T19:19:22Z"
12 | mac: ENC[AES256_GCM,data:3VCXQ7yflrJOpHKn4yC2C6yW4HI3RZ1HIkaZcss8j9Xzl4UMXfciZCyAZrBV4/V7o4zVijjiVoe6nE61f7uKjYnODY0wtof4218lU9JB+A7se4McUi2ah1Vv33ebdnrChOu1JRIF2AEkkuj86nvKWYjPFV9VbwtvNj6d1fJr6+c=,iv:enqfF9jaqljUx6nwicDOR4NJoXtF0spbLDQAjzPWe90=,tag:nKkQLphsd9ECnapOOw9jLg==,type:str]
13 | pgp:
14 | - created_at: "2023-02-18T00:03:39Z"
15 | enc: |
16 | -----BEGIN PGP MESSAGE-----
17 |
18 | hQEMA6kO4amVXIE4AQf+Mm79Unw8fKOF0CGpZ3eUqnYGwNIn4BArgpeEdal07eIh
19 | Tx3i3bVd5w+nb5EswzYKDadXnLribhm055TWLciogGWKpLuUNmuqetFZ3ZtH2hDu
20 | FxrXIhVClEhkdbWqc9x1y3FEc1eV/XGzsuBQPxfgrn7x674tUhZmf51Kn17lHS+v
21 | j3xsZMgHXnaUm8R1AhILEC6K5np252NO8GBW+H9GPR3ZP0W0iLwAkzLQ6FbJmXgn
22 | o6aqO3/pw4sA4n/7J3RlpCpflOpwDjGI5gHm98k7OVyiFwCLZfsWUQdDWkWAKH2c
23 | EqJE+nbKqG5oE5uzgf5FAhviwvLUGzPHWPnkijA6/NRoAQkCEDtw2UoAawkV/x7Q
24 | 3UBc478TGL0xUxFw8xscZ1YWb4DlVegNjZOwAa1WBLpXFh8KHdXJPr0MjIgq7psS
25 | PqFjFrG8XkYTpw4ViR+UH0idEtWIKR0kEd86KQlM7fMvOSSQb7bbmwk=
26 | =Qhmn
27 | -----END PGP MESSAGE-----
28 | fp: 0014C58BECC51E05AA299EE1210827FF59D814B4
29 | unencrypted_suffix: _unencrypted
30 | version: 3.8.1
31 |
--------------------------------------------------------------------------------
/selene.toml:
--------------------------------------------------------------------------------
1 | std="vim"
2 |
--------------------------------------------------------------------------------
/stylua.toml:
--------------------------------------------------------------------------------
1 | column_width = 120
2 | line_endings = "Unix"
3 | indent_type = "Spaces"
4 | indent_width = 2
5 | quote_style = "AutoPreferSingle"
6 | call_parentheses = "NoSingleTable"
7 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/backup/.gitignore:
--------------------------------------------------------------------------------
1 | archives
2 | *.log
3 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/backup/args.txt:
--------------------------------------------------------------------------------
1 | --host 192.168.0.186 --username admin --password admin --log-level INFO --archive-dir /home/amy/nixos/backup/archives --include /home/amy/nixos --exclude /home/amy/.config/discord /home/amy/.config/nvim/ /home/amy/.config/chromium/ /home/amy/nixos/backup/archives --log-file /home/amy/nixos/backup/backup.log
2 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/bspwm-scripts/powermenu.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ## Author : Aditya Shakya (adi1090x)
4 | ## Github : @adi1090x
5 | #
6 | ## Rofi : Power Menu
7 | #
8 | ## Available Styles
9 | #
10 | ## style-1 style-2 style-3 style-4 style-5
11 |
12 | # Current Theme
13 | dir="$HOME/.config/rofi/powermenu/type-1"
14 | theme='style-1'
15 |
16 | # CMDs
17 | # uptime="`uptime | sed -e 's/up //g'`"
18 | host=`hostname`
19 |
20 | # Options
21 | shutdown='shutdown'
22 | reboot='reboot'
23 | lock='lock'
24 | suspend='suspend'
25 | logout='logout'
26 | yes='yes'
27 | no='no'
28 |
29 | # Rofi CMD
30 | rofi_cmd() {
31 | rofi -dmenu \
32 | -p "$host"
33 | }
34 |
35 | # Confirmation CMD
36 | confirm_cmd() {
37 | rofi -theme-str 'window {location: center; anchor: center; fullscreen: false; width: 250px;}' \
38 | -dmenu \
39 | -p 'confirm' \
40 | -theme-str 'listview {columns: 2; lines: 1;}' \
41 | -theme-str 'textbox {horizontal-align: 0.5;}'
42 | # -theme-str 'element-text {horizontal-align: 0.5;}' \
43 | # -theme-str 'mainbox {children: [ "message", "listview" ];}' \
44 | }
45 |
46 | # Ask for confirmation
47 | confirm_exit() {
48 | echo -e "$yes\n$no" | confirm_cmd
49 | }
50 |
51 | # Pass variables to rofi dmenu
52 | run_rofi() {
53 | echo -e "$lock\n$suspend\n$logout\n$reboot\n$shutdown" | rofi_cmd
54 | }
55 |
56 | # Execute Command
57 | run_cmd() {
58 | selected="$(confirm_exit)"
59 | if [[ "$selected" == "$yes" ]]; then
60 | if [[ $1 == '--shutdown' ]]; then
61 | systemctl poweroff
62 | elif [[ $1 == '--reboot' ]]; then
63 | systemctl reboot
64 | elif [[ $1 == '--suspend' ]]; then
65 | mpc -q pause
66 | amixer set Master mute
67 | systemctl suspend
68 | elif [[ $1 == '--logout' ]]; then
69 | bspc quit
70 | fi
71 | else
72 | exit 0
73 | fi
74 | }
75 |
76 | # Actions
77 | chosen="$(run_rofi)"
78 | case ${chosen} in
79 | $shutdown)
80 | run_cmd --shutdown
81 | ;;
82 | $reboot)
83 | run_cmd --reboot
84 | ;;
85 | $lock)
86 | i3lock -c 282828
87 | ;;
88 | $suspend)
89 | run_cmd --suspend
90 | ;;
91 | $logout)
92 | run_cmd --logout
93 | ;;
94 | esac
95 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/bspwm-scripts/sxhkd-help.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | awk '/^[a-z]/ && last {print "",$0,"\t",last,""} {last=""} /^#/{last=$0}' \
4 | ~/.config/sxhkd/sxhkdrc |
5 |
6 | column -t -s $'\t' |
7 |
8 | rofi -dmenu -i -markup-rows -no-show-icons -lines 15 -yoffset 40
9 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | flakePath,
5 | system,
6 | ...
7 | }: let
8 | mkSource = path: config.lib.file.mkOutOfStoreSymlink "${flakePath}/users/${system.currentUser}/apps/dedicated/${path}";
9 | in {
10 | imports = [
11 | ./vscode-config
12 | ];
13 |
14 | config.home.file."etc/patches/patch-discord.sh" = {source = ./patch-discord.sh;};
15 |
16 | config.home = {
17 | sessionPath = ["${config.xdg.configHome}/emacs/bin"];
18 | };
19 |
20 | # Start the daemon
21 | config.services.emacs = {
22 | enable = true;
23 | package = with pkgs; (
24 | (emacsPackagesFor pkgs.unstable.emacs).emacsWithPackages (
25 | epkgs: [epkgs."treesit-grammars".with-all-grammars epkgs."tree-sitter"]
26 | )
27 | );
28 | };
29 |
30 | config.xdg.configFile = {
31 | "nvim" = {
32 | source = mkSource "nvim-config";
33 | };
34 | "wezterm" = {
35 | source = mkSource "wezterm-config";
36 | };
37 | "emacs" = {
38 | source = mkSource "emacs-config";
39 | };
40 | };
41 | }
42 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/.gitignore:
--------------------------------------------------------------------------------
1 | var/
2 | .cache/
3 | eln-cache/
4 | projectile-bookmarks.eld
5 | auto-save-list/
6 | secrets*
7 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/custom-vars.el:
--------------------------------------------------------------------------------
1 | (custom-set-variables
2 | ;; custom-set-variables was added by Custom.
3 | ;; If you edit it by hand, you could mess it up, so be careful.
4 | ;; Your init file should contain only one such instance.
5 | ;; If there is more than one, they won't work right.
6 | '(counsel-projectile-switch-project-action
7 | '(4
8 | ("o" counsel-projectile-switch-project-action "jump to a project buffer or file")
9 | ("f" counsel-projectile-switch-project-action-find-file "jump to a project file")
10 | ("d" counsel-projectile-switch-project-action-find-dir "jump to a project directory")
11 | ("D" counsel-projectile-switch-project-action-dired "open project in dired")
12 | ("b" counsel-projectile-switch-project-action-switch-to-buffer "jump to a project buffer")
13 | ("m" counsel-projectile-switch-project-action-find-file-manually "find file manually from project root")
14 | ("S" counsel-projectile-switch-project-action-save-all-buffers "save all project buffers")
15 | ("k" counsel-projectile-switch-project-action-kill-buffers "kill all project buffers")
16 | ("K" counsel-projectile-switch-project-action-remove-known-project "remove project from known projects")
17 | ("c" counsel-projectile-switch-project-action-compile "run project compilation command")
18 | ("C" counsel-projectile-switch-project-action-configure "run project configure command")
19 | ("E" counsel-projectile-switch-project-action-edit-dir-locals "edit project dir-locals")
20 | ("v" counsel-projectile-switch-project-action-vc "open project in vc-dir / magit / monky")
21 | ("sg" counsel-projectile-switch-project-action-grep "search project with grep")
22 | ("si" counsel-projectile-switch-project-action-git-grep "search project with git grep")
23 | ("ss" counsel-projectile-switch-project-action-ag "search project with ag")
24 | ("sr" counsel-projectile-switch-project-action-rg "search project with rg")
25 | ("xs" counsel-projectile-switch-project-action-run-shell "invoke shell from project root")
26 | ("xe" counsel-projectile-switch-project-action-run-eshell "invoke eshell from project root")
27 | ("xt" counsel-projectile-switch-project-action-run-term "invoke term from project root")
28 | ("xv" counsel-projectile-switch-project-action-run-vterm "invoke vterm from project root")
29 | ("Oc" counsel-projectile-switch-project-action-org-capture "capture into project")
30 | ("Oa" counsel-projectile-switch-project-action-org-agenda "open project agenda")))
31 | '(custom-safe-themes
32 | '("4990532659bb6a285fee01ede3dfa1b1bdf302c5c3c8de9fad9b6bc63a9252f7" "9df4b113170b630d3c00cf3e67c59ecf4f007487f199cc46d54fb30efc8b79ce" "013728cb445c73763d13e39c0e3fd52c06eefe3fbd173a766bfd29c6d040f100" "b73a23e836b3122637563ad37ae8c7533121c2ac2c8f7c87b381dd7322714cd0" "9d5124bef86c2348d7d4774ca384ae7b6027ff7f6eb3c401378e298ce605f83a" "13096a9a6e75c7330c1bc500f30a8f4407bd618431c94aeab55c9855731a95e1" "8d3ef5ff6273f2a552152c7febc40eabca26bae05bd12bc85062e2dc224cde9a" "d77d6ba33442dd3121b44e20af28f1fae8eeda413b2c3d3b9f1315fbda021992" "77fff78cc13a2ff41ad0a8ba2f09e8efd3c7e16be20725606c095f9a19c24d3d" "0c83e0b50946e39e237769ad368a08f2cd1c854ccbcd1a01d39fdce4d6f86478" "88f7ee5594021c60a4a6a1c275614103de8c1435d6d08cc58882f920e0cec65e" "dccf4a8f1aaf5f24d2ab63af1aa75fd9d535c83377f8e26380162e888be0c6a9" default))
33 | '(package-selected-packages
34 | '(gnu-elpa-keyring-update which-key rainbow-mode rainbow-delimiters diminish nerd-icons-completion cape nerd-icons-corfu corfu ido-completing-read+ diff-hl magit nerd-icons-ibuffer nerd-icons-dired nerd-icons eat org-superstar toc-org yasnippet-snippets hl-todo lsp-ui elcord lsp-tailwindcss svelte-mode rust-mode go-mode nix-mode lsp-mode projectile catppuccin-theme direnv flycheck-inline markdown-mode typescript-mode use-package))
35 | '(wakatime-cli-path "~/.wakatime/wakatime-cli")
36 | '(whitespace-display-mappings
37 | '((space-mark 32
38 | [183]
39 | [46])
40 | (space-mark 160
41 | [164]
42 | [95])
43 | (tab-mark 9
44 | [187 9]
45 | [92 9])))
46 | '(whitespace-style '(face tabs spaces indentation space-mark tab-mark))
47 | '(zig-format-on-save nil))
48 | (custom-set-faces
49 | ;; custom-set-faces was added by Custom.
50 | ;; If you edit it by hand, you could mess it up, so be careful.
51 | ;; Your init file should contain only one such instance.
52 | ;; If there is more than one, they won't work right.
53 | '(default ((t (:family "default" :foundry "default" :slant normal :weight medium :height 165 :width normal)))))
54 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/early-init.el:
--------------------------------------------------------------------------------
1 | (setq package-enable-at-startup nil)
2 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/elpa/archives/gnu/archive-contents.signed:
--------------------------------------------------------------------------------
1 | Good signature from 645357D2883A0966 GNU ELPA Signing Agent (2023) (trust undefined) created at 2024-12-17T22:05:02+0000 using EDDSA
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/elpa/archives/nongnu/archive-contents.signed:
--------------------------------------------------------------------------------
1 | Good signature from 645357D2883A0966 GNU ELPA Signing Agent (2023) (trust undefined) created at 2024-12-17T22:10:05+0000 using EDDSA
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/elpa/gnupg/pubring.kbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/apps/dedicated/emacs-config/elpa/gnupg/pubring.kbx
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/elpa/gnupg/pubring.kbx~:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/apps/dedicated/emacs-config/elpa/gnupg/pubring.kbx~
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/elpa/gnupg/trustdb.gpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/apps/dedicated/emacs-config/elpa/gnupg/trustdb.gpg
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/init.el:
--------------------------------------------------------------------------------
1 | ;; Configure straight.el settings
2 | (setq straight-enable-use-package-integration t)
3 | (setq straight-use-package-by-default t)
4 |
5 | ;; Load up my secrets
6 | (defvar secrets-path)
7 | (setq secrets-path (expand-file-name "secrets.el" user-emacs-directory))
8 | ;; Only attempt loading if the path actually exists.
9 | ;; It may not exist if sops has not yet been loaded.
10 | ;; This allows the daemon to launch (albeit with limited features) without crashing
11 | (if (file-exists-p secrets-path)
12 | (load-file secrets-path))
13 |
14 | (setq auth-sources '("~/.authinfo"))
15 |
16 | ;; Bootstrap straight
17 | (defvar bootstrap-version)
18 | (let ((bootstrap-file
19 | (expand-file-name
20 | "straight/repos/straight.el/bootstrap.el"
21 | (or (bound-and-true-p straight-base-dir)
22 | user-emacs-directory)))
23 | (bootstrap-version 7))
24 | (unless (file-exists-p bootstrap-file)
25 | (with-current-buffer
26 | (url-retrieve-synchronously
27 | "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
28 | 'silent 'inhibit-cookies)
29 | (goto-char (point-max))
30 | (eval-print-last-sexp)))
31 | (load bootstrap-file nil 'nomessage))
32 |
33 | (straight-use-package 'org)
34 |
35 | (defun rebuild-config ()
36 | "Rebuild and reload the Emacs.org config.
37 | This will **NOT** call init.el again
38 | it will simply compile and source Emacs.org"
39 | (interactive)
40 | (org-babel-load-file
41 | (expand-file-name
42 | "Emacs.org"
43 | user-emacs-directory)))
44 |
45 | (rebuild-config)
46 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/straight/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | repos/
3 | build-cache.el
4 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/straight/modified/cape:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/apps/dedicated/emacs-config/straight/modified/cape
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/straight/modified/yaml-pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/apps/dedicated/emacs-config/straight/modified/yaml-pro
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/straight/modified/yasnippet:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/apps/dedicated/emacs-config/straight/modified/yasnippet
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/emacs-config/straight/versions/default.el:
--------------------------------------------------------------------------------
1 | (("all-the-icons.el" . "ee414384938ccf2ce93c77d717b85dc5538a257d")
2 | ("anzu" . "26fb50b429ee968eb944b0615dd0aed1dd66172c")
3 | ("beacon" . "85261a928ae0ec3b41e639f05291ffd6bf7c231c")
4 | ("cape" . "361d0f2b0a9f840c207d809f54dad87e52bc9c1f")
5 | ("closql" . "27b6d2be1a06cdcb5d5fbd77a702b9fbc5082c03")
6 | ("compat" . "25da9d232399203a38722aa6638b7fe8ecab3f60")
7 | ("corfu" . "cdc3e13ad312f5f12b3f78f842fff0b398eb4473")
8 | ("dash.el" . "1de9dcb83eacfb162b6d9a118a4770b1281bcd84")
9 | ("diff-hl" . "11f3113e790526d5ee00f61f8e7cd0d01e323b2e")
10 | ("diminish.el" . "fbd5d846611bad828e336b25d2e131d1bc06b83d")
11 | ("doom-modeline" . "11ae6c193cd9cb8d7ff7996058e6df2c0d1e408b")
12 | ("dtrt-indent" . "5d1b44f9a1a484ca229cc14f8062609a10ef4891")
13 | ("el-get" . "f220df34333fdb363b84b28f4ed4a5575341bf45")
14 | ("elcord" . "e2775f40ec55dfdceea83d535dff77d60534b6bc")
15 | ("eldoc" . "c9f5787b0d2295ecca61067eedbc45039e46da5d")
16 | ("emacs" . "3d93abaa33e95f19b4a8b0e1e9bef1e3e68dd994")
17 | ("emacs-direnv" . "c0bf3b81c7a97e2a0d06d05495e86848254fcc1f")
18 | ("emacs-memoize" . "51b075935ca7070f62fae1d69fe0ff7d8fa56fdd")
19 | ("emacs-reformatter" . "0d29a04d69d47599e2cb7f1a8f8e897a2b592921")
20 | ("emacs-which-key" . "1e89fa000e9ba9549f15ef57abccd118d5f2fe1a")
21 | ("emacsmirror-mirror" . "55c75c9ec26d9167a7815f20056f6ce0170f88cf")
22 | ("emacsql" . "5108c16c5e1d5bfdd41fcc0807241e28886ab763")
23 | ("exec-path-from-shell" . "72ede29a0e0467b3b433e8edbee3c79bab005884")
24 | ("expand-region.el" . "e8f4e0fe9c9a80a6a26e2b438502aba9a799d580")
25 | ("f.el" . "1e7020dc0d4c52d3da9bd610d431cab13aa02d8c")
26 | ("flycheck" . "10430dee428f7bab176743097d996182fac29daa")
27 | ("forge" . "4727a5cc9a54223079ab6881772904e18585a342")
28 | ("ghub" . "1df5298c3c4d26ec3720dc6c31f8bfd07858f8a9")
29 | ("git-gutter" . "a41a601160818241d69414007e7679d6bf16fd8a")
30 | ("gnu-elpa-mirror" . "5338f22d8cee40109a2616007b40b558e53eb0ae")
31 | ("go-mode.el" . "6f4ff9ef874d151ed8d297a80f1bf27db5d9dbf0")
32 | ("goto-line-preview" . "12bd8de67c33bbeffbe77866b5ea7299786110cb")
33 | ("hl-todo" . "36b66cde5777943ca0f190ad7a33fae3b2f6a404")
34 | ("ht.el" . "1c49aad1c820c86f7ee35bf9fff8429502f60fef")
35 | ("hydra" . "317e1de33086637579a7aeb60f77ed0405bf359b")
36 | ("ido-completing-read-plus" . "5995b4605b4f2d568489491704ef21bc49ddecd5")
37 | ("let-alist" . "6e9f470e78cf50afa0e53a61da191d68d87a0104")
38 | ("ligature.el" . "6ac1634612dbd42f7eb81ecaf022bd239aabb954")
39 | ("lsp-mode" . "acad044ebc343c1eff0d9a875a13fb34ad113a9e")
40 | ("lsp-tailwindcss" . "3e3cc80a448e9dd24663eaa41742cda686dac5ab")
41 | ("magit" . "f9268a959828d0c6ab26171dd2fb1ffc55e5ae70")
42 | ("markdown-mode" . "0cdebc833ed9b98baf9f260ed12b1e36b0ca0e89")
43 | ("melpa" . "1b06cc08de41e82f3f148aa9e35663e2e06427ae")
44 | ("move-text" . "90ef0b078dbcb2dee47a15b0c6c6f417101e0c43")
45 | ("multiple-cursors.el" . "c870c18462461df19382ecd2f9374c8b902cd804")
46 | ("nerd-icons-completion" . "c2db8557a3c1a9588d111f8c8e91cae96ee85010")
47 | ("nerd-icons-corfu" . "7077bb76fefc15aed967476406a19dc5c2500b3c")
48 | ("nerd-icons-dired" . "c1c73488630cc1d19ce1677359f614122ae4c1b9")
49 | ("nerd-icons-ibuffer" . "16270e898abbba2bd810cbf97f999c6142863101")
50 | ("nerd-icons.el" . "4322290303f2e12efd5685a0d22d76ed76ec7349")
51 | ("nix-mode" . "719feb7868fb567ecfe5578f6119892c771ac5e5")
52 | ("no-littering" . "4a71c736ecf04f9b8e5bdd10a73ef1febb73a557")
53 | ("nongnu-elpa" . "69e5a9b389738b8f090b96b909a213293cf8e46c")
54 | ("org" . "c426f49364ac0effb89ef4da47e1450994c3ddba")
55 | ("org-superstar-mode" . "54c81c27dde2a6dc461bb064e79a8b2089093a2e")
56 | ("prescient.el" . "7dd5b53886146a507f1388e0b61990f9820f9eb1")
57 | ("projectile" . "0163b335a18af0f077a474d4dc6b36e22b5e3274")
58 | ("rainbow-delimiters" . "f40ece58df8b2f0fb6c8576b527755a552a5e763")
59 | ("rainbow-mode" . "0740f31f300982534183a2f60b1918de418a6f2c")
60 | ("rust-mode" . "d00d83d3a207a5b7c2994392b2781f627e3159ce")
61 | ("s.el" . "dda84d38fffdaf0c9b12837b504b402af910d01d")
62 | ("seq" . "d6b97ea450817ecef174d9c65d59b69bc5721a35")
63 | ("shrink-path.el" . "c14882c8599aec79a6e8ef2d06454254bb3e1e41")
64 | ("spinner" . "be1fcae967a3d3a00cb83ea764d8d329b45f8cd2")
65 | ("straight.el" . "b3760f5829dba37e855add7323304561eb57a3d4")
66 | ("svelte-mode" . "6a1d4274af7f4c0f271f77bd96678c3dd1fa68e1")
67 | ("tide" . "b38dfc3f8fb754e64e48e76fc92d472cb3d1a3dc")
68 | ("toc-org" . "6d3ae0fc47ce79b1ea06cabe21a3c596395409cd")
69 | ("transient" . "3ead3849420b82e08214a5a25e69dbe1becf5647")
70 | ("treepy.el" . "75fe3ec37e6f9b2bdfd6d0584efd984d0c00a43e")
71 | ("use-package" . "a6e856418d2ebd053b34e0ab2fda328abeba731c")
72 | ("wakatime-mode" . "1c5b2254dd72f2ff504d6a6189a8c10be03a98d1")
73 | ("with-editor" . "1b4526453ef6bdee30635f469aa26085c02b1ac1")
74 | ("yaml-mode" . "7b5ce294fb15c2c8926fa476d7218aa415550a2a")
75 | ("yaml-pro" . "5f06949e92dc19dcc48dc31662b2aa958fe33726")
76 | ("yaml.el" . "70c4fcead97e9bd6594e418c922ae769818f4245")
77 | ("yasnippet" . "eb5ba2664c3a68ae4a53bb38b85418dd131b208f")
78 | ("yasnippet-capf" . "744dedb7837d0c7e07817d36ec752a0cd813f55c")
79 | ("yasnippet-snippets" . "1bf034887c4048c38266842686b7f9c8384f72e7")
80 | ("zig-mode" . "f55e42536a3f34b81198b856595dc3a61867aa3e"))
81 | :gamma
82 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/init.lua:
--------------------------------------------------------------------------------
1 | -- For reference: https://github.com/nullishamy/derivation-station/blob/d691169ba04d9372290f1bdde5a3adbb27798c8f/users/amy/apps/dedicated/nvim-config/init.lua
2 |
3 | require('lib').modules {
4 | 'neovide',
5 |
6 | 'editor.settings',
7 | 'editor.direnv',
8 | 'editor.keys',
9 | 'editor.project',
10 | 'editor.autocmd',
11 |
12 | 'navigation.scroll',
13 | 'navigation.pairs',
14 |
15 | 'visual.statusline',
16 | 'visual.central',
17 | 'visual.theme',
18 |
19 | 'treesitter',
20 |
21 | 'interface.tree',
22 | 'interface.snippets',
23 | 'interface.cmp',
24 | 'interface.telescope',
25 |
26 | 'text.icons',
27 | 'text.todo',
28 | 'text.surround',
29 | 'text.comment',
30 | 'text.indent',
31 | 'text.cutlass',
32 | 'text.autosave',
33 |
34 | 'background',
35 | 'lazy',
36 | }
37 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lazy-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
3 | "LuaSnip": { "branch": "master", "commit": "2737edc9e674e537dc0a97e3405658d57d2d31ed" },
4 | "autosave.nvim": { "branch": "master", "commit": "406a09c1ce679bc6fbde47d6ec61c753632b55f0" },
5 | "bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" },
6 | "caskey.nvim": { "branch": "main", "commit": "86fa340f3deb8d67fe596611e717a2859c322964" },
7 | "catppuccin": { "branch": "main", "commit": "35d8057137af463c9f41f169539e9b190d57d269" },
8 | "centerscroll.nvim": { "branch": "main", "commit": "705a3f0976d8d62c97210829c2234431b58aa80d" },
9 | "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
10 | "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
11 | "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
12 | "cutlass.nvim": { "branch": "main", "commit": "1ac7e4b53d79410be52a9e464d44c60556282b3e" },
13 | "direnv.nvim": { "branch": "main", "commit": "eec36a38285457c4e5dea2c6856329a9a20bd3a4" },
14 | "indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" },
15 | "lazy.nvim": { "branch": "main", "commit": "b1134ab82ee4279e31f7ddf7e34b2a99eb9b7bc9" },
16 | "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
17 | "mini.nvim": { "branch": "main", "commit": "b612a069d1fe99300da43629e0e9c7a1a9b0acda" },
18 | "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
19 | "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
20 | "neovim-project": { "branch": "main", "commit": "2daa3f02a91d36efba692cf032b1f3cc2c66e2c2" },
21 | "neovim-session-manager": { "branch": "master", "commit": "a0b9d25154be573bc0f99877afb3f57cf881cce7" },
22 | "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
23 | "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
24 | "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
25 | "nvim-treesitter": { "branch": "master", "commit": "0603b3e3d21ebe2fa82dc5361a3d500e0d3ad3a8" },
26 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" },
27 | "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
28 | "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" },
29 | "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
30 | "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
31 | "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
32 | "smart-open.nvim": { "branch": "main", "commit": "7770b01ce4d551c143d7ec8589879320796621b9" },
33 | "sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" },
34 | "telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" },
35 | "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
36 | "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
37 | "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
38 | "vim-snippets": { "branch": "master", "commit": "f0a3184d9f90b96b044d5914625a25c554d7f301" },
39 | "vim-wakatime": { "branch": "master", "commit": "f699e30ca1ba0c7f316847316fd0ba19d3ee51c1" },
40 | "vim-wordmotion": { "branch": "master", "commit": "81d9bd298376ab0dc465c85d55afa4cb8d5f47a1" },
41 | "winshift.nvim": { "branch": "main", "commit": "37468ed6f385dfb50402368669766504c0e15583" }
42 | }
43 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/background.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | -- Plugins that run in the background (no config needed)
5 | -- or are implemented with vimscript and use vim commands bound to keys
6 | { 'chaoren/vim-wordmotion' },
7 | { 'famiu/bufdelete.nvim' },
8 | { 'wakatime/vim-wakatime' },
9 | { 'sindrets/winshift.nvim' },
10 | { 'tpope/vim-sleuth' },
11 | { 'tpope/vim-repeat' },
12 | },
13 | }
14 |
15 | return module
16 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/editor/autocmd.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | hooks = {
4 | init = function()
5 | -- Line numbers should be relative in normal mode
6 | -- but absolute in insert mode.
7 | vim.cmd([[
8 | :augroup NumberToggle
9 | : autocmd!
10 | : autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu && mode() != "i" | set rnu | endif
11 | : autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
12 | :augroup END
13 | ]])
14 |
15 | -- Don't auto comment new lines
16 | vim.cmd([[
17 | autocmd BufEnter * set fo-=c fo-=r fo-=o
18 | ]])
19 |
20 | -- Disable annoying autoindent rules
21 | vim.cmd([[
22 | autocmd BufEnter,WinEnter,FocusGained * set inde=
23 | ]])
24 |
25 | -- Disable highlight searching for every buffer
26 | vim.cmd([[
27 | autocmd BufEnter,WinEnter,FocusGained * set nohlsearch
28 | ]])
29 | end,
30 | },
31 | }
32 |
33 | return module
34 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/editor/direnv.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'actionshrimp/direnv.nvim',
6 | config = function()
7 | require('direnv-nvim').setup {
8 | type = 'dir',
9 | }
10 | end,
11 | },
12 | },
13 | }
14 |
15 | return module
16 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/editor/keys.lua:
--------------------------------------------------------------------------------
1 | local function abbrev(from, to, opts)
2 | -- This API is only available from nvim 0.7 and up.
3 | -- Setting abbreviations without it is tedious so we wont bother
4 | if not vim.api.nvim_create_user_command then
5 | return vim.api.notify_once('Abbreviations are only available in nvim 0.7 and newer, please update.')
6 | end
7 |
8 | local options = { nargs = 0 }
9 | if opts then
10 | options = vim.tbl_extend('force', options, opts)
11 | end
12 |
13 | vim.api.nvim_create_user_command(from, to, options)
14 | end
15 |
16 | ---@type ConfigModule
17 | local module = {
18 | pkgs = {
19 | {
20 | 'Nexmean/caskey.nvim',
21 | config = function()
22 | local ck = require('caskey')
23 |
24 | --Remap space as leader key
25 | vim.g.mapleader = ' '
26 | vim.g.maplocalleader = ' '
27 |
28 | ck.setup {
29 | mode = { 'n', 'v' },
30 |
31 | -- Noop q: as it's an annoying typo and the feature isnt used
32 | ['q:'] = { act = '' },
33 | [''] = { act = '' },
34 |
35 | -- Telescope & tree
36 | ['f'] = {
37 | ['f'] = { act = ck.cmd('Telescope smart_open path_display={"truncate"}') },
38 | ['o'] = { act = ck.cmd('Telescope buffers path_display={"truncate"}') },
39 | ['h'] = { act = ck.cmd('Telescope help_tags path_display={"truncate"}') },
40 | ['g'] = { act = ck.cmd('Telescope live_grep path_display={"truncate"}') },
41 | ['r'] = { act = ck.cmd('Telescope resume') },
42 |
43 | -- Cheatsheet
44 | ['c'] = { act = ck.cmd('Cheatsheet') },
45 | },
46 |
47 | -- Quick exit from insert mode
48 | ['jk'] = {
49 | act = '',
50 | mode = 'i',
51 | },
52 |
53 | ['J'] = {
54 | act = '10j',
55 | mode = { 'n', 'v', 'o' },
56 | },
57 |
58 | ['K'] = {
59 | act = '10k',
60 | mode = { 'n', 'v', 'o' },
61 | },
62 |
63 | ['p'] = {
64 | mode = { 'n' },
65 | ['p'] = { act = ck.cmd('Telescope neovim-project discover') },
66 | },
67 |
68 | -- Disable arrow keys to force hjkl usage
69 | [''] = { act = '' },
70 | [''] = { act = '' },
71 | [''] = { act = '' },
72 | [''] = { act = '' },
73 |
74 | -- Buffer controls
75 | ['q'] = { act = ck.cmd('Bdelete') },
76 |
77 | -- Window controls
78 | ['h'] = { act = ck.cmd('wincmd h') },
79 | ['j'] = { act = ck.cmd('wincmd j') },
80 | ['k'] = { act = ck.cmd('wincmd k') },
81 | ['l'] = { act = ck.cmd('wincmd l') },
82 | ['m'] = { act = ck.cmd('WinShift') },
83 |
84 | -- Jump to start / end
85 | ['H'] = {
86 | mode = { 'n', 'v', 'x', 'o' },
87 | act = '^',
88 | },
89 | ['L'] = {
90 | mode = { 'n', 'v', 'x', 'o' },
91 | act = 'g_',
92 | }, -- g_ jumps to the last non blank character, avoiding newline,
93 |
94 | -- Hard close vim with ctrl q + q
95 | ['q'] = { act = ck.cmd('qa!') },
96 |
97 | -- Moving lines
98 | -- Moving up requires two lines for some reason
99 | [''] = { act = ck.cmd('m +1') },
100 | [''] = { act = ck.cmd('m -2') },
101 |
102 | -- Tree
103 | ['g'] = { act = ck.cmd('Neotree focus reveal') },
104 |
105 | -- Debugprint
106 | ['u'] = {
107 | ['u'] = {
108 | act = function()
109 | return require('debugprint').debugprint()
110 | end,
111 | },
112 | ['q'] = {
113 | act = function()
114 | return require('debugprint').debugprint { variable = true }
115 | end,
116 | },
117 | ['Q'] = {
118 | act = function()
119 | return require('debugprint').debugprint { above = true, variable = true }
120 | end,
121 | },
122 | ['o'] = {
123 | act = function()
124 | return require('debugprint').debugprint { motion = true }
125 | end,
126 | },
127 | ['O'] = {
128 | act = function()
129 | return require('debugprint').debugprint { above = true, motion = true }
130 | end,
131 | },
132 | },
133 | ['U'] = {
134 | act = function()
135 | return require('debugprint').debugprint { above = true }
136 | end,
137 | },
138 | }
139 |
140 | -- Abbreviations
141 | abbrev('Doc', function()
142 | require('neogen').generate()
143 | end)
144 |
145 | abbrev('DeleteDebugPrints', function()
146 | require('debugprint').deleteprints()
147 | end)
148 |
149 | abbrev('RPDisable', function()
150 | require('presence'):cancel()
151 | end)
152 |
153 | abbrev('Bclear', function()
154 | vim.cmd([[ %bd ]])
155 | end)
156 | end,
157 | },
158 | },
159 | }
160 |
161 | return module
162 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/editor/project.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'coffebar/neovim-project',
6 | -- NOTE: Pinned to support neovim-session-manager pre 0.10 (see below)
7 | commit = '2daa3f02a91d36efba692cf032b1f3cc2c66e2c2',
8 | config = function()
9 | --require('session_manager').setup({})
10 | require('neovim-project').setup {
11 | projects = {
12 | '~/code/kube.config',
13 | '~/code/public/small/*',
14 | '~/code/public/medium/*',
15 | '~/code/public/large/*',
16 | '~/code/public/oss/*',
17 | '~/nixos',
18 | },
19 | picker = {
20 | type = 'telescope',
21 | },
22 | }
23 | end,
24 | dependencies = {
25 | -- NOTE: Pinned to pre 0.10 requirement
26 | { 'Shatur/neovim-session-manager', commit = 'a0b9d25154be573bc0f99877afb3f57cf881cce7' },
27 | },
28 | },
29 | },
30 | }
31 |
32 | return module
33 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/editor/settings.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | hooks = {
4 | init = function()
5 | -- stylua: ignore start
6 | local g = vim.g -- Global variables
7 | local o = vim.opt -- Set options (global/buffer/windows-scoped) (operates like :set)
8 | local w = vim.wo -- Per-window options
9 |
10 | -- General
11 | o.completeopt = 'menu,noinsert,noselect,preview' -- List of options for Insert mode completion
12 | g.noshowmode = true -- If in Insert, Replace or Visual mode put a message on the last line.
13 | o.showtabline = 0 -- Never show tabline
14 | o.updatetime = 100 -- Write to swap if left idle for n milliseconds
15 | o.mouse = 'a' -- Enable mouse support for visual select, scrolling
16 |
17 | o.ignorecase = true
18 | o.smartcase = true -- Searching is case insensitive when all lowercase, case sensitive otherwise
19 |
20 | -- Window
21 | w.number = true -- Display numbers along the side
22 | g.wrap = true -- Enable line wrapping
23 | o.scrolloff = 12 -- Keep 12 lines of context on either side of the cursor
24 | o.cindent = true
25 |
26 |
27 | -- Tab character setup
28 | -- Tabs are inferred by the reading each file
29 | -- though these act as sane defaults
30 | o.shiftwidth = 4 -- Number of spaces to use for each step of indent. Used for 'cindent', >>, <<, etc.
31 | o.expandtab = true -- In Insert mode: Use the appropriate number of spaces to insert a .
32 | o.tabstop = 4 -- Number of spaces that a in the file counts for.
33 |
34 |
35 | -- Memory & CPU
36 | o.hidden = true -- Enable background buffers
37 | o.history = 100 -- Remember N lines in history
38 | o.lazyredraw = true -- Faster scrolling
39 | o.synmaxcol = 240 -- Max column for syntax highlight
40 | o.updatetime = 700 -- ms to wait for trigger an event
41 |
42 |
43 | -- Shortmess[age] configures what (short) messages appear under certain conditions
44 | -- f => use "(3 of 5)" instead of "(file 3 of 5)"
45 | -- x => use "[dos]" instead of "[dos format]", "[unix]" instead of
46 | -- "[unix format]" and "[mac]" instead of "[mac format]".
47 | -- t => truncate file message at the start if it is too long to fit on the command-line,
48 | -- T => truncate other messages in the middle if they are too long to fit on the command line.
49 | -- o => overwrite message for writing a file with subsequent message for reading a file
50 | -- O => message for reading a file overwrites any previous message.
51 | -- I => disable the intro (:intro)
52 | -- F => don't give the file info when editing a file, like `:silent` was used for the command
53 | o.shortmess = 'fxtToOIF'
54 | -- stylua: ignore end
55 |
56 | -- Disable builtins plugins
57 | local disabled_built_ins = {
58 | 'netrw',
59 | 'netrwPlugin',
60 | 'netrwSettings',
61 | 'netrwFileHandlers',
62 | 'gzip',
63 | 'zip',
64 | 'zipPlugin',
65 | 'tar',
66 | 'tarPlugin',
67 | 'getscript',
68 | 'getscriptPlugin',
69 | 'vimball',
70 | 'vimballPlugin',
71 | '2html_plugin',
72 | 'logipat',
73 | 'rrhelper',
74 | 'spellfile_plugin',
75 | 'matchit',
76 | }
77 |
78 | for _, plugin in pairs(disabled_built_ins) do
79 | g['loaded_' .. plugin] = true
80 | end
81 | end,
82 | },
83 | }
84 |
85 | return module
86 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/interface/cmp.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'hrsh7th/nvim-cmp',
6 | config = function()
7 | local cmp = require('cmp')
8 |
9 | local icons = {
10 | Text = '',
11 | Method = '',
12 | Function = '',
13 | Constructor = '',
14 | Field = 'ﰠ',
15 | Variable = '',
16 | Class = '',
17 | Interface = '',
18 | Module = '',
19 | Property = '',
20 | Unit = '',
21 | Value = '',
22 | Enum = '',
23 | Keyword = '',
24 | Snippet = '',
25 | Color = '',
26 | File = '',
27 | Reference = '',
28 | Folder = '',
29 | EnumMember = '',
30 | Constant = '',
31 | Struct = 'פּ',
32 | Event = '',
33 | Operator = '',
34 | TypeParameter = '',
35 | }
36 |
37 | local luasnip = require('luasnip')
38 |
39 | local options = {
40 | snippet = {
41 | expand = function(args)
42 | require('luasnip').lsp_expand(args.body)
43 | end,
44 | },
45 | formatting = {
46 | format = function(_, vim_item)
47 | vim_item.kind = string.format('%s %s', icons[vim_item.kind], vim_item.kind)
48 |
49 | return vim_item
50 | end,
51 | },
52 | mapping = {
53 | [''] = cmp.mapping(function(fallback)
54 | if cmp.visible() then
55 | cmp.select_next_item()
56 | elseif luasnip.jumpable(1) then
57 | luasnip.jump(1)
58 | else
59 | fallback()
60 | end
61 | end, { 'i', 's' }),
62 |
63 | [''] = cmp.mapping(function(fallback)
64 | if cmp.visible() then
65 | cmp.select_prev_item()
66 | elseif luasnip.jumpable(-1) then
67 | luasnip.jump(-1)
68 | else
69 | fallback()
70 | end
71 | end, { 'i', 's' }),
72 | [''] = cmp.mapping.close(),
73 | [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
74 | [''] = cmp.mapping.confirm {
75 | behavior = cmp.ConfirmBehavior.Insert,
76 | select = true,
77 | },
78 | },
79 | sources = {
80 | { name = 'luasnip' },
81 | { name = 'buffer' },
82 | { name = 'nvim_lua' },
83 | { name = 'path' },
84 | { name = 'emoji' },
85 | { name = 'spell' },
86 | { name = 'latex_symbols' },
87 | },
88 | }
89 |
90 | cmp.setup(options)
91 | end,
92 | dependencies = {
93 | { 'hrsh7th/cmp-buffer' },
94 | { 'hrsh7th/cmp-path' },
95 | { 'saadparwaiz1/cmp_luasnip' },
96 | { 'L3MON4D3/LuaSnip' },
97 | },
98 | },
99 | },
100 | }
101 |
102 | return module
103 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/interface/snippets.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'L3MON4D3/LuaSnip',
6 | config = function()
7 | -- Load snipmate snippets
8 | require('luasnip.loaders.from_snipmate').lazy_load()
9 | end,
10 | dependencies = {
11 | {
12 | 'honza/vim-snippets',
13 | },
14 | },
15 | },
16 | },
17 | }
18 |
19 | return module
20 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/interface/telescope.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'nvim-telescope/telescope.nvim',
6 | config = function()
7 | require('telescope').setup {
8 | defaults = {
9 | mappings = {
10 | i = {
11 | [''] = false,
12 | [''] = false,
13 | },
14 | },
15 | },
16 | extensions = {
17 | ignore_patterns = {
18 | '*.git/*',
19 | '*/tmp/*',
20 | '*/node_modules/',
21 | },
22 | },
23 | }
24 |
25 | vim.g.sqlite_clib_path = vim.env.SQLITE_LIB_PATH
26 | require('telescope').load_extension('smart_open')
27 | end,
28 | dependencies = {
29 | {
30 | 'kkharji/sqlite.lua',
31 | },
32 | {
33 | 'danielfalk/smart-open.nvim',
34 | },
35 | },
36 | },
37 | },
38 | }
39 |
40 | return module
41 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/lazy.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | hooks = {
4 | pre_init = function()
5 | local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
6 | if not vim.loop.fs_stat(lazypath) then
7 | vim.fn.system {
8 | 'git',
9 | 'clone',
10 | '--filter=blob:none',
11 | 'https://github.com/folke/lazy.nvim.git',
12 | '--branch=stable', -- latest stable release
13 | lazypath,
14 | }
15 | end
16 | vim.opt.rtp:prepend(lazypath)
17 | end,
18 | init = function(state)
19 | require('lazy').setup(state.pkgs, {
20 | -- Configuration
21 | -- Change lockfile location, default is in ~/.config/, not the git repo that the config is stored in (~/nixos)
22 | -- Env controlled from the wrapper (../../../../packages/nvim/)
23 | lockfile = vim.env.NVIM_CONFIG_ROOT .. '/lazy-lock.json',
24 | change_detection = {
25 | -- When using an out of store symlink, lazy will be able to detect changes for us
26 | -- and auto reinstall
27 | enabled = true,
28 | },
29 | install = {
30 | colorscheme = { 'catppuccin' },
31 | },
32 | defaults = {
33 | lazy = false,
34 | },
35 | })
36 | end,
37 | },
38 | }
39 |
40 | return module
41 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/navigation/pairs.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'echasnovski/mini.pairs',
6 | config = function()
7 | require('mini.pairs').setup {}
8 | end,
9 | },
10 | },
11 | }
12 |
13 | return module
14 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/navigation/scroll.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | enable = false,
4 | pkgs = {
5 | {
6 | 'karb94/neoscroll.nvim',
7 | config = function()
8 | require('neoscroll').setup {}
9 |
10 | local t = {}
11 | -- Syntax: t[keys] = {function, {function arguments}}
12 | t[''] = { 'scroll', { '-vim.wo.scroll', 'true', '150' } }
13 | t[''] = { 'scroll', { 'vim.wo.scroll', 'true', '150' } }
14 | t['K'] = { 'scroll', { '-10', 'true', '50' } }
15 | t['J'] = { 'scroll', { '10', 'true', '50' } }
16 |
17 | require('neoscroll.config').set_mappings(t)
18 | end,
19 | },
20 | },
21 | }
22 |
23 | return module
24 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/neovide.lua:
--------------------------------------------------------------------------------
1 | local fonts = {
2 | ['iosevka_term'] = 'Iosevka Term Light',
3 | ['recursive'] = 'Recursive Mono Linear Static:h14',
4 | ['fantasque'] = 'Fantasque Sans Mono:h15',
5 | }
6 |
7 | ---@type ConfigModule
8 | local module = {
9 | hooks = {
10 | init = function(state)
11 | if vim.g.neovide then
12 | vim.o.guifont = fonts.fantasque
13 | vim.g.neovide_scroll_animation_length = 0.1
14 | vim.g.neovide_cursor_animation_length = 0
15 | end
16 | end,
17 | },
18 | }
19 |
20 | return module
21 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/text/autosave.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'nullishamy/autosave.nvim',
6 | config = function()
7 | require('autosave').setup {}
8 | end,
9 | },
10 | },
11 | }
12 |
13 | return module
14 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/text/comment.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'numToStr/Comment.nvim',
6 | config = function()
7 | require('Comment').setup {}
8 | end,
9 | },
10 | },
11 | }
12 |
13 | return module
14 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/text/cutlass.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'gbprod/cutlass.nvim',
6 | config = function()
7 | require('cutlass').setup {
8 | cut_key = 'x',
9 | }
10 | end,
11 | },
12 | },
13 | }
14 |
15 | return module
16 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/text/icons.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'kyazdani42/nvim-web-devicons',
6 | config = function()
7 | require('nvim-web-devicons').setup {
8 | default = true,
9 | }
10 | end,
11 | },
12 | },
13 | }
14 |
15 | return module
16 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/text/indent.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'lukas-reineke/indent-blankline.nvim',
6 | config = function()
7 | require('ibl').setup {
8 | scope = {
9 | enabled = false,
10 | },
11 | }
12 | end,
13 | },
14 | },
15 | }
16 |
17 | return module
18 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/text/surround.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'echasnovski/mini.nvim',
6 | config = function()
7 | require('mini.surround').setup {}
8 | end,
9 | },
10 | },
11 | }
12 |
13 | return module
14 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/text/todo.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'folke/todo-comments.nvim',
6 | config = function()
7 | require('todo-comments').setup {
8 | signs = false,
9 | highlight = {
10 | before = '', -- "fg" or "bg" or empty
11 | keyword = 'bg', -- "fg", "bg", "wide" or empty. (wide is the same as bg, but will also highlight surrounding characters)
12 | after = 'fg', -- "fg" or "bg" or empty
13 | pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlightng (vim regex)
14 | comments_only = true, -- uses treesitter to match keywords in comments only
15 | max_line_len = 400, -- ignore lines longer than this
16 | exclude = {}, -- list of file types to exclude highlighting
17 | },
18 | }
19 | end,
20 | },
21 | },
22 | }
23 |
24 | return module
25 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/treesitter/ensure_installed.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'c_sharp',
3 | 'go',
4 | 'html',
5 | 'javascript',
6 | 'typescript',
7 | 'tsx',
8 | 'java',
9 | 'json',
10 | 'kotlin',
11 | 'lua',
12 | 'prisma',
13 | 'python',
14 | 'rust',
15 | 'markdown',
16 | 'nix',
17 | }
18 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/treesitter/incremental_selection.lua:
--------------------------------------------------------------------------------
1 | return {
2 | enable = true,
3 | keymaps = {
4 | node_incremental = 'm',
5 | node_decremental = 'M',
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/treesitter/init.lua:
--------------------------------------------------------------------------------
1 | local module = {
2 | pkgs = {
3 | {
4 | 'nvim-treesitter/nvim-treesitter',
5 | config = function()
6 | require('nvim-treesitter.configs').setup {
7 | highlight = {
8 | enable = true,
9 | },
10 | indent = {
11 | enable = true,
12 | },
13 | autotag = {
14 | enable = true,
15 | },
16 | ensure_installed = require('config.treesitter.ensure_installed'),
17 | rainbow = require('config.treesitter.rainbow_brackets'),
18 | textobjects = require('config.treesitter.textobjects'),
19 | incremental_selection = require('config.treesitter.incremental_selection'),
20 | plaground = require('config.treesitter.playground'),
21 | }
22 | end,
23 | build = ':TSUpdate',
24 | dependencies = {
25 | { 'nvim-treesitter/nvim-treesitter-textobjects' },
26 | { 'p00f/nvim-ts-rainbow' },
27 | { 'windwp/nvim-ts-autotag' },
28 | { 'windwp/nvim-autopairs' },
29 | { 'nvim-treesitter/playground' },
30 | },
31 | },
32 | },
33 | }
34 |
35 | return module
36 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/treesitter/playground.lua:
--------------------------------------------------------------------------------
1 | return {
2 | enable = true,
3 | disable = {},
4 | updatetime = 25,
5 | persist_queries = false,
6 | keybindings = {
7 | toggle_query_editor = 'o',
8 | toggle_hl_groups = 'i',
9 | toggle_injected_languages = 't',
10 | toggle_anonymous_nodes = 'a',
11 | toggle_language_display = 'I',
12 | focus_language = 'f',
13 | unfocus_language = 'F',
14 | update = 'R',
15 | goto_node = '',
16 | show_help = '?',
17 | },
18 | }
19 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/treesitter/rainbow_brackets.lua:
--------------------------------------------------------------------------------
1 | return {
2 | enable = true,
3 | -- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
4 | extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
5 | max_file_lines = 2500, -- Do not enable for files with more than n lines, int
6 | -- colors = {}, -- table of hex strings
7 | -- termcolors = {} -- table of colour name strings
8 | }
9 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/treesitter/textobjects.lua:
--------------------------------------------------------------------------------
1 | return {
2 | select = {
3 | enable = true,
4 | lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
5 | keymaps = {
6 | -- You can use the capture groups defined in textobjects.scm
7 | ['af'] = '@function.outer',
8 | ['if'] = '@function.inner',
9 | ['ac'] = '@class.outer',
10 | ['ic'] = '@class.inner',
11 | ['ap'] = '@parameter.outer',
12 | ['ip'] = '@parameter.inner',
13 | ['ab'] = '@block.outer',
14 | ['ib'] = '@block.inner',
15 | },
16 | },
17 | move = {
18 | enable = true,
19 | set_jumps = true, -- whether to set jumps in the jumplist
20 | goto_next_start = {
21 | [']m'] = '@function.outer',
22 | [']]'] = '@class.outer',
23 | },
24 | goto_next_end = {
25 | [']M'] = '@function.outer',
26 | [']['] = '@class.outer',
27 | },
28 | goto_previous_start = {
29 | ['[m'] = '@function.outer',
30 | ['[['] = '@class.outer',
31 | },
32 | goto_previous_end = {
33 | ['[M'] = '@function.outer',
34 | ['[]'] = '@class.outer',
35 | },
36 | },
37 | }
38 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/visual/central.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'MagnetizedFreckles/centerscroll.nvim',
6 | config = function()
7 | require('centerscroll').setup {}
8 | end,
9 | },
10 | },
11 | }
12 |
13 | return module
14 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/visual/statusline-theme.lua:
--------------------------------------------------------------------------------
1 | local cp = require('catppuccin.palettes').get_palette()
2 | local catppuccin = {}
3 |
4 | catppuccin.normal = {
5 | a = { bg = cp.blue, fg = cp.mantle, gui = 'bold' },
6 | b = { bg = cp.surface1, fg = cp.blue },
7 | c = { bg = 'NONE', fg = cp.text },
8 | }
9 |
10 | catppuccin.insert = {
11 | a = { bg = cp.green, fg = cp.base, gui = 'bold' },
12 | b = { bg = cp.surface1, fg = cp.teal },
13 | }
14 |
15 | catppuccin.command = {
16 | a = { bg = cp.peach, fg = cp.base, gui = 'bold' },
17 | b = { bg = cp.surface1, fg = cp.peach },
18 | }
19 |
20 | catppuccin.visual = {
21 | a = { bg = cp.mauve, fg = cp.base, gui = 'bold' },
22 | b = { bg = cp.surface1, fg = cp.mauve },
23 | }
24 |
25 | catppuccin.replace = {
26 | a = { bg = cp.red, fg = cp.base, gui = 'bold' },
27 | b = { bg = cp.surface1, fg = cp.red },
28 | }
29 |
30 | catppuccin.inactive = {
31 | a = { bg = cp.mantle, fg = cp.blue },
32 | b = { bg = cp.mantle, fg = cp.surface1, gui = 'bold' },
33 | c = { bg = cp.mantle, fg = cp.overlay0 },
34 | }
35 |
36 | return catppuccin
37 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/visual/statusline.lua:
--------------------------------------------------------------------------------
1 | local time = function()
2 | return os.date('%a %d %b %Y @ %H:%M')
3 | end
4 |
5 | local function theme()
6 | return require('config.visual.statusline-theme')
7 | end
8 |
9 | local conditions = {
10 | buffer_not_empty = function()
11 | return vim.fn.empty(vim.fn.expand('%:t')) ~= 1
12 | end,
13 | ft_not_empty = function()
14 | return vim.fn.empty(vim.bo.filetype) ~= 1
15 | end,
16 | hide_in_width = function()
17 | return vim.fn.winwidth(0) > 80
18 | end,
19 | check_git_workspace = function()
20 | local filepath = vim.fn.expand('%:p:h')
21 | local gitdir = vim.fn.finddir('.git', filepath .. ';')
22 | return gitdir and #gitdir > 0 and #gitdir < #filepath
23 | end,
24 | }
25 |
26 | ---@type ConfigModule
27 | local module = {
28 | pkgs = {
29 | {
30 | 'nvim-lualine/lualine.nvim',
31 | config = function()
32 | local colors = {
33 | fg = '#93a4c3',
34 |
35 | black = '#0c0e15',
36 | purple = '#c75ae8',
37 | green = '#8bcd5b',
38 | orange = '#dd9046',
39 | blue = '#41a7fc',
40 | yellow = '#efbd5d',
41 | cyan = '#34bfd0',
42 | red = '#f65866',
43 | }
44 |
45 | local set_statusline_refresh = function()
46 | local timer = nil
47 |
48 | local redraw = function()
49 | vim.api.nvim_command('redrawtabline')
50 | end
51 |
52 | if timer == nil then
53 | timer = vim.loop.new_timer()
54 | else
55 | timer:stop()
56 | end
57 | -- never timeout, repeat every 5000ms
58 | timer:start(0, 5000, vim.schedule_wrap(redraw))
59 | end
60 |
61 | local config = {
62 | options = {
63 | theme = theme(),
64 | globalstatus = true,
65 | disabled_filetypes = { 'nvimtree' },
66 | },
67 | sections = {
68 | -- these are to remove the defaults
69 | lualine_a = { 'mode' },
70 | lualine_b = {},
71 | lualine_y = {},
72 | lualine_z = {},
73 | -- these will be filled later
74 | lualine_c = {},
75 | lualine_x = {},
76 | },
77 | inactive_sections = {
78 | -- these are to remove the defaults
79 | lualine_a = {},
80 | lualine_b = {},
81 | lualine_y = {},
82 | lualine_z = {},
83 | lualine_c = {},
84 | lualine_x = {},
85 | },
86 | }
87 |
88 | -- Inserts a component in lualine_c at left section
89 | local function left(component)
90 | table.insert(config.sections.lualine_c, component)
91 | end
92 |
93 | -- Inserts a component in lualine_x ot right section
94 | local function right(component)
95 | table.insert(config.sections.lualine_x, component)
96 | end
97 |
98 | -- Left hand side
99 | left {
100 | 'filename',
101 | fmt = function(inp)
102 | -- Fallback for empty buffers
103 | return inp or '[No name]'
104 | end,
105 | color = { fg = colors.green, gui = 'bold' },
106 | }
107 |
108 | left {
109 | 'filetype',
110 | icons_enabled = false,
111 | cond = conditions.ft_not_empty,
112 | color = { fg = colors.blue, gui = 'bold' },
113 | }
114 |
115 | local LSP_BLACKLIST = {
116 | 'null-ls',
117 | }
118 |
119 | left {
120 | -- Lsp server name .
121 | function()
122 | local msg = 'None'
123 | local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
124 | local clients = vim.lsp.get_active_clients()
125 | if next(clients) == nil then
126 | return msg
127 | end
128 | for _, client in ipairs(clients) do
129 | local filetypes = client.config.filetypes
130 | -- LSP must have filetypes, the current ft must be supported, and it must not be in the blacklist
131 | if
132 | filetypes
133 | and vim.fn.index(filetypes, buf_ft) ~= -1
134 | and vim.fn.index(LSP_BLACKLIST, client.name) == -1
135 | then
136 | return client.name
137 | end
138 | end
139 | return msg
140 | end,
141 | cond = conditions.buffer_not_empty,
142 | color = { fg = colors.blue, gui = 'bold' },
143 | }
144 |
145 | left {
146 | 'location',
147 | fmt = function(inp)
148 | -- Strip spaces to make it look nicer
149 | return string.gsub(inp, ' ', '')
150 | end,
151 | color = { fg = colors.orange, gui = 'bold' },
152 | }
153 |
154 | left {
155 | 'progress',
156 | color = { fg = colors.orange, gui = 'bold' },
157 | }
158 |
159 | -- Right hand side
160 | right {
161 | 'branch',
162 | icon = '',
163 | color = { fg = colors.purple, gui = 'bold' },
164 | }
165 |
166 | right {
167 | 'diff',
168 | symbols = { added = ' ', modified = '柳', removed = ' ' },
169 | diff_color = {
170 | added = { fg = colors.green },
171 | modified = { fg = colors.orange },
172 | removed = { fg = colors.red },
173 | },
174 | cond = conditions.hide_in_width,
175 | }
176 |
177 | right {
178 | require('lazy.status').updates,
179 | cond = require('lazy.status').has_updates,
180 | color = { fg = colors.green },
181 | }
182 |
183 | right {
184 | time,
185 | color = { fg = colors.fg, gui = 'bold' },
186 | }
187 |
188 | require('lualine').setup(config)
189 |
190 | set_statusline_refresh()
191 | end,
192 | },
193 | },
194 | }
195 |
196 | return module
197 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/config/visual/theme.lua:
--------------------------------------------------------------------------------
1 | ---@type ConfigModule
2 | local module = {
3 | pkgs = {
4 | {
5 | 'catppuccin/nvim',
6 | name = 'catppuccin',
7 | config = function()
8 | vim.o.termguicolors = true
9 | vim.o.background = 'dark'
10 |
11 | local colors = require('catppuccin.palettes').get_palette('mocha')
12 | colors.none = 'NONE'
13 |
14 | local active_background = colors.base
15 | local inactive_background = colors.base
16 |
17 | require('catppuccin').setup {
18 | term_colours = true,
19 | flavour = 'mocha',
20 | no_italic = true,
21 | integrations = {
22 | treesitter = true,
23 | treesitter_context = true,
24 | neotree = false,
25 | ts_rainbow = true,
26 | telescope = true,
27 | gitsigns = true,
28 | cmp = true,
29 | leap = true,
30 | },
31 | custom_highlights = {
32 | -- Fix float text background
33 | CmpPmenu = { fg = colors.none, bg = colors.none },
34 | NormalFloat = { fg = colors.none, bg = colors.none },
35 |
36 | -- Make builtins the same colour as regular values, for consistency
37 | ['@function.builtin'] = { fg = colors.blue },
38 | ['@const.builtin'] = { fg = colors.blue },
39 | ['@const'] = { fg = colors.blue },
40 | ['@keyword.export'] = { link = '@keyword' },
41 |
42 | NeoTreeDirectoryName = { fg = colors.blue },
43 | NeoTreeDirectoryIcon = { fg = colors.blue },
44 | NeoTreeNormal = { fg = colors.text, bg = active_bg },
45 | NeoTreeNormalNcolors = { fg = colors.text, bg = active_bg },
46 | NeoTreeExpander = { fg = colors.overlay0 },
47 | NeoTreeIndentMarker = { fg = colors.overlay0 },
48 | NeoTreeRootName = { fg = colors.blue, style = { 'bold' } },
49 | NeoTreeSymbolicLinkTarget = { fg = colors.pink },
50 | NeoTreeModified = { fg = colors.peach },
51 |
52 | NeoTreeGitAdded = { fg = colors.green },
53 | NeoTreeGitcolorsonflict = { fg = colors.red },
54 | NeoTreeGitDeleted = { fg = colors.red },
55 | NeoTreeGitIgnored = { fg = colors.overlay0 },
56 | NeoTreeGitModified = { fg = colors.yellow },
57 | NeoTreeGitUnstaged = { fg = colors.red },
58 | NeoTreeGitUntracked = { fg = colors.mauve },
59 | NeoTreeGitStaged = { fg = colors.green },
60 |
61 | NeoTreeFloatBorder = { link = 'FloatBorder' },
62 | NeoTreeFloatTitle = { link = 'FloatTitle' },
63 | NeoTreeTitleBar = { fg = colors.mantle, bg = colors.blue },
64 |
65 | NeoTreeFileNameOpened = { fg = colors.pink },
66 | NeoTreeDimText = { fg = colors.overlay1 },
67 | NeoTreeFilterTerm = { fg = colors.green, style = { 'bold' } },
68 | NeoTreeTabActive = { bg = active_bg, fg = colors.lavender, style = { 'bold' } },
69 | NeoTreeTabInactive = { bg = inactive_bg, fg = colors.overlay0 },
70 | NeoTreeTabSeparatorActive = { fg = active_bg, bg = active_bg },
71 | NeoTreeTabSeparatorInactive = { fg = inactive_bg, bg = inactive_bg },
72 | NeoTreeVertSplit = { fg = colors.base, bg = inactive_bg },
73 | NeoTreeWinSeparator = {
74 | fg = colors.base,
75 | bg = colors.base,
76 | },
77 | NeoTreeStatusLineNC = { fg = colors.mantle, bg = colors.mantle },
78 | },
79 | }
80 |
81 | vim.cmd([[ colorscheme catppuccin ]])
82 | end,
83 | },
84 | },
85 | }
86 |
87 | return module
88 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/lib/init.lua:
--------------------------------------------------------------------------------
1 | local log = require('lib.log')
2 | local lib = {}
3 |
4 | function lib.load_module(path, state)
5 | local ok, result = pcall(require, path)
6 |
7 | if not ok then
8 | log.error('failed to load module', path, '\n', result)
9 | return
10 | end
11 |
12 | if type(result) ~= 'table' then
13 | log.error('result from', path, 'was not a table, got', tostring(result))
14 | return
15 | end
16 |
17 | ---@type ConfigModule
18 | local module = result
19 | if module.hooks and module.hooks.pre_init then
20 | module.hooks.pre_init(state)
21 | end
22 |
23 | if module.enable == false then
24 | log.info('disabled module ', path)
25 | return
26 | end
27 |
28 | if type(module.pkgs) == 'table' then
29 | for _, value in ipairs(module.pkgs) do
30 | table.insert(state.pkgs, value)
31 | end
32 | end
33 |
34 | if module.hooks and module.hooks.init then
35 | module.hooks.init(state)
36 | end
37 |
38 | if module.hooks and module.hooks.post_init then
39 | module.hooks.post_init(state)
40 | end
41 | end
42 |
43 | function lib.modules(module_list)
44 | local state = {
45 | pkgs = {},
46 | }
47 |
48 | for _, value in ipairs(module_list) do
49 | lib.load_module(('config.%s'):format(value), state)
50 | end
51 | end
52 |
53 | return lib
54 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/lib/log.lua:
--------------------------------------------------------------------------------
1 | local log = {}
2 |
3 | function log.info(...)
4 | vim.print(('INFO(config) - %s'):format(table.concat({ ... }, ' ')))
5 | end
6 |
7 | function log.warn(...)
8 | vim.print(('WARN(config) - %s'):format(table.concat({ ... }, ' ')))
9 | end
10 |
11 | function log.error(...)
12 | vim.print(('ERROR(config) - %s'):format(table.concat({ ... }, ' ')))
13 | end
14 |
15 | return log
16 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/nvim-config/lua/lib/types.lua:
--------------------------------------------------------------------------------
1 | -- Lazy types
2 | ---@alias LazyPluginKind "normal"|"clean"|"disabled"
3 |
4 | ---@class LazyPluginState
5 | ---@field loaded? {[string]:string}|{time:number}
6 | ---@field installed boolean
7 | ---@field tasks? LazyTask[]
8 | ---@field dirty? boolean
9 | ---@field updated? {from:string, to:string}
10 | ---@field is_local boolean
11 | ---@field updates? {from:GitInfo, to:GitInfo}
12 | ---@field cloned? boolean
13 | ---@field kind? LazyPluginKind
14 | ---@field dep? boolean True if this plugin is only in the spec as a dependency
15 | ---@field cond? boolean
16 | ---@field super? LazyPlugin
17 |
18 | ---@alias PluginOpts table|fun(self:LazyPlugin, opts:table):table?
19 |
20 | ---@class LazyPluginHooks
21 | ---@field init? fun(self:LazyPlugin) Will always be run
22 | ---@field deactivate? fun(self:LazyPlugin) Unload/Stop a plugin
23 | ---@field config? fun(self:LazyPlugin, opts:table)|true Will be executed when loading the plugin
24 | ---@field build? string|fun(self:LazyPlugin)|(string|fun(self:LazyPlugin))[]
25 | ---@field opts? PluginOpts
26 |
27 | ---@class LazyPluginHandlers
28 | ---@field event? string[]
29 | ---@field cmd? string[]
30 | ---@field ft? string[]
31 | ---@field keys? (string|LazyKeys)[]
32 | ---@field module? false
33 |
34 | ---@class LazyPluginRef
35 | ---@field branch? string
36 | ---@field tag? string
37 | ---@field commit? string
38 | ---@field version? string
39 | ---@field pin? boolean
40 | ---@field submodules? boolean Defaults to true
41 |
42 | ---@class LazyPluginBase
43 | ---@field [1] string?
44 | ---@field name string display name and name used for plugin config files
45 | ---@field main? string Entry module that has setup & deactivate
46 | ---@field url string?
47 | ---@field dir string
48 | ---@field enabled? boolean|(fun():boolean)
49 | ---@field cond? boolean|(fun():boolean)
50 | ---@field optional? boolean If set, then this plugin will not be added unless it is added somewhere else
51 | ---@field lazy? boolean
52 | ---@field priority? number Only useful for lazy=false plugins to force loading certain plugins first. Default priority is 50
53 | ---@field dev? boolean If set, then link to the respective folder under your ~/projects
54 |
55 | ---@class LazyPlugin: LazyPluginBase,LazyPluginHandlers,LazyPluginHooks,LazyPluginRef
56 | ---@field dependencies? string[]
57 | ---@field _ LazyPluginState
58 |
59 | ---@class LazyPluginSpecHandlers
60 | ---@field event? string[]|string|fun(self:LazyPlugin, event:string[]):string[]
61 | ---@field cmd? string[]|string|fun(self:LazyPlugin, cmd:string[]):string[]
62 | ---@field ft? string[]|string|fun(self:LazyPlugin, ft:string[]):string[]
63 | ---@field keys? string|string[]|LazyKeys[]|fun(self:LazyPlugin, keys:string[]):(string|LazyKeys)[]
64 | ---@field module? false
65 |
66 | ---@class LazyPluginSpec: LazyPluginBase,LazyPluginSpecHandlers,LazyPluginHooks,LazyPluginRef
67 | ---@field dependencies? string|string[]|LazyPluginSpec[]
68 |
69 | ---@alias LazySpec string|LazyPluginSpec|LazySpecImport|LazySpec[]
70 |
71 | ---@class LazySpecImport
72 | ---@field import string spec module to import
73 | ---@field enabled? boolean|(fun():boolean)
74 |
75 | -- Lib types
76 | ---@alias Hook fun(state: State):nil
77 |
78 | ---@class ModuleHooks
79 | ---@field pre_init Hook
80 | ---@field init Hook
81 | ---@field post_init Hook
82 |
83 | ---@class ConfigModule
84 | ---@field enable? boolean
85 | ---@field hooks? ModuleHooks
86 | ---@field pkgs LazySpec[]
87 |
88 | ---@class State
89 | ---@field pkgs LazySpec[]
90 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/patch-discord.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env nix-shell
2 | #! nix-shell -i bash -p jq
3 |
4 | settings_content=$(cat $settings_path)
5 | patch_content='
6 | {
7 | "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true,
8 | "SKIP_HOST_UPDATE": true,
9 | "MIN_WIDTH": 0,
10 | "MIN_HEIGHT": 0
11 | }
12 | '
13 |
14 | base_dir="$HOME/.config/discord"
15 | settings_file="settings.json"
16 | settings_path="$base_dir/$settings_file"
17 |
18 |
19 | echo "$settings_content" "$patch_content" | jq -s add > "$settings_path"
20 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/vscode-config/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | flakePath,
4 | lib,
5 | pkgs,
6 | nix-vscode-extensions,
7 | ...
8 | }: {
9 | programs.vscode = {
10 | enable = true;
11 | package = pkgs.unstable.vscode;
12 | extensions = (import ./packages.nix) {
13 | inherit pkgs;
14 | inherit lib;
15 | inherit nix-vscode-extensions;
16 | };
17 | mutableExtensionsDir = true;
18 | };
19 |
20 | home.file = {
21 | "${config.xdg.configHome}/Code/User/settings.json" = {
22 | source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/users/amy/apps/dedicated/vscode-config/settings.json";
23 | };
24 | "${config.xdg.configHome}/Code/User/keybindings.json" = {
25 | source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/users/amy/apps/dedicated/vscode-config/keybindings.json";
26 | };
27 | };
28 |
29 | # Snippet for when we need to use the home-manager unstable vscode module
30 | # disabledModules = ["programs/vscode"];
31 | # imports = [
32 | # "${inputs.home-manager-unstable.outPath}/modules/programs/vscode.nix"
33 | # ];
34 | }
35 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/vscode-config/keybindings.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "key": "tab",
4 | "command": "selectNextSuggestion",
5 | "when": "suggestWidgetHasFocusedSuggestion && suggestWidgetVisible && textInputFocus"
6 | },
7 | {
8 | "key": "shift+tab",
9 | "command": "selectPrevSuggestion",
10 | "when": "suggestWidgetHasFocusedSuggestion && suggestWidgetVisible && textInputFocus"
11 | }
12 | ]
13 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/vscode-config/packages.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | nix-vscode-extensions,
4 | ...
5 | }: let
6 | marketplace = nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace;
7 | in
8 | (with marketplace; [
9 | formulahendry.auto-rename-tag
10 | aaron-bond.better-comments
11 | # catppuccin.catppuccin-vsc -- not managed by nix because the configurability is broken on Nix. installed by hand
12 | catppuccin.catppuccin-vsc-icons
13 | dotenv.dotenv-vscode
14 | kamikillerto.vscode-colorize
15 | mkhl.direnv
16 | leonardssh.vscord
17 | dbaeumer.vscode-eslint
18 | tamasfe.even-better-toml
19 | eamodio.gitlens
20 | firsttris.vscode-jest-runner
21 | fwcd.kotlin
22 | sumneko.lua
23 | pkief.material-icon-theme
24 | jnoortheen.nix-ide
25 | ionutvmi.path-autocomplete
26 | esbenp.prettier-vscode
27 | prisma.prisma
28 | ms-vscode-remote.remote-ssh
29 | ms-vscode-remote.remote-ssh-edit
30 | ms-vscode.remote-explorer
31 | bradlc.vscode-tailwindcss
32 | pdesaulniers.vscode-teal
33 | vscodevim.vim
34 | thenuprojectcontributors.vscode-nushell-lang
35 | wakatime.vscode-wakatime
36 | redhat.vscode-yaml
37 | # streetsidesoftware.code-spell-checker
38 | ms-dotnettools.csdevkit
39 | ms-dotnettools.vscode-dotnet-runtime
40 | ])
41 | ++ (with pkgs.vscode-extensions; [
42 | ms-dotnettools.csharp
43 | devsense.phptools-vscode
44 | rust-lang.rust-analyzer
45 | vadimcn.vscode-lldb
46 | ])
47 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/wezterm-config/lua/bar.lua:
--------------------------------------------------------------------------------
1 | local DIVIDERS = {
2 | LEFT = utf8.char(0xe0be),
3 | RIGHT = utf8.char(0xe0bc),
4 | }
5 |
6 | return function(cfg, _, wez)
7 | cfg.use_fancy_tab_bar = false
8 | cfg.hide_tab_bar_if_only_one_tab = false
9 | cfg.enable_scroll_bar = false
10 |
11 | wez.on('format-tab-title', function(tab, tabs, panes, config, hover, max_width)
12 | local colours = config.resolved_palette.tab_bar
13 |
14 | local active_tab_index = 0
15 | for _, t in ipairs(tabs) do
16 | if t.is_active == true then
17 | active_tab_index = t.tab_index
18 | end
19 | end
20 |
21 | -- Indexed by terminal colour code
22 | local active_bg = config.resolved_palette.ansi[2]
23 | local active_fg = colours.background
24 | local inactive_bg = colours.inactive_tab.bg_color
25 | local inactive_fg = colours.inactive_tab.fg_color
26 | local new_tab_bg = colours.new_tab.bg_color
27 |
28 | local s_bg, s_fg, e_bg, e_fg
29 |
30 | -- the last tab
31 | if tab.tab_index == #tabs - 1 then
32 | if tab.is_active then
33 | s_bg = active_bg
34 | s_fg = active_fg
35 | e_bg = new_tab_bg
36 | e_fg = active_bg
37 | else
38 | s_bg = inactive_bg
39 | s_fg = inactive_fg
40 | e_bg = new_tab_bg
41 | e_fg = inactive_bg
42 | end
43 | elseif tab.tab_index == active_tab_index - 1 then
44 | s_bg = inactive_bg
45 | s_fg = inactive_fg
46 | e_bg = active_bg
47 | e_fg = inactive_bg
48 | elseif tab.is_active then
49 | s_bg = active_bg
50 | s_fg = active_fg
51 | e_bg = inactive_bg
52 | e_fg = active_bg
53 | else
54 | s_bg = inactive_bg
55 | s_fg = inactive_fg
56 | e_bg = inactive_bg
57 | e_fg = inactive_bg
58 | end
59 |
60 | -- local muxpanes = wez.mux.get_tab(tab.tab_id):panes()
61 | -- local count = #muxpanes == 1 and "" or #muxpanes
62 | local index = tab.tab_index + 1 .. ': '
63 |
64 | return {
65 | { Background = { Color = s_bg } },
66 | { Foreground = { Color = s_fg } },
67 | {
68 | Text = ' ' .. index .. tab.active_pane.title .. ' ',
69 | },
70 | { Background = { Color = e_bg } },
71 | { Foreground = { Color = e_fg } },
72 | { Text = DIVIDERS.RIGHT },
73 | }
74 | end)
75 |
76 | wez.on('update-status', function(window, pane)
77 | local palette = window:effective_config().resolved_palette
78 | local firstTabActive = window:mux_window():tabs_with_info()[1].is_active
79 |
80 | local leader_text = ' '
81 |
82 | if window:leader_is_active() then
83 | leader_text = ' '
84 | end
85 |
86 | local divider_bg = firstTabActive and palette.ansi[2] or palette.tab_bar.inactive_tab.bg_color
87 |
88 | window:set_left_status(wez.format {
89 | { Foreground = { Color = palette.background } },
90 | { Background = { Color = palette.ansi[5] } },
91 | { Text = leader_text },
92 | { Background = { Color = divider_bg } },
93 | { Foreground = { Color = palette.ansi[5] } },
94 | { Text = DIVIDERS.RIGHT },
95 | })
96 |
97 | -- window:set_right_status(wez.format({
98 | -- { Background = { Color = palette.tab_bar.background } },
99 | -- { Foreground = { Color = palette.ansi[6] } },
100 | -- { Text = os.date(" %H:%M ") },
101 | -- }))
102 | end)
103 | end
104 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/wezterm-config/lua/base.lua:
--------------------------------------------------------------------------------
1 | return function(cfg, values)
2 | cfg.window_frame = {
3 | active_titlebar_bg = values.theme.background,
4 | inactive_titlebar_bg = values.theme.background,
5 | font = values.font,
6 | font_size = 12.0,
7 | }
8 |
9 | cfg.max_fps = 144
10 | cfg.audible_bell = 'Disabled'
11 | cfg.debug_key_events = true
12 |
13 | -- Disable the shell
14 | cfg.default_cursor_style = 'SteadyBar'
15 | cfg.cursor_blink_rate = 0
16 |
17 | -- Use nushell for wezterm
18 | cfg.default_prog = { 'nu' }
19 |
20 | cfg.warn_about_missing_glyphs = false
21 | end
22 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/wezterm-config/lua/colors.lua:
--------------------------------------------------------------------------------
1 | return function(cfg, values)
2 | cfg.color_scheme = values.scheme
3 | cfg.colors = {}
4 |
5 | cfg.colors.tab_bar = {
6 | background = '#1e1e2e',
7 | active_tab = {
8 | bg_color = '#36374a',
9 | fg_color = '#cdd6f4',
10 | intensity = 'Normal',
11 | italic = false,
12 | strikethrough = false,
13 | underline = 'None',
14 | },
15 | inactive_tab = {
16 | bg_color = '#1e1e2e',
17 | fg_color = '#cdd6f4',
18 | intensity = 'Normal',
19 | italic = false,
20 | strikethrough = false,
21 | underline = 'None',
22 | },
23 | inactive_tab_edge = 'none',
24 | inactive_tab_edge_hover = '#363636',
25 | inactive_tab_hover = {
26 | bg_color = '#1e1e2e',
27 | fg_color = '#cdd6f4',
28 | intensity = 'Normal',
29 | italic = false,
30 | strikethrough = false,
31 | underline = 'None',
32 | },
33 | new_tab = {
34 | bg_color = '#1e1e2e',
35 | fg_color = '#cdd6f4',
36 | intensity = 'Normal',
37 | italic = false,
38 | strikethrough = false,
39 | underline = 'None',
40 | },
41 | new_tab_hover = {
42 | bg_color = '#181825',
43 | fg_color = '#cdd6f4',
44 | intensity = 'Normal',
45 | italic = true,
46 | strikethrough = false,
47 | underline = 'None',
48 | },
49 | }
50 | end
51 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/wezterm-config/lua/font.lua:
--------------------------------------------------------------------------------
1 | local wez = require('wezterm')
2 |
3 | local fonts = {
4 | berkeley = {
5 | font = wez.font_with_fallback {
6 | {
7 | family = 'Berkeley Mono',
8 | stretch = 'Normal',
9 | weight = 'Medium',
10 | },
11 | },
12 | size = 12,
13 | cell_width = 0.9,
14 | },
15 | fantasque = {
16 | font = wez.font_with_fallback {
17 | {
18 | family = 'FantasqueSansM Nerd Font Mono',
19 | stretch = 'Normal',
20 | weight = 'Medium',
21 | },
22 | },
23 | size = 12.5,
24 | },
25 | iosevka = {
26 | font = wez.font_with_fallback {
27 | {
28 | family = 'Iosevka Term',
29 | stretch = 'Normal',
30 | weight = 'Regular',
31 | },
32 | {
33 | family = 'Symbols Nerd Font',
34 | },
35 | },
36 | size = 12.5,
37 | },
38 | }
39 |
40 | local selected_font = 'fantasque'
41 |
42 | return function(cfg, values)
43 | cfg.font = fonts[selected_font].font
44 | cfg.font_size = fonts[selected_font].size
45 | cfg.cell_width = fonts[selected_font].cell_width or 1
46 |
47 | if values.italic_enable then
48 | cfg.font_rules = {
49 | -- Disable italics everywhere
50 | -- Use regular bold instead of italic bold
51 | {
52 | italic = true,
53 | font = cfg.font,
54 | },
55 | {
56 | italic = false,
57 | intensity = 'Bold',
58 | font = wez.font {
59 | family = cfg.font.family,
60 | stretch = 'Normal',
61 | weight = 'Bold',
62 | },
63 | },
64 | }
65 | end
66 | end
67 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/wezterm-config/lua/keys.lua:
--------------------------------------------------------------------------------
1 | return function(cfg, _, wez)
2 | local act = wez.action
3 |
4 | cfg.leader = {
5 | key = 's',
6 | mods = 'CTRL',
7 | timeout_milliseconds = 2500,
8 | }
9 |
10 | cfg.debug_key_events = true
11 | cfg.disable_default_key_bindings = true
12 |
13 | cfg.keys = {
14 | -- Wez control
15 | { key = 'r', mods = 'LEADER', action = act.ReloadConfiguration },
16 | { key = 'd', mods = 'LEADER', action = act.ShowDebugOverlay },
17 |
18 | { key = 's', mods = 'LEADER', action = act.ResetTerminal },
19 |
20 | { key = 'Space', mods = 'LEADER', action = act.ShowLauncher },
21 |
22 | { key = 'l', mods = 'CTRL', action = act.ActivateTabRelative(1) },
23 | { key = 'h', mods = 'CTRL', action = act.ActivateTabRelative(-1) },
24 |
25 | -- Tab control
26 | { key = '1', mods = 'CTRL', action = act { ActivateTab = 0 } },
27 | { key = '2', mods = 'CTRL', action = act { ActivateTab = 1 } },
28 | { key = '3', mods = 'CTRL', action = act { ActivateTab = 2 } },
29 | { key = '4', mods = 'CTRL', action = act { ActivateTab = 3 } },
30 | { key = '5', mods = 'CTRL', action = act { ActivateTab = 4 } },
31 | { key = '6', mods = 'CTRL', action = act { ActivateTab = 5 } },
32 | { key = '7', mods = 'CTRL', action = act { ActivateTab = 6 } },
33 | { key = '8', mods = 'CTRL', action = act { ActivateTab = 7 } },
34 | { key = '9', mods = 'CTRL', action = act { ActivateTab = 8 } },
35 | { key = '9', mods = 'CTRL', action = act { ActivateTab = 9 } },
36 | { key = '0', mods = 'CTRL', action = act { ActivateTab = -1 } },
37 |
38 | { key = 'n', mods = 'SHIFT|CTRL', action = act.SpawnWindow },
39 | { key = 't', mods = 'SHIFT|CTRL', action = act.SpawnTab('CurrentPaneDomain') },
40 |
41 | { key = 'c', mods = 'SHIFT|CTRL', action = act.CopyTo('Clipboard') },
42 | { key = 'v', mods = 'SHIFT|CTRL', action = act.PasteFrom('Clipboard') },
43 |
44 | { key = 'w', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab { confirm = true } },
45 | }
46 | end
47 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/wezterm-config/lua/util.lua:
--------------------------------------------------------------------------------
1 | local util = {}
2 |
3 | function util.apply(cfg, values, mod)
4 | local ok, res = pcall(require, 'lua.' .. mod)
5 |
6 | if not ok then
7 | -- die idk
8 | print(res)
9 | return
10 | end
11 |
12 | ok, res = pcall(res, cfg, values, require('wezterm'))
13 |
14 | if not ok then
15 | -- die idk
16 | print(res)
17 | return
18 | end
19 | end
20 |
21 | return util
22 |
--------------------------------------------------------------------------------
/users/amy/apps/dedicated/wezterm-config/wezterm.lua:
--------------------------------------------------------------------------------
1 | local wez = require('wezterm')
2 | local util = require('lua.util')
3 |
4 | local config = {}
5 |
6 | local values = {
7 | scheme = 'Catppuccin Mocha',
8 | theme = wez.color.get_builtin_schemes()['Catppuccin Mocha'],
9 | italic_enable = false,
10 | }
11 |
12 | util.apply(config, values, 'base')
13 | util.apply(config, values, 'font')
14 | util.apply(config, values, 'keys')
15 | util.apply(config, values, 'bar')
16 | util.apply(config, values, 'colors')
17 |
18 | return config
19 |
--------------------------------------------------------------------------------
/users/amy/apps/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | config,
4 | ghostty,
5 | ...
6 | }: {
7 | imports = [
8 | ./dedicated
9 | ./personal
10 | ./service
11 | ./system
12 | ./tools
13 | ./ui
14 | ];
15 |
16 | home.packages = with pkgs; [
17 | ghostty.packages.x86_64-linux.default
18 | bottom
19 | neofetch
20 | gh
21 | thunderbird
22 | comma
23 | rofi
24 | spotifywm
25 | flameshot
26 | keybase
27 | pkgs.unstable.neovide
28 | vesktop
29 | _1password-gui
30 | gparted
31 | gimp
32 | obsidian
33 | steam
34 | lunar-client
35 | pavucontrol
36 | photoqt
37 | dunst
38 | tailscale
39 |
40 | element-desktop
41 |
42 | # 3D printing
43 | #super-slicer
44 |
45 | # Modern unix
46 | ripgrep
47 | fd
48 | duf
49 | jq
50 | dogdns
51 |
52 | jetbrains.idea-community
53 | ];
54 | }
55 |
--------------------------------------------------------------------------------
/users/amy/apps/personal/default.nix:
--------------------------------------------------------------------------------
1 | {...}: {
2 | imports = [
3 | ];
4 | }
5 |
--------------------------------------------------------------------------------
/users/amy/apps/personal/steam.nix:
--------------------------------------------------------------------------------
1 | # Steam settings
2 | {...}: {
3 | programs.steam = {
4 | enable = true;
5 | remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
6 | dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/users/amy/apps/service/default.nix:
--------------------------------------------------------------------------------
1 | {...}: {
2 | imports = [
3 | ./keybase.nix
4 | ./mpris.nix
5 | ];
6 | }
7 |
--------------------------------------------------------------------------------
/users/amy/apps/service/keybase.nix:
--------------------------------------------------------------------------------
1 | # Keybase settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | services.keybase = {
9 | enable = true;
10 | };
11 | }
12 |
--------------------------------------------------------------------------------
/users/amy/apps/service/mpris.nix:
--------------------------------------------------------------------------------
1 | # Mpris settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | services.mpris-proxy = {
9 | enable = true;
10 | };
11 | }
12 |
--------------------------------------------------------------------------------
/users/amy/apps/system/default.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | imports = [
3 | ./xdg.nix
4 | ./sops.nix
5 | ];
6 |
7 | config.xdg.configFile."nixpkgs/config.nix" = {source = ./nixpkgs.nix;};
8 | }
9 |
--------------------------------------------------------------------------------
/users/amy/apps/system/nixpkgs.nix:
--------------------------------------------------------------------------------
1 | {
2 | allowUnfree = true;
3 | }
4 |
--------------------------------------------------------------------------------
/users/amy/apps/system/sops.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | sops = {
3 | gnupg.home = config.programs.gpg.homedir;
4 | defaultSopsFile = ../../../../secrets.yaml;
5 | secrets = {
6 | "ssh-private-key" = {
7 | path = "${config.home.homeDirectory}/.ssh/github";
8 | };
9 | "ssh-public-key" = {
10 | path = "${config.home.homeDirectory}/.ssh/github.pub";
11 | };
12 | "authinfo" = {
13 | path = "${config.home.homeDirectory}/.authinfo";
14 | };
15 | "emacs" = {
16 | path = "${config.xdg.configHome}/emacs/secrets.el";
17 | };
18 | };
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/users/amy/apps/system/xdg.nix:
--------------------------------------------------------------------------------
1 | # XDG settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | xdg = {
9 | userDirs = {
10 | enable = true;
11 | createDirectories = true;
12 |
13 | # Improve the XDG dir locations so they dont clutter up $HOME
14 | download = "$HOME/downloads";
15 | desktop = "$HOME/desktop";
16 | documents = "$HOME/documents";
17 |
18 | publicShare = "$HOME/etc/public";
19 | templates = "$HOME/etc/templates";
20 |
21 | music = "$HOME/media/music";
22 | pictures = "$HOME/media/pictures";
23 | videos = "$HOME/media/videos";
24 | };
25 |
26 | mimeApps = {
27 | enable = true;
28 | defaultApplications = {
29 | "text/html" = ["chromium.desktop"];
30 | "image/png" = ["photoqt.desktop"];
31 | "text/plain" = ["neovide.desktop"];
32 |
33 | # xdg-open for mail
34 | "x-scheme-handler/mailto" = ["thunderbird.desktop"];
35 | "x-scheme-handler/mid" = ["thunderbird.desktop"];
36 | "message/rfc822" = ["thunderbird.desktop"];
37 | };
38 | };
39 | };
40 | }
41 |
--------------------------------------------------------------------------------
/users/amy/apps/tools/cargo.nix:
--------------------------------------------------------------------------------
1 | # Cargo settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | programs.cargo = {
9 | enable = true;
10 | file = "${config.xdg.dataHome}/cargo/config.toml";
11 | settings = {
12 | net = {
13 | git-fetch-with-cli = true;
14 | };
15 | };
16 | };
17 | }
18 |
--------------------------------------------------------------------------------
/users/amy/apps/tools/default.nix:
--------------------------------------------------------------------------------
1 | {...}: {
2 | imports = [
3 | ./cargo.nix
4 | ./git.nix
5 | ./lazygit.nix
6 | ./sh.nix
7 | ];
8 | }
9 |
--------------------------------------------------------------------------------
/users/amy/apps/tools/discord.css:
--------------------------------------------------------------------------------
1 | /* Variables */
2 | .visual-refresh {
3 | --custom-app-top-bar-height: 30px !important;
4 | --custom-channel-textarea-text-area-height: 45px !important;
5 | --custom-guild-list-padding: var(--space-12) !important;
6 | }
7 |
8 | /* Profile pane (bottom left) */
9 | .visual-refresh .container__37e49 {
10 | padding: var(--space-4);
11 | }
12 |
13 | /* Context menu */
14 | :where(.visual-refresh) .wrapper_f563df {
15 | gap: 2px !important;
16 | padding: 4px;
17 | padding-top: 8px;
18 | padding-bottom: 8px;
19 |
20 | margin-bottom: 4px;
21 | }
22 |
23 | :where(.visual-refresh) .labelContainer_c1e9c4 {
24 | padding-left: 6px !important;
25 | padding-right: 6px !important;
26 | padding-top: 4px;
27 | padding-bottom: 4px;
28 | }
29 |
30 | /* Quick reacts */
31 | :where(.visual-refresh) .button_f563df {
32 | border-radius: 6px;
33 | width: 30px;
34 | height: 30px;
35 | }
36 |
37 | :where(.visual-refresh) .scroller_c1e9c4 {
38 | padding: 6px;
39 | padding-bottom: 8px;
40 | }
41 |
42 | /* VC person count */
43 | .users__260e1 {
44 | display: block;
45 | }
46 |
47 | .visual-refresh .total__260e1 {
48 | padding: 0 0;
49 | }
50 |
51 | .visual-refresh .wrapper__260e1 {
52 | background-color: transparent;
53 | }
54 |
55 | /* Attach button */
56 | .attachButton__0923f {
57 | padding-left: 10px;
58 | padding-right: 5px;
59 | }
60 |
--------------------------------------------------------------------------------
/users/amy/apps/tools/git.nix:
--------------------------------------------------------------------------------
1 | # Git settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | system,
7 | ...
8 | }: let
9 | shouldUseSSH = true;
10 | ifSSH = c:
11 | if shouldUseSSH
12 | then c
13 | else {};
14 | in {
15 | programs.git = {
16 | enable = true;
17 |
18 | inherit (system.git) userEmail userName;
19 |
20 | extraConfig = {
21 | gpg = {
22 | format = "ssh";
23 | };
24 |
25 | url = ifSSH {
26 | "ssh://git@github.com/" = {
27 | insteadOf = "https://github.com/";
28 | };
29 | };
30 |
31 | init = {
32 | defaultBranch = "master";
33 | };
34 |
35 | commit = {
36 | gpgsign = true;
37 | };
38 |
39 | tag = {
40 | gpgsign = true;
41 | };
42 |
43 | user = {
44 | signingKey = "/home/${system.currentUser}/.ssh/github.pub";
45 | };
46 |
47 | github = {
48 | user = "nullishamy";
49 | };
50 | };
51 | };
52 | }
53 |
--------------------------------------------------------------------------------
/users/amy/apps/tools/lazygit.nix:
--------------------------------------------------------------------------------
1 | # Lazygit settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | programs.lazygit = {
9 | enable = true;
10 | package = pkgs.unstable.lazygit;
11 | settings = {
12 | gui = {
13 | # stuff relating to the UI
14 | scrollHeight = 2; # how many lines you scroll by
15 | scrollPastBottom = true; # enable scrolling past the bottom
16 | sidePanelWidth = 0.3333; # number from 0 to 1
17 | expandFocusedSidePanel = false;
18 | mainPanelSplitMode = "flexible"; # one of 'horizontal' | 'flexible' | 'vertical'
19 | language = "auto"; # one of 'auto' | 'en' | 'zh' | 'pl' | 'nl' | 'ja' | 'ko'
20 | timeFormat = "02 Jan 06 15:04 MST"; # https://pkg.go.dev/time#Time.Format
21 | authorColors = {
22 | "*" = "#b4befe";
23 | };
24 | theme = {
25 | activeBorderColor = [
26 | "#89b4fa"
27 | "bold"
28 | ];
29 | inactiveBorderColor = ["#a6adc8"];
30 | optionsTextColor = ["#89b4fa"];
31 | selectedLineBgColor = ["#313244"];
32 | cherryPickedCommitBgColor = ["#45475a"];
33 | cherryPickedCommitFgColor = ["#89b4fa"];
34 | unstagedChangesColor = ["#f38ba8"];
35 | defaultFgColor = ["#cdd6f4"];
36 | searchingActiveBorderColor = ["#f9e2af"];
37 | };
38 | commitLength = {
39 | show = true;
40 | };
41 | mouseEvents = true;
42 | skipDiscardChangeWarning = false;
43 | skipStashWarning = false;
44 | showFileTree = true; # for rendering changes files in a tree format
45 | showListFooter = true; # for seeing the '5 of 20' message in list panels
46 | showRandomTip = false;
47 | showBottomLine = false; # for hiding the bottom information line (unless it has important information to tell you)
48 | showCommandLog = true;
49 | showIcons = false;
50 | commandLogSize = 8;
51 | splitDiff = "auto"; # one of 'auto' | 'always'
52 | };
53 | git = {
54 | paging = {
55 | colorArg = "always";
56 | useConfig = false;
57 | };
58 | commit = {
59 | signOff = false;
60 | };
61 | merging = {
62 | # only applicable to unix users
63 | manualCommit = false;
64 | # extra args passed to `git merge`, e.g. --no-ff
65 | args = "";
66 | };
67 | log = {
68 | # one of date-order, author-date-order, topo-order.
69 | # topo-order makes it easier to read the git log graph, but commits may not
70 | # appear chronologically. See https://git-scm.com/docs/git-log#_commit_ordering
71 | order = "topo-order";
72 | # one of always, never, when-maximised
73 | # this determines whether the git graph is rendered in the commits panel
74 | showGraph = "when-maximised";
75 | # displays the whole git graph by default in the commits panel (equivalent to passing the `--all` argument to `git log`)
76 | showWholeGraph = false;
77 | };
78 | skipHookPrefix = "WIP";
79 | autoFetch = false;
80 | autoRefresh = true;
81 | branchLogCmd = "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --";
82 | allBranchesLogCmd = "git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium";
83 | overrideGpg = false; # prevents lazygit from spawning a separate process when using GPG
84 | disableForcePushing = false;
85 | parseEmoji = false;
86 | diffContextSize = 3; # how many lines of context are shown around a change in diffs
87 | };
88 | os = {
89 | editCommand = ""; # see 'Configuring File Editing' section
90 | editCommandTemplate = "";
91 | openCommand = "";
92 | refresher = {
93 | refreshInterval = 10; # File/submodule refresh interval in seconds. Auto-refresh can be disabled via option 'git.autoRefresh'.
94 | fetchInterval = 60; # Re-fetch interval in seconds. Auto-fetch can be disabled via option 'git.autoFetch'.
95 | update = {
96 | method = "prompt"; # can be: prompt | background | never
97 | days = 14; # how often an update is checked for
98 | };
99 | reporting = "undetermined"; # one of: 'on' | 'off' | 'undetermined'
100 | confirmOnQuit = false;
101 | # determines whether hitting 'esc' will quit the application when there is nothing to cancel/close
102 | quitOnTopLevelReturn = false;
103 | disableStartupPopups = false;
104 | notARepository = "skip"; # one of: 'prompt' | 'create' | 'skip'
105 | promptToReturnFromSubprocess = true; # display confirmation when subprocess terminates
106 | };
107 | };
108 | keybinding = {
109 | universal = {
110 | quit = "q";
111 | quit-alt1 = ""; # alternative/alias of quit
112 | return = ""; # return to previous menu, will quit if there"s nowhere to return
113 | quitWithoutChangingDirectory = "Q";
114 | togglePanel = ""; # goto the next panel
115 | prevItem = ""; # go one line up
116 | nextItem = ""; # go one line down
117 | prevItem-alt = "k"; # go one line up
118 | nextItem-alt = "j"; # go one line down
119 | prevPage = ","; # go to next page in list
120 | nextPage = "."; # go to previous page in list
121 | gotoTop = "<"; # go to top of list
122 | gotoBottom = ">"; # go to bottom of list
123 | scrollLeft = "H"; # scroll left within list view
124 | scrollRight = "L"; # scroll right within list view
125 | prevBlock = ""; # goto the previous block / panel
126 | nextBlock = ""; # goto the next block / panel
127 | prevBlock-alt = "h"; # goto the previous block / panel
128 | nextBlock-alt = "l"; # goto the next block / panel
129 | jumpToBlock = ["1" "2" "3" "4" "5"]; # goto the Nth block / panel
130 | nextMatch = "n";
131 | prevMatch = "N";
132 | optionMenu = "x"; # show help menu
133 | optionMenu-alt1 = "?"; # show help menu
134 | select = "";
135 | goInto = "";
136 | openRecentRepos = "";
137 | confirm = "";
138 | confirm-alt1 = "y";
139 | remove = "d";
140 | new = "n";
141 | edit = "e";
142 | openFile = "o";
143 | scrollUpMain = ""; # main panel scroll up
144 | scrollDownMain = ""; # main panel scroll down
145 | scrollUpMain-alt1 = "K"; # main panel scroll up
146 | scrollDownMain-alt1 = "J"; # main panel scroll down
147 | scrollUpMain-alt2 = ""; # main panel scroll up
148 | scrollDownMain-alt2 = ""; # main panel scroll down
149 | executeShellCommand = ":";
150 | createRebaseOptionsMenu = "m";
151 | pushFiles = "P";
152 | pullFiles = "p";
153 | refresh = "R";
154 | createPatchOptionsMenu = "";
155 | nextTab = "]";
156 | prevTab = "[";
157 | nextScreenMode = "-";
158 | prevScreenMode = "+";
159 | undo = "z";
160 | redo = "";
161 | filteringMenu = "";
162 | diffingMenu = "W";
163 | copyToClipboard = "";
164 | submitEditorText = "";
165 | appendNewline = "";
166 | extrasMenu = "@";
167 | toggleWhitespaceInDiffView = "";
168 | increaseContextInDiffView = "}";
169 | decreaseContextInDiffView = "{";
170 | toggleRangeSelect = "V";
171 | };
172 | status = {
173 | checkForUpdate = "u";
174 | recentRepos = "";
175 | };
176 | files = {
177 | commitChanges = "c";
178 | commitChangesWithoutHook = "w"; # commit changes without pre-commit hook
179 | amendLastCommit = "A";
180 | commitChangesWithEditor = "C";
181 | ignoreFile = "i";
182 | refreshFiles = "r";
183 | stashAllChanges = "s";
184 | viewStashOptions = "S";
185 | toggleStagedAll = "a"; # stage/unstage all
186 | viewResetOptions = "D";
187 | fetch = "f";
188 | toggleTreeView = "`";
189 | };
190 | branches = {
191 | createPullRequest = "o";
192 | viewPullRequestOptions = "O";
193 | checkoutBranchByName = "c";
194 | forceCheckoutBranch = "F";
195 | rebaseBranch = "r";
196 | renameBranch = "R";
197 | mergeIntoCurrentBranch = "M";
198 | viewGitFlowOptions = "i";
199 | fastForward = "f"; # fast-forward this branch from its upstream
200 | pushTag = "P";
201 | setUpstream = "u"; # set as upstream of checked-out branch
202 | fetchRemote = "f";
203 | };
204 | commits = {
205 | squashDown = "s";
206 | renameCommit = "r";
207 | renameCommitWithEditor = "R";
208 | viewResetOptions = "g";
209 | markCommitAsFixup = "f";
210 | createFixupCommit = "F"; # create fixup commit for this commit
211 | squashAboveCommits = "S";
212 | moveDownCommit = ""; # move commit down one
213 | moveUpCommit = ""; # move commit up one
214 | amendToCommit = "A";
215 | pickCommit = "p"; # pick commit (when mid-rebase)
216 | revertCommit = "t";
217 | cherryPickCopy = "c";
218 | cherryPickCopyRange = "C";
219 | pasteCommits = "v";
220 | tagCommit = "T";
221 | checkoutCommit = "";
222 | resetCherryPick = "";
223 | copyCommitMessageToClipboard = "";
224 | openLogMenu = "";
225 | viewBisectOptions = "b";
226 | };
227 | stash = {
228 | popStash = "g";
229 | };
230 | commitFiles = {
231 | checkoutCommitFile = "c";
232 | };
233 | main = {
234 | toggleDragSelect = "v";
235 | toggleDragSelect-alt = "V";
236 | toggleSelectHunk = "a";
237 | pickBothHunks = "b";
238 | };
239 | submodules = {
240 | init = "i";
241 | update = "u";
242 | bulkMenu = "b";
243 | };
244 | };
245 | };
246 | };
247 | }
248 |
--------------------------------------------------------------------------------
/users/amy/apps/tools/nu/config.nu:
--------------------------------------------------------------------------------
1 | let catppuccin = {
2 | latte: {
3 | rosewater: "#dc8a78"
4 | flamingo: "#dd7878"
5 | pink: "#ea76cb"
6 | mauve: "#8839ef"
7 | red: "#d20f39"
8 | maroon: "#e64553"
9 | peach: "#fe640b"
10 | yellow: "#df8e1d"
11 | green: "#40a02b"
12 | teal: "#179299"
13 | sky: "#04a5e5"
14 | sapphire: "#209fb5"
15 | blue: "#1e66f5"
16 | lavender: "#7287fd"
17 | text: "#4c4f69"
18 | subtext1: "#5c5f77"
19 | subtext0: "#6c6f85"
20 | overlay2: "#7c7f93"
21 | overlay1: "#8c8fa1"
22 | overlay0: "#9ca0b0"
23 | surface2: "#acb0be"
24 | surface1: "#bcc0cc"
25 | surface0: "#ccd0da"
26 | crust: "#dce0e8"
27 | mantle: "#e6e9ef"
28 | base: "#eff1f5"
29 | }
30 | frappe: {
31 | rosewater: "#f2d5cf"
32 | flamingo: "#eebebe"
33 | pink: "#f4b8e4"
34 | mauve: "#ca9ee6"
35 | red: "#e78284"
36 | maroon: "#ea999c"
37 | peach: "#ef9f76"
38 | yellow: "#e5c890"
39 | green: "#a6d189"
40 | teal: "#81c8be"
41 | sky: "#99d1db"
42 | sapphire: "#85c1dc"
43 | blue: "#8caaee"
44 | lavender: "#babbf1"
45 | text: "#c6d0f5"
46 | subtext1: "#b5bfe2"
47 | subtext0: "#a5adce"
48 | overlay2: "#949cbb"
49 | overlay1: "#838ba7"
50 | overlay0: "#737994"
51 | surface2: "#626880"
52 | surface1: "#51576d"
53 | surface0: "#414559"
54 | base: "#303446"
55 | mantle: "#292c3c"
56 | crust: "#232634"
57 | }
58 | macchiato: {
59 | rosewater: "#f4dbd6"
60 | flamingo: "#f0c6c6"
61 | pink: "#f5bde6"
62 | mauve: "#c6a0f6"
63 | red: "#ed8796"
64 | maroon: "#ee99a0"
65 | peach: "#f5a97f"
66 | yellow: "#eed49f"
67 | green: "#a6da95"
68 | teal: "#8bd5ca"
69 | sky: "#91d7e3"
70 | sapphire: "#7dc4e4"
71 | blue: "#8aadf4"
72 | lavender: "#b7bdf8"
73 | text: "#cad3f5"
74 | subtext1: "#b8c0e0"
75 | subtext0: "#a5adcb"
76 | overlay2: "#939ab7"
77 | overlay1: "#8087a2"
78 | overlay0: "#6e738d"
79 | surface2: "#5b6078"
80 | surface1: "#494d64"
81 | surface0: "#363a4f"
82 | base: "#24273a"
83 | mantle: "#1e2030"
84 | crust: "#181926"
85 | }
86 | mocha: {
87 | rosewater: "#f5e0dc"
88 | flamingo: "#f2cdcd"
89 | pink: "#f5c2e7"
90 | mauve: "#cba6f7"
91 | red: "#f38ba8"
92 | maroon: "#eba0ac"
93 | peach: "#fab387"
94 | yellow: "#f9e2af"
95 | green: "#a6e3a1"
96 | teal: "#94e2d5"
97 | sky: "#89dceb"
98 | sapphire: "#74c7ec"
99 | blue: "#89b4fa"
100 | lavender: "#b4befe"
101 | text: "#cdd6f4"
102 | subtext1: "#bac2de"
103 | subtext0: "#a6adc8"
104 | overlay2: "#9399b2"
105 | overlay1: "#7f849c"
106 | overlay0: "#6c7086"
107 | surface2: "#585b70"
108 | surface1: "#45475a"
109 | surface0: "#313244"
110 | base: "#1e1e2e"
111 | mantle: "#181825"
112 | crust: "#11111b"
113 | }
114 | }
115 |
116 | # Regenerate with `run-external --redirect-stdout "nix" "run" "nixpkgs#vivid" "--" "generate" "catppuccin-mocha" | str trim | xclip -sel cl`
117 | $env.LS_COLORS = ((cat ~/.config/nushell/ls-colors) | str trim)
118 |
119 | let stheme = $catppuccin.mocha
120 | let theme = {
121 | separator: $stheme.overlay0
122 | leading_trailing_space_bg: $stheme.overlay0
123 | header: $stheme.green
124 | date: $stheme.mauve
125 | filesize: $stheme.blue
126 | row_index: $stheme.pink
127 | bool: $stheme.peach
128 | int: $stheme.peach
129 | duration: $stheme.peach
130 | range: $stheme.peach
131 | float: $stheme.peach
132 | string: $stheme.green
133 | nothing: $stheme.peach
134 | binary: $stheme.peach
135 | cellpath: $stheme.peach
136 | hints: dark_gray
137 |
138 | shape_garbage: { fg: $stheme.crust bg: $stheme.red attr: b }
139 | shape_bool: $stheme.blue
140 | shape_int: { fg: $stheme.mauve attr: b}
141 | shape_float: { fg: $stheme.mauve attr: b}
142 | shape_range: { fg: $stheme.yellow attr: b}
143 | shape_internalcall: { fg: $stheme.blue attr: b}
144 | shape_external: { fg: $stheme.blue attr: b}
145 | shape_externalarg: $stheme.text
146 | shape_literal: $stheme.blue
147 | shape_operator: $stheme.yellow
148 | shape_signature: { fg: $stheme.green attr: b}
149 | shape_string: $stheme.green
150 | shape_filepath: $stheme.yellow
151 | shape_globpattern: { fg: $stheme.blue attr: b}
152 | shape_variable: $stheme.text
153 | shape_flag: { fg: $stheme.blue attr: b}
154 | shape_custom: {attr: b}
155 | }
156 |
157 | $env.config = {
158 | show_banner: false
159 | cursor_shape: {
160 | vi_normal: block
161 | vi_insert: line
162 | }
163 | edit_mode: vi
164 | render_right_prompt_on_last_line: true
165 | rm: {
166 | always_trash: true
167 | }
168 | color_config: $theme
169 | keybindings: [
170 | {
171 | name: completion_menu
172 | modifier: none
173 | keycode: tab
174 | mode: [vi_normal, vi_insert]
175 | event: {
176 | until: [
177 | { send: menu name: completion_menu }
178 | { send: menunext }
179 | ]
180 | }
181 | }
182 | {
183 | name: completion_previous
184 | modifier: shift
185 | keycode: backtab
186 | mode: [vi_normal, vi_insert] # Note: You can add the same keybinding to all modes by using a list
187 | event: { send: menuprevious }
188 | }
189 | {
190 | name: jump_to_start
191 | keycode: char_h
192 | modifier: shift
193 | mode: [vi_normal]
194 | event: { edit: MoveToLineStart }
195 | }
196 | {
197 | name: jump_to_end
198 | modifier: shift
199 | keycode: char_l
200 | mode: [vi_normal]
201 | event: { edit: MoveToLineEnd }
202 | }
203 | ]
204 | completions: {
205 | algorithm: "fuzzy",
206 | }
207 | history: {
208 | max_size: 100_000 # Session has to be reloaded for this to take effect
209 | sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
210 | file_format: "sqlite" # "sqlite" or "plaintext"
211 | isolation: false # only available with sqlite file_format. true enables history isolation, false disables it.
212 | }
213 | hooks: {
214 | pre_prompt: [{ ||
215 | let direnv = (direnv export json | from json)
216 | let direnv = if ($direnv | table | length) == 1 { $direnv } else { {} }
217 | $direnv | load-env
218 | }]
219 | pre_execution: [{ || }]
220 | }
221 | }
222 |
223 | $env.PROMPT_INDICATOR_VI_INSERT = "I "
224 | $env.PROMPT_INDICATOR_VI_NORMAL = "N "
225 |
226 | # Aliases
227 | alias l = ls -l
228 | alias lg = lazygit
229 | def lge [] {
230 | do { wezterm start --cwd (pwd) --always-new-process lazygit } out> /dev/null
231 | }
232 |
233 | def sshi [] {
234 | echo 'Tap the YubiKey now:'; systemctl --user restart sops-nix; ssh-add ~/.ssh/github; echo 'Added Git SSH keys.'
235 | }
236 |
237 | # Modern unix
238 | alias grep = rg
239 | alias df = duf
240 | alias cat = bat
241 | alias dig = dog
242 |
243 | alias wget = wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
244 |
245 | use "~/.config/nushell/scripts/custom-completions/nix/nix-completions.nu" *
246 | use "~/.config/nushell/scripts/custom-completions/git/git-completions.nu" *
247 | use "~/.config/nushell/scripts/custom-completions/npm/npm-completions.nu" *
248 | # FIXME: Broken
249 | # use "~/.config/nushell/scripts/custom-completions/just/just-completions.nu" *
250 | use "~/.config/nushell/scripts/custom-completions/tealdeer/tldr-completions.nu" *
251 | use "~/.config/nushell/scripts/custom-completions/btm/btm-completions.nu" *
252 | use "~/.config/nushell/scripts/custom-completions/make/make-completions.nu" *
253 |
254 | source ~/.cache/starship/init.nu
255 | source ~/.cache/atuin/init.nu
256 | source ~/.cache/zoxide/init.nu
--------------------------------------------------------------------------------
/users/amy/apps/tools/nu/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | flakePath,
6 | nu_scripts,
7 | ...
8 | }: {
9 | programs.nushell = {
10 | enable = true;
11 | package = pkgs.unstable.nushell;
12 | };
13 |
14 | home.file = {
15 | "${config.xdg.configHome}/nushell/config.nu" = lib.mkForce {
16 | source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/users/amy/apps/tools/nu/config.nu";
17 | };
18 | "${config.xdg.configHome}/nushell/env.nu" = lib.mkForce {
19 | source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/users/amy/apps/tools/nu/env.nu";
20 | };
21 | "${config.xdg.configHome}/nushell/ls-colors" = {
22 | source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/users/amy/apps/tools/nu/ls-colors";
23 | };
24 | "${config.xdg.configHome}/nushell/env-nix.nu" = with lib; let
25 | environmentVariables = {
26 | # "-a" will launch emacs if the dameon is dead
27 | EDITOR = "nvim";
28 | GIT_EDITOR = "nvim";
29 | VISUAL = "neovide";
30 | TERMINAL = "wezterm";
31 |
32 | CARGO_HOME = "${config.xdg.dataHome}/cargo";
33 | HISTFILE = "${config.xdg.dataHome}/history";
34 | GNUPGHOME = "${config.xdg.dataHome}/gnupg";
35 | GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle";
36 | GTK2_RC_FILES = "${config.xdg.configHome}/gtk-2.0/gtkrc";
37 | XCURSOR_PATH = "/usr/share/icons:${config.xdg.dataHome}/icons";
38 | NODE_REPL_HISTORY = "${config.xdg.dataHome}/node_repl_history";
39 | _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=\"${config.xdg.configHome}\"/java";
40 | PLATFORMIO_CORE_DIR = "${config.xdg.dataHome}/platformio";
41 | RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
42 | WAKATIME_HOME = "${config.xdg.configHome}/wakatime";
43 | XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompose";
44 | # XAUTHORITY = "${config.xdg.runtimeDir}/Xauthority";
45 | };
46 | in {
47 | text = ''
48 | ${concatStringsSep "\n"
49 | (mapAttrsToList (k: v: "$env.${k} = \"${v}\"")
50 | environmentVariables)}
51 | '';
52 | };
53 | "${config.xdg.configHome}/nushell/scripts" = {
54 | source = nu_scripts;
55 | };
56 | };
57 | }
58 |
--------------------------------------------------------------------------------
/users/amy/apps/tools/nu/env.nu:
--------------------------------------------------------------------------------
1 | mkdir ~/.cache/starship
2 | starship init nu
3 | | str replace "term size -c" "term size"
4 | | str replace --all "let-env " "$env."
5 | | save -f ~/.cache/starship/init.nu
6 |
7 | mkdir ~/.cache/atuin
8 | atuin init nu --disable-up-arrow
9 | | save -f ~/.cache/atuin/init.nu
10 |
11 | mkdir ~/.cache/zoxide
12 | zoxide init nushell
13 | | str replace --all "-- $rest" "-- ...$rest"
14 | | str replace "--interactive -- $rest" "--interactive -- ...$rest"
15 | | save -f ~/.cache/zoxide/init.nu
16 |
17 | # from https://www.nushell.sh/cookbook/misc.html#manage-ssh-passphrases
18 | # and https://github.com/nushell/nushell/discussions/9192
19 |
20 | $env.SSH_AGENT_TIMEOUT = 300
21 | mkdir ~/.cache/ssh-agent/
22 |
23 | if ("~/.cache/ssh-agent/agent" | path exists) {
24 | let ssh_env = (open ~/.cache/ssh-agent/agent | from json)
25 |
26 | let nc = (do { ^nc -zU $ssh_env.SSH_AUTH_SOCK } | complete)
27 | let sock_exit = $nc.exit_code
28 |
29 | if ($sock_exit == 0) {
30 | $ssh_env | load-env
31 | } else {
32 | let ssh_env = (ssh-agent -c -t $env.SSH_AGENT_TIMEOUT
33 | | lines
34 | | first 2
35 | | parse "setenv {name} {value};"
36 | | transpose -i -r -d)
37 |
38 | $ssh_env | to json | save -f ~/.cache/ssh-agent/agent
39 | $ssh_env | load-env
40 | }
41 | } else {
42 | let ssh_env = (ssh-agent -c -t $env.SSH_AGENT_TIMEOUT
43 | | lines
44 | | first 2
45 | | parse "setenv {name} {value};"
46 | | transpose -i -r -d)
47 |
48 | $ssh_env | to json | save ~/.cache/ssh-agent/agent
49 | $ssh_env | load-env
50 | }
51 |
52 | if ("~/.ssh/github" | path exists ) {
53 | do { ssh-add ~/.ssh/github } o+e> /dev/null
54 | }
55 |
56 | source ~/.config/nushell/env-nix.nu
57 |
--------------------------------------------------------------------------------
/users/amy/apps/tools/nu/ls-colors:
--------------------------------------------------------------------------------
1 | *~=0;38;2;88;91;112:bd=0;38;2;116;199;236;48;2;49;50;68:ca=0:cd=0;38;2;245;194;231;48;2;49;50;68:di=0;38;2;137;180;250:do=0;38;2;17;17;27;48;2;245;194;231:ex=1;38;2;243;139;168:fi=0:ln=0;38;2;245;194;231:mh=0:mi=0;38;2;17;17;27;48;2;243;139;168:no=0:or=0;38;2;17;17;27;48;2;243;139;168:ow=0:pi=0;38;2;17;17;27;48;2;137;180;250:rs=0:sg=0:so=0;38;2;17;17;27;48;2;245;194;231:st=0:su=0:tw=0:*.a=1;38;2;243;139;168:*.c=0;38;2;166;227;161:*.d=0;38;2;166;227;161:*.h=0;38;2;166;227;161:*.m=0;38;2;166;227;161:*.o=0;38;2;88;91;112:*.p=0;38;2;166;227;161:*.r=0;38;2;166;227;161:*.t=0;38;2;166;227;161:*.z=4;38;2;116;199;236:*.7z=4;38;2;116;199;236:*.as=0;38;2;166;227;161:*.bc=0;38;2;88;91;112:*.bz=4;38;2;116;199;236:*.cc=0;38;2;166;227;161:*.cp=0;38;2;166;227;161:*.cr=0;38;2;166;227;161:*.cs=0;38;2;166;227;161:*.di=0;38;2;166;227;161:*.el=0;38;2;166;227;161:*.ex=0;38;2;166;227;161:*.fs=0;38;2;166;227;161:*.go=0;38;2;166;227;161:*.gv=0;38;2;166;227;161:*.gz=4;38;2;116;199;236:*.hh=0;38;2;166;227;161:*.hi=0;38;2;88;91;112:*.hs=0;38;2;166;227;161:*.jl=0;38;2;166;227;161:*.js=0;38;2;166;227;161:*.ko=1;38;2;243;139;168:*.kt=0;38;2;166;227;161:*.la=0;38;2;88;91;112:*.ll=0;38;2;166;227;161:*.lo=0;38;2;88;91;112:*.md=0;38;2;249;226;175:*.ml=0;38;2;166;227;161:*.mn=0;38;2;166;227;161:*.nb=0;38;2;166;227;161:*.pl=0;38;2;166;227;161:*.pm=0;38;2;166;227;161:*.pp=0;38;2;166;227;161:*.ps=0;38;2;243;139;168:*.py=0;38;2;166;227;161:*.rb=0;38;2;166;227;161:*.rm=0;38;2;242;205;205:*.rs=0;38;2;166;227;161:*.sh=0;38;2;166;227;161:*.so=1;38;2;243;139;168:*.td=0;38;2;166;227;161:*.ts=0;38;2;166;227;161:*.ui=0;38;2;249;226;175:*.vb=0;38;2;166;227;161:*.wv=0;38;2;242;205;205:*.xz=4;38;2;116;199;236:*.aif=0;38;2;242;205;205:*.ape=0;38;2;242;205;205:*.apk=4;38;2;116;199;236:*.arj=4;38;2;116;199;236:*.asa=0;38;2;166;227;161:*.aux=0;38;2;88;91;112:*.avi=0;38;2;242;205;205:*.awk=0;38;2;166;227;161:*.bag=4;38;2;116;199;236:*.bak=0;38;2;88;91;112:*.bat=1;38;2;243;139;168:*.bbl=0;38;2;88;91;112:*.bcf=0;38;2;88;91;112:*.bib=0;38;2;249;226;175:*.bin=4;38;2;116;199;236:*.blg=0;38;2;88;91;112:*.bmp=0;38;2;242;205;205:*.bsh=0;38;2;166;227;161:*.bst=0;38;2;249;226;175:*.bz2=4;38;2;116;199;236:*.c++=0;38;2;166;227;161:*.cfg=0;38;2;249;226;175:*.cgi=0;38;2;166;227;161:*.clj=0;38;2;166;227;161:*.com=1;38;2;243;139;168:*.cpp=0;38;2;166;227;161:*.css=0;38;2;166;227;161:*.csv=0;38;2;249;226;175:*.csx=0;38;2;166;227;161:*.cxx=0;38;2;166;227;161:*.deb=4;38;2;116;199;236:*.def=0;38;2;166;227;161:*.dll=1;38;2;243;139;168:*.dmg=4;38;2;116;199;236:*.doc=0;38;2;243;139;168:*.dot=0;38;2;166;227;161:*.dox=0;38;2;148;226;213:*.dpr=0;38;2;166;227;161:*.elc=0;38;2;166;227;161:*.elm=0;38;2;166;227;161:*.epp=0;38;2;166;227;161:*.eps=0;38;2;242;205;205:*.erl=0;38;2;166;227;161:*.exe=1;38;2;243;139;168:*.exs=0;38;2;166;227;161:*.fls=0;38;2;88;91;112:*.flv=0;38;2;242;205;205:*.fnt=0;38;2;242;205;205:*.fon=0;38;2;242;205;205:*.fsi=0;38;2;166;227;161:*.fsx=0;38;2;166;227;161:*.gif=0;38;2;242;205;205:*.git=0;38;2;88;91;112:*.gvy=0;38;2;166;227;161:*.h++=0;38;2;166;227;161:*.hpp=0;38;2;166;227;161:*.htc=0;38;2;166;227;161:*.htm=0;38;2;249;226;175:*.hxx=0;38;2;166;227;161:*.ico=0;38;2;242;205;205:*.ics=0;38;2;243;139;168:*.idx=0;38;2;88;91;112:*.ilg=0;38;2;88;91;112:*.img=4;38;2;116;199;236:*.inc=0;38;2;166;227;161:*.ind=0;38;2;88;91;112:*.ini=0;38;2;249;226;175:*.inl=0;38;2;166;227;161:*.ipp=0;38;2;166;227;161:*.iso=4;38;2;116;199;236:*.jar=4;38;2;116;199;236:*.jpg=0;38;2;242;205;205:*.kex=0;38;2;243;139;168:*.kts=0;38;2;166;227;161:*.log=0;38;2;88;91;112:*.ltx=0;38;2;166;227;161:*.lua=0;38;2;166;227;161:*.m3u=0;38;2;242;205;205:*.m4a=0;38;2;242;205;205:*.m4v=0;38;2;242;205;205:*.mid=0;38;2;242;205;205:*.mir=0;38;2;166;227;161:*.mkv=0;38;2;242;205;205:*.mli=0;38;2;166;227;161:*.mov=0;38;2;242;205;205:*.mp3=0;38;2;242;205;205:*.mp4=0;38;2;242;205;205:*.mpg=0;38;2;242;205;205:*.nix=0;38;2;249;226;175:*.odp=0;38;2;243;139;168:*.ods=0;38;2;243;139;168:*.odt=0;38;2;243;139;168:*.ogg=0;38;2;242;205;205:*.org=0;38;2;249;226;175:*.otf=0;38;2;242;205;205:*.out=0;38;2;88;91;112:*.pas=0;38;2;166;227;161:*.pbm=0;38;2;242;205;205:*.pdf=0;38;2;243;139;168:*.pgm=0;38;2;242;205;205:*.php=0;38;2;166;227;161:*.pid=0;38;2;88;91;112:*.pkg=4;38;2;116;199;236:*.png=0;38;2;242;205;205:*.pod=0;38;2;166;227;161:*.ppm=0;38;2;242;205;205:*.pps=0;38;2;243;139;168:*.ppt=0;38;2;243;139;168:*.pro=0;38;2;148;226;213:*.ps1=0;38;2;166;227;161:*.psd=0;38;2;242;205;205:*.pyc=0;38;2;88;91;112:*.pyd=0;38;2;88;91;112:*.pyo=0;38;2;88;91;112:*.rar=4;38;2;116;199;236:*.rpm=4;38;2;116;199;236:*.rst=0;38;2;249;226;175:*.rtf=0;38;2;243;139;168:*.sbt=0;38;2;166;227;161:*.sql=0;38;2;166;227;161:*.sty=0;38;2;88;91;112:*.svg=0;38;2;242;205;205:*.swf=0;38;2;242;205;205:*.swp=0;38;2;88;91;112:*.sxi=0;38;2;243;139;168:*.sxw=0;38;2;243;139;168:*.tar=4;38;2;116;199;236:*.tbz=4;38;2;116;199;236:*.tcl=0;38;2;166;227;161:*.tex=0;38;2;166;227;161:*.tgz=4;38;2;116;199;236:*.tif=0;38;2;242;205;205:*.tml=0;38;2;249;226;175:*.tmp=0;38;2;88;91;112:*.toc=0;38;2;88;91;112:*.tsx=0;38;2;166;227;161:*.ttf=0;38;2;242;205;205:*.txt=0;38;2;249;226;175:*.vcd=4;38;2;116;199;236:*.vim=0;38;2;166;227;161:*.vob=0;38;2;242;205;205:*.wav=0;38;2;242;205;205:*.wma=0;38;2;242;205;205:*.wmv=0;38;2;242;205;205:*.xcf=0;38;2;242;205;205:*.xlr=0;38;2;243;139;168:*.xls=0;38;2;243;139;168:*.xml=0;38;2;249;226;175:*.xmp=0;38;2;249;226;175:*.yml=0;38;2;249;226;175:*.zip=4;38;2;116;199;236:*.zsh=0;38;2;166;227;161:*.zst=4;38;2;116;199;236:*TODO=1:*hgrc=0;38;2;148;226;213:*.bash=0;38;2;166;227;161:*.conf=0;38;2;249;226;175:*.dart=0;38;2;166;227;161:*.diff=0;38;2;166;227;161:*.docx=0;38;2;243;139;168:*.epub=0;38;2;243;139;168:*.fish=0;38;2;166;227;161:*.flac=0;38;2;242;205;205:*.h264=0;38;2;242;205;205:*.hgrc=0;38;2;148;226;213:*.html=0;38;2;249;226;175:*.java=0;38;2;166;227;161:*.jpeg=0;38;2;242;205;205:*.json=0;38;2;249;226;175:*.less=0;38;2;166;227;161:*.lisp=0;38;2;166;227;161:*.lock=0;38;2;88;91;112:*.make=0;38;2;148;226;213:*.mpeg=0;38;2;242;205;205:*.opus=0;38;2;242;205;205:*.orig=0;38;2;88;91;112:*.pptx=0;38;2;243;139;168:*.psd1=0;38;2;166;227;161:*.psm1=0;38;2;166;227;161:*.purs=0;38;2;166;227;161:*.rlib=0;38;2;88;91;112:*.sass=0;38;2;166;227;161:*.scss=0;38;2;166;227;161:*.tbz2=4;38;2;116;199;236:*.tiff=0;38;2;242;205;205:*.toml=0;38;2;249;226;175:*.webm=0;38;2;242;205;205:*.webp=0;38;2;242;205;205:*.woff=0;38;2;242;205;205:*.xbps=4;38;2;116;199;236:*.xlsx=0;38;2;243;139;168:*.yaml=0;38;2;249;226;175:*.cabal=0;38;2;166;227;161:*.cache=0;38;2;88;91;112:*.class=0;38;2;88;91;112:*.cmake=0;38;2;148;226;213:*.dyn_o=0;38;2;88;91;112:*.ipynb=0;38;2;166;227;161:*.mdown=0;38;2;249;226;175:*.patch=0;38;2;166;227;161:*.scala=0;38;2;166;227;161:*.shtml=0;38;2;249;226;175:*.swift=0;38;2;166;227;161:*.toast=4;38;2;116;199;236:*.xhtml=0;38;2;249;226;175:*README=0;38;2;30;30;46;48;2;249;226;175:*passwd=0;38;2;249;226;175:*shadow=0;38;2;249;226;175:*.config=0;38;2;249;226;175:*.dyn_hi=0;38;2;88;91;112:*.flake8=0;38;2;148;226;213:*.gradle=0;38;2;166;227;161:*.groovy=0;38;2;166;227;161:*.ignore=0;38;2;148;226;213:*.matlab=0;38;2;166;227;161:*COPYING=0;38;2;147;153;178:*INSTALL=0;38;2;30;30;46;48;2;249;226;175:*LICENSE=0;38;2;147;153;178:*TODO.md=1:*.desktop=0;38;2;249;226;175:*.gemspec=0;38;2;148;226;213:*Doxyfile=0;38;2;148;226;213:*Makefile=0;38;2;148;226;213:*TODO.txt=1:*setup.py=0;38;2;148;226;213:*.DS_Store=0;38;2;88;91;112:*.cmake.in=0;38;2;148;226;213:*.fdignore=0;38;2;148;226;213:*.kdevelop=0;38;2;148;226;213:*.markdown=0;38;2;249;226;175:*.rgignore=0;38;2;148;226;213:*COPYRIGHT=0;38;2;147;153;178:*README.md=0;38;2;30;30;46;48;2;249;226;175:*configure=0;38;2;148;226;213:*.gitconfig=0;38;2;148;226;213:*.gitignore=0;38;2;148;226;213:*.localized=0;38;2;88;91;112:*.scons_opt=0;38;2;88;91;112:*CODEOWNERS=0;38;2;148;226;213:*Dockerfile=0;38;2;249;226;175:*INSTALL.md=0;38;2;30;30;46;48;2;249;226;175:*README.txt=0;38;2;30;30;46;48;2;249;226;175:*SConscript=0;38;2;148;226;213:*SConstruct=0;38;2;148;226;213:*.gitmodules=0;38;2;148;226;213:*.synctex.gz=0;38;2;88;91;112:*.travis.yml=0;38;2;166;227;161:*INSTALL.txt=0;38;2;30;30;46;48;2;249;226;175:*LICENSE-MIT=0;38;2;147;153;178:*MANIFEST.in=0;38;2;148;226;213:*Makefile.am=0;38;2;148;226;213:*Makefile.in=0;38;2;88;91;112:*.applescript=0;38;2;166;227;161:*.fdb_latexmk=0;38;2;88;91;112:*CONTRIBUTORS=0;38;2;30;30;46;48;2;249;226;175:*appveyor.yml=0;38;2;166;227;161:*configure.ac=0;38;2;148;226;213:*.clang-format=0;38;2;148;226;213:*.gitattributes=0;38;2;148;226;213:*.gitlab-ci.yml=0;38;2;166;227;161:*CMakeCache.txt=0;38;2;88;91;112:*CMakeLists.txt=0;38;2;148;226;213:*LICENSE-APACHE=0;38;2;147;153;178:*CONTRIBUTORS.md=0;38;2;30;30;46;48;2;249;226;175:*.sconsign.dblite=0;38;2;88;91;112:*CONTRIBUTORS.txt=0;38;2;30;30;46;48;2;249;226;175:*requirements.txt=0;38;2;148;226;213:*package-lock.json=0;38;2;88;91;112:*.CFUserTextEncoding=0;38;2;88;91;112
--------------------------------------------------------------------------------
/users/amy/apps/tools/sh.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | flakePath,
6 | system,
7 | ...
8 | }: {
9 | imports = [
10 | ./zsh.nix
11 | ./nu
12 | ];
13 |
14 | programs.atuin = {
15 | enable = true;
16 | flags = ["--disable-up-arrow"];
17 | package = pkgs.unstable.atuin;
18 | settings = {
19 | dialect = "uk";
20 | show_help = false;
21 | };
22 | };
23 |
24 | programs.zoxide = {
25 | enable = true;
26 | enableNushellIntegration = true;
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/users/amy/apps/tools/starship.toml:
--------------------------------------------------------------------------------
1 | "$schema" = "https://starship.rs/config-schema.json"
2 |
3 | format = """
4 | [ ](bg:red)\
5 | $directory\
6 | $username\
7 | $hostname\
8 | $container\
9 | $sudo\
10 | $shlvl\
11 | [](fg:red bg:peach)\
12 | $vcsh\
13 | $git_branch\
14 | $git_commit\
15 | $git_state\
16 | $git_status\
17 | $git_metrics\
18 | [](fg:peach bg:yellow)\
19 | $cmd_duration\
20 | $status\
21 | [](fg:yellow bg:green)\
22 | $deno\
23 | $golang\
24 | $helm\
25 | $lua\
26 | $nodejs\
27 | $php\
28 | $python\
29 | $rust\
30 | [](fg:green bg:blue)\
31 | $package\
32 | $nix_shell\
33 | [](fg:blue bg:mauve)\
34 | $azure\
35 | $docker_context\
36 | $kubernetes\
37 | [](fg:mauve)\
38 | $line_break\
39 | $shell\
40 | $character"""
41 |
42 | add_newline = true
43 | palette = "catppuccin_mocha"
44 |
45 | [directory]
46 | format = "[$path]($style)[$read_only]($read_only_style)"
47 | style = 'bg:red fg:#000000'
48 | read_only = ''
49 | use_os_path_sep = false
50 |
51 | [username]
52 | format = '[ $user]($style)'
53 | style_root = 'bg:red fg:#000000'
54 | style_user = 'bg:red fg:#000000'
55 |
56 | [hostname]
57 | format = '[$ssh_symbol$hostname ]($style)'
58 | style = 'bg:red fg:#000000'
59 | ssh_symbol = '@'
60 |
61 | [container]
62 | format = '[$hostname]($style)'
63 | style = 'bg:red fg:#000000'
64 |
65 | [sudo]
66 | disabled = false
67 | format = '[$symbol]($style)'
68 | style = 'bg:red fg:#000000'
69 | symbol = ' '
70 |
71 | [shlvl]
72 | style = 'bg:red fg:#000000'
73 |
74 | ### VCS
75 | [git_branch]
76 | symbol = ' '
77 | format = '[$symbol$branch]($style)'
78 | style = 'bg:peach fg:#000000'
79 |
80 | [hg_branch]
81 | format = '[$symbol$branch]($style)'
82 | style = 'bg:peach fg:#000000'
83 |
84 | [git_commit]
85 | format = '[\($hash$tag\)]($style)'
86 | tag_disabled = false
87 | tag_symbol = ' '
88 | style = 'bg:peach fg:#000000'
89 |
90 | [git_state]
91 | format = '[\($state( $progress_current/$progress_total)\)]($style)'
92 | style = 'bg:peach fg:#000000'
93 |
94 | [git_metrics]
95 | format = '([ +$added]($added_style)[/](bg:peach fg:#000000)[-$deleted]($deleted_style))'
96 | added_style = 'bg:peach fg:#000000'
97 | deleted_style = 'bg:peach fg:#000000'
98 | disabled = false
99 |
100 | [git_status]
101 | format = '([ $all_status$ahead_behind]($style))'
102 | ahead = "↑"
103 | behind = "↓"
104 | conflicted = "!"
105 | deleted = ""
106 | diverged = "↕"
107 | modified = "*"
108 | renamed = ""
109 | untracked = ""
110 | staged = ""
111 | stashed = ""
112 | style = 'bg:peach fg:#000000'
113 |
114 | [cmd_duration]
115 | format = '[$duration]($style)'
116 | style = 'bg:yellow fg:#000000'
117 | show_milliseconds = true
118 | min_time = 0
119 |
120 | [status]
121 | style = 'bg:yellow fg:#000000'
122 |
123 | ### LANGUAGE VERSION INDICATORS
124 | [c]
125 | format = '[ $symbol($version(-$name)) ]($style)'
126 | style = 'bg:green fg:#000000'
127 |
128 | [cmake]
129 | format = '[ $symbol($version) ]($style)'
130 | style = 'bg:green fg:#000000'
131 |
132 | [cobol]
133 | format = '[ $symbol($version) ]($style)'
134 | style = 'bg:green fg:#000000'
135 |
136 | [conda]
137 | format = '[ $symbol$environment ]($style)'
138 | style = 'bg:green fg:#000000'
139 |
140 | [crystal]
141 | format = '[ $symbol($version) ]($style)'
142 | style = 'bg:green fg:#000000'
143 |
144 | [dart]
145 | format = '[ $symbol($version) ]($style)'
146 | style = 'bg:green fg:#000000'
147 |
148 | [deno]
149 | format = '[ $symbol($version) ]($style)'
150 | style = 'bg:green fg:#000000'
151 |
152 | [dotnet]
153 | format = '[ $symbol($version)( $tfm) ]($style)'
154 | style = 'bg:green fg:#000000'
155 |
156 | [elixir]
157 | format = '[ $symbol($version \(OTP $otp_version\)) ]($style)'
158 | style = 'bg:green fg:#000000'
159 |
160 | [elm]
161 | format = '[ $symbol($version) ]($style)'
162 | style = 'bg:green fg:#000000'
163 |
164 | [erlang]
165 | format = '[ $symbol($version) ]($style)'
166 | style = 'bg:green fg:#000000'
167 |
168 | [golang]
169 | symbol = ' '
170 | format = '[ $symbol($version) ]($style)'
171 | style = 'bg:green fg:#000000'
172 |
173 | [haskell]
174 | symbol = ' '
175 | format = '[ $symbol($version) ]($style)'
176 | style = 'bg:green fg:#000000'
177 |
178 | [helm]
179 | symbol = 'ﴱ '
180 | format = '[ $symbol($version) ]($style)'
181 | style = 'bg:green fg:#000000'
182 |
183 | [java]
184 | symbol = ' '
185 | format = '[ $symbol($version) ]($style)'
186 | style = 'bg:green fg:#000000'
187 |
188 | [julia]
189 | format = '[ $symbol($version) ]($style)'
190 | style = 'bg:green fg:#000000'
191 |
192 | [kotlin]
193 | format = '[ $symbol($version) ]($style)'
194 | style = 'bg:green fg:#000000'
195 |
196 | [lua]
197 | symbol = ' '
198 | format = '[ $symbol($version) ]($style)'
199 | style = 'bg:green fg:#000000'
200 |
201 | [nim]
202 | format = '[ $symbol($version) ]($style)'
203 | style = 'bg:green fg:#000000'
204 |
205 | [nix_shell]
206 | format = '[ $symbol$state( \($name\)) ]($style)'
207 | symbol = ' '
208 | style = 'bg:blue fg:#000000'
209 |
210 | [nodejs]
211 | format = '[ $symbol($version) ]($style)'
212 | style = 'bg:green fg:#000000'
213 |
214 | [ocaml]
215 | format = '[ $symbol($version)(\($switch_indicator$switch_name\)) ]($style)'
216 | style = 'bg:green fg:#000000'
217 |
218 | [perl]
219 | format = '[ $symbol($version) ]($style)'
220 | style = 'bg:green fg:#000000'
221 |
222 | [php]
223 | symbol = ' '
224 | format = '[ $symbol($version) ]($style)'
225 | style = 'bg:green fg:#000000'
226 |
227 | [pulumi]
228 | format = '[ $symbol$stack ]($style)'
229 | style = 'bg:green fg:#000000'
230 |
231 | [purescript]
232 | format = '[ $symbol($version) ]($style)'
233 | style = 'bg:green fg:#000000'
234 |
235 | [python]
236 | symbol = ' '
237 | format = '[ ${symbol}${pyenv_prefix}(${version})(\($virtualenv\)) ]($style)'
238 | style = 'bg:green fg:#000000'
239 |
240 | [red]
241 | format = '[ $symbol($version) ]($style)'
242 | style = 'bg:green fg:#000000'
243 |
244 | [ruby]
245 | symbol = ' '
246 | format = '[ $symbol($version) ]($style)'
247 | style = 'bg:green fg:#000000'
248 |
249 | [rust]
250 | symbol = ' '
251 | format = '[ $symbol($version) ]($style)'
252 | style = 'bg:green fg:#000000'
253 |
254 | [scala]
255 | format = '[ $symbol($version) ]($style)'
256 | style = 'bg:green fg:#000000'
257 |
258 | [spack]
259 | format = '[ $symbol$environment ]($style)'
260 | style = 'bg:green fg:#000000'
261 |
262 | [swift]
263 | symbol = ' '
264 | format = '[ $symbol($version) ]($style)'
265 | style = 'bg:green fg:#000000'
266 |
267 | [vagrant]
268 | format = '[ $symbol($version) ]($style)'
269 | style = 'bg:green fg:#000000'
270 |
271 | [vlang]
272 | format = '[ $symbol($version) ]($style)'
273 | style = 'bg:green fg:#000000'
274 |
275 | [zig]
276 | format = '[ $symbol($version) ]($style)'
277 | style = 'bg:green fg:#000000'
278 |
279 | ### PACKAGE INDICATORS
280 |
281 | [package]
282 | symbol = ' '
283 | format = '[ $symbol$version ]($style)'
284 | style = 'bg:blue fg:#000000'
285 |
286 | ### CONTEXT INDICATORS
287 | [aws]
288 | symbol = ' '
289 | format = '[ $symbol($profile)(\($region\))(\[$duration\]) ]($style)'
290 | style = 'bg:mauve fg:#000000'
291 |
292 | [docker_context]
293 | symbol = ' '
294 | format = '[ $symbol$context ]($style)'
295 | style = 'bg:mauve fg:#000000'
296 |
297 | [gcloud]
298 | symbol = ' '
299 | format = '[ $symbol$account(@$domain)(\($region\)) ]($style)'
300 | style = 'bg:mauve fg:#000000'
301 |
302 | [kubernetes]
303 | symbol = ' '
304 | format = '[ $symbol($cluster/$namespace) ]($style)'
305 | disabled = false
306 | style = 'bg:mauve fg:#000000'
307 |
308 | [openstack]
309 | symbol = ' '
310 | format = '[ $symbol$cloud(\($project\)) ]($style)'
311 | style = 'bg:mauve fg:#000000'
312 |
313 | [terraform]
314 | format = '[ $symbol$workspace ]($style)'
315 | style = 'bg:mauve fg:#000000'
316 |
317 | ### STATUS INDICATORS
318 |
319 | [character]
320 | success_symbol = '[>](bold cyan)'
321 | error_symbol = '[>](bold red)'
322 | vimcmd_symbol = '[>](bold cyan)'
323 |
324 | [palettes.catppuccin_latte]
325 | rosewater = "#dc8a78"
326 | flamingo = "#dd7878"
327 | pink = "#ea76cb"
328 | mauve = "#8839ef"
329 | red = "#d20f39"
330 | maroon = "#e64553"
331 | peach = "#fe640b"
332 | yellow = "#df8e1d"
333 | green = "#40a02b"
334 | teal = "#179299"
335 | sky = "#04a5e5"
336 | sapphire = "#209fb5"
337 | blue = "#1e66f5"
338 | lavender = "#7287fd"
339 | text = "#4c4f69"
340 | subtext1 = "#5c5f77"
341 | subtext0 = "#6c6f85"
342 | overlay2 = "#7c7f93"
343 | overlay1 = "#8c8fa1"
344 | overlay0 = "#9ca0b0"
345 | surface2 = "#acb0be"
346 | surface1 = "#bcc0cc"
347 | surface0 = "#ccd0da"
348 | base = "#eff1f5"
349 | mantle = "#e6e9ef"
350 | crust = "#dce0e8"
351 |
352 | [palettes.catppuccin_mocha]
353 | rosewater = "#f5e0dc"
354 | flamingo = "#f2cdcd"
355 | pink = "#f5c2e7"
356 | mauve = "#cba6f7"
357 | red = "#f38ba8"
358 | maroon = "#eba0ac"
359 | peach = "#fab387"
360 | yellow = "#f9e2af"
361 | green = "#a6e3a1"
362 | teal = "#94e2d5"
363 | sky = "#89dceb"
364 | sapphire = "#74c7ec"
365 | blue = "#89b4fa"
366 | lavender = "#b4befe"
367 | text = "#cdd6f4"
368 | subtext1 = "#bac2de"
369 | subtext0 = "#a6adc8"
370 | overlay2 = "#9399b2"
371 | overlay1 = "#7f849c"
372 | overlay0 = "#6c7086"
373 | surface2 = "#585b70"
374 | surface1 = "#45475a"
375 | surface0 = "#313244"
376 | base = "#1e1e2e"
377 | mantle = "#181825"
378 | crust = "#11111b"
379 |
--------------------------------------------------------------------------------
/users/amy/apps/tools/zsh.nix:
--------------------------------------------------------------------------------
1 | # ZSH settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | flakePath,
7 | system,
8 | ...
9 | }: {
10 | programs = {
11 | bat.enable = true;
12 |
13 | btop = {
14 | enable = true;
15 | settings = {
16 | theme_background = false;
17 | vim_keys = true;
18 | };
19 | };
20 |
21 | direnv.enable = true;
22 | direnv.nix-direnv.enable = true;
23 |
24 | fzf.enable = true;
25 |
26 | lsd = {
27 | enable = true;
28 | enableAliases = true;
29 | };
30 |
31 | mcfly = {
32 | enable = true;
33 | keyScheme = "vim";
34 | fuzzySearchFactor = 3;
35 | };
36 |
37 | # Support command-not-found in zsh
38 | nix-index.enable = true;
39 |
40 | starship = {
41 | enable = true;
42 | };
43 |
44 | tealdeer = {
45 | enable = true;
46 | settings = {
47 | updates = {
48 | auto_update = true;
49 | };
50 | display = {
51 | compact = false;
52 | };
53 | style = {
54 | command_name = {
55 | foreground = "red";
56 | bold = false;
57 | };
58 | example_text = {
59 | foreground = "green";
60 | bold = false;
61 | };
62 | example_code = {
63 | foreground = "blue";
64 | bold = false;
65 | };
66 | example_variable = {
67 | foreground = "blue";
68 | underline = false;
69 | bold = false;
70 | };
71 | };
72 | };
73 | };
74 | };
75 |
76 | xdg.configFile = let
77 | symlink = fileName: {recursive ? false}: {
78 | source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/${fileName}";
79 | inherit recursive;
80 | };
81 | in {
82 | "starship.toml" = symlink "users/${system.currentUser}/apps/tools/starship.toml" {};
83 | };
84 |
85 | programs.zsh = {
86 | enable = true;
87 | enableCompletion = true;
88 |
89 | # Intentionally doesnt use the full path
90 | dotDir = ".config/zsh";
91 | history.path = "${config.xdg.dataHome}/zsh-history";
92 |
93 | # OMZ Plugins
94 | plugins = [
95 | {
96 | name = "zsh-autosuggestions";
97 | src = pkgs.fetchFromGitHub {
98 | owner = "zsh-users";
99 | repo = "zsh-autosuggestions";
100 | rev = "a411ef3e0992d4839f0732ebeb9823024afaaaa8";
101 | sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98";
102 | };
103 | }
104 | {
105 | name = "zsh-syntax-highlighting";
106 | src = pkgs.fetchFromGitHub {
107 | owner = "zsh-users";
108 | repo = "zsh-syntax-highlighting";
109 | rev = "caa749d030d22168445c4cb97befd406d2828db0";
110 | sha256 = "17ck9lm8j6bv9fhag827kxrbwdwbhhss0sw7p1yz7nhpknj6apv1";
111 | };
112 | }
113 | {
114 | name = "zsh-nix-shell";
115 | file = "nix-shell.plugin.zsh";
116 | src = pkgs.fetchFromGitHub {
117 | owner = "chisui";
118 | repo = "zsh-nix-shell";
119 | rev = "v0.5.0";
120 | sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91";
121 | };
122 | }
123 | ];
124 |
125 | # Aliases
126 | shellAliases = {
127 | py = "python";
128 | nv = "neovide";
129 | lg = "lazygit";
130 |
131 | nix-clean = "pushd ${flakePath} && just clean; popd";
132 | nix-switch = "pushd ${flakePath} && just switch; popd";
133 | nix-update = "pushd ${flakePath} && just upgrade; popd";
134 | secret-reload = "echo 'Tap the YubiKey now:' && systemctl --user restart sops-nix && ssh-add ~/.ssh/github && echo 'Added Git SSH keys.'";
135 |
136 | # ;true swallows any additional args, instead of echoing them out with our echo
137 | nix-env = "echo 'do not the nix-env. https://stop-using-nix-env.privatevoid.net'; true";
138 |
139 | sxhkd-switch = "pkill -usr1 -x sxhkd";
140 | bspwm-switch = "bspc wm --restart";
141 | wallpaper-switch = "bash ${../../wallpapers}/sh/random-switch.sh";
142 |
143 | mkcd = "mkdir \"$1\" && cd \"$1\"";
144 | wget = "wget --hsts-file=\"$XDG_DATA_HOME/wget-hsts\"";
145 |
146 | # Modern unix
147 | grep = "rg $@";
148 | find = "fd $@";
149 | df = "duf $@";
150 | cat = "bat $@";
151 | dig = "dog $@";
152 | };
153 |
154 | # OMZ Config
155 | oh-my-zsh = {
156 | enable = true;
157 | theme = "philips";
158 | plugins = [
159 | "git"
160 | "ssh-agent"
161 | ];
162 | };
163 |
164 | envExtra = ''
165 | export MCFLY_DISABLE_MENU=TRUE
166 | '';
167 |
168 | initExtra = ''
169 | # Little helper because doing the spawning in ZSH causes many issues
170 | # also we use "bash-isms" in the script
171 | function shell { bash ~/shells/spawn-shell.sh $@; }
172 |
173 | mkdir -p "$(dirname "$HISTFILE")"
174 |
175 | eval "$(mcfly init zsh)"
176 | '';
177 | };
178 | }
179 |
--------------------------------------------------------------------------------
/users/amy/apps/ui/alacritty.nix:
--------------------------------------------------------------------------------
1 | # Alacritty settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | programs.alacritty = {
9 | enable = true;
10 | settings = {
11 | # Colors (Catppuccin Mocha)
12 | colors = {
13 | primary = {
14 | background = "#1E1E2E";
15 | foreground = "#CDD6F4";
16 | dim_foreground = "#CDD6F4";
17 | bright_foreground = "#CDD6F4";
18 |
19 | cursor = {
20 | text = "#1E1E2E";
21 | cursor = "#F5E0DC";
22 | };
23 |
24 | search = {
25 | matches = {
26 | foreground = "#1E1E2E";
27 | background = "#A6ADC8";
28 | };
29 | focused_match = {
30 | foreground = "#1E1E2E";
31 | background = "#A6E3A1";
32 | };
33 | footer_bar = {
34 | foreground = "#1E1E2E";
35 | background = "#A6ADC8";
36 | };
37 | };
38 | };
39 |
40 | hints = {
41 | start = {
42 | foreground = "#1E1E2E";
43 | background = "#F9E2AF";
44 | };
45 | end = {
46 | foreground = "#1E1E2E";
47 | background = "#A6ADC8";
48 | };
49 | };
50 |
51 | selection = {
52 | text = "#1E1E2E";
53 | background = "#F5E0DC";
54 | };
55 |
56 | normal = {
57 | black = "#45475A";
58 | red = "#F38BA8";
59 | green = "#A6E3A1";
60 | yellow = "#F9E2AF";
61 | blue = "#89B4FA";
62 | magenta = "#F5C2E7";
63 | cyan = "#94E2D5";
64 | white = "#BAC2DE";
65 | };
66 |
67 | bright = {
68 | black = "#585B70";
69 | red = "#F38BA8";
70 | green = "#A6E3A1";
71 | yellow = "#F9E2AF";
72 | blue = "#89B4FA";
73 | magenta = "#F5C2E7";
74 | cyan = "#94E2D5";
75 | white = "#A6ADC8";
76 | };
77 |
78 | dim = {
79 | black = "#45475A";
80 | red = "#F38BA8";
81 | green = "#A6E3A1";
82 | yellow = "#F9E2AF";
83 | blue = "#89B4FA";
84 | magenta = "#F5C2E7";
85 | cyan = "#94E2D5";
86 | white = "#BAC2DE";
87 | };
88 |
89 | indexed_colours = [
90 | {
91 | index = 16;
92 | color = "#FAB387";
93 | }
94 | {
95 | index = 16;
96 | color = "#F5E0DC";
97 | }
98 | ];
99 | };
100 |
101 | font = {
102 | normal = {
103 | family = "VictorMono Nerd Font Mono";
104 | style = "Medium";
105 | };
106 |
107 | bold = {
108 | family = "VictorMono Nerd Font Mono";
109 | style = "Bold";
110 | };
111 |
112 | italic = {
113 | family = "VictorMono Nerd Font Mono";
114 | style = "Medium";
115 | };
116 |
117 | bold_italic = {
118 | family = "VictorMono Nerd Font Mono";
119 | style = "Medium Bold";
120 | };
121 |
122 | size = 13.0;
123 | };
124 |
125 | cursor = {
126 | style = {
127 | shape = "Beam";
128 | blinking = "Off";
129 | };
130 | };
131 |
132 | dynamic_padding = true;
133 | };
134 | };
135 | }
136 |
--------------------------------------------------------------------------------
/users/amy/apps/ui/bspwm.nix:
--------------------------------------------------------------------------------
1 | # Bspwm settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: let
8 | mod = "mod1";
9 | in {
10 | xsession.windowManager.bspwm = {
11 | enable = true;
12 | settings = {};
13 | extraConfig = ''
14 | bspc monitor -d Web Music Discord Editor Notes Email 7 8 9 10
15 |
16 | # Mice bindings
17 | # Set mod key
18 | bspc config pointer_modifier ${mod}
19 |
20 | # Set mouse 1 to move floating windows
21 | bspc config pointer_action1 move
22 |
23 | # Mouse 2 button resizes the window by side
24 | bspc config pointer_action2 resize_side
25 |
26 | # Mouse 3 button (right mouse) resize by corner
27 | bspc config pointer_action2 resize_corner
28 |
29 | bspc config focus_follows_pointer true
30 | bspc config automatic_scheme alternate
31 | '';
32 |
33 | rules = {
34 | "vesktop" = {
35 | desktop = "^3";
36 | follow = false;
37 | };
38 | "Spotify" = {
39 | desktop = "^2";
40 | follow = false;
41 | };
42 | "apple-music" = {
43 | desktop = "^2";
44 | follow = false;
45 | };
46 | "obsidian" = {
47 | desktop = "^5";
48 | follow = false;
49 | };
50 | "thunderbird" = {
51 | desktop = "^6";
52 | follow = false;
53 | };
54 | };
55 |
56 | startupPrograms = [
57 | "nm-applet"
58 | "${pkgs.polkit_gnome} /libexec/polkit-gnome-authentication-agent-1"
59 | "polybar -r top"
60 | "flameshot"
61 | "redshift -P -O 2500"
62 | "vesktop"
63 | "thunderbird"
64 | "spotify" # Launch spotifywm instead, which has WM bug fixes (https://github.com/dasJ/spotifywm). Nix sets this up https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/by-name/sp/spotifywm/package.nix#L49
65 | # "apple-music-via-google-chrome"
66 | "obsidian"
67 | "xrandr --output DP-3 --mode 3440x1440 --rate 165 --primary"
68 | ];
69 | };
70 |
71 | services.sxhkd = {
72 | enable = true;
73 |
74 | keybindings = {
75 | "${mod} + Return" = "wezterm";
76 | "${mod} + shift + q" = "bspc node -c";
77 | "${mod} + d" = "rofi -show drun -no-lazy-grab -lines 15 -width 40";
78 | "${mod} + r" = "bspc node @focused:/ --rotate 90";
79 | "${mod} + shift + r" = "bspc node @focused:/ --rotate 180";
80 | "${mod} + y" = "bspc node @parent -R 90";
81 | "Print" = "flameshot gui";
82 | };
83 |
84 | extraConfig = ''
85 | # Switch to different workspaces with back-and-forth support
86 | ${mod} + {1-9,0}
87 | desktop='^{1-9,10}'; \
88 | bspc query -D -d "$desktop.focused" && bspc desktop -f last || bspc desktop -f "$desktop"
89 |
90 | # Move windows to different workspaces
91 | ${mod} + shift + {1-9,0}
92 | bspc node -d ^{1-9,10}
93 |
94 | # Expand/contract a window by moving one of its side outward/inward
95 | ${mod} + s : {h,j,k,l}
96 | STEP=30; SELECTION={1,2,3,4}; \
97 | bspc node -z $(echo "left -$STEP 0,bottom 0 $STEP,top 0 -$STEP,right $STEP 0" | cut -d',' -f$SELECTION) || \
98 | bspc node -z $(echo "right -$STEP 0,top 0 $STEP,bottom 0 -$STEP,left $STEP 0" | cut -d',' -f$SELECTION)
99 |
100 | ${mod} + {t,shift + t,f,shift + f}
101 | bspc node -t '~{tiled,pseudo_tiled,floating,fullscreen}'
102 |
103 | ${mod} + /
104 | ${../dedicated/bspwm-scripts/sxhkd-help.sh}
105 |
106 | ${mod} + p
107 | ${../dedicated/bspwm-scripts/powermenu.sh}
108 |
109 | # focus the node in the given direction
110 | ${mod} + {_,shift + }{h,j,k,l}
111 | bspc node -{f,s} {west,south,north,east}
112 | '';
113 | };
114 | }
115 |
--------------------------------------------------------------------------------
/users/amy/apps/ui/chromium.nix:
--------------------------------------------------------------------------------
1 | # Chromium settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | programs.chromium = {
9 | enable = true;
10 | commandLineArgs = ["--force-dark-mode" "--enable-features=WebUIDarkMode"];
11 | extensions = [
12 | {id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # uBlock Origin
13 | {id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";} # Dark Reader
14 | {id = "aeblfdkhhhdcdjpifhhbdiojplfjncoa";} # 1Password
15 | {id = "mnjggcdmjocbbbhaepdhchncahnbgone";} # SponsorBlock
16 | {id = "hlepfoohegkhhmjieoechaddaejaokhf";} # Refined GitHub
17 | {id = "jehmdpemhgfgjblpkilmeoafmkhbckhi";} # ScrollAnywhere
18 | {id = "dhdgffkkebhmkfjojejmpbldmpobfkfo";} # TamperMonkey
19 | ];
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/users/amy/apps/ui/default.nix:
--------------------------------------------------------------------------------
1 | {...}: {
2 | imports = [
3 | ./alacritty.nix
4 | ./bspwm.nix
5 | ./chromium.nix
6 | ./dunst.nix
7 | ./flameshot.nix
8 | ./gtk.nix
9 | ./polybar.nix
10 | ./rofi.nix
11 | ];
12 | }
13 |
--------------------------------------------------------------------------------
/users/amy/apps/ui/dunst.nix:
--------------------------------------------------------------------------------
1 | # Dunst settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | services.dunst = {
9 | enable = true;
10 | settings = {
11 | global = {
12 | font = "FantasqueSansM Nerd Font Mono";
13 | # font = "Berkeley Mono 12";
14 | # font = "Iosevka Term";
15 |
16 | # Allow markup in messages, bold italic etc
17 | markup = "full";
18 | plaintext = "no";
19 |
20 | # The format of the message. Possible variables are:
21 | # %a appname
22 | # %s summary
23 | # %b body
24 | # %i iconname (including its path)
25 | # %I iconname (without its path)
26 | # %p progress value if set ([ 0%] to [100%]) or nothing
27 | # Markup is allowed
28 | format = "%s\n%b";
29 |
30 | # Sort by severity
31 | sort = "yes";
32 |
33 | # Indicate if there's some amount of hidden messages
34 | indicate_hidden = "yes";
35 |
36 | # Align text in the center
37 | alignment = "center";
38 | vertical_alignment = "center";
39 |
40 | # The frequency at which text can scroll in the notification, we disable it.
41 | # We use word_wrap instead.
42 | bounce_freq = 0;
43 | word_wrap = "yes";
44 |
45 | # Hide duplicates and stack them instead
46 | # stack_duplicates = "yes";
47 | # hide_duplicate_count = "yes";
48 |
49 | # Respect newlines (\n)
50 | ignore_newline = "no";
51 |
52 | # Disable icons
53 | icon_position = "off";
54 |
55 | # The geometry of the window:
56 | # [{width}]x{height}[+/-{x}+/-{y}]
57 |
58 | # The geometry of the message window.
59 | # The height is measured in number of notifications everything else
60 | # in pixels. If the width is omitted but the height is given
61 | # ("-geometry x2"), the message window expands over the whole screen
62 | # (dmenu-like).
63 |
64 | # If width is 0, the window expands to the longest
65 | # message displayed. A positive x is measured from the left, a
66 | # negative from the right side of the screen. Y is measured from
67 | # the top and down respectevly.
68 |
69 | # The width can be negative. In this case the actual width is the
70 | # screen width minus the width defined in within the geometry option.
71 | # geometry = "250x50-40+40"
72 | geometry = "300x30-5+60";
73 |
74 | # Shrink window if it's smaller than the width.
75 | shrink = "no";
76 |
77 | # Don't remove messages if the user is idle (no mouse or keyboard input)
78 | # for longer than idle_threshold seconds.
79 | # Set to 0 to disable.
80 | idle_threshold = 0;
81 |
82 | # Which monitor should the notifications be displayed on.
83 | monitor = 0;
84 |
85 | # Display indicators for URLs (U) and actions (A).
86 | show_indicators = "no";
87 |
88 | # The height of a single line. If the height is smaller than the
89 | # font height, it will get raised to the font height.
90 | # This adds empty space above and under the text.
91 | line_height = 3;
92 |
93 | # Height of whole notification
94 | notification_height = 0;
95 |
96 | # Draw a line of "separatpr_height" pixel height between two
97 | # notifications.
98 | # Set to 0 to disable.
99 | separator_height = 2;
100 |
101 | # Padding between text and separator.
102 | padding = 8;
103 |
104 | # Horizontal padding.
105 | horizontal_padding = 8;
106 |
107 | # Define a color for the separator.
108 | # possible values are:
109 | # * auto: dunst tries to find a color fitting to the background;
110 | # * foreground: use the same color as the foreground;
111 | # * frame: use the same color as the frame;
112 | # * anything else will be interpreted as a X color.
113 | separator_color = "frame";
114 |
115 | # Print a notification on startup.
116 | # This is mainly for error detection, since dbus (re-)starts dunst
117 | # automatically after a crash.
118 | startup_notification = true;
119 |
120 | # Browser for opening urls in context menu.
121 | browser = "${pkgs.chromium} - new-tab";
122 |
123 | # Mouse
124 | # Left click
125 | mouse_left_click = "do_action";
126 | # Middle click
127 | mouse_middle_click = "close_current";
128 | # Right click
129 | mouse_right_click = "close_current";
130 |
131 | # History length
132 | history_length = 20;
133 | };
134 |
135 | # Appearance / theme
136 | global = {
137 | frame_width = 2;
138 | frame_color = "#89B4FA";
139 |
140 | # Corner radius of dunst
141 | corner_radius = 5;
142 | };
143 |
144 | urgency_low = {
145 | foreground = "#CDD6F4";
146 | background = "#1E1E2E";
147 | "#background" = "#1E1E2E";
148 | timeout = 4;
149 | };
150 |
151 | urgency_normal = {
152 | foreground = "#CDD6F4";
153 | background = "#1E1E2E";
154 | "#background" = "#1E1E2E";
155 | timeout = 6;
156 | };
157 |
158 | urgency_critical = {
159 | foreground = "#F38BA8";
160 | background = "#1E1E2E";
161 | "#background" = "#1E1E2E";
162 | timeout = 8;
163 | };
164 |
165 | # Shortcuts
166 | shortcuts = {
167 | # Close notification.
168 | close = "ctrl+space";
169 |
170 | # Close all notifications.
171 | close_all = "ctrl+shift+space";
172 |
173 | # Redisplay last message(s).
174 | history = "ctrl+grave";
175 |
176 | # Context menu.
177 | context = "ctrl+shift+period";
178 | };
179 | };
180 | };
181 | }
182 |
--------------------------------------------------------------------------------
/users/amy/apps/ui/flameshot.nix:
--------------------------------------------------------------------------------
1 | # Flameshot settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: let
8 | colors = [
9 | "#CC241D"
10 | "#98971A"
11 | "#D79921"
12 | "#D65D0E"
13 | "#458588"
14 | "#B16286"
15 | "#689D6A"
16 | "#A89984"
17 | ];
18 | in {
19 | services.flameshot = {
20 | enable = true;
21 | settings = {
22 | General = {
23 | showStartupLaunchMessage = false;
24 | predefinedColorPaletteLarge = true;
25 | showHelp = false;
26 | uiColor = "#282828";
27 | contrastUiColor = "#458588";
28 | userColors = "picker,${builtins.concatStringsSep "," colors}";
29 | drawColor = "#689D6A";
30 | };
31 | };
32 | };
33 | }
34 |
--------------------------------------------------------------------------------
/users/amy/apps/ui/gtk.nix:
--------------------------------------------------------------------------------
1 | # GTK settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: let
8 | theme = {
9 | name = "Catppuccin-Mocha-Lavender";
10 | package = pkgs.catppuccin-gtk;
11 | };
12 |
13 | iconTheme = {
14 | name = "oomox-gruvbox-dark";
15 | package = pkgs.gruvbox-dark-icons-gtk;
16 | };
17 |
18 | imports = [
19 | ./gtk2.nix
20 | {
21 | inherit theme;
22 | icons = iconTheme;
23 | }
24 | ];
25 | in {
26 | config.gtk = {
27 | enable = true;
28 | inherit theme;
29 | inherit iconTheme;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/users/amy/apps/ui/gtk2.nix:
--------------------------------------------------------------------------------
1 | # Credit: https://github.com/dbwest/nixos-files/blob/master/utils/gtk2Theme.nix
2 | # Parameters
3 | # theme = {
4 | # package = the package name of the theme
5 | # name = The location of the theme in .../share/themes/
6 | # }
7 | #
8 | # icons = {
9 | # package = the package name of the icon theme
10 | # name = The location of the icon pack in .../share/icons/
11 | # }
12 | #
13 | # returns a nix configuration function, so it
14 | # should be placed inside the imports configuration option.
15 | #
16 | # usage example:
17 | # in yout configuration.nix:
18 | #
19 | # imports = [ ...
20 | # import .../.../gtk2Theme.nix {
21 | # theme = {
22 | # package = pkgs.arc-theme;
23 | # name = "Arc";
24 | # };
25 | # icons = {
26 | # package = pkgs.breeze-icons;
27 | # name = "Breeze";
28 | # };
29 | # }
30 | #
31 | # ... ]
32 | {
33 | theme,
34 | icons,
35 | }: {
36 | pkgs,
37 | config,
38 | ...
39 | }: let
40 | themeEnv = ''
41 | export GTK2_RC_FILES=${pkgs.writeText "iconrc" ''gtk-icon-theme-name="${icons.name}"''}:${theme.package}/share/themes/${theme.name}/gtk-2.0/gtkrc:$GTK2_RC_FILES
42 | export GDK_PIXBUF_MODULE_FILE=$(echo ${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/*/loaders.cache)
43 | '';
44 | in {
45 | environment.extraInit = themeEnv;
46 | environment.systemPackages = [
47 | theme.package
48 | icons.package
49 | ];
50 | }
51 |
--------------------------------------------------------------------------------
/users/amy/apps/ui/polybar.nix:
--------------------------------------------------------------------------------
1 | # Polybar settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | services.polybar = {
9 | enable = true;
10 | script = "polybar -r top &";
11 | config = {
12 | colors = {
13 | background = "#1E1E2E";
14 | background-alt = "#181825";
15 | foreground = "#CDD6F4";
16 | alert = "#F38BA8";
17 | underline = "#A6E3A1";
18 | };
19 |
20 | "bar/top" = {
21 | width = "100%";
22 | height = "3%";
23 | radius = 6;
24 |
25 | background = "\${colors.background}";
26 | foreground = "\${colors.foreground}";
27 |
28 | line-size = 3;
29 | line-color = "\${colors.underline}";
30 |
31 | modules-left = "wm";
32 | modules-right = "memory cpu eth date";
33 |
34 | # font-0 = "Berkeley Mono:size=13;2";
35 | font-0 = "FantasqueSansM Nerd Font Mono:size=13;2";
36 | # font-0 = "Iosevka:size=13;2";
37 |
38 | border-size = "4pt";
39 | border-color = "#00000000";
40 |
41 | padding-left = 0;
42 | padding-right = 1;
43 |
44 | module-margin = 1;
45 |
46 | separator = "|";
47 | separator-foreground = "\${colors.foreground}";
48 |
49 | wm-restack = "generic";
50 | cursor-click = "pointer";
51 | };
52 |
53 | "module/wm" = {
54 | type = "internal/xworkspaces";
55 | wrapping-scroll = true;
56 |
57 | label-active = "%name%";
58 | label-active-background = "\${colors.background-alt}";
59 | label-active-underline = "\${colors.underline}";
60 | label-active-padding = 1;
61 |
62 | label-occupied = "%name%";
63 | label-occupied-padding = 1;
64 |
65 | label-urgent = "%name%";
66 | label-urgent-background = "\${colors.alert}";
67 | label-urgent-padding = 1;
68 |
69 | label-empty = "%name%";
70 | label-empty-foreground = "\${colors.background}";
71 | label-empty-padding = 1;
72 | };
73 |
74 | "module/cpu" = {
75 | type = "internal/cpu";
76 | interval = 2;
77 | format-prefix-foreground = "\${colors.foreground}";
78 | label = "CPU: %percentage:2%%";
79 | };
80 |
81 | "module/memory" = {
82 | type = "internal/memory";
83 | interval = 2;
84 | format-prefix-foreground = "\${colors.foreground}";
85 | label = "MEM: %percentage_used%%";
86 | };
87 |
88 | "module/eth" = {
89 | type = "internal/network";
90 | interface = "enp42s0";
91 | interval = 3;
92 |
93 | format-connected-prefix-foreground = "\${colors.foreground}";
94 | label-connected = "ETH: %local_ip%";
95 |
96 | label-disconnected = "ETH: N/A";
97 | };
98 |
99 | "module/date" = {
100 | type = "internal/date";
101 | interval = 5;
102 | date = "%d %b %Y";
103 | time = "%H:%M";
104 |
105 | label = "%date% @ %time%";
106 | };
107 |
108 | "settings" = {
109 | screenchange-reload = true;
110 | pseudo-transparency = true;
111 | };
112 |
113 | "global/wm" = {
114 | margin-top = 0;
115 | };
116 | };
117 | };
118 | }
119 |
--------------------------------------------------------------------------------
/users/amy/apps/ui/rofi.nix:
--------------------------------------------------------------------------------
1 | # Rofi settings
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | programs.rofi = {
9 | enable = true;
10 | theme = let
11 | inherit (config.lib.formats.rasi) mkLiteral;
12 | in {
13 | "*" = {
14 | bg-col = mkLiteral "#1e1e2e";
15 | bg-col-light = mkLiteral "#1e1e2e";
16 | border-col = mkLiteral "#181825";
17 | selected-col = mkLiteral "#1e1e2e";
18 | blue = mkLiteral "#89b4fa";
19 | fg-col = mkLiteral "#cdd6f4";
20 | fg-col2 = mkLiteral "#f38ba8";
21 | grey = mkLiteral "#6c7086";
22 |
23 | width = 600;
24 | };
25 | "element-text, element-icon, mode-switcher" = {
26 | background-color = mkLiteral "inherit";
27 | text-color = mkLiteral "inherit";
28 | };
29 |
30 | window = {
31 | height = mkLiteral "360px";
32 | border = mkLiteral "3px";
33 | border-color = mkLiteral "@border-col";
34 | background-color = mkLiteral "@bg-col";
35 | };
36 |
37 | mainbox = {
38 | background-color = mkLiteral "@bg-col";
39 | };
40 |
41 | inputbar = {
42 | children = map mkLiteral ["prompt" "entry"];
43 | background-color = mkLiteral "@bg-col";
44 | border-radius = mkLiteral "5px";
45 | padding = mkLiteral "2px";
46 | };
47 |
48 | prompt = {
49 | background-color = mkLiteral "@blue";
50 | padding = mkLiteral "6px";
51 | text-color = mkLiteral "@bg-col";
52 | border-radius = mkLiteral "3px";
53 | margin = mkLiteral "20px 0px 0px 20px";
54 | };
55 |
56 | textbox-prompt-colon = {
57 | expand = "false";
58 | str = ":";
59 | };
60 |
61 | entry = {
62 | padding = mkLiteral "6px";
63 | margin = mkLiteral "20px 0px 0px 10px";
64 | text-color = mkLiteral "@fg-col";
65 | background-color = mkLiteral "@bg-col";
66 | };
67 |
68 | listview = {
69 | border = mkLiteral "0px 0px 0px";
70 | padding = mkLiteral "6px 0px 0px";
71 | margin = mkLiteral "10px 0px 0px 20px";
72 | columns = "2";
73 | lines = "5";
74 | background-color = mkLiteral "@bg-col";
75 | };
76 |
77 | element = {
78 | padding = mkLiteral "5px";
79 | background-color = mkLiteral "@bg-col";
80 | text-color = mkLiteral "@fg-col";
81 | };
82 |
83 | element-icon = {
84 | size = mkLiteral "25px";
85 | };
86 |
87 | "element selected" = {
88 | background-color = mkLiteral "@selected-col";
89 | text-color = mkLiteral "@fg-col2";
90 | };
91 |
92 | mode-switcher = {
93 | spacing = 0;
94 | };
95 |
96 | button = {
97 | padding = mkLiteral "10px";
98 | background-color = mkLiteral "@bg-col-light";
99 | text-color = mkLiteral "@grey";
100 | vertical-align = mkLiteral "0.5";
101 | horizontal-align = mkLiteral "0.5";
102 | };
103 |
104 | "button selected" = {
105 | background-color = mkLiteral "@bg-col";
106 | text-color = mkLiteral "@blue";
107 | };
108 |
109 | textbox = {
110 | background-color = mkLiteral "inherit";
111 | text-color = mkLiteral "inherit";
112 | vertical-align = mkLiteral "0.5";
113 | horizontal-align = mkLiteral "0.0";
114 | placeholder-color = mkLiteral "@fg-col";
115 | blink = true;
116 | markup = true;
117 | };
118 |
119 | error-message = {
120 | padding = mkLiteral "10px";
121 | border = mkLiteral "0px solid";
122 | border-radius = mkLiteral "0px";
123 | border-color = mkLiteral "@border-col";
124 | background-color = mkLiteral "@bg-col";
125 | text-color = mkLiteral "@fg-col2";
126 | };
127 | };
128 |
129 | # font = "Iosevka 14";
130 | # font = "Berkeley Mono 13";
131 | font = "FantasqueSansM Nerd Font Mono 13";
132 | terminal = "wezterm";
133 | };
134 | }
135 |
--------------------------------------------------------------------------------
/users/amy/config.nix:
--------------------------------------------------------------------------------
1 | {
2 | currentUser = "amy";
3 | userName = "Amy";
4 | git = {
5 | userEmail = "git@amyerskine.me";
6 | userName = "nullishamy";
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/users/amy/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | ...
5 | }: let
6 | system = import ./config.nix;
7 | in {
8 | imports = [
9 | ];
10 |
11 | users.users.${system.currentUser} = {
12 | isNormalUser = true;
13 | description = system.userName;
14 | hashedPassword = "$6$EuVxrglUIHa0ojiz$Oy9JF.PIAmsb.5Vz9icDwbpPp0Mw5ct3aOAniJ0n/s7.3ZGNQfiC4izz/Uc6FdgmPg9UWtoqGWo3mX6";
15 | extraGroups = [
16 | "networkmanager" # Use networks
17 | "wheel" # Sudoer
18 | "docker"
19 | "lxd"
20 | "vboxusers" # Virtualbox
21 | ];
22 | packages = with pkgs; [];
23 | shell = pkgs.nushell;
24 | };
25 |
26 | home-manager.users.${system.currentUser} = {
27 | imports = [
28 | ./packages
29 | ./environment
30 | ./apps
31 | ./wallpapers
32 | ];
33 |
34 | home = {
35 | inherit (config.system) stateVersion;
36 |
37 | username = system.currentUser;
38 | homeDirectory = "/home/${system.currentUser}";
39 | };
40 | };
41 | }
42 |
--------------------------------------------------------------------------------
/users/amy/environment/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }: {
7 | imports = [
8 | ./gpg.nix
9 | ];
10 | config.home.sessionVariables = {
11 | ALTERNATE_EDITOR = "";
12 | # "-a" will launch emacs if the dameon is dead
13 | EDITOR = "nvim";
14 | GIT_EDITOR = "nvim";
15 | VISUAL = "neovide";
16 | TERMINAL = "wezterm";
17 |
18 | CARGO_HOME = "${config.xdg.dataHome}/cargo";
19 | HISTFILE = "${config.xdg.dataHome}/history";
20 | GNUPGHOME = "${config.xdg.dataHome}/gnupg";
21 | GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle";
22 | GTK2_RC_FILES = lib.mkForce "${config.xdg.configHome}/gtk-2.0/gtkrc";
23 | XCURSOR_PATH = "/usr/share/icons:${config.xdg.dataHome}/icons";
24 | NODE_REPL_HISTORY = "${config.xdg.dataHome}/node_repl_history";
25 | _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=\"${config.xdg.configHome}\"/java";
26 | PLATFORMIO_CORE_DIR = "${config.xdg.dataHome}/platformio";
27 | RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
28 | WAKATIME_HOME = "${config.xdg.configHome}/wakatime";
29 | XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompose";
30 | # XAUTHORITY = "${config.xdg.runtimeDir}/Xauthority";
31 | };
32 |
33 | # Declared here as it is only relevant to the remapping ^^
34 | config.programs.go = {
35 | enable = true;
36 | goPath = "${config.xdg.dataHome}/go";
37 | };
38 |
39 | config.xdg.dataFile = {
40 | "icons/default" = {source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ-AA";};
41 | };
42 | }
43 |
--------------------------------------------------------------------------------
/users/amy/environment/gpg.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: let
2 | key = "0x210827FF59D814B4";
3 | in {
4 | programs.gpg = {
5 | enable = true;
6 | homedir = "${config.xdg.dataHome}/gnupg";
7 | scdaemonSettings."disable-ccid" = true;
8 | settings = {
9 | # https://github.com/drduh/config/blob/master/gpg.conf
10 | # https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration-Options.html
11 | # https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html
12 | # Use AES256, 192, or 128 as cipher
13 | personal-cipher-preferences = "AES256 AES192 AES";
14 | # Use SHA512, 384, or 256 as digest
15 | personal-digest-preferences = "SHA512 SHA384 SHA256";
16 | # Use ZLIB, BZIP2, ZIP, or no compression
17 | personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
18 | # Default preferences for new keys
19 | default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
20 | # SHA512 as digest to sign keys
21 | cert-digest-algo = "SHA512";
22 | # SHA512 as digest for symmetric ops
23 | s2k-digest-algo = "SHA512";
24 | # AES256 as cipher for symmetric ops
25 | s2k-cipher-algo = "AES256";
26 | # UTF-8 support for compatibility
27 | charset = "utf-8";
28 | # Show Unix timestamps
29 | fixed-list-mode = true;
30 | # No comments in signature
31 | no-comments = true;
32 | # No version in output
33 | no-emit-version = true;
34 | # Disable banner
35 | no-greeting = true;
36 | # Long hexadecimal key format
37 | keyid-format = "0xlong";
38 | # Display UID validity
39 | list-options = "show-uid-validity";
40 | verify-options = "show-uid-validity";
41 | # Display all keys and their fingerprints
42 | with-fingerprint = true;
43 | # Display key origins and updates
44 | with-key-origin = true;
45 | # Cross-certify subkeys are present and valid
46 | require-cross-certification = true;
47 | # Disable caching of passphrase for symmetrical ops
48 | no-symkey-cache = true;
49 | # Enable smartcard
50 | use-agent = true;
51 | # Disable recipient key ID in messages
52 | throw-keyids = true;
53 | # Default/trusted key ID to use (helpful with throw-keyids)
54 | default-key = key;
55 | trusted-key = key;
56 | # Group recipient keys (preferred ID last)
57 | #group keygroup = 0xFF00000000000001 0xFF00000000000002 0xFF3E7D88647EBCDB
58 | # Keyserver URL
59 | keyserver = "hkps://keys.openpgp.org";
60 | # Verbose output
61 | #verbose
62 | # Show expired subkeys
63 | # list-options = "show-unusable-subkeys";
64 | };
65 | };
66 | services.gnome-keyring = {
67 | enable = true;
68 | components = ["secrets"];
69 | };
70 | services.gpg-agent = {
71 | enable = true;
72 | enableExtraSocket = true;
73 | # TODO: enable?
74 | # enableSshSupport = true;
75 | };
76 | }
77 |
--------------------------------------------------------------------------------
/users/amy/overlays/default.nix:
--------------------------------------------------------------------------------
1 | self: super: {
2 | }
3 |
--------------------------------------------------------------------------------
/users/amy/packages/apple-music/default.nix:
--------------------------------------------------------------------------------
1 | # https://github.com/nekowinston/dotfiles/blob/2bfedcd162409bfd2f1cc6aee06e64c231aad982/pkgs/apple-music.nix
2 | {
3 | fetchurl,
4 | google-chrome,
5 | lib,
6 | makeDesktopItem,
7 | runtimeShell,
8 | symlinkJoin,
9 | writeScriptBin,
10 | # command line arguments which are always set e.g "--disable-gpu"
11 | commandLineArgs ? [],
12 | }: let
13 | name = "apple-music-via-google-chrome";
14 |
15 | meta = {
16 | description = "Open Apple Music in Google Chrome app mode";
17 | homepage = google-chrome.meta.homepage or null;
18 | license = lib.licenses.unfree;
19 | maintainers = [lib.maintainers.roberth];
20 | platforms = google-chrome.meta.platforms or lib.platforms.all;
21 | };
22 |
23 | desktopItem = makeDesktopItem {
24 | inherit name;
25 | exec = name;
26 | icon = fetchurl {
27 | name = "apple-music-icon.png";
28 | url = "https://music.apple.com/assets/favicon/favicon-180.png";
29 | sha256 = "sha256-lZXt+kbYCBTLzK1S9QcxVwIhin2x8iNUAcrSHtmWmOY=";
30 | meta.license = lib.licenses.unfree;
31 | };
32 | desktopName = "Apple Music via Google Chrome";
33 | genericName = "Music streaming service";
34 | categories = ["AudioVideo"];
35 | startupNotify = true;
36 | };
37 |
38 | script = writeScriptBin name ''
39 | #!${runtimeShell}
40 | exec ${google-chrome}/bin/${google-chrome.meta.mainProgram} ${lib.escapeShellArgs commandLineArgs} \
41 | --app=https://music.apple.com/browse?l=en_US \
42 | --no-first-run \
43 | --no-default-browser-check \
44 | --no-crash-upload \
45 | --class="apple-music" \
46 | "$@"
47 | '';
48 | in
49 | symlinkJoin {
50 | inherit name meta;
51 | paths = [
52 | script
53 | desktopItem
54 | ];
55 | }
56 |
--------------------------------------------------------------------------------
/users/amy/packages/cargo/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 | with lib; let
8 | cfg = config.programs.cargo;
9 | tomlFormat = pkgs.formats.toml {};
10 | in {
11 | meta.maintainers = [];
12 |
13 | options.programs.cargo = {
14 | enable = mkEnableOption "cargo package manager";
15 |
16 | package = mkOption {
17 | type = types.package;
18 | default = pkgs.cargo;
19 | defaultText = literalExpression "pkgs.cargo";
20 | description = "The package to use for cargo.";
21 | };
22 |
23 | file = mkOption {
24 | type = types.str;
25 | default = ".cargo/config.toml";
26 | description = "The file path, relative to the home directory, to use for the config file.";
27 | };
28 |
29 | settings = mkOption {
30 | inherit (tomlFormat) type;
31 | default = {};
32 | example = literalExpression ''
33 | {
34 | paths = ["/path/to/override"]; # path dependency overrides
35 |
36 | alias = {
37 | b = "build";
38 | c = "check";
39 | t = "test";
40 | r = "run";
41 | rr = "run --release";
42 | recursive_example = "rr --example recursions";
43 | space_example = ["run", "--release", "--", "\"command list\""];
44 | };
45 |
46 | build = {
47 | jobs = 1; # number of parallel jobs, defaults to # of CPUs
48 | rustc = "rustc"; # the rust compiler tool
49 | rustc-wrapper = "…"; # run this wrapper instead of `rustc`
50 | rustc-workspace-wrapper = "…"; # run this wrapper instead of `rustc` for workspace members
51 | rustdoc = "rustdoc"; # the doc generator tool
52 | target = "triple"; # build for the target triple (ignored by `cargo install`)
53 | target-dir = "target"; # path of where to place all generated artifacts
54 | rustflags = ["…", "…"]; # custom flags to pass to all compiler invocations
55 | rustdocflags = ["…", "…"]; # custom flags to pass to rustdoc
56 | incremental = true; # whether or not to enable incremental compilation
57 | dep-info-basedir = "…"; # path for the base directory for targets in depfiles
58 | };
59 | };
60 | '';
61 | description = ''
62 | Configuration written to the file
63 |
64 | See
65 | for the full list of options.
66 | '';
67 | };
68 | };
69 |
70 | config = mkIf cfg.enable {
71 | home.file."${cfg.file}" = mkIf (cfg.settings != {}) {
72 | source = tomlFormat.generate "cargo-config" cfg.settings;
73 | };
74 | };
75 | }
76 |
--------------------------------------------------------------------------------
/users/amy/packages/catppuccin-gtk/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | stdenv,
4 | fetchFromGitHub,
5 | unzip,
6 | }:
7 | stdenv.mkDerivation rec {
8 | pname = "catppuccin-gtk";
9 | version = "0.2.7";
10 |
11 | src = fetchFromGitHub {
12 | owner = "catppuccin";
13 | repo = "gtk";
14 | rev = "v-${version}";
15 | sha256 = "sha256-oTAfURHMWqlKHk4CNz5cn6vO/7GmQJM2rXXGDz2e+0w=";
16 | };
17 |
18 | buildInputs = [
19 | unzip
20 | ];
21 |
22 | installPhase = ''
23 | mkdir -p $out/share/themes
24 | cp -r Releases/* $out/share/themes
25 |
26 | for theme in $out/share/themes/*.zip
27 | do
28 | theme_out=$(echo "$theme" | sed --expression "s/.zip//")
29 | unzip "$theme" -d "$theme_out"-tmp
30 | mv "$theme_out"-tmp/* $out/share/themes
31 | rm -rf "$theme_out"-tmp
32 | done
33 |
34 | rm $out/share/themes/*.zip
35 | '';
36 |
37 | meta = with lib; {
38 | description = "Catppuccin theme for GTK based desktop environments";
39 | homepage = "https://github.com/catppuccin/gtk";
40 | license = licenses.gpl3Only;
41 | platforms = platforms.unix;
42 | maintainers = [maintainers.nullishamy];
43 | };
44 | }
45 |
--------------------------------------------------------------------------------
/users/amy/packages/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | ...
5 | }: {
6 | imports = [
7 | ./cargo
8 | ];
9 |
10 | config.home.packages = [
11 | (pkgs.callPackage ./catppuccin-gtk {})
12 | (pkgs.unstable.callPackage ./nvim {})
13 | (pkgs.callPackage ./emacs {
14 | emacs = with pkgs; (
15 | (emacsPackagesFor pkgs.unstable.emacs).emacsWithPackages (
16 | epkgs: [epkgs."treesit-grammars".with-all-grammars]
17 | )
18 | );
19 | })
20 | (pkgs.callPackage ./apple-music {})
21 | (pkgs.callPackage ./rescrobbled {})
22 | ];
23 | }
24 |
--------------------------------------------------------------------------------
/users/amy/packages/emacs/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | symlinkJoin,
3 | emacs,
4 | makeDesktopItem,
5 | ...
6 | }: let
7 | name = "emacs";
8 | meta = emacs.meta;
9 |
10 | desktopItem = makeDesktopItem {
11 | inherit name;
12 | exec = name;
13 | desktopName = "Emacs";
14 | genericName = "Text Editor";
15 | categories = ["TextEditor"];
16 | startupNotify = true;
17 | };
18 | in
19 | symlinkJoin {
20 | inherit name meta;
21 | paths = [
22 | emacs
23 | desktopItem
24 | ];
25 | }
26 |
--------------------------------------------------------------------------------
/users/amy/packages/nvim/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | makeWrapper,
5 | runCommandNoCC,
6 | neovim-unwrapped,
7 | sumneko-lua-language-server,
8 | stylua,
9 | selene,
10 | clang,
11 | clang-tools,
12 | go,
13 | xclip,
14 | nodejs,
15 | python3,
16 | sqlite,
17 | cargo,
18 | rustc,
19 | luarocks,
20 | gcc,
21 | rust-analyzer,
22 | statix,
23 | gitlint,
24 | alejandra,
25 | beautysh,
26 | proselint,
27 | nodePackages,
28 | tree-sitter,
29 | ...
30 | }: let
31 | system = import ../../config.nix;
32 | in
33 | runCommandNoCC "nvim" {nativeBuildInputs = [makeWrapper];} ''
34 | mkdir -p $out/bin
35 | makeWrapper ${neovim-unwrapped}/bin/nvim $out/bin/nvim \
36 | --set CC "gcc" \
37 | --set NVIM_CONFIG_ROOT "/home/${system.currentUser}/nixos/users/${system.currentUser}/apps/dedicated/nvim-config" \
38 | --set SQLITE_LIB_PATH "${sqlite.out}/lib/libsqlite3.so" \
39 | --prefix PATH : ${
40 | lib.makeBinPath [
41 | sumneko-lua-language-server
42 | stylua
43 | selene
44 | clang
45 | clang-tools
46 | gcc
47 | gitlint
48 | luarocks
49 | cargo
50 | rustc
51 | rust-analyzer
52 | nodejs
53 | python3
54 | go
55 | xclip
56 | statix
57 | alejandra
58 | beautysh
59 | proselint
60 | tree-sitter
61 |
62 | nodePackages."@tailwindcss/language-server"
63 | nodePackages.typescript-language-server
64 | nodePackages.bash-language-server
65 | nodePackages.vscode-json-languageserver
66 | nodePackages.prettier
67 | #nodePackages.pyright
68 | ]
69 | }
70 | ''
71 |
--------------------------------------------------------------------------------
/users/amy/packages/rescrobbled/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | stdenvNoCC,
4 | rustPlatform,
5 | fetchFromGitHub,
6 | dbus,
7 | pkg-config,
8 | openssl,
9 | }:
10 | rustPlatform.buildRustPackage rec {
11 | pname = "rescrobbled";
12 |
13 | version = "0.7.1";
14 |
15 | src = fetchFromGitHub {
16 | owner = "InputUsername";
17 | repo = "rescrobbled";
18 | rev = "v${version}";
19 | hash = "sha256-1E+SeKjHCah+IFn2QLAyyv7jgEcZ1gtkh8iHgiVBuz4=";
20 | };
21 |
22 | cargoSha256 = "sha256-ZJbyYFvGTuXt1aqhGOATcDRrkTk7SorWXkN81sUoDdo=";
23 |
24 | nativeBuildInputs = [pkg-config];
25 | buildInputs = [dbus.dev openssl.dev];
26 |
27 | checkFlags = [
28 | # Broken
29 | "--skip=filter::tests::test_filter_script"
30 | ];
31 |
32 | meta = with lib; {
33 | description = "MPRIS music scrobbler daemon";
34 | homepage = "https://github.com/InputUsername/rescrobbled";
35 | license = licenses.gpl3Only;
36 | platforms = platforms.x86_64;
37 | maintainers = with maintainers; [nullishamy];
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/buttons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/buttons.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/caffeine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/caffeine.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/ctp-hills.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/ctp-hills.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/ctp-mocha-coffee.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/ctp-mocha-coffee.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/ctp-mocha-penguin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/ctp-mocha-penguin.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/ctp-mocha-rainbow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/ctp-mocha-rainbow.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/ctp-mocha-unicat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/ctp-mocha-unicat.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/ctp-wavy-calm-ferris.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/ctp-wavy-calm-ferris.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/ctp-wavy-ferris.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/ctp-wavy-ferris.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/dark-ascii-cat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/dark-ascii-cat.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/neomoji-frappe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/neomoji-frappe.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/neomoji-latte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/neomoji-latte.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/neomoji-macchiato.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/neomoji-macchiato.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/neomoji-mocha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/neomoji-mocha.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/nix-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/nix-black.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/nix-gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/nix-gray.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/nix-magenta.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/nix-magenta.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/assets/petals-pink.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nullishamy/derivation-station/1b6f5428e3525728684ce9afd33a975d8ecd1086/users/amy/wallpapers/assets/petals-pink.png
--------------------------------------------------------------------------------
/users/amy/wallpapers/buttons.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "buttons" "center"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/caffeine.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "caffeine" "center"
--------------------------------------------------------------------------------
/users/amy/wallpapers/catppuccin-hills.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "ctp-hills" "scale"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/catppuccin-mocha-coffee.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "ctp-mocha-coffee" "scale"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/catppuccin-mocha-penguin.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "ctp-mocha-penguin" "max"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/catppuccin-mocha-rainbow.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "ctp-mocha-rainbow" "scale"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/catppuccin-mocha-unicat.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "ctp-mocha-unicat" "center"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/catppuccin-wavy-ferris-calm.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "ctp-wavy-calm-ferris" "center"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/catppuccin-wavy-ferris.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "ctp-wavy-ferris" "center"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/dark-ascii-cat.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "dark-ascii-cat" "center"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/default.nix:
--------------------------------------------------------------------------------
1 | {...}: {
2 | home.file."etc/wallpapers" = {source = ../wallpapers;};
3 | }
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/neomoji-frappe.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "neomoji-frappe" "max"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/neomoji-latte.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "neomoji-latte" "max"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/neomoji-macchiato.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "neomoji-macchiato" "max"
--------------------------------------------------------------------------------
/users/amy/wallpapers/neomoji-mocha.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "neomoji-mocha" "max"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/nix-black.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "nix-black" "center"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/nix-gray.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "nix-gray" "max"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/nix-magenta.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "nix-magenta" "center"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/petals-pink.wp:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | switchWallpaper "petals-pink" "scale"
4 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/sh/lib.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 | script_dir=$(dirname "${BASH_SOURCE[0]}")
5 |
6 | #######################################
7 | # Switch to the provided wallpaper
8 | #
9 | # Args:
10 | # key: string => The wallpaper key, used to lookup the asset
11 | # mode: string => The mode to use, one of center|fill|max|scale|tile
12 | #######################################
13 | function switchWallpaper() {
14 | local key=$1
15 | local mode=$2
16 |
17 | echo "Switching to $key.png with mode $mode"
18 |
19 | nix-shell -p feh --run "feh --bg-$mode $script_dir/../assets/$key.png"
20 |
21 | echo "Copying $key.png to ~/.background-image"
22 |
23 | cp "$script_dir/../assets/$key.png" ~/.background-image
24 | # Owner
25 | # Owner can read
26 | # Owner can write
27 | # Owner can execute
28 | #
29 | # Group
30 | # Group can read
31 | # Group can't write
32 | # Group can't execute
33 | #
34 | # Other
35 | # Others can read
36 | # Others can't write
37 | # Others can't execute
38 | chmod -R 744 ~/.background-image
39 | }
40 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/sh/random-switch.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 | script_dir=$(dirname "${BASH_SOURCE[0]}")
5 |
6 | source "$script_dir/lib.sh"
7 |
8 | paper=$(find "$script_dir/../" -name "*.wp" | shuf -n1)
9 |
10 | source $paper
11 |
--------------------------------------------------------------------------------
/users/amy/wallpapers/sh/select-wallpaper.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 | script_dir=$(dirname "${BASH_SOURCE[0]}")
5 |
6 | source "$script_dir/lib.sh"
7 | source $1
8 |
--------------------------------------------------------------------------------
/vim.toml:
--------------------------------------------------------------------------------
1 | [selene]
2 | base = "lua51"
3 | name = "vim"
4 |
5 | [vim]
6 | any = true
7 |
8 | [[describe.args]]
9 | type = "string"
10 | [[describe.args]]
11 | type = "function"
12 |
13 | [[it.args]]
14 | type = "string"
15 | [[it.args]]
16 | type = "function"
17 |
18 | [[before_each.args]]
19 | type = "function"
20 | [[after_each.args]]
21 | type = "function"
22 |
23 | [assert.is_not]
24 | any = true
25 |
26 | [assert.matches]
27 | any = true
28 |
29 | [assert.has_error]
30 | any = true
31 |
32 | [[assert.equals.args]]
33 | type = "any"
34 | [[assert.equals.args]]
35 | type = "any"
36 | [[assert.equals.args]]
37 | type = "any"
38 | required = false
39 |
40 | [[assert.same.args]]
41 | type = "any"
42 | [[assert.same.args]]
43 | type = "any"
44 |
45 | [[assert.truthy.args]]
46 | type = "any"
47 |
48 | [[assert.falsy.args]]
49 | type = "any"
50 |
51 | [[assert.spy.args]]
52 | type = "any"
53 |
54 | [[assert.stub.args]]
55 | type = "any"
56 |
--------------------------------------------------------------------------------