sync with tcarrio (#7)

sync with tcarrio
This commit is contained in:
Gregory Burd 2024-05-23 15:02:20 -04:00 committed by GitHub
parent b69f1bb0cd
commit 6a8f6e2cb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
231 changed files with 6700 additions and 2989 deletions

View file

@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v6
- uses: DeterminateSystems/nix-installer-action@v9
- uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build Console ISO
run: |
@ -46,7 +46,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v6
- uses: DeterminateSystems/nix-installer-action@v9
- uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build Desktop ISO
run: |

View file

@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v6
- uses: DeterminateSystems/nix-installer-action@v9
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: astro/deadnix-action@v1

View file

@ -17,6 +17,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@v6
- uses: DeterminateSystems/nix-installer-action@v9
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: DeterminateSystems/flake-checker-action@v5

View file

@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@v6
- uses: DeterminateSystems/nix-installer-action@v9
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: DeterminateSystems/update-flake-lock@v20
with:

View file

@ -1,26 +0,0 @@
{
"main": {
"enabled": 1,
"type": 1,
"hidden": false,
"description": "Build main branch",
"flake": "github:gburd/nix-config/main",
"checkinterval": 60,
"schedulingshares": 10,
"enableemail": false,
"emailoverride": "",
"keepnr": 2
},
"next": {
"enabled": 1,
"type": 1,
"hidden": false,
"description": "Build next branch",
"flake": "github:gburd/nix-config/next",
"checkinterval": 60,
"schedulingshares": 5,
"enableemail": false,
"emailoverride": "",
"keepnr": 1
}
}

3
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"git-blame.gitWebUrl": ""
}

21
LICENSE
View file

@ -1,8 +1,23 @@
MIT License
Copyright (c) 2021 Gabriel Fontes
Copyright (c) 2023 Greg Burd
Copyright (c) 2023 Tom Carrio
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

5
NOTES
View file

@ -1,3 +1,8 @@
# Major differences:
* sops/age for secrets
* persistence/impermanence
* Yubikeys are great, if you use them correctly
https://www.procustodibus.com/blog/2023/04/how-to-set-up-a-yubikey/
* generate age public key from host's existing SSH keypair

View file

@ -1,37 +1,12 @@
[![built with nix](https://img.shields.io/static/v1?logo=nixos&logoColor=white&label=&message=Built%20with%20Nix&color=41439a)](https://builtwithnix.org)
# My NixOS configurations
Here's my NixOS/home-manager config files. Requires [Nix flakes](https://nixos.wiki/wiki/Flakes).
## Structure
- `flake.nix`: Entrypoint for hosts and home configurations. Also exposes a
devshell for boostrapping (`nix develop` or `nix-shell`).
- `lib`: A few lib functions for making my flake cleaner
- `hosts`: NixOS Configurations, accessible via `nixos-rebuild --flake`.
- `common`: Shared configurations consumed by the machine-specific ones.
- `global`: Configurations that are globally applied to all my machines.
- `optional`: Opt-in configurations my machines can use.
- `floki`: Lenovo ThinkPad X1 Carbon Extreme Gen 5
- `home`: My Home-manager configuration, acessible via `home-manager --flake`
- Each directory here is a "feature" each hm configuration can toggle, thus
customizing my setup for each machine (be it a server, desktop, laptop,
anything really).
- `modules`: A few actual modules (with options) I haven't upstreamed yet.
- `overlay`: Patches and version overrides for some packages. Accessible via
`nix build`.
- `pkgs`: My custom packages. Also accessible via `nix build`. You can compose
these into your own configuration by using my flake's overlay, or consume them through NUR.
- `templates`: A couple project templates for different languages. Accessible
via `nix init`.
## About the installation
Home-manager is used in a standalone way, and because of opt-in persistence is
activated on every boot with `loginShellInit`.
Here's my NixOS/home-manager config files. Requires [Nix
flakes](https://nixos.wiki/wiki/Flakes).
This work is really a 90% copy/paste from [Tom
Carrio(https://github.com/tcarrio/nix-config) so you'd be much better off
looking at his work than mine while I'm off studying [Nix
Pills](https://nixos.org/guides/nix-pills/) and trying to keep up.
## How to bootstrap
@ -64,49 +39,12 @@ EDITOR=vi sops --config .sops.yaml nixos/_mixins/secrets.yaml
## Secrets
For deployment secrets (such as user passwords and server service secrets), I'm
using the awesome [`sops-nix`](https://github.com/Mic92/sops-nix). All secrets
are encrypted with my personal PGP key (stored on a YubiKey), as well as the
relevant systems's SSH host keys.
using the awesome [`sops-nix`](https://github.com/Mic92/sops-nix). This keeps
all secrets encrypted with my personal PGP key (stored *only* within a YubiKey I
keep in my safe at home), as well as the relevant systems's SSH host keys and
any other sensitive materials.
On my desktop and laptop, I use `pass` for managing passwords, which are
encrypted using (you bet) my PGP key. This same key is also used for mail
signing, as well as for SSH'ing around.
## Tooling and applications I use
Most relevant user apps daily drivers:
- emacs
- fish
- kitty
- qutebrowser
- neomutt + mbsync
- khal + khard + todoman + vdirsyncer
- gpg + pass
- tailscale
- podman
- zathura
- wofi
- bat + fd + rg
- kdeconnect
- sublime-music
Some of the services I host:
- hydra
- navidrome
- deluge
- prometheus
- websites (such as https://burd.me ...)
- headscale
Nixy stuff:
- nix-colors
- sops-nix
- impermanence
- home-manager
- deploy-rs
- and NixOS and nix itself, of course :)
Let me know if you have any questions about them :)
On my desktop and laptop, I use `pass` for managing passwords, also encrypted
using (you bet) my PGP key. This same key is also used for mail signing, as well
as for SSH'ing around. You can find my pub key on
[Keybase.io](https://keybase.io/gregburd) or other information on [my site](https://greg.burd.me).

1
android/_mixins/nixos Symbolic link
View file

@ -0,0 +1 @@
../../nixos/_mixins/

View file

@ -0,0 +1,35 @@
{ config, desktop, lib, pkgs, ... }:
let
ifExists = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in
{
# Only include desktop components if one is supplied.
imports = lib.optional (builtins.isString desktop) ./desktop.nix;
environment.systemPackages = [
pkgs.yadm # Terminal dot file manager
];
users.users.gburd = {
description = "Greg Burd";
extraGroups = [
"audio"
"input"
"networkmanager"
"users"
"video"
"wheel"
]
++ ifExists [
"docker"
"podman"
];
# mkpasswd -m sha-512
hashedPassword = "$6$1.WkO0Vt/wcBd4uy$X/3Uan97cxd7atvi1XN1.CL8E01eWpWiFp9O4Od6W5kKTx1m22RUv/MXaX3EvISKEdBd4mvVXMSgTVgQzA3Vl/";
homeMode = "0755";
isNormalUser = true;
openssh.authorizedKeys.keys = sshMatrix.groups.privileged_users;
packages = [ pkgs.home-manager ];
shell = pkgs.bash;
};
}

View file

@ -0,0 +1,42 @@
{ desktop, pkgs, lib, ... }: {
imports = [
../../desktop/chromium.nix
../../desktop/discord.nix
../../desktop/element.nix
../../desktop/firefox.nix
#../../desktop/evolution.nix
../../desktop/google-chrome.nix
../../desktop/lutris.nix
../../desktop/obs-studio.nix
../../desktop/spotify.nix
../../desktop/tilix.nix
../../desktop/vscode.nix
] ++ lib.optional (builtins.pathExists (../.. + "/desktop/${desktop}-apps.nix")) ../../desktop/${desktop}-apps.nix;
environment.systemPackages = with pkgs; [
audio-recorder
gimp-with-plugins
gnome.gnome-clocks
gnome.dconf-editor
gnome.gnome-sound-recorder
inkscape
libreoffice
meld
netflix
pick-colour-picker
slack
];
# programs = {
# chromium = {
# extensions = [
# "kbfnbcaeplbcioakkpcpgfkobkghlhen" # Grammarly
# "cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
# "mdjildafknihdffpkfmmpnpoiajfjnjd" # Consent-O-Matic
# "mnjggcdmjocbbbhaepdhchncahnbgone" # SponsorBlock for YouTube
# "gebbhagfogifgggkldgodflihgfeippi" # Return YouTube Dislike
# "edlifbnjlicfpckhgjhflgkeeibhhcii" # Screenshot Tool
# ];
# };
# };
}

View file

@ -0,0 +1,123 @@
{ config, desktop, lib, pkgs, username, ... }:
let
ifExists = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
install-system = pkgs.writeScriptBin "install-system" ''
#!${pkgs.stdenv.shell}
#set -euo pipefail
TARGET_HOST="''${1:-}"
TARGET_USER="''${2:-gburd}"
TARGET_TYPE="''${3:-}"
if [ "$(id -u)" -eq 0 ]; then
echo "ERROR! $(basename "$0") should be run as a regular user"
exit 1
fi
if [ ! -d "$HOME/ws/nix-config/.git" ]; then
git clone https://github.com/gburd/nix-config.git "$HOME/ws/nix-config"
fi
pushd "$HOME/ws/nix-config"
if [[ -z "$TARGET_HOST" ]]; then
echo "ERROR! $(basename "$0") requires a hostname as the first argument"
echo " The following hosts are available"
ls -1 nixos/*/default.nix | cut -d'/' -f2 | grep -v iso
exit 1
fi
if [[ -z "$TARGET_USER" ]]; then
echo "ERROR! $(basename "$0") requires a username as the second argument"
echo " The following users are available"
ls -1 nixos/_mixins/users/ | grep -v -E "nixos|root"
exit 1
fi
if [[ -z "$TARGET_TYPE" ]]; then
echo "ERROR! $(basename "$0") requires a type as the third argument"
echo " The following types are available"
ls -1 nixos/ | grep -v -E "nixos|root|_mixins"
exit 1
fi
TARGET_HOST_ROOT="nixos/$TARGET_TYPE/$TARGET_HOST"
if [ ! -e "$TARGET_HOST_ROOT/disks.nix" ]; then
echo "ERROR! $(basename "$0") could not find the required $TARGET_HOST_ROOT/disks.nix"
exit 1
fi
# Check if the machine we're provisioning expects a keyfile to unlock a disk.
# If it does, generate a new key, and write to a known location.
if grep -q "data.keyfile" "$TARGET_HOST_ROOT/disks.nix"; then
echo -n "$(head -c32 /dev/random | base64)" > /tmp/data.keyfile
fi
echo "WARNING! The disks in $TARGET_HOST are about to get wiped"
echo " NixOS will be re-installed"
echo " This is a destructive operation"
echo
read -p "Are you sure? [y/N]" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
sudo true
sudo nix run github:nix-community/disko \
--extra-experimental-features "nix-command flakes" \
--no-write-lock-file \
-- \
--mode zap_create_mount \
"$TARGET_HOST_ROOT/disks.nix"
sudo nixos-install --no-root-password --flake ".#$TARGET_HOST"
if [[ "$TARGET_USER" == "root" ]]; then
TARGET_USER_HOME="/mnt/root"
else
TARGET_USER_HOME="/mnt/home/$TARGET_USER"
fi
# Rsync nix-config to the target install and set the remote origin to SSH.
rsync -a --delete "$HOME/ws/" "$TARGET_USER_HOME/ws/"
pushd "$TARGET_USER_HOME/ws/nix-config"
git remote set-url origin git@github.com:gburd/nix-config.git
popd
# If there is a keyfile for a data disk, put copy it to the root partition and
# ensure the permissions are set appropriately.
if [[ -f "/tmp/data.keyfile" ]]; then
sudo cp /tmp/data.keyfile /mnt/etc/data.keyfile
sudo chmod 0400 /mnt/etc/data.keyfile
fi
fi
'';
in
{
# Only include desktop components if one is supplied.
imports = lib.optional (builtins.isString desktop) ./desktop.nix;
config.users.users.nixos = {
description = "NixOS";
extraGroups = [
"audio"
"networkmanager"
"users"
"video"
"wheel"
]
++ ifExists [
"docker"
"podman"
];
homeMode = "0755";
openssh.authorizedKeys.keys = sshMatrix.groups.privileged_users;
packages = [ pkgs.home-manager ];
shell = pkgs.fish;
};
config.system.stateVersion = lib.mkForce lib.trivial.release;
config.environment.systemPackages = [ install-system ];
config.services.kmscon.autologinUser = "${username}";
}

View file

@ -0,0 +1,14 @@
{ config, desktop, lib, pkgs, username, ... }: {
config.environment.systemPackages = with pkgs; [
gparted
];
config.systemd.tmpfiles.rules = [
"d /home/${username}/Desktop 0755 ${username} users"
"L+ /home/${username}/Desktop/gparted.desktop - - - - ${pkgs.gparted}/share/applications/gparted.desktop"
"L+ /home/${username}/Desktop/io.elementary.terminal.desktop - - - - ${pkgs.pantheon.elementary-terminal}/share/applications/io.elementary.terminal.desktop"
"L+ /home/${username}/Desktop/io.calamares.calamares.desktop - - - - ${pkgs.calamares-nixos}/share/applications/io.calamares.calamares.desktop"
];
config.isoImage.edition = lib.mkForce "${desktop}";
config.services.xserver.displayManager.autoLogin.user = "${username}";
config.services.kmscon.autologinUser = lib.mkForce null;
}

View file

@ -0,0 +1,7 @@
_:
{
users.users.root = {
hashedPassword = null;
openssh.authorizedKeys.keys = sshMatrix.groups.privileged_users;
};
}

102
android/default.nix Normal file
View file

@ -0,0 +1,102 @@
{ self, pkgs, hostname, username, platform, stateVersion, ... /* outputs, lib, config */ }: {
imports = [
./${hostname}
./_mixins/users/${username}
];
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
# SYSTEM packages, for all users
direnv
htop
home-manager
];
# fonts = {
# fontDir.enable = true;
# fonts = with pkgs; [
# font-awesome
# (nerdfonts.override {
# fonts = [
# "FiraCode"
# ];
# })
# ];
# };
# Auto upgrade nix package and the daemon service.
# services.nix-daemon.enable = true;
nix.package = pkgs.nix;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = false; # default shell on catalina
programs = {
fish = {
enable = true;
interactiveShellInit = ''
set fish_cursor_default block blink
set fish_cursor_insert line blink
set fish_cursor_replace_one underscore blink
set fish_cursor_visual block
set -U fish_color_autosuggestion brblack
set -U fish_color_cancel -r
set -U fish_color_command green
set -U fish_color_comment brblack
set -U fish_color_cwd brgreen
set -U fish_color_cwd_root brred
set -U fish_color_end brmagenta
set -U fish_color_error red
set -U fish_color_escape brcyan
set -U fish_color_history_current --bold
set -U fish_color_host normal
set -U fish_color_match --background=brblue
set -U fish_color_normal normal
set -U fish_color_operator cyan
set -U fish_color_param blue
set -U fish_color_quote yellow
set -U fish_color_redirection magenta
set -U fish_color_search_match bryellow '--background=brblack'
set -U fish_color_selection white --bold '--background=brblack'
set -U fish_color_status red
set -U fish_color_user brwhite
set -U fish_color_valid_path --underline
set -U fish_pager_color_completion normal
set -U fish_pager_color_description yellow
set -U fish_pager_color_prefix white --bold --underline
set -U fish_pager_color_progress brwhite '--background=cyan'
'';
shellAliases = {
nix-gc = "sudo nix-collect-garbage --delete-older-than 14d";
rebuild-all = "sudo nix-collect-garbage --delete-older-than 14d && darwin-rebuild switch --flake $HOME/ws/nix-config && home-manager switch -b backup --flake $HOME/ws/nix-config";
rebuild-home = "home-manager switch -b backup --flake $HOME/ws/nix-config";
rebuild-host = "nix-on-droid switch --flake $HOME/ws/nix-config";
rebuild-lock = "pushd $HOME/ws/nix-config && nix flake lock --recreate-lock-file && popd";
# TODO: Support secrets management on macOS
# modify-secret = "agenix -i ~/.ssh/id_rsa -e"; # the path relative to /secrets must be passed
moon = "curl -s wttr.in/Moon";
nano = "vim";
pubip = "curl -s ifconfig.me/ip";
#pubip = "curl -s https://api.ipify.org";
wttr = "curl -s wttr.in && curl -s v2.wttr.in";
wttr-bas = "curl -s wttr.in/detroit && curl -s v2.wttr.in/detroit";
};
};
};
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = stateVersion;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = platform;
}

12
android/pixel6a/README.md Normal file
View file

@ -0,0 +1,12 @@
> ⚠️ The Android support for Nix-on-Droid in this repository is still experimental
# android
Or rather, [nix-on-droid], which assists in managing a Nix terminal environment on Android devices.
The devices in the tree relate are Android devices with [the Nix-on-Droid app from F-Droid][nix-on-fdroid].
<!-- References -->
[nix-on-droid]: https://github.com/nix-community/nix-on-droid
[nix-on-fdroid]: https://f-droid.org/packages/com.termux.nix/

View file

@ -0,0 +1,60 @@
{ pkgs, ... }:
{
# Simply install just the packages
environment.packages = with pkgs; [
# User-facing stuff that you really really want to have
vim # or some other editor, e.g. nano or neovim
# Some common stuff that people expect to have
curl
diffutils
findutils
utillinux
tzdata
hostname
man
git
gnugrep
gnupg
gnused
gnutar
bzip2
gzip
openssh
xz
zip
unzip
];
# Backup etc files instead of failing to activate generation if a file already exists in /etc
environment.etcBackupExtension = ".bak";
# Read the changelog before changing this value
system.stateVersion = "23.05";
# Set up nix for flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Set your time zone
time.timeZone = "America/Detroit";
# After installing home-manager channel like
# nix-channel --add https://github.com/rycee/home-manager/archive/release-23.11.tar.gz home-manager
# nix-channel --update
# you can configure home-manager in here like
#home-manager = {
# useGlobalPkgs = true;
#
# config =
# { config, lib, pkgs, ... }:
# {
# # Read the changelog before changing this value
# home.stateVersion = "23.11";
#
# # insert home-manager config
# };
#};
}
# vim: ft=nix

View file

@ -0,0 +1,13 @@
_: {
homebrew = {
enable = true;
taps = [ ];
# the following sets up Homebrew to NEVER update implicitly
# to update brew itself, use `brew upgrade`
# to update brew packages, use `brew update`
global.autoUpdate = false;
onActivation.autoUpdate = false;
};
}

View file

@ -0,0 +1,5 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
skhd
];
}

1
darwin/_mixins/nixos Symbolic link
View file

@ -0,0 +1 @@
../../nixos/_mixins/

View file

@ -0,0 +1,26 @@
{ pkgs, ... }: {
imports = [
../../nixos/console/auth0.nix
../../nixos/console/direnv.nix
../../nixos/console/kubectl.nix
../../nixos/desktop/spotify.nix
];
environment.systemPackages = with pkgs; [
bazelisk
direnv
dive
fish
fishPlugins.foreign-env
guile
jdk11
lazydocker
lazygit
mysql
neofetch
neovim
tmux
tokei
tree
];
}

113
darwin/default.nix Normal file
View file

@ -0,0 +1,113 @@
{ self, pkgs, hostname, username, platform, stateVersion, outputs, ... /* lib, config */ }: {
imports = [
./${hostname}
./_mixins/users/${username}
];
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
# SYSTEM packages, for all users
direnv
glances
home-manager
];
fonts = {
fontDir.enable = true;
fonts = with pkgs; [
iosevka
font-awesome
(nerdfonts.override {
fonts = [
"FiraCode"
];
})
];
};
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
outputs.overlays.trunk-packages
];
};
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = false; # default shell on catalina
programs = {
fish = {
enable = true;
interactiveShellInit = ''
set fish_cursor_default block blink
set fish_cursor_insert line blink
set fish_cursor_replace_one underscore blink
set fish_cursor_visual block
set -U fish_color_autosuggestion brblack
set -U fish_color_cancel -r
set -U fish_color_command green
set -U fish_color_comment brblack
set -U fish_color_cwd brgreen
set -U fish_color_cwd_root brred
set -U fish_color_end brmagenta
set -U fish_color_error red
set -U fish_color_escape brcyan
set -U fish_color_history_current --bold
set -U fish_color_host normal
set -U fish_color_match --background=brblue
set -U fish_color_normal normal
set -U fish_color_operator cyan
set -U fish_color_param blue
set -U fish_color_quote yellow
set -U fish_color_redirection magenta
set -U fish_color_search_match bryellow '--background=brblack'
set -U fish_color_selection white --bold '--background=brblack'
set -U fish_color_status red
set -U fish_color_user brwhite
set -U fish_color_valid_path --underline
set -U fish_pager_color_completion normal
set -U fish_pager_color_description yellow
set -U fish_pager_color_prefix white --bold --underline
set -U fish_pager_color_progress brwhite '--background=cyan'
'';
shellAliases = {
nix-gc = "sudo nix-collect-garbage --delete-older-than 14d";
rebuild-all = "sudo nix-collect-garbage --delete-older-than 14d && darwin-rebuild switch --flake $HOME/ws/nix-config && home-manager switch -b backup --flake $HOME/ws/nix-config";
rebuild-home = "home-manager switch -b backup --flake $HOME/ws/nix-config";
rebuild-host = "darwin-rebuild switch --flake $HOME/ws/nix-config";
rebuild-lock = "pushd $HOME/ws/nix-config && nix flake lock --recreate-lock-file && popd";
# TODO: Support secrets management on macOS
# modify-secret = "agenix -i ~/.ssh/id_rsa -e"; # the path relative to /secrets must be passed
moon = "curl -s wttr.in/Moon";
nano = "vim";
pubip = "curl -s ifconfig.me/ip";
#pubip = "curl -s https://api.ipify.org";
wttr = "curl -s wttr.in && curl -s v2.wttr.in";
wttr-bas = "curl -s wttr.in/detroit && curl -s v2.wttr.in/detroit";
};
};
};
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = stateVersion;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = platform;
}

