Skip to content
Open

Quote #194

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 8 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ My personal nix flake.

### NixOS (Linux)

I have a configuration for my gaming desktop:
My desktop has two configurations sharing the same hardware:

```bash
- `desktop` — my main config
- `quote` — an alternate `desktop` running an XP-themed awesome WM with an
embedded Minecraft game as the wallpaper

```bash
sudo nixos-rebuild switch --flake .#desktop

# or, the Minecraft desktop
sudo nixos-rebuild switch --flake .#quote
```

e-ink desktop using [Dasung Paperlike](https://shop.dasung.com/)
Expand All @@ -33,25 +39,6 @@ My personal MacBook uses [nix-darwin](https://github.com/nix-darwin/nix-darwin):
darwin-rebuild switch --flake .#macbook
```

### Android

My
[Pixel 9 Pro Fold](https://store.google.com/us/product/pixel_9_pro_fold?hl=en-US)
uses [nixos-avf](https://github.com/nix-community/nixos-avf) on Android's Native
Linux terminal:

```bash
sudo nixos-rebuild switch --flake .#android
```

### Standalone

Standalone home-manager configuration:

```bash
home-manager switch --flake .#standalone
```

## Manual Setup

### Tresorit
Expand Down
36 changes: 18 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions home/common/claude-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"allow": ["mcp__svelte__*"]
},
"model": "opus",
"attribution": {
"commit": ""
},
"enabledPlugins": {
"elements-of-style@superpowers-marketplace": true,
"superpowers-lab@superpowers-marketplace": true,
Expand Down
19 changes: 16 additions & 3 deletions home/common/ghostty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@
fi
'';

xdg.configFile = lib.mkIf pkgs.stdenv.isLinux {
"ghostty/no-rounded.css".text = ''
window, .background, .titlebar, .top-bar {
border-radius: 0;
}
'';
};

programs.ghostty = {
enable = true;
package = if pkgs.stdenv.isLinux then pkgs.ghostty else null;
settings = {
command = lib.mkIf pkgs.stdenv.isLinux "zellij";
command = lib.mkIf pkgs.stdenv.isLinux "${nixpkgs-unstable.zellij}/bin/zellij";
desktop-notifications = false;

font-family = lib.mkForce "MonoLisa Variable";
font-family = "MonoLisa Variable";
font-family-bold = "MonoLisa Variable Regular Bold";
font-family-italic = "MonoLisa Variable Italic Italic";
font-family-bold-italic = "MonoLisa Variable Italic Bold Italic";
Expand All @@ -30,7 +38,12 @@

background-opacity = 1.0;

gtk-titlebar = true;
gtk-titlebar = lib.mkIf pkgs.stdenv.isLinux false;
gtk-custom-css = lib.mkIf pkgs.stdenv.isLinux "no-rounded.css";

# The default "single-instance" scope strips PATH down to systemd +
# ghostty; "never" keeps spawned commands as direct ghostty children.
linux-cgroup = lib.mkIf pkgs.stdenv.isLinux "never";

macos-titlebar-style = "native";

Expand Down
6 changes: 3 additions & 3 deletions home/common/neovim/rocks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ rev = "2337f109f51a09297596dd6b538b70ccba92b4e4"
git = "A7Lavinraj/fyler.nvim"
rev = "v2.0.0"

[plugins."nvim-java"]
git = "nvim-java/nvim-java"
rev = "v4.1.0"
# [plugins."nvim-java"]
# git = "nvim-java/nvim-java"
# rev = "v4.1.0"

[bundles.neorg]
items = [
Expand Down
19 changes: 16 additions & 3 deletions home/common/zellij.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
{ pkgs, lib, nixpkgs-unstable, ... }:
let
# zellij splits copy_command via shell-words, so route through a wrapper
# script that picks wl-copy or xclip based on whether a Wayland socket
# is present at runtime (awesome/quote is X11, sway/niri is Wayland).
linuxCopy = pkgs.writeShellScript "zellij-copy" ''
if [ -n "$WAYLAND_DISPLAY" ]; then
exec ${pkgs.wl-clipboard}/bin/wl-copy
else
exec ${pkgs.xclip}/bin/xclip -selection clipboard -in
fi
'';
in
{
home.packages = lib.optionals pkgs.stdenv.isLinux (with pkgs; [
wl-clipboard
xclip
]);

programs.zellij = {
Expand All @@ -10,12 +23,12 @@

settings = {
theme = "default";
default_shell = "zsh";
default_shell = if pkgs.stdenv.isLinux then "${pkgs.zsh}/bin/zsh" else "zsh";
mouse_mode = true;
rounded_corners = true;
rounded_corners = false;
show_startup_tips = false;
show_release_notes = false;
copy_command = if pkgs.stdenv.isLinux then "wl-copy" else "pbcopy";
copy_command = if pkgs.stdenv.isLinux then "${linuxCopy}" else "pbcopy";
copy_clipboard = "system";
keybinds = {
"locked" = {
Expand Down
28 changes: 16 additions & 12 deletions home/linux/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{ features, hostName, lib, ... }:
let
de = features.desktopEnvironment;
selfContained = {
plasma = ./plasma;
sway = ./sway;
quote = ./quote;
};
perHost = lib.optional
(de != null && !(selfContained ? ${de}))
./${de}/host/${hostName}.nix;
in
{
imports = [
./theme.nix
] ++ lib.optionals features.gui [
./desktop.nix
./mpv
] ++ lib.optionals features.gaming [
./games
] ++ lib.optionals (features.desktopEnvironment == "plasma") [
./plasma
] ++ lib.optionals (features.desktopEnvironment == "sway") [
./sway
] ++ lib.optionals (features.desktopEnvironment != null && features.desktopEnvironment != "sway") [
./${features.desktopEnvironment}/host/${hostName}.nix
];
]
++ lib.optionals features.gui [ ./desktop.nix ./mpv ]
++ lib.optionals features.gaming [ ./games ]
++ lib.optional (de != null && selfContained ? ${de}) selfContained.${de}
++ perHost;
}
8 changes: 3 additions & 5 deletions home/linux/games/minecraft.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
})
];

# JAVA_HOME pins temurin for general use; prismlauncher carries its own jdks.
# Not using `programs.java` because it adds temurin to home.packages, which
# collides with the openjdk propagated by clojure/leiningen/babashka.
home.sessionVariables = {
JAVA_HOME = "${pkgs.temurin-bin-21}";
};

programs.java = {
enable = true;
package = pkgs.temurin-bin-21;
};
}
7 changes: 5 additions & 2 deletions home/linux/plasma/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{ pkgs, inputs, theme, ... }:
{ pkgs, inputs, theme, hostName, ... }:
let
isLight = theme.appearance == "light";
in
{
imports = [ inputs.plasma-manager.homeModules.plasma-manager ];
imports = [
inputs.plasma-manager.homeModules.plasma-manager
./host/${hostName}.nix
];
home.packages = with pkgs; [
exfatprogs
hfsprogs
Expand Down
54 changes: 54 additions & 0 deletions home/linux/quote/_prism-files.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ pkgs, appearance ? "dark" }:
let
java = "${pkgs.temurin-bin-17}/bin/java";

# Prism's registered application theme IDs are "system", "dark", "bright"
# (no "light" — that was triggering ThemeWizardPage every launch because
# isValidApplicationTheme rejected it, regenerating the welcome wizard).
applicationTheme = if appearance == "light" then "bright" else "dark";
iconTheme = if appearance == "light" then "pe_light" else "pe_dark";

# Merges our keys into prismlauncher.cfg without clobbering Prism-owned
# fields (accounts, last-used instance, window state, etc.). Idempotent.
prism-apply-launcher-config = pkgs.writeShellApplication {
name = "prism-apply-launcher-config";
runtimeInputs = [ pkgs.crudini ];
text = ''
file="''${1:-}"
[ -n "$file" ] || { echo "prism-apply-launcher-config: file path required" >&2; exit 1; }
[ -f "$file" ] || printf '[General]\n' > "$file"
set_kv() { crudini --ini-options=nospace --set "$file" General "$1" "$2"; }
set_kv ApplicationTheme '${applicationTheme}'
set_kv IconTheme '${iconTheme}'
set_kv BackgroundCat kitteh
set_kv JavaPath '${java}'
set_kv AutomaticJavaSwitch false
set_kv AutomaticJavaDownload false
'';
};

# Merges our keys into an existing Prism instance.cfg without clobbering
# Prism-owned fields (Name, InstanceType, iconKey, etc.). Idempotent.
prism-apply-instance-config = pkgs.writeShellApplication {
name = "prism-apply-instance-config";
runtimeInputs = [ pkgs.crudini ];
text = ''
file="''${1:-}"
[ -f "$file" ] || { echo "prism-apply-instance-config: file not found: $file" >&2; exit 1; }
# Prism (QSettings) emits `key=value` with no spaces; nospace keeps us off
# crudini's default `key = value` so the file stays byte-identical when no
# value actually changes.
set_kv() { crudini --ini-options=nospace --set "$file" General "$1" "$2"; }
set_kv OverrideJavaLocation true
set_kv JavaPath '${java}'
set_kv OverrideMemory true
set_kv MinMemAlloc 512
set_kv MaxMemAlloc 4096
set_kv OverrideJavaArgs true
set_kv JvmArgs '-Ddirector.autoScreensaver=true'
'';
};
in
{
inherit prism-apply-launcher-config prism-apply-instance-config;
}
Loading