feat: Add canvasback
To avoid duplicating lots of options between my systems, I'm factoring
this out into a "minion" chimera option.
Change-Id: If6058406efe5104f089eaf755596bf41bade431d
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/513
Reviewed-by: Skyler Grey <minion@clicks.codes>
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/homes/x86_64-linux/minion@greylag/default.nix b/homes/x86_64-linux/minion@greylag/default.nix
index e01db43..5dbbcdc 100644
--- a/homes/x86_64-linux/minion@greylag/default.nix
+++ b/homes/x86_64-linux/minion@greylag/default.nix
@@ -19,152 +19,27 @@
...
}:
{
- programs.git.includes = [
- {
- condition = "gitdir:~/Code/clicks/";
- contents.user.email = "minion@clicks.codes";
- }
- {
- condition = "gitdir:~/Code/personal/";
- contents.user.email = "skyler3665@gmail.com";
- }
- {
- condition = "gitdir:~/Code/collabora/";
- contents.user.email = "skyler.grey@collabora.com";
- }
+ chimera.minion.enable = true;
+
+ chimera.waybar = {
+ modules.temperature.hwmonPath = "/sys/class/hwmon/hwmon4/temp1_input";
+ modules.laptop.enable = true;
+ };
+
+ chimera.hyprland.enable = true;
+ chimera.hyprland.hyprpaper.splash.enable = true;
+ chimera.touchpad.enable = true;
+
+ chimera.hyprland.monitors = [
+ "eDP-1,preferred,0x0,1"
+ "desc:Dell Inc. DELL P2715Q V7WP95AV914L,preferred,2256x-1956,1,transform,1"
+ "desc:AOC 2460G5 0x00023C3F,preferred,336x-1080,1"
];
- programs.git.extraConfig.alias = {
- recommit = "!git commit --verbose -eF $(git rev-parse --git-dir)/COMMIT_EDITMSG";
- graph = "log --graph --oneline --decorate";
- hash = "rev-parse HEAD";
- personal = "config user.email skyler3665@gmail.com";
- clicks = "config user.email minion@clicks.codes";
- collabora = "config user.email skyler.grey@collabora.com";
- stg-clean = ''!for PATCH in $(stg series -PU); do CHANGE_ID=$(git show -s --format="%(trailers:key=Change-Id,valueonly,separator=%x2C )" $(stg id $PATCH)); git log --format="%(trailers:key=Change-Id,valueonly,separator=%x2C )" | grep -qFx "$CHANGE_ID" && stg delete $PATCH; done'';
- };
+ chimera.theme.wallpaper = ./wallpaper.png;
- home.shellAliases = {
- gpg-card-switch = ''for keygrip in $(gpg --with-keygrip --list-secret-keys 76E0B09A741C4089522111E5F27E3E5922772E7A | grep Keygrip | sed "1d" | sed "s/ *Keygrip = //"); do gpg-connect-agent "delete_key $keygrip" /bye > /dev/null; done; gpg --card-status;'';
- };
-
- programs.git.extraConfig.user = {
- name = "Skyler Grey";
- signingkey = "7C868112B5390C5C";
- };
-
- chimera = {
- waybar = {
- modules.temperature.hwmonPath = "/sys/class/hwmon/hwmon4/temp1_input";
- modules.laptop.enable = true;
- };
-
- nextcloud.enable = true;
-
- hyprland.enable = true;
- hyprland.hyprpaper.splash.enable = true;
-
- touchpad.enable = true;
-
- hyprland.monitors = [
- "eDP-1,preferred,0x0,1"
- "desc:Dell Inc. DELL P2715Q V7WP95AV914L,preferred,2256x-1956,1,transform,1"
- "desc:AOC 2460G5 0x00023C3F,preferred,336x-1080,1"
- ];
-
- theme.wallpaper = ./wallpaper.png;
- theme.catppuccin = {
- enable = true;
- style = "Latte";
- color = "Maroon";
- };
-
- browser.chromium = {
- enable = true;
- extensions = {
- ublockOrigin.enable = true;
- bitwarden.enable = true;
- };
- };
-
- browser.firefox = {
- enable = true;
- extensions = {
- bitwarden.enable = true;
- youtube = {
- sponsorBlock.enable = true;
- returnDislike.enable = true;
- deArrow.enable = true;
- };
- reactDevTools.enable = true;
- adnauseam.enable = true;
- };
- search = {
- enable = true;
- extensions.enable = true;
- bookmarks.enable = true;
- engines = [
- "Kagi"
- "MDN"
- "NixOS Options"
- "NixOS Packages"
- "Home-Manager Options"
- "Noogle"
- "GitHub"
- "Docs.rs"
- "Crates.io"
- "Arch Wiki"
- "Gentoo Wiki"
- ];
- };
- extraExtensions = [
- config.nur.repos.rycee.firefox-addons.sidebery
- ];
- };
-
- shell.bash.enable = true;
- shell.defaultAliases.enable = true;
- shell.replacements.defaultEnable = true;
- shell.replacements.bat.enable = false;
-
- theme.font.nerdFontGlyphs.enable = true;
-
- editor.ed = {
- enable = true;
- prompt = ":";
- defaultEditor = false;
- };
-
- editor.neovim = {
- enable = true;
- defaultEditor = false;
- };
-
- editor.emacs.enable = true;
- editor.editorconfig.enable = true;
-
- input.keyboard = {
- layout = "us";
- variant = "dvorak";
- };
-
- input.mouse.scrolling.natural = true;
-
- git = {
- delta.enable = true;
- stgit.enable = true;
- gitReview.enable = true;
- auth.clicksUsername = "minion";
- gpg.enable = true;
- };
-
- shell.usefulPackages.enable = true;
-
- games = {
- minecraft.enable = true;
- itch.enable = true;
- };
-
- yubikey.enable = true;
+ chimera.games = {
+ minecraft.enable = true;
+ itch.enable = true;
};
}
diff --git a/homes/x86_64-linux/skyler@canvasback/default.nix b/homes/x86_64-linux/skyler@canvasback/default.nix
index 9deeedb..f3e7c1b 100644
--- a/homes/x86_64-linux/skyler@canvasback/default.nix
+++ b/homes/x86_64-linux/skyler@canvasback/default.nix
@@ -19,4 +19,10 @@
...
}:
{
+ home.packages = [ pkgs.home-manager ];
+ chimera.minion.enable = true;
+
+ home.shellAliases.home-manager = "${pkgs.home-manager}/bin/home-manager --flake ${config.chimera.shell.rebuildFlakePath}#skyler@canvasback";
+
+ programs.kitty.settings.shell = "${pkgs.bashInteractive}/bin/bash --login"; # nasty hack to make environment variables load on gnome
}
diff --git a/modules/home/users/minion/README.md b/modules/home/users/minion/README.md
new file mode 100644
index 0000000..37025b8
--- /dev/null
+++ b/modules/home/users/minion/README.md
@@ -0,0 +1,8 @@
+# minion's chimera options
+
+## What is this?
+
+`minion` is a `chimera` user with multiple machines. Some of her options should
+be shared across all of her machines, these are those options.
+
+## How can I use this?
diff --git a/modules/home/users/minion/default.nix b/modules/home/users/minion/default.nix
new file mode 100644
index 0000000..7578950
--- /dev/null
+++ b/modules/home/users/minion/default.nix
@@ -0,0 +1,150 @@
+{ config, lib, pkgs, ... }:
+{
+ options.chimera.minion.enable = lib.mkEnableOption "Enable Chimera options for minion";
+
+ config = lib.mkIf config.chimera.minion.enable (let
+ git_emails = {
+ personal = "skyler3665@gmail.com";
+ collabora = "skyler.grey@collabora.com";
+ transplace = "minion@trans.gg";
+ clicks = "minion@clicks.codes";
+ };
+
+ git_email_to_include_option = name: email: {
+ condition = "gitdir:~/Code/${name}/";
+ contents.user.email = email;
+ };
+
+ git_email_to_alias_value = email: "config user.email ${email}";
+ in {
+ chimera.shell.rebuildFlakePath = "/home/skyler/Code/nix/configs/personal";
+
+ programs.git.includes =
+ lib.mapAttrsToList
+ git_email_to_include_option
+ git_emails;
+
+ programs.git.extraConfig.alias = {
+ recommit = "!git commit --verbose -eF $(git rev-parse --git-dir)/COMMIT_EDITMSG";
+ graph = "log --graph --oneline --decorate";
+ hash = "rev-parse HEAD";
+
+ stg-clean = ''!for PATCH in $(stg series -PU); do CHANGE_ID=$(git show -s --format="%(trailers:key=Change-Id,valueonly,separator=%x2C )" $(stg id $PATCH)); git log --format="%(trailers:key=Change-Id,valueonly,separator=%x2C )" | grep -qFx "$CHANGE_ID" && stg delete $PATCH; done'';
+ } // (builtins.mapAttrs (_name: email: git_email_to_alias_value email) git_emails);
+
+ home.shellAliases = {
+ gpg-card-switch = ''for keygrip in $(gpg --with-keygrip --list-secret-keys 76E0B09A741C4089522111E5F27E3E5922772E7A | grep Keygrip | sed "1d" | sed "s/ *Keygrip = //"); do gpg-connect-agent "delete_key $keygrip" /bye > /dev/null; done; gpg --card-status;'';
+ };
+
+ programs.git.extraConfig.user = {
+ name = "Skyler Grey";
+ signingkey = "7C868112B5390C5C";
+ };
+
+ chimera.git = {
+ delta.enable = true;
+ stgit.enable = true;
+ gitReview.enable = true;
+ auth.clicksUsername = "minion";
+ gpg.enable = true;
+ };
+
+ chimera.theme = {
+ font.nerdFontGlyphs.enable = true;
+ catppuccin = {
+ enable = true;
+ style = "Latte";
+ color = "Maroon";
+ };
+ };
+
+ chimera.browser.chromium = {
+ enable = true;
+ extensions = {
+ ublockOrigin.enable = true;
+ bitwarden.enable = true;
+ };
+ };
+
+ chimera.browser.firefox = {
+ enable = true;
+ extensions = {
+ bitwarden.enable = true;
+ youtube = {
+ sponsorBlock.enable = true;
+ returnDislike.enable = true;
+ deArrow.enable = true;
+ };
+ reactDevTools.enable = true;
+ adnauseam.enable = true;
+ };
+ search = {
+ enable = true;
+ extensions.enable = true;
+ bookmarks.enable = true;
+ engines = [
+ "Kagi"
+ "MDN"
+ "NixOS Options"
+ "NixOS Packages"
+ "Home-Manager Options"
+ "Noogle"
+ "GitHub"
+ "Docs.rs"
+ "Crates.io"
+ "Arch Wiki"
+ "Gentoo Wiki"
+ ];
+ };
+ extraExtensions = [
+ config.nur.repos.rycee.firefox-addons.sidebery
+ ];
+ };
+
+ chimera.shell = {
+ bash.enable = true;
+ defaultAliases.enable = true;
+ replacements.defaultEnable = true;
+ replacements.bat.enable = false;
+ usefulPackages.enable = true;
+ };
+
+ chimera.editor = {
+ ed = {
+ enable = true;
+ prompt = ":";
+ defaultEditor = false;
+ };
+
+ neovim = {
+ enable = true;
+ defaultEditor = false;
+ };
+
+ emacs.enable = true;
+
+ editorconfig.enable = true;
+ };
+
+ chimera.yubikey.enable = true;
+
+ chimera.input = {
+ keyboard = {
+ layout = "us";
+ variant = "dvorak";
+ };
+ mouse.scrolling.natural = true;
+ };
+
+ chimera.nextcloud.enable = true;
+
+ programs.bash.bashrcExtra = ''
+ export PS1="\[\e]133;k;start_kitty\a\]\[\e]133;A\a\]\[\e]133;k;end_kitty\a\]\n\[\e]133;k;start_secondary_kitty\a\]\[\e]133;A;k=s\a\]\[\e]133;k;end_secondary_kitty\a\]\[\033[1;35m\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\$\[\033[0m\] \[\e]133;k;start_suffix_kitty\a\]\[\e[5 q\]\[\e]2;\w\a\]\[\e]133;k;end_suffix_kitty\a\]"
+ '';
+
+ programs.kitty.extraConfig = ''
+ map kitty_mod+enter launch --cwd=current --type=window
+ map kitty_mod+t launch --cwd=current --type=tab
+ '';
+ });
+}