135
darwin/sktc0/brews.nix Normal file
View file

@ -0,0 +1,135 @@
_: {
homebrew = {
taps = [
"auth0/auth0-cli"
"ankitpokhrel/jira-cli"
"codefresh-io/cli"
"oven-sh/bun"
];
brews = [
"ansible"
"asdf"
"auth0"
"autoconf"
"automake"
"bash"
"bats-core"
"bison"
"bpython"
"brotli"
"bun"
"c-ares"
"ca-certificates"
"circleci"
"cloudflared"
"cmake"
"codefresh"
"conftest"
"coreutils"
"curl"
"dbus"
"deno"
"dive"
"docker-compose"
"editorconfig"
"flarectl"
"freetype"
"fswatch"
"gd"
"gettext"
"ghostscript"
"git-crypt"
"git"
"glib"
"gnu-getopt"
"gnupg"
"gnutls"
"go-task"
"go"
"gotop"
"gpatch"
"graphite2"
"graphviz"
"hadolint"
"htop"
"icu4c"
"imagemagick"
"jira-cli"
"jq"
"k6"
"k9s"
"krb5"
"kubernetes-cli"
"libedit"
"libiconv"
"libjpeg"
"libpng"
"libsodium"
"libtool"
"libxml2"
"libxslt"
"libyaml"
"libzip"
"m4"
"mkcert"
"mysql-client"
"mysql"
"ncdu"
"ninja"
"node"
"openssl@1.1"
"openssl"
"pandoc"
"pango"
"pcre"
"percona-toolkit"
"pkg-config"
"podman"
"portaudio"
"postgresql"
"postgresql@14"
"protobuf"
"protobuf@21"
"pyenv"
"python@3.10"
"python@3.11"
"python@3.12"
"python@3.9"
"pyyaml"
"qemu"
"r"
"re2c"
"readline"
"redis"
"ripgrep"
"rustup-init"
"shellcheck"
"shfmt"
"six"
"sops"
"spotifyd"
"sqlite"
"stern"
"telnet"
"terraform"
"terragrunt"
"unixodbc"
"unzip"
"wget"
"xz"
"yarn"
"zlib"
];
casks = [
"amethyst"
"docker"
"emacs"
"rstudio"
"secretive"
"sequel-ace"
"talon"
];
};
}

29
darwin/sktc0/default.nix Normal file
View file

@ -0,0 +1,29 @@
# Device: Apple M1 Pro
# CPU: Apple M1 Pro
# RAM: 16GB DDR4
# SATA: 500GB SSD
_: {
imports = [
../_mixins/console/homebrew.nix
./brews.nix
];
networking.hostName = "sktc0";
system = {
defaults = {
dock = {
autohide = true;
orientation = "bottom";
tilesize = 80;
};
finder = { };
trackpad = {
Clicking = true;
TrackpadRightClick = true;
};
};
keyboard = { enableKeyMapping = true; };
};
}

View file

@ -0,0 +1,23 @@
# Multi-Network Topology
My devices are spread across multiple locations
- Home
- Office suite
- Cloud?
I prefer these to be as interoperable as possible
## Home
CIDR range: 192.168.40.0/24
## Office suite
CIDR range: 172.16.100.0/24
## Cloud
Additional cloud private networks can be added and included here.
These will likely fall under 10.x.0.0/8 ranges.

231
examples/dns-rpi.nix Normal file
View file

@ -0,0 +1,231 @@
{ pkgs, ... }:
{
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
# --- NETWORK --- #
networking.hostName = "dns"; # Define your hostname.
networking.useDHCP = false;
services.resolved.enable = false;
systemd.network.enable = true;
systemd.network = {
netdevs = {
"20-vlan10" = {
netdevConfig = {
Kind = "vlan";
Name = "vlan10";
};
vlanConfig.Id = 10;
};
"20-vlan20" = {
netdevConfig = {
Kind = "vlan";
Name = "vlan20";
};
vlanConfig.Id = 20;
};
"20-vlan30" = {
netdevConfig = {
Kind = "vlan";
Name = "vlan30";
};
vlanConfig.Id = 30;
};
"20-vlan40" = {
netdevConfig = {
Kind = "vlan";
Name = "vlan40";
};
vlanConfig.Id = 40;
};
};
networks = {
"30-enu1u1" = {
matchConfig.Name = "enu1u1";
vlan = [
"vlan10"
"vlan20"
"vlan30"
"vlan40"
];
};
# VLANs
"50-vlan10" = {
matchConfig.Name = "vlan10";
address = [
"10.50.10.2/24"
];
routes = [
{ routeConfig.Gateway = "10.50.10.1"; }
];
linkConfig.RequiredForOnline = "routable";
};
"50-vlan20" = {
matchConfig.Name = "vlan20";
address = [
"10.50.20.2/24"
];
routes = [
{ routeConfig.Gateway = "10.50.20.1"; }
];
linkConfig.RequiredForOnline = "routable";
};
"50-vlan30" = {
matchConfig.Name = "vlan30";
address = [
"10.50.30.2/24"
];
routes = [
{ routeConfig.Gateway = "10.50.30.1"; }
];
linkConfig.RequiredForOnline = "routable";
};
"50-vlan40" = {
matchConfig.Name = "vlan40";
address = [
"10.50.40.2/24"
];
routes = [
{ routeConfig.Gateway = "10.50.40.1"; }
];
linkConfig.RequiredForOnline = "routable";
};
};
};
# Set your time zone.
time.timeZone = "Europe/London";
# Configure console keymap
console = {
font = "Lat2-Terminus16";
keyMap = "uk";
};
# Define a user account. Don't forget to set a password with passwd.
users.users.alex = {
isNormalUser = true;
home = "/home/alex";
extraGroups = [ "wheel" "libvirtd" "docker" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [ "INSERT SSH KEY HERE" ];
hashedPassword = "INSERT HASHED PASSWORD HERE";
};
environment.systemPackages = with pkgs; [
wget
parted
];
networking.extraHosts =
''
10.50.10.2 dns dns.int.example.uk
10.50.20.2 dns dns.int.example.uk
10.50.30.2 dns dns.int.example.uk
10.50.40.2 dns dns.int.example.uk
'';
services.dnsmasq = {
enable = true;
settings = {
server = [
"1.1.1.1"
"8.8.8.8"
];
dhcp-authoritative = true;
domain-needed = true;
domain = "int.example.com";
local = "/int.example.com";
bogus-priv = true;
rebind-domain-ok = "/plex.direct/";
# DHCP OPTIONS (SUCH AS PXE, DNS SERVER, GATEWAY, ETC)
dhcp-option = [
"enu1u1.10,3,10.50.10.1"
"enu1u1.10,6,10.50.10.2"
"enu1u1.20,3,10.50.20.1"
"enu1u1.20,6,10.50.20.2"
"enu1u1.30,3,10.50.30.1"
"enu1u1.30,6,10.50.30.2"
"enu1u1.40,3,10.50.40.1"
"enu1u1.40,6,10.50.40.2"
];
# DHCP RANGES
dhcp-range = [
"enu1u1.10,10.50.10.200,10.50.10.254,255.255.255.0,8h"
"enu1u1.20,10.50.20.10,10.50.20.254,255.255.255.0,8h"
"enu1u1.30,10.50.30.10,10.50.30.254,255.255.255.0,8h"
"enu1u1.40,10.50.40.200,10.50.40.254,255.255.255.0,8h"
];
# STATIC HOST MAPPINGS ("MAC_ADDRESS,IP_ADDRESS,HOSTNAME")
dhcp-host = [
"xx:xx:xx:xx:xx:xx,10.50.10.3,switch"
"xx:xx:xx:xx:xx:xx,10.50.10.4,ap"
"xx:xx:xx:xx:xx:xx,10.50.10.10,bedrock"
"xx:xx:xx:xx:xx:xx,10.50.10.11,hass"
"xx:xx:xx:xx:xx:xx,10.50.10.12,mainsail"
"xx:xx:xx:xx:xx:xx,10.50.40.10,hass-iot"
"xx:xx:xx:xx:xx:xx,10.50.40.11,glow-ihd"
"xx:xx:xx:xx:xx:xx,10.50.40.12,printer"
"xx:xx:xx:xx:xx:xx,10.50.40.13,cctv-iot"
"xx:xx:xx:xx:xx:xx,10.50.40.14,cctv-front"
"xx:xx:xx:xx:xx:xx,10.50.40.15,cctv-side"
"xx:xx:xx:xx:xx:xx,10.50.40.16,cctv-rear"
"xx:xx:xx:xx:xx:xx,10.50.40.17,doorbell"
"xx:xx:xx:xx:xx:xx,10.50.40.18,cctv-downstairs"
];
# DNS OVERRIDES
address = [
"/cloud.example.com/10.50.10.10"
"/photos.example.com/10.50.10.10"
"/id.example.com/10.50.10.10"
"/vault.example.com/10.50.10.10"
"/overseerr.example.com/10.50.10.10"
"/media.int.example.com/10.50.10.10"
"/example.com/10.50.10.10"
"/matrix.example.com/10.50.10.10"
"/syncv3.example.com/10.50.10.10"
"/cctv.int.example.com/10.50.10.10"
"/archive.int.example.com/10.50.10.10"
];
};
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.netdata.enable = true;
# Open ports in the firewall.
#networking.firewall.allowedTCPPorts = [
# 22
# 80
# 443
# 19999
#];
#networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

66
examples/nextcloud.nix Normal file
View file

@ -0,0 +1,66 @@
# Reference: https://carjorvaz.com/posts/the-holy-grail-nextcloud-setup-made-easy-by-nixos/
{ config, pkgs, ... }:
{
services = {
nginx.virtualHosts = {
"cloud.example.com" = {
forceSSL = true;
enableACME = true;
};
"onlyoffice.example.com" = {
forceSSL = true;
enableACME = true;
};
};
nextcloud = {
enable = true;
hostName = "cloud.example.com";
# Need to manually increment with every major upgrade.
package = pkgs.nextcloud27;
# Let NixOS install and configure the database automatically.
database.createLocally = true;
# Let NixOS install and configure Redis caching automatically.
configureRedis = true;
# Increase the maximum file upload size to avoid problems uploading videos.
maxUploadSize = "16G";
https = true;
enableBrokenCiphersForSSE = false;
autoUpdateApps.enable = true;
extraAppsEnable = true;
extraApps = with config.services.nextcloud.package.packages.apps; {
# List of apps we want to install and are already packaged in
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json
inherit calendar contacts mail notes onlyoffice tasks;
# Custom app installation example.
cookbook = pkgs.fetchNextcloudApp rec {
url =
"https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz";
sha256 = "sha256-XgBwUr26qW6wvqhrnhhhhcN4wkI+eXDHnNSm1HDbP6M=";
};
};
config = {
overwriteProtocol = "https";
defaultPhoneRegion = "PT";
dbtype = "pgsql";
adminuser = "admin";
adminpassFile = "/path/to/nextcloud-admin-pass";
};
};
onlyoffice = {
enable = true;
hostname = "onlyoffice.example.com";
};
};
}

1327
flake.lock

File diff suppressed because it is too large Load diff

115
flake.nix
View file

@ -1,11 +1,11 @@
{
description = "Greg Burd's NixOS and Home Manager Configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
# You can access packages and modules from different nixpkgs revs at the
# same time. See 'unstable-packages' overlay in 'overlays/default.nix'.
# same time. See 'unstable-packages' overlay in 'overlays/default.nix'.
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-trunk.url = "github:nixos/nixpkgs/master";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
@ -13,73 +13,113 @@
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
#fh.url = "https://flakehub.com/f/DeterminateSystems/fh/*.tar.gz";
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware/master";
# Chaotic's Nyx provides many additional packages like NordVPN
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
chaotic.inputs.nixpkgs.follows = "nixpkgs";
impermanence.url = "github:nix-community/impermanence";
nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
nix-doom-emacs.inputs.nixpkgs.follows = "nixpkgs-unstable";
nix-formatter-pack.url = "github:Gerschtli/nix-formatter-pack";
nix-formatter-pack.inputs.nixpkgs.follows = "nixpkgs";
vscode-server.url = "github:nix-community/nixos-vscode-server";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
vscode-server.url = "github:msteen/nixos-vscode-server";
vscode-server.inputs.nixpkgs.follows = "nixpkgs";
devshells.url = "github:gburd/devshells";
devshells.inputs.nixpkgs.follows = "nixpkgs";
# Android support with nix-on-droid. Currently not updated for 23.11
nix-on-droid.url = "github:nix-community/nix-on-droid/release-23.05";
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
# Darwin support with nix-darwin
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs-unstable";
# nixos-generators for sdcard and raw disk install generation
nixos-generators.url = "github:tcarrio/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs-unstable";
sops-nix.url = "github:mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs";
nh.url = "github:viperml/nh";
nh.inputs.nixpkgs.follows = "nixpkgs";
# TODO... review below here
impermanence.url = "github:nix-community/impermanence";
firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
firefox-addons.inputs.nixpkgs.follows = "nixpkgs";
#nh.url = "github:viperml/nh";
#nh.inputs.nixpkgs.follows = "nixpkgs";
#firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
#firefox-addons.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{ self
, nixpkgs
, nix-formatter-pack
, nixpkgs
, ...
} @ inputs:
let
inherit (self) outputs;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
stateVersion = "23.11";
libx = import ./lib { inherit inputs outputs stateVersion; };
inherit (self) outputs;
libx = import ./lib { inherit self inputs outputs stateVersion; };
in
{
# home-manager switch -b backup --flake $HOME/ws/nix-config
# nix build .#homeConfigurations."gburd@floki".activationPackage
homeConfigurations = {
# .iso images
# "gburd@iso-console" = libx.mkHome { hostname = "iso-console"; username = "nixos"; };
# "gburd@iso-desktop" = libx.mkHome { hostname = "iso-desktop"; username
# = "nixos"; desktop = "pantheon"; };
# Workstations
"gburd@floki" = libx.mkHome { hostname = "floki"; username = "gburd"; desktop = "pantheon"; };
#"gburd@floki" = libx.mkHome { hostname = "floki"; username = "gburd"; desktop = "mate"; };
# Servers
};
# Support for nix-darwin workstations
# - darwin-rebuild build --flake .#sktc0
# darwinConfigurations = {
# "antanes" = libx.mkDarwin { username = "gburd"; hostname = "antanes"; stateVersion = 4; };
# };
# Expose the package set, including overlays, for convenience.
# darwinPackages = self.darwinConfigurations."antanes".pkgs;
nixosConfigurations = {
# .iso images
# - nix build .#nixosConfigurations.{iso-console|iso-desktop}.config.system.build.isoImage
# iso-console = libx.mkHost { hostname = "iso-console"; username = "nixos"; installer = nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"; };
# iso-desktop = libx.mkHost { hostname = "iso-desktop"; username = "nixos"; installer = nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix"; desktop = "pantheon"; };
# Workstations
# Lenovo Carbon X1 Extreme Gen 5 - x86_64
floki = libx.mkHost { hostname = "floki"; username = "gburd"; desktop = "pantheon"; };
floki = libx.mkHost { systemType = "workstation"; hostname = "floki"; username = "gburd"; desktop = "pantheon"; };
# Servers
# Can be executed locally:
# - sudo nixos-rebuild switch --flake $HOME/ws/nix-config
#
# Or remotely:
# - nixos-rebuild switch --fast --flake .#${HOST} \
# --target-host ${USERNAME}@${HOST}.${TAILNET} \
# --build-host ${USERNAME}@${HOST}.${TAILNET}
};
# nixOnDroidConfigurations = {
# pixel6a-legacy = nix-on-droid.lib.nixOnDroidConfiguration {
# modules = [ ./android/pixel6a/config.nix ];
# };
# pixel6a = libx.mkDroid { hostname = "pixel6a"; username = "gburd"; };
# };
# Devshell for bootstrapping; acessible via 'nix develop' or 'nix-shell' (legacy)
#inherit (devshells) devShells;
devShells = libx.forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./shell.nix { inherit pkgs; }
@ -99,14 +139,31 @@
);
# Custom packages and modifications, exported as overlays
overlays = import ./overlays { inherit inputs outputs; };
homeManagerModules = import ./modules/home-manager;
overlays = import ./overlays { inherit inputs; };
# Custom packages; acessible via 'nix build', 'nix shell', etc
packages = libx.forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./pkgs { inherit pkgs; }
);
packages = libx.forAllSystems
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
(import ./pkgs { inherit pkgs; })
//
{
# nuc-init = mkNuc "nixos" "nuc-init";
# system-image-nuc0 = mkNuc "archon" "nuc0";
# system-image-nuc1 = mkNuc "archon" "nuc1";
# system-image-nuc2 = mkNuc "archon" "nuc2";
# system-image-nuc3 = mkNuc "archon" "nuc3";
# system-image-nuc4 = mkNuc "archon" "nuc4";
# system-image-nuc5 = mkNuc "archon" "nuc5";
# system-image-nuc6 = mkNuc "archon" "nuc6";
# system-image-nuc7 = mkNuc "archon" "nuc7";
# system-image-nuc8 = mkNuc "archon" "nuc8";
# system-image-nuc9 = mkNuc "archon" "nuc9";
}
);
# homeManagerModules = import ./modules/home-manager;
};
}

View file

@ -13,7 +13,6 @@
./ranger.nix
./screen.nix
./ssh.nix
# ./xpo.nix
];
home.packages = with pkgs; [
@ -23,7 +22,7 @@
bc # Calculator
bottom # System viewer
ncdu # TUI disk usage
# eza # Better ls
eza # Better ls
ripgrep # Better grep
fd # Better find
curl # cURL

View file

@ -31,47 +31,6 @@ in
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
aliases = {
aa = "add --all";
add-nowhitespace = "!git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -";
amend = "commit --amend";
ci = "commit";
co = "checkout";
dag = "log --graph --format='format:%C(yellow)%h%C(reset) %C(blue)\"%an\" <%ae>%C(reset) %C(magenta)%cr%C(reset)%C(auto)%d%C(reset)%n%s' --date-order";
dc = "diff --cached";
di = "diff";
div = "divergence";
fa = "fetch --all";
fast-forward = "merge --ff-only";
ff = "merge --ff-only";
files = "show --oneline";
gn = "goodness";
gnc = "goodness --cached";
graph = "log --decorate --oneline --graph";
h = "!git head";
head = "!git l -1";
l = "log --graph --abbrev-commit --date=relative";
la = "!git l --all";
lastchange = "log -n 1 -p";
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
mend = "commit --amend --no-edit";
pom = "push origin master";
pullff = "pull --ff-only";
pushall = "!git remote | xargs -L1 git push --all";
r = "!git --no-pager l -20";
ra = "!git r --all";
st = "status --short";
subdate = "submodule update --init --recursive";
sync = "pull --rebase";
unadd = "reset --";
unedit = "checkout --";
unrm = "checkout --";
unstage = "reset HEAD";
unstash = "stash pop";
update = "merge --ff-only origin/master";
};
userName = "Greg Burd";
userEmail = "greg@burd.me";
signing = {

View file

@ -1,5 +1,5 @@
{ desktop, lib, pkgs, ... }: {
imports = [ ] ++ lib.optionals (desktop != null) [
imports = lib.optionals (desktop != null) [
../desktop/signal.nix
];
home.packages = [ pkgs.signal-cli ];

View file

@ -0,0 +1,5 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
asdf-vm
];
}

View file

@ -0,0 +1,5 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ charm-freeze ];
home.file.".config/freeze/user.json".text = builtins.readFile ./charm-freeze/config.json;
}

View file

@ -0,0 +1,17 @@
{
"window": true,
"border": {
"radius": 8,
"width": 0,
"color": "#515151"
},
"shadow": false,
"padding": [20, 20, 20, 20],
"margin": 32,
"font": {
"family": "FiraCode Nerd font",
"size": 12
},
"line_height": 1.2,
"theme": "dracula"
}

View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
# Deckmaster and the utilities I bind to the Stream Deck
home.packages = with pkgs; [
deckmaster
hueadm
unstable.obs-cli
playerctl
];
}

View file

@ -1,16 +1,57 @@
{ config, lib, pkgs, ... }: {
{ config, pkgs, ... }: {
imports = [
./neovim.nix
./tmux.nix
];
home = {
file = {
"${config.xdg.configHome}/neofetch/config.conf".text = builtins.readFile ./neofetch.conf;
};
# A Modern Unix experience
# https://jvns.ca/blog/2022/04/12/a-list-of-new-ish--command-line-tools/
packages = with pkgs; [
neofetch
asciinema # Terminal recorder
breezy # Terminal bzr client
butler # Terminal Itch.io API client
chafa # Terminal image viewer
dconf2nix # Nix code from Dconf files
diffr # Modern Unix `diff`
difftastic # Modern Unix `diff`
dua # Modern Unix `du`
duf # Modern Unix `df`
du-dust # Modern Unix `du`
entr # Modern Unix `watch`
fd # Modern Unix `find`
ffmpeg-headless # Terminal video encoder
fzf # Command-line fuzzy finder
glow # Terminal Markdown renderer
gping # Modern Unix `ping`
hexyl # Modern Unix `hexedit`
hyperfine # Terminal benchmarking
jpegoptim # Terminal JPEG optimizer
jiq # Modern Unix `jq`
lazygit # Terminal Git client
neofetch # Terminal system info
nixpkgs-review # Nix code review
nurl # Nix URL fetcher
nyancat # Terminal rainbow spewing feline
optipng # Terminal PNG optimizer
page # Modern pager
procs # Modern Unix `ps`
quilt # Terminal patch manager
ripgrep # Modern Unix `grep`
tldr # Modern Unix `man`
tokei # Modern Unix `wc` for code
wget # Terminal downloader
yq-go # Terminal `jq` for YAML
];
sessionVariables = {
EDITOR = "vi";
MANPAGER = "sh -c 'col --no-backspaces --spaces | bat --language man'";
SYSTEMD_EDITOR = "vi";
VISUAL = "vi";
EDITOR = "nvim";
PAGER = "page";
SYSTEMD_EDITOR = "nvim";
VISUAL = "nvim";
};
};
@ -25,7 +66,7 @@
package = pkgs.unstable.atuin;
settings = {
auto_sync = true;
dialect = "uk";
dialect = "us";
show_preview = true;
style = "compact";
sync_frequency = "1h";
@ -33,13 +74,6 @@
update_check = false;
};
};
bat = {
enable = true;
extraPackages = with pkgs.bat-extras; [
batwatch
prettybat
];
};
bottom = {
enable = true;
settings = {
@ -85,20 +119,52 @@
fish = {
enable = true;
shellAliases = {
#cat = "bat --paging=never --style=plain";
diff = "diffr";
glow = "glow --pager";
htop = "btm --basic --tree --hide_table_gap --dot_marker --mem_as_value";
ip = "ip --color --brief";
#less = "bat --paging=always";
#more = "bat --paging=always";
top = "btm --basic --tree --hide_table_gap --dot_marker --mem_as_value";
tree = "exa --tree";
tree = "eza --tree";
};
functions =
let
doCurl = type: url: "$(curl -L \"${url}\" 2>/dev/null | ${type}sum | awk '{print $1}')";
makeSriHasher = type: content: "nix-hash --type ${type} --to-sri ${content}";
makeSriUrlHasher = url: type: makeSriHasher type (doCurl type url);
makeSriUrlHasherFishFunction = makeSriUrlHasher "$argv[1]";
in
{
shell = ''
nix develop $HOME/ws/nix-config#$argv[1] || nix develop $HOME/ws/nix-config#( \
git remote -v \
| grep '(push)' \
| awk '{print $2}' \
| cut -d ':' -f 2 \
| rev \
| sed 's/tig.//' \
| rev \
)
'';
is-number = ''
string match --quiet --regex "^\d+\$" $argv[1]
'';
deploy-nuc = "is-number $argv[1] && nixos-rebuild --fast --flake $HOME/ws/nix-config#nuc$argv[1] --target-host root@192.168.40.20$argv[1] $argv[2..]";
sriMd5Url = makeSriUrlHasherFishFunction "md5";
sriSha1Url = makeSriUrlHasherFishFunction "sha1";
sriSha256Url = makeSriUrlHasherFishFunction "sha256";
sriSha512Url = makeSriUrlHasherFishFunction "sha512";
};
plugins = with pkgs.fishPlugins; [
{ name = "foreign-env"; inherit (foreign-env) src; }
{ name = "fzf"; inherit (fzf-fish) src; }
];
};
gh = {
enable = true;
extensions = with pkgs; [ gh-markdown-preview ];
settings = {
editor = "micro";
editor = "nvim";
git_protocol = "ssh";
prompt = "enabled";
};
@ -110,11 +176,88 @@
options = {
features = "decorations";
navigate = true;
line-numbers = true;
side-by-side = true;
syntax-theme = "GitHub";
};
};
aliases = {
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
a = "add";
aa = "add --all";
aaa = "!git a $(git rd)";
add-nowhitespace = "!git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -";
# amend
am = "!git cm --amend --no-edit --date=\"$(date +'%Y %D')\"";
amend = "commit --amend";
# branch name
bn = "br --show-current";
br = "branch";
ci = "commit";
co = "checkout";
cob = "co -b";
d = "diff";
dag = "log --graph --format='format:%C(yellow)%h%C(reset) %C(blue)\"%an\" <%ae>%C(reset) %C(magenta)%cr%C(reset)%C(auto)%d%C(reset)%n%s' --date-order";
dc = "diff --cached";
di = "diff";
div = "divergence";
ds = "d --staged";
f = "fetch";
fa = "f --all";
fast-forward = "merge --ff-only";
ff = "merge --ff-only";
files = "show --oneline";
gn = "goodness";
gnc = "goodness --cached";
# generate patch
gp = "!gitgenpatch() { target=$1; git format-patch $target --stdout | sed -n -e '/^diff --git/,$p' | head -n -3; }; gitgenpatch";
graph = "log --decorate --oneline --graph";
h = "!git head";
head = "!git l -1";
# shows commit history
hist = "log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short";
l = "log --graph --abbrev-commit --date=relative";
la = "!git l --all";
lastchange = "log -n 1 -p";
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
mend = "commit --amend --no-edit";
p = "push";
# force with lease
pf = "poh --force-with-lease";
# FORCEEEE
pff = "poh --force";
# push to origin HEAD
poh = "p origin HEAD";
pom = "push origin master";
# push and open pr
ppr = "!git poh; !git pr";
# open pr
pr = "!gh pr create";
pullff = "pull --ff-only";
pushall = "!git remote | xargs -L1 git push --all";
r = "!git --no-pager l -20";
ra = "!git r --all";
rb = "rebase";
rbc = "rebase --continue";
# gets root directory
rd = "rev-parse --show-toplevel";
rh = "rs --hard";
rho = "!git rh origin/$(git bn)";
rs = "reset";
# squash it
sq = "!gitsq() { git rb -i $(git sr $1) $2; }; gitsq";
# gets latest shared commit
sr = "merge-base HEAD";
st = "status --short";
subdate = "submodule update --init --recursive";
sync = "pull --rebase";
unadd = "reset --";
unedit = "checkout --";
unrm = "checkout --";
unstage = "reset HEAD";
unstash = "stash pop";
update = "merge --ff-only origin/master";
};
extraConfig = {
push = {
@ -122,6 +265,7 @@
};
pull = {
rebase = true;
ff = "only";
};
init = {
defaultBranch = "main";
@ -159,27 +303,10 @@
max-width = 60;
};
};
};
services = {
gpg-agent = {
zoxide = {
enable = true;
enableSshSupport = true;
pinentryFlavor = "curses";
};
};
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
xdg = {
enable = true;
userDirs = {
enable = true;
createDirectories = lib.mkDefault true;
extraConfig = {
XDG_SCREENSHOTS_DIR = "${config.home.homeDirectory}/Pictures/Screenshots";
};
enableBashIntegration = true;
enableFishIntegration = true;
};
};
}

View file

@ -24,7 +24,7 @@ print_info() {
info "${cl4} ├─ ${cl0}" disk
# info "${cl4} ├─ ${cl0} " battery
info "${cl4} ├─" gpu
# info "${cl4} ├─" gpu_driver
info "${cl4} ├─" gpu_driver
info "${cl4} ╰─" resolution
prin " "

View file

@ -0,0 +1,9 @@
{ pkgs, ... }: {
home.file.".config/nvim/init.lua".text = builtins.readFile ./neovim/init.lua;
home.packages = with pkgs; [
gcc
nnn
zig
];
}

View file

@ -0,0 +1 @@
_: { }

View file

@ -0,0 +1,28 @@
{ lib, config, pkgs, ... }: {
home.packages = with pkgs; [
debootstrap # Terminal Debian installer
lurk # Modern Unix `strace`
];
services = {
gpg-agent = {
enable = true;
enableSshSupport = true;
pinentryFlavor = "curses";
};
};
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
xdg = {
enable = true;
userDirs = {
enable = true;
createDirectories = lib.mkDefault true;
extraConfig = {
XDG_SCREENSHOTS_DIR = "${config.home.homeDirectory}/Pictures/Screenshots";
};
};
};
}

View file

@ -0,0 +1,20 @@
{ pkgs, ... }:
let
theme = {
colors = {
black = "#282c34";
blue = "#61afef";
yellow = "#e5c07b";
red = "#06c75";
white = "#aab2bf";
green = "#98c379";
visual_grey = "#3e4452";
comment_grey = "#5c6370";
};
};
themeFile = pkgs.templateFile "onedark-theme.tmux" ./tmux/theme.tmux.tpl theme;
tmuxConfig = pkgs.templateFile "tmux.conf" ./tmux/tmux.conf.tpl { theme.path = "${themeFile}"; };
in
{
home.file.".tmux.conf".source = "${tmuxConfig}";
}

View file

@ -0,0 +1,88 @@
#!/bin/bash
color__black="{{colors.black}}"
color__blue="{{colors.blue}}"
color__yellow="{{colors.yellow}}"
color__red="{{colors.red}}"
color__white="{{colors.white}}"
color__green="{{colors.green}}"
color__visual_grey="{{colors.visual_grey}}"
color__comment_grey="{{colors.comment_grey}}"
get() {
local option=$1
local default_value=$2
local option_value="$(tmux show-option -gqv "$option")"
if [ -z "$option_value" ]; then
echo "$default_value"
else
echo "$option_value"
fi
}
set() {
local option=$1
local value=$2
tmux set-option -gq "$option" "$value"
}
setw() {
local option=$1
local value=$2
tmux set-window-option -gq "$option" "$value"
}
set "status" "on"
set "status-justify" "left"
set "status-left-length" "100"
set "status-right-length" "100"
set "status-right-attr" "none"
set "message-fg" "$color__white"
set "message-bg" "$color__black"
set "message-command-fg" "$color__white"
set "message-command-bg" "$color__black"
set "status-attr" "none"
set "status-left-attr" "none"
setw "window-status-fg" "$color__black"
setw "window-status-bg" "$color__black"
setw "window-status-attr" "none"
setw "window-status-activity-bg" "$color__black"
setw "window-status-activity-fg" "$color__black"
setw "window-status-activity-attr" "none"
setw "window-status-separator" ""
set "window-style" "fg=$color__comment_grey"
set "window-active-style" "fg=$color__white"
set "pane-border-fg" "$color__white"
set "pane-border-bg" "$color__black"
set "pane-active-border-fg" "$color__green"
set "pane-active-border-bg" "$color__black"
set "display-panes-active-colour" "$color__yellow"
set "display-panes-colour" "$color__blue"
set "status-bg" "$color__black"
set "status-fg" "$color__white"
set "@prefix_highlight_fg" "$color__black"
set "@prefix_highlight_bg" "$color__green"
set "@prefix_highlight_copy_mode_attr" "fg=$color__black,bg=$color__green"
set "@prefix_highlight_output_prefix" "  "
status_widgets=$(get "@color__widgets")
time_format=$(get "@color__time_format" "%R")
date_format=$(get "@color__date_format" "%d/%m/%Y")
set "status-right" "#[fg=$color__white,bg=$color__black,nounderscore,noitalics]${time_format}  ${date_format} #[fg=$color__visual_grey,bg=$color__black]#[fg=$color__visual_grey,bg=$color__visual_grey]#[fg=$color__white, bg=$color__visual_grey]${status_widgets} #[fg=$color__green,bg=$color__visual_grey,nobold,nounderscore,noitalics]#[fg=$color__black,bg=$color__green,bold] #h #[fg=$color__yellow, bg=$color__green]#[fg=$color__red,bg=$color__yellow]"
set "status-left" "#[fg=$color__black,bg=$color__green,bold] #S #{prefix_highlight}#[fg=$color__green,bg=$color__black,nobold,nounderscore,noitalics]"
set "window-status-format" "#[fg=$color__black,bg=$color__black,nobold,nounderscore,noitalics]#[fg=$color__white,bg=$color__black] #I  #W #[fg=$color__black,bg=$color__black,nobold,nounderscore,noitalics]"
set "window-status-current-format" "#[fg=$color__black,bg=$color__visual_grey,nobold,nounderscore,noitalics]#[fg=$color__white,bg=$color__visual_grey,nobold] #I  #W #[fg=$color__visual_grey,bg=$color__black,nobold,nounderscore,noitalics]"

View file

@ -0,0 +1,88 @@
#!/bin/bash
onedark_black="#282c34"
onedark_blue="#61afef"
onedark_yellow="#e5c07b"
onedark_red="#e06c75"
onedark_white="#aab2bf"
onedark_green="#98c379"
onedark_visual_grey="#3e4452"
onedark_comment_grey="#5c6370"
get() {
local option=$1
local default_value=$2
local option_value="$(tmux show-option -gqv "$option")"
if [ -z "$option_value" ]; then
echo "$default_value"
else
echo "$option_value"
fi
}
set() {
local option=$1
local value=$2
tmux set-option -gq "$option" "$value"
}
setw() {
local option=$1
local value=$2
tmux set-window-option -gq "$option" "$value"
}
set "status" "on"
set "status-justify" "left"
set "status-left-length" "100"
set "status-right-length" "100"
set "status-right-attr" "none"
set "message-fg" "$onedark_white"
set "message-bg" "$onedark_black"
set "message-command-fg" "$onedark_white"
set "message-command-bg" "$onedark_black"
set "status-attr" "none"
set "status-left-attr" "none"
setw "window-status-fg" "$onedark_black"
setw "window-status-bg" "$onedark_black"
setw "window-status-attr" "none"
setw "window-status-activity-bg" "$onedark_black"
setw "window-status-activity-fg" "$onedark_black"
setw "window-status-activity-attr" "none"
setw "window-status-separator" ""
set "window-style" "fg=$onedark_comment_grey"
set "window-active-style" "fg=$onedark_white"
set "pane-border-fg" "$onedark_white"
set "pane-border-bg" "$onedark_black"
set "pane-active-border-fg" "$onedark_green"
set "pane-active-border-bg" "$onedark_black"
set "display-panes-active-colour" "$onedark_yellow"
set "display-panes-colour" "$onedark_blue"
set "status-bg" "$onedark_black"
set "status-fg" "$onedark_white"
set "@prefix_highlight_fg" "$onedark_black"
set "@prefix_highlight_bg" "$onedark_green"
set "@prefix_highlight_copy_mode_attr" "fg=$onedark_black,bg=$onedark_green"
set "@prefix_highlight_output_prefix" "  "
status_widgets=$(get "@onedark_widgets")
time_format=$(get "@onedark_time_format" "%R")
date_format=$(get "@onedark_date_format" "%d/%m/%Y")
set "status-right" "#[fg=$onedark_white,bg=$onedark_black,nounderscore,noitalics]${time_format}  ${date_format} #[fg=$onedark_visual_grey,bg=$onedark_black]#[fg=$onedark_visual_grey,bg=$onedark_visual_grey]#[fg=$onedark_white, bg=$onedark_visual_grey]${status_widgets} #[fg=$onedark_green,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_black,bg=$onedark_green,bold] #h #[fg=$onedark_yellow, bg=$onedark_green]#[fg=$onedark_red,bg=$onedark_yellow]"
set "status-left" "#[fg=$onedark_black,bg=$onedark_green,bold] #S #{prefix_highlight}#[fg=$onedark_green,bg=$onedark_black,nobold,nounderscore,noitalics]"
set "window-status-format" "#[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_black] #I  #W #[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]"
set "window-status-current-format" "#[fg=$onedark_black,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_visual_grey,nobold] #I  #W #[fg=$onedark_visual_grey,bg=$onedark_black,nobold,nounderscore,noitalics]"

View file

@ -0,0 +1 @@
run-shell "/bin/bash -c {{theme.path}}"

View file

@ -1,10 +1,6 @@
{ config, lib, pkgs, username, ... }:
{ lib, config, username, ... }:
with lib.hm.gvariant;
{
home.packages = with pkgs; [
audio-recorder
];
dconf.settings = {
"apps/audio-recorder" = {
append-to-file = false;
@ -20,8 +16,4 @@ with lib.hm.gvariant;
timer-text = "";
};
};
systemd.user.tmpfiles.rules = [
"d ${config.home.homeDirectory}/Audio 0755 ${username} users - -"
];
}

View file

@ -1,10 +1,6 @@
{ lib, pkgs, ... }:
{ lib, ... }:
with lib.hm.gvariant;
{
home.packages = with pkgs; [
celluloid
];
dconf.settings = {
"io/github/celluloid-player/celluloid" = {
csd-enable = false;

View file

@ -1,10 +1,6 @@
{ lib, pkgs, ... }:
{ lib, ... }:
with lib.hm.gvariant;
{
home.packages = with pkgs; [
gnome.dconf-editor
];
dconf.settings = {
"ca/desrt/dconf-editor" = {
show-warning = false;

View file

@ -1,27 +1,20 @@
{ config, pkgs, ... }:
{ config, username, ... }:
{
# https://github.com/muesli/deckmaster
home = {
file = {
"${config.xdg.configHome}/autostart/deskmaster-xl.desktop".text = "
[Desktop Entry]
Name=Deckmaster XL
Comment=Deckmaster XL
Type=Application
Exec=deckmaster -deck ${config.home.homeDirectory}/Studio/StreamDeck/Deckmaster-xl/main.deck
Categories=
Terminal=false
NoDisplay=true
StartupNotify=false";
};
# Deckmaster and the utilities I bind to the Stream Deck
packages = with pkgs; [
bc
deckmaster
hueadm
libnotify
unstable.obs-cli
playerctl
];
imports = [
../console/decktrunk.nix
];
home.file = {
"${config.xdg.configHome}/autostart/deskmaster-xl.desktop".text = "
[Desktop Entry]
Name=Deckmaster XL
Comment=Deckmaster XL
Type=Application
Exec=deckmaster -deck /home/${username}/Studio/StreamDeck/Deckmaster-xl/main.deck
Categories=
Terminal=false
NoDisplay=true
StartupNotify=false";
};
}

View file

@ -1,10 +1,10 @@
{ desktop, lib, username, ... }: {
{ desktop, ... }: {
imports = [
./neovide.nix
./emote.nix
./tilix.nix
(./. + "/${desktop}.nix")
] ++ lib.optional (builtins.pathExists (./. + "/../users/${username}/desktop.nix")) ../users/${username}/desktop.nix;
# https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
services.mpris-proxy.enable = true;
];
xresources.properties = {
"XTerm*background" = "#121214";

View file

@ -0,0 +1,11 @@
{ inputs, ... }: {
imports = [
inputs.nix-doom-emacs.hmModule
];
programs.doom-emacs = {
enable = true;
doomPrivateDir = ./doom.d; # Directory containing your config.el, init.el
# and packages.el files
};
}

View file

@ -0,0 +1,54 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets.
(setq user-full-name "Greg Burd"
user-mail-address "greg@burd.me")
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two:
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
;; Here are some additional functions/macros that could help you configure Doom:
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.

View file

@ -0,0 +1,191 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a "Module Index" link where you'll find
;; a comprehensive list of Doom's modules and what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;chinese
;;japanese ; どうも!
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
docker
editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
lsp ; M-x vscode
magit ; a git porcelain for Emacs
make ; run make tasks from Emacs
;;pass ; password manager for nerds
;;pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;cc ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
(go +lsp) ; the hipster dialect
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
json ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
;;literate
(default +bindings +smartparens))

View file

@ -0,0 +1,50 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;(package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/raxod502/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;(package! this-package
; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;(package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see raxod502/straight.el#279)
;(package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;(package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;(unpin! pinned-package)
;; ...or multiple packages
;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)

View file

@ -11,7 +11,7 @@
Description = "Emote";
};
Service = {
ExecStart = "${pkgs.unstable.emote}/bin/emote";
ExecStart = "${pkgs.emote}/bin/emote";
Restart = "on-failure";
};
Install = {

View file

@ -1,9 +1,5 @@
{ pkgs, ... }:
_:
{
home.packages = with pkgs; [
unstable.gitkraken
];
home.file = {
".gitkraken/themes/bearded-vivid-black.jsonc".text = ''
{

View file

@ -1,10 +1,6 @@
{ config, lib, pkgs, username, ... }:
{ lib, username, ... }:
with lib.hm.gvariant;
{
home.packages = with pkgs; [
gnome.gnome-sound-recorder
];
dconf.settings = {
"org/gnome/SoundRecorder" = {
audio-channel = "mono";
@ -13,7 +9,6 @@ with lib.hm.gvariant;
};
systemd.user.tmpfiles.rules = [
"d ${config.home.homeDirectory}/Audio 0755 ${username} users - -"
"L+ ${config.home.homeDirectory}/.local/share/org.gnome.SoundRecorder/ - - - - ${config.home.homeDirectory}/Audio/"
"L+ /home/${username}/.local/share/org.gnome.SoundRecorder/ - - - - /home/${username}/Audio/"
];
}

View file

@ -0,0 +1,174 @@
{ config, lib, pkgs, ... }:
with lib.hm.gvariant;
{
dconf.settings = {
"com/github/stsdc/monitor/settings" = {
background-state = true;
indicator-state = true;
indicator-cpu-state = false;
indicator-gpu-state = false;
indicator-memory-state = false;
indicator-network-download-state = true;
indicator-network-upload-state = true;
indicator-temperature-state = true;
};
"desktop/ibus/panel" = {
show-icon-on-systray = false;
use-custom-font = true;
custom-font = "Work Sans 10";
};
"desktop/ibus/panel/emoji" = {
font = "JoyPixels 16";
};
# "net/launchpad/plank/docks/dock1" = {
# alignment = "center";
# hide-mode = "window-dodge";
# icon-size = 48;
# pinned-only = false;
# position = "left";
# theme = "Transparent";
# };
"org/gnome/desktop/datetime" = {
automatic-timezone = true;
};
"org/gnome/desktop/input-sources" = {
xkb-options = [ "grp:alt_shift_toggle" "caps:none" ];
};
"org/gnome/desktop/interface" = {
clock-format = "24h";
color-scheme = "prefer-dark";
cursor-size = 24;
cursor-theme = "adwaita";
document-font-name = "Work Sans 12";
font-name = "Work Sans 12";
gtk-theme = "org.gnome.theme";
gtk-enable-primary-paste = true;
icon-theme = "adwaita";
monospace-font-name = "FiraCode Nerd Font Medium 13";
text-scaling-factor = 1.0;
};
"org/gnome/desktop/session" = {
idle-delay = lib.hm.gvariant.mkUint32 7200;
};
# "org/gnome/desktop/sound" = {
# theme-name = "elementary";
# };
"org/gnome/desktop/wm/keybindings" = {
switch-to-workspace-left = [ "<Primary><Alt>Left" ];
switch-to-workspace-right = [ "<Primary><Alt>Right" ];
switch-windows = [ "<Alt> Tab" ];
switch-windows-backward = [ "<Shift><Alt> Tab" ];
};
"org/gnome/desktop/wm/preferences" = {
audible-bell = false;
button-layout = ":minimize,maximize,close";
num-workspaces = 8;
titlebar-font = "Work Sans Semi-Bold 12";
workspace-names = [ "Web" "Work" "Chat" "Code" "Virt" "Cast" "Fun" "Stuff" ];
};
"org/gnome/GWeather" = {
locations = "[<(uint32 2, <('Detroit', 'KDET', true, [(0.74017959717812587, -1.448797812080493)], [(0.73882277821762554, -1.4494218371012511)])>)>]";
};
"org/gnome/mutter" = {
workspaces-only-on-primary = false;
dynamic-workspaces = false;
};
"org/gnome/mutter/keybindings" = {
toggle-tiled-left = [ "<Super>Left" ];
toggle-tiled-right = [ "<Super>Right" ];
};
# "org/gnome/settings-daemon/plugins/media-keys" = {
# custom-keybindings = [ "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" ];
# };
# "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
# binding = "<Super>e";
# command = "io.elementary.files -n ~/";
# name = "io.elementary.files -n ~/";
# };
"org/gnome/settings-daemon/plugins/power" = {
power-button-action = "interactive";
sleep-inactive-ac-timeout = 0;
sleep-inactive-ac-type = "nothing";
};
#"org/gnome/settings-daemon/plugins/xsettings" = {
# overrides = "{\'Gtk/DialogsUseHeader\': <0>, \'Gtk/ShellShowsAppMenu\': <0>, \'Gtk/EnablePrimaryPaste\': <1>, \'Gtk/DecorationLayout\': <\':minimize,maximize,close,menu\'>, \'Gtk/ShowUnicodeMenu\': <0>}";
#};
"org/gtk/gtk4/Settings/FileChooser" = {
clock-format = "24h";
};
"org/gtk/Settings/FileChooser" = {
clock-format = "24h";
};
};
gtk = {
enable = true;
cursorTheme = {
name = "adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 24;
};
font = {
name = "Work Sans 12";
package = pkgs.work-sans;
};
gtk2 = {
configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
extraConfig = ''
gtk-application-prefer-dark-theme=1
'';
};
gtk3 = {
extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
gtk4 = {
extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
iconTheme = {
name = "adwaita";
package = pkgs.gnome.adwaita-icon-theme;
};
theme = {
name = "org.gnome.theme";
package = pkgs.numix-solarized-gtk-theme;
};
};
home.pointerCursor = {
package = pkgs.gnome.adwaita-icon-theme;
name = "adwaita";
size = 24;
gtk.enable = true;
x11.enable = true;
};
}

View file

@ -0,0 +1,32 @@
{ pkgs, ... }: {
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "SUPER";
bind =
[
"$mod, F, exec, ${pkgs.rofi}/bin/rofi"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList
(
x:
let
ws =
let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in
[
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]
)
10)
);
};
};
}

View file

@ -0,0 +1,191 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
# bindsym $mod+d exec --no-startup-id dmenu_run
bindsym $mod+d exec "rofi -modi drun,run -show drun"
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+Shift+g split h
# split in vertical orientation
bindsym $mod+Shift+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window's width.
# Pressing right will grow the window's width.
# Pressing up will shrink the window's height.
# Pressing down will grow the window's height.
bindsym h resize shrink width 12 px or 12 ppt
bindsym j resize grow height 12 px or 12 ppt
bindsym k resize shrink height 12 px or 12 ppt
bindsym l resize grow width 12 px or 12 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 3 px or 3 ppt
bindsym Down resize grow height 3 px or 3 ppt
bindsym Up resize shrink height 3 px or 3 ppt
bindsym Right resize grow width 3 px or 3 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}

View file

@ -0,0 +1,33 @@
{ pkgs, ... }: with pkgs.unstable; {
home.file = {
".config/i3/config".text = builtins.readFile ./i3.config;
};
# xsession.windowManager.i3 = {
# config = {
# bars = [
# {
# position = "bottom";
# statusCommand = "${i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-top.toml";
# }
# ];
# };
# };
# programs.i3status-rust = {
# enable = true;
# package = pkgs.unstable.i3status-rust;
# bars = {
# top = {
# blocks = [
# {
# block = "time";
# interval = 60;
# format = "%a %d/%m %k:%M %p";
# }
# ];
# };
# };
# };
}

View file

@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.jetbrains-toolbox ];
}

View file

@ -0,0 +1,21 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
keybase-gui
];
systemd.user.services = {
keybase-gui = {
Unit = {
Description = "Keybase GUI";
};
Service = {
ExecStart = "${pkgs.keybase-gui}/bin/keybase-gui";
Restart = "on-failure";
};
Install = {
WantedBy = [ "default.target" ];
};
};
};
}

View file

@ -3,15 +3,15 @@ with lib.hm.gvariant;
{
dconf.settings = {
"org/gnome/charmap" = {
font = "Work Sans 22";
font = "Work Sans 18";
};
"org/gnome/desktop/interface" = {
cursor-theme = "Yaru";
document-font-name = "Work Sans 12";
font-name = "Work Sans 12";
gtk-theme = lib.mkForce "Yaru-magenta-dark";
icon-theme = lib.mkForce "Yaru-magenta-dark";
gtk-theme = "Yaru-magenta-dark";
icon-theme = "Yaru-magenta-dark";
monospace-font-name = "FiraCode Nerd Font Medium 13";
};
@ -107,7 +107,7 @@ with lib.hm.gvariant;
};
"org/mate/desktop/peripherals/mouse" = {
cursor-size = 32;
cursor-size = 24;
cursor-theme = "Yaru";
};
@ -315,7 +315,7 @@ with lib.hm.gvariant;
cursorTheme = {
name = "Yaru";
package = pkgs.yaru-theme;
size = 32;
size = 24;
};
font = {
@ -356,7 +356,7 @@ with lib.hm.gvariant;
home.pointerCursor = {
name = "Yaru";
package = pkgs.yaru-theme;
size = 32;
size = 24;
gtk.enable = true;
x11.enable = true;
};

View file

@ -1,10 +1,6 @@
{ lib, pkgs, ... }:
{ lib, ... }:
with lib.hm.gvariant;
{
home.packages = with pkgs; [
meld
];
dconf.settings = {
"org/gnome/meld" = {
indent-width = 4;

View file

@ -0,0 +1 @@
_: { }

View file

@ -101,7 +101,7 @@ with lib.hm.gvariant;
"org/gnome/desktop/interface" = {
clock-format = "24h";
color-scheme = "prefer-dark";
cursor-size = 32;
cursor-size = 24;
cursor-theme = "elementary";
document-font-name = "Work Sans 12";
font-name = "Work Sans 12";
@ -195,7 +195,7 @@ with lib.hm.gvariant;
cursorTheme = {
name = "elementary";
package = pkgs.pantheon.elementary-icon-theme;
size = 32;
size = 24;
};
font = {
@ -236,7 +236,7 @@ with lib.hm.gvariant;
home.pointerCursor = {
package = pkgs.pantheon.elementary-icon-theme;
name = "elementary";
size = 32;
size = 24;
gtk.enable = true;
x11.enable = true;
};

View file

@ -1,10 +1,6 @@
{ lib, pkgs, ... }:
{ lib, ... }:
with lib.hm.gvariant;
{
home.packages = with pkgs; [
rhythmbox
];
dconf.settings = {
"org/gnome/rhythmbox/plugins" = {
active-plugins = [ "rb" "power-manager" "mpris" "iradio" "generic-player" "audiocd" "android" ];
@ -14,6 +10,11 @@ with lib.hm.gvariant;
download-interval = "manual";
};
"org/gnome/rhythmbox/rhythmdb" = {
locations = [ "file:///home/${username}/Studio/Music" ];
monitor-library = true;
};
"org/gnome/rhythmbox/sources" = {
browser-views = "genres-artists-albums";
visible-columns = [ "post-time" "duration" "track-number" "album" "genre" "beats-per-minute" "play-count" "artist" ];

View file

@ -0,0 +1,13 @@
{ pkgs, ... }:
let
templateValues = {
bin = {
yabai = "${pkgs.yabai}";
};
};
skhdConfig = pkgs.templateFile "skhdrc" ./skhd/skhd.conf.tpl templateValues;
in
{
home.file.".config/skhd/skhdrc".source = "${skhdConfig}";
}

View file

@ -0,0 +1,55 @@
cmd - return: open -n -a ITerm
# cmd - e : emacsclient -c
# Restart Yabai
alt + cmd - q: brew services restart {{bin.yabai}}
#restart emacs client
alt + cmd - e: brew services restart sketchybar
### Switch focus to another destop ###
cmd - 1 : {{bin.yabai}} -m space --focus 1
cmd - 2 : {{bin.yabai}} -m space --focus 2
cmd - 3 : {{bin.yabai}} -m space --focus 3
cmd - 4 : {{bin.yabai}} -m space --focus 4
cmd - 5 : {{bin.yabai}} -m space --focus 5
cmd - 6 : {{bin.yabai}} -m space --focus 6
cmd - 7 : {{bin.yabai}} -m space --focus 7
cmd - 8 : {{bin.yabai}} -m space --focus 8
cmd - 9 : {{bin.yabai}} -m space --focus 9
cmd - 0 : {{bin.yabai}} -m space --focus 10
cmd - l : {{bin.yabai}} -m space --focus next
cmd - h : {{bin.yabai}} -m space --focus prev
#resize windows
cmd + shift - h : {{bin.yabai}} -m window --resize right:-20:0
cmd + shift - l : {{bin.yabai}} -m window --resize right:20:0
#kill active window
cmd + shift - c : {{bin.yabai}} -m window --close
### Open dmenu ###
# cmd + shift - return : open -a Xquartz && /bin/bash -l -c "sh ~/dev/dots/dmenu/apps.sh" # App launcher
### Send a window to a space ###
cmd + shift - 1 : {{bin.yabai}} -m window --space 1
cmd + shift - 2 : {{bin.yabai}} -m window --space 2
cmd + shift - 3 : {{bin.yabai}} -m window --space 3
cmd + shift - 4 : {{bin.yabai}} -m window --space 4
cmd + shift - 5 : {{bin.yabai}} -m window --space 5
cmd + shift - 6 : {{bin.yabai}} -m window --space 6
cmd + shift - 7 : {{bin.yabai}} -m window --space 7
cmd + shift - 8 : {{bin.yabai}} -m window --space 8
cmd + shift - 9 : {{bin.yabai}} -m window --space 9
cmd + shift - h : {{bin.yabai}} -m window --space prev # Send window to space on the left
cmd + shift - l : {{bin.yabai}} -m window --space next # Send window to space on the right
### Send a window to a space and follow focus ###
cmd + alt - 1 : {{bin.yabai}} -m window --space 1; {{bin.yabai}} -m space --focus 1
cmd + alt - 2 : {{bin.yabai}} -m window --space 2; {{bin.yabai}} -m space --focus 2
cmd + alt - 3 : {{bin.yabai}} -m window --space 3; {{bin.yabai}} -m space --focus 3
cmd + alt - 4 : {{bin.yabai}} -m window --space 4; {{bin.yabai}} -m space --focus 4
cmd + alt - 5 : {{bin.yabai}} -m window --space 5; {{bin.yabai}} -m space --focus 5
cmd + alt - 6 : {{bin.yabai}} -m window --space 6; {{bin.yabai}} -m space --focus 6
cmd + alt - 7 : {{bin.yabai}} -m window --space 7; {{bin.yabai}} -m space --focus 7
cmd + alt - 8 : {{bin.yabai}} -m window --space 8; {{bin.yabai}} -m space --focus 8
cmd + alt - h : {{bin.yabai}} -m window --space prev; {{bin.yabai}} -m space --focus prev # To the space on the left
cmd + alt - l : {{bin.yabai}} -m window --space next; {{bin.yabai}} -m space --focus next # To the spave on the right

View file

@ -1,11 +1,9 @@
# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix
{ lib, pkgs, ... }:
with lib.hm.gvariant;
{
home.packages = with pkgs; [
tilix
];
{ lib, ... }:
with lib.hm.gvariant;
{
dconf.settings = {
"com/gexperts/Tilix" = {
app-title = "\${appName}: \${directory}";
@ -48,7 +46,7 @@ with lib.hm.gvariant;
default-size-columns = 132;
default-size-rows = 50;
draw-margin = 80;
font = "FiraCode Nerd Font Medium 12";
font = "FiraCode Nerd Font Medium 10";
foreground-color = "#C8C8C8C8C8C8";
highlight-background-color = "#1E1E1E1E2020";
highlight-colors-set = false;
@ -56,7 +54,7 @@ with lib.hm.gvariant;
palette = [ "#121212121414" "#D6D62B2B2B2B" "#4141DDDD7575" "#FFFFB6B63838" "#2828A9A9FFFF" "#E6E66D6DFFFF" "#1414E5E5D3D3" "#C8C8C8C8C8C8" "#434343434545" "#DEDE56565656" "#A1A1EEEEBBBB" "#FFFFC5C56060" "#9494D4D4FFFF" "#F2F2B6B6FFFF" "#A0A0F5F5EDED" "#E9E9E9E9E9E9" ];
scrollback-unlimited = true;
terminal-title = "";
use-system-font = true;
use-system-font = false;
use-theme-colors = false;
visible-name = "Bearded Dark Vivid";
};

View file

@ -1,6 +0,0 @@
{ pkgs, ... }: {
imports = [
# ./steam.nix
];
home.packages = with pkgs; [ gamescope ];
}

View file

@ -1,55 +0,0 @@
{ pkgs, lib, config, ... }:
let
steam-with-pkgs = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
gamescope
mangohud
];
};
monitor = lib.head (lib.filter (m: m.primary) config.monitors);
steam-session = pkgs.writeTextDir "share/wayland-sessions/steam-sesson.desktop" ''
[Desktop Entry]
Name=Steam Session
Exec=${pkgs.gamescope}/bin/gamescope -W ${toString monitor.width} -H ${toString monitor.height} -O ${monitor.name} -e -- steam -gamepadui
Type=Application
'';
in
{
home.packages = with pkgs; [
steam-with-pkgs
steam-session
gamescope
mangohud
protontricks
];
home.persistence = {
"/persist/home/${username}" = {
allowOther = true;
directories = [
".factorio"
".config/Hero_Siege"
".config/unity3d/Berserk Games/Tabletop Simulator"
".config/unity3d/IronGate/Valheim"
".local/share/Tabletop Simulator"
".local/share/Paradox Interactive"
".paradoxlauncher"
{
# A couple of games don't play well with bindfs
directory = ".local/share/Steam";
method = "symlink";
}
];
};
};
}

View file

@ -1,24 +0,0 @@
{ config, ... }:
let
inherit (config) colorscheme;
in
{
home.sessionVariables.COLORTERM = "truecolor";
programs.helix = {
enable = true;
settings = {
theme = colorscheme.slug;
editor = {
color-modes = true;
line-number = "relative";
indent-guides.render = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
};
};
themes = import ./theme.nix { inherit colorscheme; };
};
}

View file

@ -1,72 +0,0 @@
{ colorscheme }: {
"${colorscheme.slug}" = {
palette = builtins.mapAttrs (_name: value: "#${value}") colorscheme.colors; # Add leading '#'
"attributes" = "base09";
"comment" = { fg = "base03"; modifiers = [ "italic" ]; };
"constant" = "base09";
"constant.character.escape" = "base0C";
"constant.numeric" = "base09";
"constructor" = "base0D";
"debug" = "base03";
"diagnostic" = { modifiers = [ "underlined" ]; };
"diagnostic.error" = { underline = { style = "curl"; }; };
"diagnostic.hint" = { underline = { style = "curl"; }; };
"diagnostic.info" = { underline = { style = "curl"; }; };
"diagnostic.warning" = { underline = { style = "curl"; }; };
"diff.delta" = "base09";
"diff.minus" = "base08";
"diff.plus" = "base0B";
"error" = "base08";
"function" = "base0D";
"hint" = "base03";
"info" = "base0D";
"keyword" = "base0E";
"label" = "base0E";
"markup.bold" = { fg = "base0A"; modifiers = [ "bold" ]; };
"markup.heading" = "base0D";
"markup.italic" = { fg = "base0E"; modifiers = [ "italic" ]; };
"markup.link.text" = "base08";
"markup.link.url" = { fg = "base09"; modifiers = [ "underlined" ]; };
"markup.list" = "base08";
"markup.quote" = "base0C";
"markup.raw" = "base0B";
"markup.strikethrough" = { modifiers = [ "crossed_out" ]; };
"namespace" = "base0E";
"operator" = "base05";
"special" = "base0D";
"string" = "base0B";
"type" = "base0A";
"ui.background" = { bg = "base00"; };
"ui.bufferline" = { fg = "base04"; bg = "base00"; };
"ui.bufferline.active" = { fg = "base00"; bg = "base03"; modifiers = [ "bold" ]; };
"ui.cursor" = { fg = "base04"; modifiers = [ "reversed" ]; };
"ui.cursor.insert" = { fg = "base0A"; modifiers = [ "underlined" ]; };
"ui.cursor.match" = { fg = "base0A"; modifiers = [ "underlined" ]; };
"ui.cursor.select" = { fg = "base0A"; modifiers = [ "underlined" ]; };
"ui.cursorline.primary" = { fg = "base05"; bg = "base01"; };
"ui.gutter" = { bg = "base00"; };
"ui.help" = { fg = "base06"; bg = "base01"; };
"ui.linenr" = { fg = "base03"; bg = "base00"; };
"ui.linenr.selected" = { fg = "base04"; bg = "base01"; modifiers = [ "bold" ]; };
"ui.menu" = { fg = "base05"; bg = "base01"; };
"ui.menu.scroll" = { fg = "base03"; bg = "base01"; };
"ui.menu.selected" = { fg = "base01"; bg = "base04"; };
"ui.popup" = { bg = "base01"; };
"ui.selection" = { bg = "base02"; };
"ui.selection.primary" = { bg = "base02"; };
"ui.statusline" = { fg = "base0B"; bg = "base02"; };
"ui.statusline.inactive" = { bg = "base01"; fg = "base02"; };
"ui.statusline.insert" = { fg = "base00"; bg = "base0B"; };
"ui.statusline.normal" = { fg = "base00"; bg = "base04"; };
"ui.statusline.select" = { fg = "base00"; bg = "base0E"; };
"ui.text" = "base05";
"ui.text.focus" = "base05";
"ui.virtual.indent-guide" = { fg = "base03"; };
"ui.virtual.ruler" = { bg = "base01"; };
"ui.virtual.whitespace" = { fg = "base01"; };
"ui.window" = { bg = "base01"; };
"variable" = "base08";
"variable.other.member" = "base08";
"warning" = "base09";
};
}

View file

@ -1,11 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ alsa-utils ];
services.fluidsynth = {
enable = true;
soundService = "pipewire-pulse";
extraOptions = [
"-g 2"
];
};
}

View file

@ -1,171 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./lsp.nix
./syntaxes.nix
./ui.nix
];
programs.neovim = {
enable = true;
extraConfig = /* vim */ ''
"Use system clipboard
set clipboard=unnamedplus
"Set fold level to highest in file
"so everything starts out unfolded at just the right level
augroup initial_fold
autocmd!
autocmd BufWinEnter * let &foldlevel = max(map(range(1, line('$')), 'foldlevel(v:val)'))
augroup END
"Tabs
set tabstop=4 "4 char-wide tab
set expandtab "Use spaces
set softtabstop=0 "Use same length as 'tabstop'
set shiftwidth=0 "Use same length as 'tabstop'
"2 char-wide overrides
augroup two_space_tab
autocmd!
autocmd FileType json,html,htmldjango,hamlet,nix,scss,typescript,php,haskell,terraform setlocal tabstop=2
augroup END
"Set tera to use htmldjango syntax
augroup tera_htmldjango
autocmd!
autocmd BufRead,BufNewFile *.tera setfiletype htmldjango
augroup END
"Options when composing mutt mail
augroup mail_settings
autocmd FileType mail set noautoindent wrapmargin=0 textwidth=0 linebreak wrap formatoptions +=w
augroup END
"Fix nvim size according to terminal
"(https://github.com/neovim/neovim/issues/11330)
augroup fix_size
autocmd VimEnter * silent exec "!kill -s SIGWINCH" getpid()
augroup END
"Line numbers
set number relativenumber
"Scroll up and down
nmap <C-j> <C-e>
nmap <C-k> <C-y>
"Buffers
nmap <C-l> :bnext<CR>
nmap <C-h> :bprev<CR>
nmap <C-q> :bdel<CR>
"Loclist
nmap <space>l :lwindow<cr>
nmap [l :lprev<cr>
nmap ]l :lnext<cr>
nmap <space>L :lhistory<cr>
nmap [L :lolder<cr>
nmap ]L :lnewer<cr>
"Quickfix
nmap <space>q :cwindow<cr>
nmap [q :cprev<cr>
nmap ]q :cnext<cr>
nmap <space>Q :chistory<cr>
nmap [Q :colder<cr>
nmap ]Q :cnewer<cr>
"Make
nmap <space>m :make<cr>
"Grep (replace with ripgrep)
nmap <space>g :grep<space>
if executable('rg')
set grepprg=rg\ --vimgrep
set grepformat=%f:%l:%c:%m
endif
"Close other splits
nmap <space>o :only<cr>
"Sudo save
cmap w!! w !sudo tee > /dev/null %
'';
extraLuaConfig = /* lua */ ''
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { desc = "Go to declaration" })
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" })
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, { desc = "Go to implementation" })
vim.keymap.set("n", "<space>f", vim.lsp.buf.format, { desc = "Format code" })
vim.keymap.set("n", "K", vim.lsp.buf.hover, { desc = "Hover Documentation" })
vim.keymap.set("n", "<space>c", vim.lsp.buf.code_action, { desc = "Code action" })
-- Diagnostic
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, { desc = "Floating diagnostic" })
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Previous diagnostic" })
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Next diagnostic" })
vim.keymap.set("n", "gl", vim.diagnostic.setloclist, { desc = "Diagnostics on loclist" })
vim.keymap.set("n", "gq", vim.diagnostic.setqflist, { desc = "Diagnostics on quickfix" })
function add_sign(name, text)
vim.fn.sign_define(name, { text = text, texthl = name, numhl = name})
end
add_sign("DiagnosticSignError", "󰅚 ")
add_sign("DiagnosticSignWarn", " ")
add_sign("DiagnosticSignHint", "󰌶 ")
add_sign("DiagnosticSignInfo", " ")
'';
plugins = with pkgs.vimPlugins; [
vim-table-mode
editorconfig-nvim
vim-surround
{
plugin = nvim-autopairs;
type = "lua";
config = /* lua */ ''
require('nvim-autopairs').setup{}
'';
}
];
};
xdg.configFile."nvim/init.lua".onChange = ''
XDG_RUNTIME_DIR=''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
for server in $XDG_RUNTIME_DIR/nvim.*; do
nvim --server $server --remote-send ':source $MYVIMRC<CR>' &
done
'';
xdg.desktopEntries = {
nvim = {
name = "Neovim";
genericName = "Text Editor";
comment = "Edit text files";
exec = "nvim %F";
icon = "nvim";
mimeType = [
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
];
terminal = true;
type = "Application";
categories = [ "Utility" "TextEditor" ];
};
};
}

View file

@ -1,91 +0,0 @@
{ pkgs, ... }: {
programs.neovim.plugins = with pkgs.vimPlugins; [
# LSP
{
plugin = nvim-lspconfig;
type = "lua";
config = /* lua */ ''
local lspconfig = require('lspconfig')
function add_lsp(binary, server, options)
if not options["cmd"] then options["cmd"] = { binary, unpack(options["cmd_args"] or {}) } end
if vim.fn.executable(binary) == 1 then server.setup(options) end
end
add_lsp("docker-langserver", lspconfig.dockerls, {})
add_lsp("bash-language-server", lspconfig.bashls, {})
add_lsp("clangd", lspconfig.clangd, {})
add_lsp("nil", lspconfig.nil_ls, {})
add_lsp("pylsp", lspconfig.pylsp, {})
add_lsp("solargraph", lspconfig.solargraph, {})
add_lsp("phpactor", lspconfig.phpactor, {})
add_lsp("terraform-ls", lspconfig.terraformls, {
cmd_args = { "serve" }
})
add_lsp("texlab", lspconfig.texlab, {})
add_lsp("gopls", lspconfig.gopls, {})
add_lsp("tsserver", lspconfig.tsserver, {})
add_lsp("lua-lsp", lspconfig.lua_ls, {})
add_lsp("jdt-language-server", lspconfig.jdtls, {})
add_lsp("texlab", lspconfig.texlab, {
chktex = {
onEdit = true,
onOpenAndSave = true
}
})
'';
}
{
plugin = ltex_extra-nvim;
type = "lua";
config = /* lua */ ''
local ltex_extra = require('ltex_extra')
add_lsp("ltex-ls", lspconfig.ltex, {
on_attach = function(client, bufnr)
ltex_extra.setup{
path = vim.fn.expand("~") .. "/.local/state/ltex"
}
end
})
'';
}
{
plugin = rust-tools-nvim;
type = "lua";
config = /* lua */ ''
local rust_tools = require('rust-tools')
add_lsp("rust-analyzer", rust_tools, {
tools = { autoSetHints = true }
})
vim.api.nvim_set_hl(0, '@lsp.type.comment.rust', {})
'';
}
# Completions
cmp-nvim-lsp
cmp-buffer
lspkind-nvim
{
plugin = nvim-cmp;
type = "lua";
config = /* lua */ ''
local cmp = require('cmp')
cmp.setup{
formatting = { format = require('lspkind').cmp_format() },
-- Same keybinds as vim's vanilla completion
mapping = {
['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
['<C-e>'] = cmp.mapping.close(),
['<C-y>'] = cmp.mapping.confirm(),
},
sources = {
{ name='buffer', option = { get_bufnrs = vim.api.nvim_list_bufs } },
{ name='nvim_lsp' },
},
}
'';
}
];
}

View file

@ -1,53 +0,0 @@
{ pkgs, config, lib, ... }: {
programs.neovim = {
extraConfig = /* vim */ lib.mkAfter ''
function! SetCustomKeywords()
syn match Todo /TODO/
syn match Done /DONE/
syn match Start /START/
syn match End /END/
endfunction
autocmd Syntax * call SetCustomKeywords()
'';
plugins = with pkgs.vimPlugins; [
rust-vim
vim-markdown
vim-nix
vim-toml
mermaid-vim
pgsql-vim
vim-terraform
vim-jsx-typescript
vim-caddyfile
{
plugin = vimtex;
config =
let
method =
if config.programs.zathura.enable
then "zathura"
else "general";
in
''
let g:vimtex_view_method = '${method}'
'';
}
# Tree sitter
{
plugin = nvim-treesitter.withAllGrammars;
type = "lua";
config = /* lua */ ''
require('nvim-treesitter.configs').setup{
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}
'';
}
];
};
}

View file

@ -1,329 +0,0 @@
scheme:
let c = scheme.colors;
in /* vim */ ''
let g:colors_name="nix-${scheme.slug}"
set termguicolors
if exists("syntax_on")
syntax reset
endif
hi clear
hi Normal guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
hi Bold guifg=NONE guibg=NONE gui=bold guisp=NONE
hi Debug guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi Directory guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi Error guifg=#${c.base00} guibg=#${c.base08} gui=NONE guisp=NONE
hi ErrorMsg guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
hi Exception guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi FoldColumn guifg=#${c.base0C} guibg=#${c.base00} gui=NONE guisp=NONE
hi Folded guifg=#${c.base03} guibg=#${c.base01} gui=NONE guisp=NONE
hi IncSearch guifg=#${c.base01} guibg=#${c.base09} gui=NONE guisp=NONE
hi Italic guifg=NONE guibg=NONE gui=NONE guisp=NONE
hi Macro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi MatchParen guifg=NONE guibg=#${c.base03} gui=NONE guisp=NONE
hi ModeMsg guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
hi MoreMsg guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
hi Question guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi Search guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE
hi Substitute guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE
hi SpecialKey guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
hi TooLong guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi Underlined guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi Visual guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE
hi VisualNOS guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi WarningMsg guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi WildMenu guifg=#${c.base08} guibg=#${c.base0A} gui=NONE guisp=NONE
hi Title guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi Conceal guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
hi Cursor guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE
hi NonText guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
hi LineNr guifg=#${c.base04} guibg=#${c.base00} gui=NONE guisp=NONE
hi SignColumn guifg=#${c.base04} guibg=#${c.base00} gui=NONE guisp=NONE
hi StatusLine guifg=#${c.base0B} guibg=#${c.base02} gui=NONE guisp=NONE
hi StatusLineNC guifg=#${c.base04} guibg=#${c.base01} gui=NONE guisp=NONE
hi VertSplit guifg=#${c.base01} guibg=#${c.base00} gui=NONE guisp=NONE
hi ColorColumn guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
hi CursorColumn guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
hi CursorLine guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE
hi CursorLineNr guifg=#${c.base0B} guibg=#${c.base01} gui=NONE guisp=NONE
hi QuickFixLine guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
hi PMenu guifg=#${c.base05} guibg=#${c.base01} gui=NONE guisp=NONE
hi PMenuSel guifg=#${c.base01} guibg=#${c.base05} gui=NONE guisp=NONE
hi TabLine guifg=#${c.base03} guibg=#${c.base01} gui=NONE guisp=NONE
hi TabLineFill guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE
hi TabLineSel guifg=#${c.base0B} guibg=#${c.base01} gui=NONE guisp=NONE
hi EndOfBuffer guifg=#${c.base00} guibg=NONE gui=NONE guisp=NONE
hi Boolean guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
hi Character guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi Comment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
hi Conditional guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
hi Constant guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
hi Define guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
hi Delimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
hi Float guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
hi Function guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi Identifier guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi Include guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi Keyword guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
hi Label guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi Number guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
hi Operator guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi PreProc guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi Repeat guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi Special guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
hi SpecialChar guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
hi Statement guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi StorageClass guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi String guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
hi Structure guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
hi Tag guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi Type guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi Typedef guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi Todo guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE
hi Done guifg=#${c.base01} guibg=#${c.base0B} gui=NONE guisp=NONE
hi Start guifg=#${c.base01} guibg=#${c.base0D} gui=NONE guisp=NONE
hi End guifg=#${c.base01} guibg=#${c.base0E} gui=NONE guisp=NONE
hi DiffAdd guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
hi DiffChange guifg=#${c.base03} guibg=#${c.base00} gui=NONE guisp=NONE
hi DiffDelete guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
hi DiffText guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
hi DiffAdded guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
hi DiffFile guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
hi DiffNewFile guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
hi DiffLine guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
hi DiffRemoved guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
hi gitcommitOverflow guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi gitcommitSummary guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
hi gitcommitComment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
hi gitcommitUntracked guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
hi gitcommitDiscarded guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
hi gitcommitSelected guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
hi gitcommitHeader guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
hi gitcommitSelectedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi gitcommitUnmergedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi gitcommitDiscardedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi gitcommitBranch guifg=#${c.base09} guibg=NONE gui=bold guisp=NONE
hi gitcommitUntrackedFile guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi gitcommitUnmergedFile guifg=#${c.base08} guibg=NONE gui=bold guisp=NONE
hi gitcommitDiscardedFile guifg=#${c.base08} guibg=NONE gui=bold guisp=NONE
hi gitcommitSelectedFile guifg=#${c.base0B} guibg=NONE gui=bold guisp=NONE
hi GitGutterAdd guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
hi GitGutterChange guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
hi GitGutterDelete guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
hi GitGutterChangeDelete guifg=#${c.base0E} guibg=#${c.base00} gui=NONE guisp=NONE
hi SpellBad guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base08}
hi SpellLocal guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0C}
hi SpellCap guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0D}
hi SpellRare guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E}
hi DiagnosticError guifg=#${c.base08} guibg=#${c.base01} gui=NONE guisp=NONE
hi DiagnosticWarn guifg=#${c.base0E} guibg=#${c.base01} gui=NONE guisp=NONE
hi DiagnosticInfo guifg=#${c.base05} guibg=#${c.base01} gui=NONE guisp=NONE
hi DiagnosticHint guifg=#${c.base0C} guibg=#${c.base01} gui=NONE guisp=NONE
hi DiagnosticUnderlineError guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base08}
hi DiagnosticUnderlineWarning guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E}
hi DiagnosticUnderlineWarn guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E}
hi DiagnosticUnderlineInformation guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0F}
hi DiagnosticUnderlineHint guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0C}
hi LspReferenceText guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
hi LspReferenceRead guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
hi LspReferenceWrite guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
hi link LspDiagnosticsDefaultError DiagnosticError
hi link LspDiagnosticsDefaultWarning DiagnosticWarn
hi link LspDiagnosticsDefaultInformation DiagnosticInfo
hi link LspDiagnosticsDefaultHint DiagnosticHint
hi link LspDiagnosticsUnderlineError DiagnosticUnderlineError
hi link LspDiagnosticsUnderlineWarning DiagnosticUnderlineWarning
hi link LspDiagnosticsUnderlineInformation DiagnosticUnderlineInformation
hi link LspDiagnosticsUnderlineHint DiagnosticUnderlineHint
hi TSAnnotation guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
hi TSAttribute guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi TSBoolean guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
hi TSCharacter guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi TSComment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE "was italic
hi TSConstructor guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi TSConditional guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
hi TSConstant guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
hi TSConstBuiltin guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE "was italic
hi TSConstMacro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi TSError guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi TSException guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi TSField guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi TSFloat guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
hi TSFunction guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi TSFuncBuiltin guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE "was italic
hi TSFuncMacro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi TSInclude guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi TSKeyword guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
hi TSKeywordFunction guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
hi TSKeywordOperator guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
hi TSLabel guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi TSMethod guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi TSNamespace guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi TSNone guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi TSNumber guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
hi TSOperator guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi TSParameter guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi TSParameterReference guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi TSProperty guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi TSPunctDelimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
hi TSPunctBracket guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi TSPunctSpecial guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi TSRepeat guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi TSString guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
hi TSStringRegex guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
hi TSStringEscape guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
hi TSSymbol guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
hi TSTag guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi TSTagDelimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
hi TSText guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi TSStrong guifg=NONE guibg=NONE gui=bold guisp=NONE
hi TSEmphasis guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE "was italic
hi TSUnderline guifg=#${c.base00} guibg=NONE gui=underline guisp=NONE
hi TSStrike guifg=#${c.base00} guibg=NONE gui=strikethrough guisp=NONE
hi TSTitle guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
hi TSLiteral guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
hi TSURI guifg=#${c.base09} guibg=NONE gui=underline guisp=NONE
hi TSType guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
hi TSTypeBuiltin guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE "was italic
hi TSVariable guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
hi TSVariableBuiltin guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE "was italic
hi TSDefinition guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
hi TSDefinitionUsage guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
hi TSCurrentScope guifg=NONE guibg=NONE gui=bold guisp=NONE
if has('nvim-0.8.0')
highlight! link @annotation TSAnnotation
highlight! link @attribute TSAttribute
highlight! link @boolean TSBoolean
highlight! link @character TSCharacter
highlight! link @comment TSComment
highlight! link @conditional TSConditional
highlight! link @constant TSConstant
highlight! link @constant.builtin TSConstBuiltin
highlight! link @constant.macro TSConstMacro
highlight! link @constructor TSConstructor
highlight! link @exception TSException
highlight! link @field TSField
highlight! link @float TSFloat
highlight! link @function TSFunction
highlight! link @function.builtin TSFuncBuiltin
highlight! link @function.macro TSFuncMacro
highlight! link @include TSInclude
highlight! link @keyword TSKeyword
highlight! link @keyword.function TSKeywordFunction
highlight! link @keyword.operator TSKeywordOperator
highlight! link @label TSLabel
highlight! link @method TSMethod
highlight! link @namespace TSNamespace
highlight! link @none TSNone
highlight! link @number TSNumber
highlight! link @operator TSOperator
highlight! link @parameter TSParameter
highlight! link @parameter.reference TSParameterReference
highlight! link @property TSProperty
highlight! link @punctuation.bracket TSPunctBracket
highlight! link @punctuation.delimiter TSPunctDelimiter
highlight! link @punctuation.special TSPunctSpecial
highlight! link @repeat TSRepeat
highlight! link @storageclass TSStorageClass
highlight! link @string TSString
highlight! link @string.escape TSStringEscape
highlight! link @string.regex TSStringRegex
highlight! link @symbol TSSymbol
highlight! link @tag TSTag
highlight! link @tag.delimiter TSTagDelimiter
highlight! link @text TSText
highlight! link @strike TSStrike
highlight! link @math TSMath
highlight! link @type TSType
highlight! link @type.builtin TSTypeBuiltin
highlight! link @uri TSURI
highlight! link @variable TSVariable
highlight! link @variable.builtin TSVariableBuiltin
endif
hi IndentBlankLine guifg=#${c.base01} guibg=NONE gui=NONE guisp=NONE
hi NvimTreeNormal guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
hi CmpItemAbbr guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi CmpItemAbbrDeprecated guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
hi CmpItemAbbrMatch guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi CmpItemAbbrMatchFuzzy guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi CmpItemKind guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
hi CmpItemMenu guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
hi BufferCurrent guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
hi BufferCurrentIndex guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
hi BufferCurrentMod guifg=#${c.base0E} guibg=#${c.base00} gui=NONE guisp=NONE
hi BufferCurrentSign guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
hi BufferCurrentTarget guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
hi BufferCurrentIcon guifg=NONE guibg=#${c.base00} gui=NONE guisp=NONE
hi BufferVisible guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE
hi BufferVisibleIndex guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE
hi BufferVisibleMod guifg=#${c.base0E} guibg=#${c.base01} gui=NONE guisp=NONE
hi BufferVisibleSign guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE
hi BufferVisibleTarget guifg=#${c.base08} guibg=#${c.base01} gui=NONE guisp=NONE
hi BufferVisibleIcon guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
hi BufferInactive guifg=#${c.base04} guibg=#${c.base02} gui=NONE guisp=NONE
hi BufferInactiveIndex guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
hi BufferInactiveMod guifg=#${c.base0E} guibg=#${c.base02} gui=NONE guisp=NONE
hi BufferInactiveSign guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
hi BufferInactiveTarget guifg=#${c.base08} guibg=#${c.base02} gui=NONE guisp=NONE
hi BufferInactiveIcon guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE
hi BufferTabpages guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE
hi BufferTabpageFill guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE
hi NvimInternalError guifg=#${c.base00} guibg=#${c.base08} gui=NONE guisp=NONE
hi NormalFloat guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
hi FloatBorder guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
hi NormalNC guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
hi TermCursor guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE
hi TermCursorNC guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE
hi User1 guifg=#${c.base08} guibg=#${c.base02} gui=NONE guisp=NONE
hi User2 guifg=#${c.base0E} guibg=#${c.base02} gui=NONE guisp=NONE
hi User3 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
hi User4 guifg=#${c.base0C} guibg=#${c.base02} gui=NONE guisp=NONE
hi User5 guifg=#${c.base01} guibg=#${c.base02} gui=NONE guisp=NONE
hi User6 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
hi User7 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
hi User8 guifg=#${c.base00} guibg=#${c.base02} gui=NONE guisp=NONE
hi User9 guifg=#${c.base00} guibg=#${c.base02} gui=NONE guisp=NONE
hi TreesitterContext guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE "was italic
let g:terminal_color_background = "#${c.base00}"
let g:terminal_color_foreground = "#${c.base05}"
let g:terminal_color_0 = "#${c.base00}"
let g:terminal_color_1 = "#${c.base08}"
let g:terminal_color_2 = "#${c.base0B}"
let g:terminal_color_3 = "#${c.base0A}"
let g:terminal_color_4 = "#${c.base0D}"
let g:terminal_color_5 = "#${c.base0E}"
let g:terminal_color_6 = "#${c.base0C}"
let g:terminal_color_7 = "#${c.base05}"
let g:terminal_color_8 = "#${c.base03}"
let g:terminal_color_9 = "#${c.base08}"
let g:terminal_color_10 = "#${c.base0B}"
let g:terminal_color_11 = "#${c.base0A}"
let g:terminal_color_12 = "#${c.base0D}"
let g:terminal_color_13 = "#${c.base0E}"
let g:terminal_color_14 = "#${c.base0C}"
let g:terminal_color_15 = "#${c.base07}"
''

View file

@ -1,128 +0,0 @@
{ pkgs, ... }: {
programs.neovim.plugins = with pkgs.vimPlugins; [
# UI
vim-illuminate
vim-numbertoggle
# vim-markology
{
plugin = vim-fugitive;
type = "viml";
config = /* vim */ ''
nmap <space>G :Git<CR>
'';
}
{
plugin = nvim-bqf;
type = "lua";
config = /* lua * */ ''
require('bqf').setup{}
'';
}
{
plugin = alpha-nvim;
type = "lua";
config = /* lua */ ''
local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.val = {
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
}
dashboard.section.header.opts.hl = "Title"
dashboard.section.buttons.val = {
dashboard.button( "n", "󰈔 New file" , ":enew<CR>"),
dashboard.button( "e", " Explore", ":Explore<CR>"),
dashboard.button( "g", " Git summary", ":Git | :only<CR>"),
dashboard.button( "c", " Nix config flake" , ":cd ~/Documents/NixConfig | :e flake.nix<CR>"),
dashboard.button( "q", "󰅙 Quit nvim", ":qa<CR>"),
}
alpha.setup(dashboard.opts)
vim.keymap.set("n", "<space>a", ":Alpha<CR>", { desc = "Open alpha dashboard" })
'';
}
{
plugin = bufferline-nvim;
type = "lua";
config = /* lua */ ''
require('bufferline').setup{}
'';
}
{
plugin = scope-nvim;
type = "lua";
config = /* lua */ ''
require('scope').setup{}
'';
}
{
plugin = which-key-nvim;
type = "lua";
config = /* lua */ ''
require('which-key').setup{}
'';
}
{
plugin = range-highlight-nvim;
type = "lua";
config = /* lua */ ''
require('range-highlight').setup{}
'';
}
{
plugin = indent-blankline-nvim;
type = "lua";
config = /* lua */ ''
require('indent_blankline').setup{char_highlight_list={'IndentBlankLine'}}
'';
}
{
plugin = nvim-web-devicons;
type = "lua";
config = /* lua */ ''
require('nvim-web-devicons').setup{}
'';
}
{
plugin = gitsigns-nvim;
type = "lua";
config = /* lua */ ''
require('gitsigns').setup{
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
}
'';
}
{
plugin = nvim-colorizer-lua;
type = "lua";
config = /* lua */ ''
require('colorizer').setup{}
'';
}
{
plugin = fidget-nvim;
type = "lua";
config = /* lua */ ''
require('fidget').setup{
text = {
spinner = "dots",
},
}
'';
}
];
}

View file

@ -1,17 +0,0 @@
{ pkgs, config, username, ... }: {
programs.password-store = {
enable = true;
settings = { PASSWORD_STORE_DIR = "$HOME/.password-store"; };
package = pkgs.pass.withExtensions (p: [ p.pass-otp ]);
};
services.pass-secret-service = {
enable = true;
storePath = "${config.home.homeDirectory}/.password-store";
extraArgs = [ "-e${config.programs.password-store.package}/bin/pass" ];
};
home.persistence = {
"/persist/home/${username}".directories = [ ".password-store" ];
};
}

View file

@ -1,14 +0,0 @@
{
imports = [
./khal.nix
./khard.nix
./todoman.nix
./vdirsyncer.nix
./mail.nix
./neomutt.nix
# Pass feature is required
../pass
];
}

View file

@ -1,14 +0,0 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ khal ];
xdg.configFile."khal/config".text = ''
[calendars]
[[calendars]]
path = ~/Calendars/*
type = discover
[locale]
timeformat = %H:%M
dateformat = %d/%m/%Y
'';
}

View file

@ -1,8 +0,0 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ khard ];
xdg.configFile."khard/khard.conf".text = ''
[addressbooks]
[[contacts]]
path = ~/Contacts/Main
'';
}

View file

@ -1,111 +0,0 @@
{ pkgs, config, ... }:
let
mbsync = "${config.programs.mbsync.package}/bin/mbsync";
pass = "${config.programs.password-store.package}/bin/pass";
common = rec {
realName = "Greg Burd";
gpg = {
key = "D4BB42BE729AEFBD2EFEBF8822931AF7895E82DF";
signByDefault = true;
};
signature = {
showSignature = "append";
text = ''
${realName}
https://burd.me
PGP: ${gpg.key}
'';
};
};
in
{
home.persistence = {
"/persist/home/${username}".directories = [ "Mail" ];
};
accounts.email = {
maildirBasePath = "Mail";
accounts = {
personal = rec {
primary = true;
address = "greg@burd.me";
aliases = [ "gregburd@gmail.com" ];
passwordCommand = "${pass} ${smtp.host}/${address}";
imap.host = "mail.burd.me";
mbsync = {
enable = true;
create = "maildir";
expunge = "both";
};
folders = {
inbox = "Inbox";
drafts = "Drafts";
sent = "Sent";
trash = "Trash";
};
neomutt = {
enable = true;
extraMailboxes = [ "Archive" "Drafts" "Junk" "Sent" "Trash" ];
};
msmtp.enable = true;
smtp.host = "mail.burd.me";
userName = address;
} // common;
symas = rec {
address = "gburd@symas.com";
passwordCommand = "${pass} ${smtp.host}/${address}";
/* TODO: add imap (conditionally)
imap.host = "symas.zmailcloud.com";
mbsync = {
enable = true;
create = "maildir";
expunge = "both";
};
folders = {
inbox = "INBOX";
trash = "Trash";
};
neomutt = {
enable = true;
};
*/
msmtp.enable = true;
smtp.host = "symas.zmailcloud.com";
userName = address;
} // common;
};
};
programs.mbsync.enable = true;
programs.msmtp.enable = true;
systemd.user.services.mbsync = {
Unit = { Description = "mbsync synchronization"; };
Service =
let gpgCmds = import ../cli/gpg-commands.nix { inherit pkgs; };
in
{
Type = "oneshot";
ExecCondition = ''
/bin/sh -c "${gpgCmds.isUnlocked}"
'';
ExecStart = "${mbsync} -a";
};
};
systemd.user.timers.mbsync = {
Unit = { Description = "Automatic mbsync synchronization"; };
Timer = {
OnBootSec = "30";
OnUnitActiveSec = "5m";
};
Install = { WantedBy = [ "timers.target" ]; };
};
}

View file

@ -1,232 +0,0 @@
{ config, pkgs, lib, ... }: {
xdg = {
desktopEntries = {
neomutt = {
name = "Neomutt";
genericName = "Email Client";
comment = "Read and send emails";
exec = "neomutt %U";
icon = "mutt";
terminal = true;
categories = [ "Network" "Email" "ConsoleOnly" ];
type = "Application";
mimeType = [ "x-scheme-handler/mailto" ];
};
};
mimeApps.defaultApplications = {
"x-scheme-handler/mailto" = "neomutt.desktop";
};
};
programs.neomutt = {
enable = true;
vimKeys = true;
checkStatsInterval = 60;
sidebar = {
enable = true;
width = 30;
};
settings = {
mark_old = "no";
text_flowed = "yes";
reverse_name = "yes";
query_command = ''"khard email --parsable '%s'"'';
};
binds = [
{
action = "sidebar-toggle-visible";
key = "\\\\";
map = [ "index" "pager" ];
}
{
action = "group-reply";
key = "L";
map = [ "index" "pager" ];
}
{
action = "toggle-new";
key = "B";
map = [ "index" ];
}
];
macros =
let
browserpipe =
"cat /dev/stdin > /tmp/muttmail.html && xdg-open /tmp/muttmail.html";
in
[
{
action = "<sidebar-next><sidebar-open>";
key = "J";
map = [ "index" "pager" ];
}
{
action = "<sidebar-prev><sidebar-open>";
key = "K";
map = [ "index" "pager" ];
}
{
action =
":set confirmappend=no\\n<save-message>+Archive<enter>:set confirmappend=yes\\n";
key = "A";
map = [ "index" "pager" ];
}
{
action = "<pipe-entry>${browserpipe}<enter><exit>";
key = "V";
map = [ "attach" ];
}
{
action = "<pipe-message>${pkgs.urlscan}/bin/urlscan<enter><exit>";
key = "F";
map = [ "pager" ];
}
{
action =
"<view-attachments><search>html<enter><pipe-entry>${browserpipe}<enter><exit>";
key = "V";
map = [ "index" "pager" ];
}
];
extraConfig =
let
# Collect all addresses and aliases
addresses = lib.flatten (lib.mapAttrsToList (_n: v: [ v.address ] ++ v.aliases) config.accounts.email.accounts);
in
''
alternates "${lib.concatStringsSep "|" addresses}"
'' + ''
# From: https://github.com/altercation/mutt-colors-solarized/blob/master/mutt-colors-solarized-dark-16.muttrc
# basic colors ---------------------------------------------------------
color normal brightyellow default
color error red default
color tilde black default
color message cyan default
color markers red white
color attachment white default
color search brightmagenta default
color status brightyellow black
color indicator brightblack yellow
color tree cyan default # arrow in threads
# basic monocolor screen
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
# index ----------------------------------------------------------------
color index red default "~A" # all messages
color index blue default "~N" # new messages
color index brightred default "~E" # expired messages
color index blue default "~N" # new messages
color index blue default "~O" # old messages
color index brightmagenta default "~Q" # messages that have been replied to
color index brightgreen default "~R" # read messages
color index blue default "~U" # unread messages
color index blue default "~U~$" # unread, unreferenced messages
color index cyan default "~v" # messages part of a collapsed thread
color index magenta default "~P" # messages from me
color index cyan default "~p!~F" # messages to me
color index cyan default "~N~p!~F" # new messages to me
color index cyan default "~U~p!~F" # unread messages to me
color index brightgreen default "~R~p!~F" # messages to me
color index red default "~F" # flagged messages
color index red default "~F~p" # flagged messages to me
color index red default "~N~F" # new flagged messages
color index red default "~N~F~p" # new flagged messages to me
color index red default "~U~F~p" # new flagged messages to me
color index brightcyan default "~v~(!~N)" # collapsed thread with no unread
color index yellow default "~v~(~N)" # collapsed thread with some unread
color index green default "~N~v~(~N)" # collapsed thread with unread parent
color index red black "~v~(~F)!~N" # collapsed thread with flagged, no unread
color index yellow black "~v~(~F~N)" # collapsed thread with some unread & flagged
color index green black "~N~v~(~F~N)" # collapsed thread with unread parent & flagged
color index green black "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged
color index cyan black "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly
color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial)
color index yellow default "~(~N)" # messages in threads with some unread
color index green default "~S" # superseded messages
color index black red "~D" # deleted messages
color index black red "~N~D" # deleted messages
color index red default "~T" # tagged messages
# message headers ------------------------------------------------------
color hdrdefault brightgreen default
color header brightyellow default "^(From)"
color header blue default "^(Subject)"
# body -----------------------------------------------------------------
color quoted blue default
color quoted1 cyan default
color quoted2 yellow default
color quoted3 red default
color quoted4 brightred default
color signature brightgreen default
color bold black default
color underline black default
color normal default default
color body brightcyan default "[;:][-o][)/(|]" # emoticons
color body brightcyan default "[;:][)(|]" # emoticons
color body brightcyan default "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\
|FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\
|IRL|RTFM|ROTFL|ROFL|YMMV)[*]?"
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
## pgp
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightblack default "^gpg: Good signature .*"
color body brightyellow default "^gpg: "
color body brightyellow red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"
# yes, an insance URL regex
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
# and a heavy handed email regex
color body magenta default "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])"
# Various smilies and the like
color body brightwhite default "<[Gg]>" # <g>
color body brightwhite default "<[Bb][Gg]>" # <bg>
color body yellow default " [;:]-*[})>{(<|]" # :-) etc...
# *bold*
color body blue default "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)"
mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)"
# _underline_
color body blue default "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
# /italic/ (Sometimes gets directory names)
color body blue default "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
# Border lines.
color body blue default "( *[-+=#*~_]){6,}"
# From https://github.com/jessfraz/dockerfiles/blob/master/mutt/.mutt/mutt-patch-highlighting.muttrc
color body cyan default ^(Signed-off-by).*
color body cyan default ^(Docker-DCO-1.1-Signed-off-by).*
color body brightwhite default ^(Cc)
color body yellow default "^diff \-.*"
color body brightwhite default "^index [a-f0-9].*"
color body brightblue default "^---$"
color body white default "^\-\-\- .*"
color body white default "^[\+]{3} .*"
color body green default "^[\+][^\+]+.*"
color body red default "^\-[^\-]+.*"
color body brightblue default "^@@ .*"
color body green default "LGTM"
color body brightmagenta default "-- Commit Summary --"
color body brightmagenta default "-- File Changes --"
color body brightmagenta default "-- Patch Links --"
'';
};
}

View file

@ -1,11 +0,0 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ todoman ];
xdg.configFile."todoman/config.py".text = ''
path = "~/Calendars/*"
default_list = "Personal"
date_format = "%d/%m/%Y"
time_format = "%H:%M"
humanize = True
default_due = 0
'';
}

View file

@ -1,74 +0,0 @@
{ pkgs, config, ... }:
let
pass = "${config.programs.password-store.package}/bin/pass";
in
{
home.packages = with pkgs; [ vdirsyncer ];
home.persistence = {
"/persist/home/${username}".directories =
[ "Calendars" "Contacts" ".local/share/vdirsyncer" ];
};
xdg.configFile."vdirsyncer/config".text = ''
[general]
status_path = "~/.local/share/vdirsyncer/status"
[pair contacts]
a = "contacts_local"
b = "contacts_remote"
collections = ["from a", "from b"]
conflict_resolution = "b wins"
[storage contacts_local]
type = "filesystem"
path = "~/Contacts"
fileext = ".vcf"
[storage contacts_remote]
type = "carddav"
url = "https://dav.burd.me"
username = "greg@burd.me"
password.fetch = ["command", "${pass}", "mail.burd.me/greg@burd.me"]
[pair calendars]
a = "calendars_local"
b = "calendars_remote"
collections = ["from a", "from b"]
metadata = ["color"]
conflict_resolution = "b wins"
[storage calendars_local]
type = "filesystem"
path = "~/Calendars"
fileext = ".ics"
[storage calendars_remote]
type = "caldav"
url = "https://dav.burd.me"
username = "greg@burd.me"
password.fetch = ["command", "${pass}", "mail.burd.me/greg@burd.me"]
'';
systemd.user.services.vdirsyncer = {
Unit = { Description = "vdirsyncer synchronization"; };
Service =
let gpgCmds = import ../cli/gpg-commands.nix { inherit pkgs; };
in
{
Type = "oneshot";
ExecCondition = ''
/bin/sh -c "${gpgCmds.isUnlocked}"
'';
ExecStart = "${pkgs.vdirsyncer}/bin/vdirsyncer sync";
};
};
systemd.user.timers.vdirsyncer = {
Unit = { Description = "Automatic vdirsyncer synchronization"; };
Timer = {
OnBootSec = "30";
OnUnitActiveSec = "5m";
};
Install = { WantedBy = [ "timers.target" ]; };
};
}

View file

@ -1,28 +0,0 @@
{ config, ... }:
let inherit (config.colorscheme) colors;
in {
services.rgbdaemon = {
enable = true;
daemons = {
swayLock = true;
mute = true;
player = true;
};
colors = {
background = "${colors.base00}";
foreground = "${colors.base05}";
secondary = "${colors.base0B}";
tertiary = "${colors.base0E}";
quaternary = "${colors.base05}";
};
keyboard = {
device = "/dev/input/ckb1/cmd";
highlighted = [ "h" "j" "k" "l" "w" "a" "s" "d" "m3" "g11" "profswitch" "lwin" "rwin" ];
};
mouse = {
device = "/dev/input/ckb2/cmd";
dpi = 750;
highlighted = [ "wheel" "thumb" ];
};
};
}

View file

@ -1,6 +1,6 @@
{ desktop, lib, ... }: {
imports = [ ] ++ lib.optionals (desktop != null) [
./keybase-gui.nix
imports = lib.optionals (desktop != null) [
../desktop/keybase.nix
];
services = {

View file

@ -0,0 +1,4 @@
_: {
# https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
services.mpris-proxy.enable = true;
}

View file

@ -1,8 +0,0 @@
{ pkgs, ... }: {
services.syncthing = {
tray = {
enable = true;
package = pkgs.unstable.syncthingtray;
};
};
}

View file

@ -1,16 +1,16 @@
{ config, desktop, hostname, lib, ... }: {
imports = [ ] ++ lib.optionals (desktop != null) [
./syncthing-tray.nix
];
{ hostname, pkgs, username, ... }: {
services.syncthing = {
enable = true;
extraOptions = [
"--config=${config.home.homeDirectory}/Syncthing/Devices/${hostname}"
"--data=${config.home.homeDirectory}/Syncthing/DB/${hostname}"
"--config=/home/${username}/Syncthing/Devices/${hostname}"
"--data=/home/${username}/Syncthing/DB/${hostname}"
"--gui-address=0.0.0.0:8384"
"--no-default-folder"
"--no-browser"
];
tray = {
enable = true;
package = pkgs.unstable.syncthingtray;
};
};
}

View file

@ -77,7 +77,7 @@
},
"vscode-neovim.neovimExecutablePaths.linux": "/home/gburd/.nix-profile/bin/nvim",
}
'';
'';
file.".config/alacritty/alacritty.yml".source = ./alacritty.yml;
@ -133,8 +133,7 @@
enableDebugInfo = true;
};
programs = {
};
programs = { };
systemd.user.tmpfiles.rules = [
"d ${config.home.homeDirectory}/ws 0755 ${username} users - -"

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ lib, ... }:
with lib.hm.gvariant;
{
imports = [

View file

@ -1,430 +1,89 @@
{ inputs, config, pkgs, username, ... }: {
{ lib, hostname, inputs, platform, pkgs, ... }:
let
systemInfo = lib.splitString "-" platform;
systemType = builtins.elemAt systemInfo 1;
in
{
imports = [
inputs.impermanence.nixosModules.home-manager.impermanence
../../pass
../../cli
../../nvim
# TODO:
# ../../productivity
# ../../games
];
#../../console/charm-freeze.nix
]
++ lib.optional (builtins.pathExists (./. + "/hosts/${hostname}.nix")) ./hosts/${hostname}.nix
++ lib.optional (builtins.pathExists (./. + "/hosts/${hostname}/default.nix")) ./hosts/${hostname}/default.nix
++ lib.optional (builtins.pathExists (./. + "/systems/${systemType}.nix")) ./systems/${systemType}.nix;
home = {
persistence = {
"/persist/home/gburd" = {
directories = [
"Documents"
"Downloads"
"Pictures"
"Videos"
".local/bin"
".config"
];
allowOther = true;
};
};
file.".face".source = ./face.png;
file.".ssh/config".text = ''
Host burd.me *.burd.me *.ts.burd.me
ForwardAgent yes
Host floki
ForwardAgent yes
RemoteForward /%d/.gnupg-sockets/S.gpg-agent /%d/.gnupg-sockets/S.gpg-agent.extra
Host *
ForwardAgent no
Compression no
ServerAliveInterval 0
ServerAliveCountMax 3
HashKnownHosts no
UserKnownHostsFile ~/.ssh/known_hosts
ControlMaster no
ControlPath ~/.ssh/master-%r@%n:%p
ControlPersist no
file."ws/devshells".source = inputs.devshells;
file.".ssh/config".text = "
Host github.com
HostName github.com
User git
'';
file."Quickemu/nixos-console.conf".text = ''
#!/run/current-system/sw/bin/quickemu --vm
guest_os="linux"
disk_img="nixos-console/disk.qcow2"
disk_size="96G"
iso="nixos-console/nixos.iso"
'';
file."Quickemu/nixos-desktop.conf".text = ''
#!/run/current-system/sw/bin/quickemu --vm
guest_os="linux"
disk_img="nixos-desktop/disk.qcow2"
disk_size="96G"
iso="nixos-desktop/nixos.iso"
'';
file.".inputrc".text = ''
"\C-v": ""
set enable-bracketed-paste off
'';
file.".config/direnv/direnv.toml".text = ''
[global]
load_dotenv = true
'';
file.".gitconfig".text = ''
[user]
name = Greg Burd
email = greg@burd.me
[color]
ui = auto
diff = auto
status = auto
branch = auto
[alias]
st = status --short
ci = commit
co = checkout
di = diff
dc = diff --cached
amend = commit --amend
aa = add --all
head = !git l -1
h = !git head
r = !git --no-pager l -20
ra = !git r --all
ff = merge --ff-only
pullff = pull --ff-only
l = log --graph --abbrev-commit --date=relative
la = !git l --all
div = divergence
gn = goodness
gnc = goodness --cached
fa = fetch --all
pom = push origin master
files = show --oneline
graph = log --graph --decorate --all
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
sync = pull --rebase
update = merge --ff-only origin/master
mend = commit --amend --no-edit
unadd = reset --
unedit = checkout --
unstage = reset HEAD
unrm = checkout --
unstash = stash pop
lastchange = log -n 1 -p
dag = log --graph --format='format:%C(yellow)%h%C(reset) %C(blue)\"%an\" <%ae>%C(reset) %C(magenta)%cr%C(reset)%C(auto)%d%C(reset)%n%s' --date-order
subdate = submodule update --init --recursive
[format]
pretty=format:%C(yellow)%h%Creset | %C(green)%ad (%ar)%Creset | %C(blue)%an%Creset | %s
[push]
default = simple
autoSetupRemote = true
[branch]
autosetuprebase = always
[receive]
denyCurrentBranch = warn
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
# http://nicercode.github.io/blog/2013-04-30-excel-and-line-endings/
[filter "cr"]
clean = LC_CTYPE=C awk '{printf(\"%s\\n\", $0)}' | LC_CTYPE=C tr '\\r' '\\n'
smudge = tr '\\n' '\\r'
[diff]
tool = meld
[difftool]
prompt = false
[difftool "meld"]
cmd = meld "$LOCAL" "$REMOTE"
[merge]
tool = meld
[mergetool "meld"]
# Choose one of these 2 lines (not both!) explained below.
cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"
cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
[core]
editor = nvim
# editor = emacs -nw -q
excludesfile = ~/.gitignore_global
pager = less -FMRiX
quotepath = false
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[init]
templateDir = /home/gregburd/.git-template
defaultBranch = main
[commit]
# gpgsign = true
'';
file.".config/Code/User/settings.json".text = ''
";
sessionVariables = {
# ...
};
file.".config/nixpkgs/config.nix".text = ''
{
"editor.inlineSuggest.enabled": true,
"editor.fontFamily": "'FiraCode Nerd Font Mono', 'Droid Sans Mono', 'monospace', monospace",
"editor.fontLigatures": true,
"cSpell.userWords": [
"Burd",
"Wpedantic",
"Wvariadic"
],
"files.watcherExclude": {
"**/.bloop": true,
"**/.metals": true,
"**/.ammonite": true
},
"extensions.experimental.affinity": {
"asvetliakov.vscode-neovim": 1
},
"vscode-neovim.neovimExecutablePaths.linux": "/home/gburd/.nix-profile/bin/nvim",
allowUnfree = true;
}
'';
file.".config/Code/User/keybindings.json".text = ''
// Place your key bindings in this file to override the defaults
[
// allow arrow keys to work in the find widget
{
"key": "right",
"command": "-emacs-mcx.isearchExit"
},
{
"key": "left",
"command": "-emacs-mcx.isearchExit"
},
{
"key": "up",
"command": "-emacs-mcx.isearchExit"
},
{
"key": "down",
"command": "-emacs-mcx.isearchExit"
},
// allow ctrl+f to find next in the find widget
{
"key": "ctrl+f",
"command": "-emacs-mcx.isearchExit",
"when": "editorFocus && findWidgetVisible"
},
// allow other stuff to functional normally in the find widget
{
"key": "ctrl+b",
"command": "-emacs-mcx.isearchExit",
"when": "editorFocus && findWidgetVisible"
},
{
"key": "ctrl+p",
"command": "-emacs-mcx.isearchExit",
"when": "editorFocus && findWidgetVisible"
},
{
"key": "ctrl+n",
"command": "-emacs-mcx.isearchExit",
"when": "editorFocus && findWidgetVisible"
},
{
"key": "ctrl+a",
"command": "-emacs-mcx.isearchExit",
"when": "editorFocus && findWidgetVisible"
},
{
"key": "ctrl+e",
"command": "-emacs-mcx.isearchExit",
"when": "editorFocus && findWidgetVisible"
},
{
"key": "enter",
"command": "-emacs-mcx.isearchExit"
},
// allow curly quotes and ellipses characters on mac
{
"key": "alt+shift+[",
"command": "-emacs-mcx.backwardParagraph"
},
{
"key": "alt+shift+]",
"command": "-emacs-mcx.forwardParagraph"
},
{
"key": "alt+;",
"command": "-editor.action.blockComment",
"when": "editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd && !editorReadonly"
},
{
"key": "alt+;",
"command": "-emacs-mcx.executeCommands",
"when": "editorFocus && findWidgetVisible && !config.emacs-mcx.useMetaPrefixMacCmd"
},
// stop backward kill word from adding to clipboard
{
"key": "alt+backspace",
"command": "-emacs-mcx.backwardKillWord",
"when": "editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd && !editorReadonly"
}
]
'';
file.".config/nvim/init.nvim".source = ./init.nvim;
# file.".config/sublime-text-2/Local/License.sublime_license".text =
# config.sops.secrets.sublime-licenses.text.path;
# file.".config/sublime-merge/Local/License.sublime_license".text =
# config.sops.secrets.sublime-licenses.merge.path;
# A Modern Unix experience
# https://jvns.ca/blog/2022/04/12/a-list-of-new-ish--command-line-tools/
packages = with pkgs; [
asciinema # Terminal recorder
black # Code format Python
bmon # Modern Unix `iftop`
breezy # Terminal bzr client
butler # Terminal Itch.io API client
chafa # Terminal image viewer
chroma # Code syntax highlighter
clinfo # Terminal OpenCL info
curlie # Terminal HTTP client
dconf2nix # Nix code from Dconf files
debootstrap # Terminal Debian installer
diffr # Modern Unix `diff`
difftastic # Modern Unix `diff`
dogdns # Modern Unix `dig`
dua # Modern Unix `du`
duf # Modern Unix `df`
du-dust # Modern Unix `du`
entr # Modern Unix `watch`
fast-cli # Terminal fast.com
fd # Modern Unix `find`
glow # Terminal Markdown renderer
gping # Modern Unix `ping`
hexyl # Modern Unix `hexedit`
httpie # Terminal HTTP client
hyperfine # Terminal benchmarking
iperf3 # Terminal network benchmarking
iw # Terminal WiFi info
jpegoptim # Terminal JPEG optimizer
jiq # Modern Unix `jq`
lazygit # Terminal Git client
libva-utils # Terminal VAAPI info
lurk # Modern Unix `strace`
mdp # Terminal Markdown presenter
#moar # Modern Unix `less`
mtr # Modern Unix `traceroute`
netdiscover # Modern Unix `arp`
nethogs # Modern Unix `iftop`
nixpkgs-review # Nix code review
nodePackages.prettier # Code format
nurl # Nix URL fetcher
nyancat # Terminal rainbow spewing feline
speedtest-go # Terminal speedtest.net
optipng # Terminal PNG optimizer
procs # Modern Unix `ps`
python310Packages.gpustat # Terminal GPU info
quilt # Terminal patch manager
ripgrep # Modern Unix `grep`
rustfmt # Code format Rust
shellcheck # Code lint Shell
shfmt # Code format Shell
tldr # Modern Unix `man`
tokei # Modern Unix `wc` for code
vdpauinfo # Terminal VDPAU info
wavemon # Terminal WiFi monitor
yq-go # Terminal `jq` for YAML
_1password
_1password-gui
cfssl
gnumake
cmake
autoconf
libtool
m4
perl
pkg-config
python3
gcc
gdb
dig
emacs
file
git-credential-1password
htop
openssl
plocate
ripgrep
tig
tree
lsof
unstable.flyctl
unstable.minio-client
unstable.element-desktop
erlang
rebar3
elixir
];
sessionVariables = {
# PAGER = "moar";
};
# http://rski.github.io/2021/09/05/nix-debugging.html
# https://github.com/nix-community/home-manager/commit/0056a5aea1a7b68bdacb7b829c325a1d4a3c4259
enableDebugInfo = true;
packages = with pkgs; [ ];
};
programs = {
bash = {
shellAliases = {
pubip = "curl -s ifconfig.me/ip"; # "curl -s https://api.ipify.org";
speedtest = "speedtest-go";
vi = "nvim";
vim = "nvim";
};
};
fish = {
shellAliases = {
#diff = "diffr";
#fast = "fast -u";
#glow = "glow --pager";
pubip = "curl -s ifconfig.me/ip"; # "curl -s https://api.ipify.org";
speedtest = "speedtest-go";
vi = "nvim";
vim = "nvim";
};
enable = true;
interactiveShellInit = ''
set fish_cursor_default block blink
set fish_cursor_insert line blink
set fish_cursor_replace_one underscore blink
set fish_cursor_visual block
set -U fish_color_autosuggestion brblack
set -U fish_color_cancel -r
set -U fish_color_command green
set -U fish_color_comment brblack
set -U fish_color_cwd brgreen
set -U fish_color_cwd_root brred
set -U fish_color_end brmagenta
set -U fish_color_error red
set -U fish_color_escape brcyan
set -U fish_color_history_current --bold
set -U fish_color_host normal
set -U fish_color_match --background=brblue
set -U fish_color_normal normal
set -U fish_color_operator cyan
set -U fish_color_param blue
set -U fish_color_quote yellow
set -U fish_color_redirection magenta
set -U fish_color_search_match bryellow '--background=brblack'
set -U fish_color_selection white --bold '--background=brblack'
set -U fish_color_status red
set -U fish_color_user brwhite
set -U fish_color_valid_path --underline
set -U fish_pager_color_completion normal
set -U fish_pager_color_description yellow
set -U fish_pager_color_prefix white --bold --underline
set -U fish_pager_color_progress brwhite '--background=cyan'
'';
shellAliases =
let
# determines directory path of symbolic link
sh = target: "nix develop $(readlink -f ~/ws/devshells)#${target} --command \$SHELL";
in
{
"sh:c" = sh "c";
"sh:python" = sh "python";
};
};
git = {
userEmail = lib.mkDefault "greg@burd.me";
userName = lib.mkDefault "Greg Burd";
};
};
systemd.user.tmpfiles.rules = [
"d ${config.home.homeDirectory}/ws 0755 ${username} users - -"
"d ${config.home.homeDirectory}/Dropbox 0755 ${username} users - -"
# "d ${config.home.homeDirectory}/Quickemu/nixos-console 0755 ${username} users - -"
# "d ${config.home.homeDirectory}/Quickemu/nixos-desktop 0755 ${username} users - -"
"d ${config.home.homeDirectory}/bin 0755 ${username} users - -"
"d ${config.home.homeDirectory}/Studio/OBS/config/obs-studio/ 0755 ${username} users - -"
# "d ${config.home.homeDirectory}/Syncthing 0755 ${username} users - -"
"d ${config.home.homeDirectory}/Websites 0755 ${username} users - -"
"L+ ${config.home.homeDirectory}/.config/obs-studio/ - - - - ${config.home.homeDirectory}/Studio/OBS/config/obs-studio/"
];
}

View file

@ -1,8 +1,108 @@
{ lib, ... }:
{ lib, pkgs, ... }:
with lib.hm.gvariant;
{
imports = [
../../../desktop/vorta.nix
../../../desktop/sublime.nix
../../../desktop/sublime-merge.nix
];
dconf.settings = { };
home = {
persistence = {
"/persist/home/gburd" = {
directories = [
"Documents"
"Downloads"
"Pictures"
"Videos"
".local/bin"
".config"
];
allowOther = true;
};
};
file.".inputrc".text = ''
"\C-v": ""
set enable-bracketed-paste off
'';
file.".config/direnv/direnv.toml".text = ''
[global]
load_dotenv = true
'';
file.".config/Code/User/settings.json".text = ''
{
"editor.inlineSuggest.enabled": true,
"editor.fontFamily": "'FiraCode Nerd Font Mono', 'Droid Sans Mono', 'monospace', monospace",
"editor.fontLigatures": true,
"cSpell.userWords": [
"Burd",
"Wpedantic",
"Wvariadic"
],
"files.watcherExclude": {
"**/.bloop": true,
"**/.metals": true,
"**/.ammonite": true
},
"extensions.experimental.affinity": {
"asvetliakov.vscode-neovim": 1
},
"vscode-neovim.neovimExecutablePaths.linux": "/home/gburd/.nix-profile/bin/nvim",
}
'';
# file.".config/Code/User/keybindings.json".text = ''
# // Place your key bindings in this file to override the defaults
# [
# ]
# '';
# file.".config/sublime-text-2/Local/License.sublime_license".text =
# config.sops.secrets.sublime-licenses.text.path;
# file.".config/sublime-merge/Local/License.sublime_license".text =
# config.sops.secrets.sublime-licenses.merge.path;
packages = with pkgs; [
# TODO: Move some of these into ../../../desktop/<app>.nix files
_1password
_1password-gui
cfssl
gnumake
cmake
autoconf
libtool
m4
perl
pkg-config
python3
gcc
gdb
dig
emacs
file
git-credential-1password
htop
openssl
plocate
ripgrep
tig
tree
lsof
unstable.flyctl
unstable.minio-client
unstable.element-desktop
erlang
rebar3
elixir
];
# http://rski.github.io/2021/09/05/nix-debugging.html
# https://github.com/nix-community/home-manager/commit/0056a5aea1a7b68bdacb7b829c325a1d4a3c4259
enableDebugInfo = true;
};
}

Some files were not shown because too many files have changed in this diff Show more