random rice

This commit is contained in:
iofq 2025-06-20 23:39:52 -05:00
parent f080730c99
commit 60613b0a1d
No known key found for this signature in database
GPG key ID: ECF3B2DA38BF7183
17 changed files with 221 additions and 143 deletions

20
flake.lock generated
View file

@ -750,6 +750,25 @@
"type": "github"
}
},
"nh": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1751031069,
"owner": "nix-community",
"repo": "nh",
"rev": "992aa30f55d35395b129376f16809319a9b23b16",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nh",
"type": "github"
}
},
"nix": {
"inputs": {
"flake-parts": "flake-parts",
@ -1013,6 +1032,7 @@
"determinate": "determinate",
"home-manager": "home-manager",
"neovim-nightly-overlay": "neovim-nightly-overlay",
"nh": "nh",
"nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_4",

View file

@ -31,6 +31,10 @@
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
nh = {
url = "github:nix-community/nh";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*";
};
@ -50,6 +54,7 @@
overlays = [
inputs.neovim-nightly-overlay.overlays.default
inputs.nvim.overlays.default
inputs.nh.overlays.default
];
};
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
@ -81,7 +86,6 @@
devShells.${system}.default = pkgs.mkShell {
inherit (self.checks.pre-commit-check) shellHook;
buildInputs = [
pkgs.nix
pkgs.home-manager
pkgs.git
pkgs.ssh-to-age

View file

@ -1,12 +1,5 @@
{
inputs,
attrs,
...
}: {
{attrs, ...}: {
programs.home-manager.enable = true;
nix = {
registry.nixpkgs.flake = inputs.nixpkgs;
};
home = {
inherit (attrs) username;
stateVersion = "22.11";

View file

@ -7,6 +7,7 @@
tree
jujutsu
emacs-nox
shellcheck
#devops
k9s

View file

@ -1,7 +1,4 @@
{
pkgs,
...
}: {
{pkgs, ...}: {
imports = [
./tmux.nix
./git.nix
@ -88,6 +85,10 @@
pinentry-mode = "loopback";
};
};
programs.zoxide = {
enable = true;
enableFishIntegration = true;
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
@ -95,10 +96,8 @@
allow-loopback-pinentry
'';
};
programs = {
nix-index = {
programs.nix-index = {
enableBashIntegration = false;
enableFishIntegration = true;
};
};
}

View file

@ -1,4 +1,4 @@
{pkgs, host, ...}: {
{pkgs, ...}: {
programs.fish = {
enable = true;
interactiveShellInit = ''
@ -6,17 +6,21 @@
set show_startup_tips false
'';
shellInit = "
fish_add_path /usr/local/go/bin
fish_add_path ~/go/bin
fish_add_path ~/.local/bin
set -gx MANPAGER 'nvim +Man!'
set -gx EDITOR 'nvim'
set -gx _JAVA_AWT_WM_NONREPARENTING 1
set -gx NIX_FLAKE '/home/e/dev/nix'
set -gx NH_FLAKE '/home/e/dev/nix'
";
plugins = [
{name = "fzf"; inherit (pkgs.fishPlugins.fzf-fish) src;}
{name = "puffer"; inherit (pkgs.fishPlugins.puffer) src;}
{
name = "fzf";
inherit (pkgs.fishPlugins.fzf-fish) src;
}
{
name = "puffer";
inherit (pkgs.fishPlugins.puffer) src;
}
];
functions = import ./functions.nix;
shellAbbrs = {
@ -25,14 +29,11 @@
};
shellAliases = {
":q" = "exit";
hms = "home-manager switch --flake $NIX_FLAKE#${host.username}";
rbs = "sudo nixos-rebuild switch --flake $NIX_FLAKE#${host.hostName}";
mpv = "mpv --no-keepaspect-window";
cat = "bat -pp";
tcd = "cd $(mktemp -d)";
docker = "nerdctl";
vimdiff = "nvim -d";
ls = "eza";
};
};
}

View file

@ -16,19 +16,29 @@
end
'';
};
nix-prefetch-hash = {
body = ''
nix-hash --type sha256 --to-base64 (nix-prefetch-url $argv)
'';
};
fish_jj_prompt = {
body = ''
if not command -sq jj
return 1
end
if not command -sq timeout
return 1
end
if set -q FISH_JJ
return 0
end
if not jj root &>/dev/null
return 1
end
# Generate prompt
set -l info "$(
jj log --ignore-working-copy --no-graph --color=always --revisions=@ --template "
timeout 5 jj log --ignore-working-copy --no-graph --color=always --revisions=@ --template "
separate(
' ',
self.change_id().shortest(),

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.git = {
enable = true;
userEmail = "cjriddz@protonmail.com";
@ -26,6 +27,9 @@
settings = {
core = {
fsmonitor = "watchman";
watchman = {
register-snapshot-trigger = false;
};
};
user = {
email = "cjriddz@protonmail.com";
@ -35,7 +39,7 @@
username = "iofq";
};
signing = {
behavior = "own";
behavior = "drop";
backend = "gpg";
key = "cjriddz@protonmail.com";
};
@ -47,7 +51,7 @@
conflict-marker-style = "git";
merge-editor = "vimdiff";
diff-editor = "diffview";
diff.format = "git";
diff-formatter = ":git";
paginate = "never";
movement = {
edit = true;
@ -81,10 +85,25 @@
max-new-file-size = "10MiB";
};
revsets = {
log = "ancestors(reachable(@,trunk()..),2) | trunk()";
anc = "ancestors(@,10) | trunk()";
};
aliases = {
tug = ["bookmark" "move" "--from" "heads(::@- & bookmarks())" "--to" "@"];
tug = [
"bookmark"
"move"
"--from"
"heads(::@- & bookmarks())"
"--to"
"@"
];
};
fix = {
tools = {
treefmt = {
command = [ "treefmt" ];
patterns = [ "glob:**/*.nix" ];
};
};
};
};
};

View file

@ -26,7 +26,8 @@
default_mode "locked"
keybinds {
tmux {
bind "Ctrl a" { Write 2; SwitchToMode "Locked"; }
bind "Ctrl a" { SwitchToMode "Locked"; }
bind "Ctrl b" { Write 1; }
bind "[" { SwitchToMode "Scroll"; }
bind "\"" { NewPane "Down"; SwitchToMode "Locked"; }
bind "%" { NewPane "Right"; SwitchToMode "Locked"; }
@ -60,6 +61,9 @@
bind "8" { GoToTab 8; SwitchToMode "Locked"; }
bind "9" { GoToTab 9; SwitchToMode "Locked"; }
}
locked {
unbind "Ctrl g"
}
shared_except "tmux" {
bind "Ctrl a" {
SwitchToMode "Tmux"

View file

@ -7,8 +7,8 @@
./alacritty
./hyprland
];
home.packages = with pkgs; [
home = {
packages = with pkgs; [
pulseaudio
pulsemixer
alsa-utils
@ -20,10 +20,41 @@
sway-contrib.grimshot
xdg-utils
];
home.sessionVariables = {
sessionVariables = {
MOZ_DBUS_REMOTE = 1;
};
programs.wofi = {
file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/DMZ-Black";
};
services = {
gammastep = {
enable = true;
dawnTime = "6:00-8:00";
duskTime = "20:00-22:00";
latitude = 43.0;
longitude = -89.0;
temperature.day = 6000;
temperature.night = 3500;
};
swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
{
event = "lock";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
];
};
mako.enable = true;
mako.settings = {
default-timeout = 5;
};
};
programs = {
wofi = {
enable = true;
style = ''
window, #input, #entry, #scroll, #text, #inner-box {
@ -36,16 +67,7 @@
}
'';
};
services.gammastep = {
enable = true;
dawnTime = "6:00-8:00";
duskTime = "20:00-22:00";
latitude = 43.0;
longitude = -89.0;
temperature.day = 6000;
temperature.night = 3500;
};
programs.swaylock = {
swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
@ -55,18 +77,6 @@
ignore-empty-password = true;
};
};
services.swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
{
event = "lock";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
];
};
xdg = {
configFile."mimeapps.list".force = true;
@ -92,6 +102,4 @@
};
};
};
services.mako.enable = true;
home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/DMZ-Black";
}

View file

@ -91,7 +91,7 @@
",XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
## Movement
"$mod, p, layoutmsg, swapwithmaster"
"$mod, m, layoutmsg, swapwithmaster"
"$mod, e, layoutmsg, orientationnext"
"$mod, i, layoutmsg, addmaster"
"$mod, d, layoutmsg, removemaster"
@ -100,6 +100,7 @@
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod, n, changegroupactive, f"
"$mod, p, changegroupactive, b"
"$mod SHIFT, h, movewindoworgroup, l"
"$mod SHIFT, l, movewindoworgroup, r"
"$mod SHIFT, k, movewindoworgroup, u"

View file

@ -32,7 +32,12 @@
appimage-run
wireguard-tools
android-tools
nh
];
sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
JAVA_AWT_WM_NONREPARENTING = 1;
};
};
programs.librewolf.enable = true;
programs.ssh = {

View file

@ -1,7 +1,9 @@
{
inputs,
host,
...
}: { # Create plugdev group
}: {
# Create plugdev group
networking.hostName = host.hostName;
time.timeZone = "America/Chicago";
users = {
@ -28,6 +30,7 @@ host,
# Enable flakes and unfree packages
nix = {
registry.nixpkgs.flake = inputs.nixpkgs;
settings = {
auto-optimise-store = true;
substituters = [
@ -40,11 +43,15 @@ host,
];
trusted-users = [host.username];
experimental-features = ["nix-command" "flakes"];
lazy-trees = true;
};
channel.enable = false;
nixPath = ["nixpkgs=flake:nixpkgs"];
gc = {
automatic = true;
dates = "00:00";
options = "--delete-older-than 14d";
};
};
security.sudo-rs.enable = true;
}

View file

@ -1,4 +1,9 @@
{lib, pkgs, config, ...}: {
{
lib,
pkgs,
config,
...
}: {
imports = [
./hardware-configuration.nix
./backups.nix
@ -44,7 +49,7 @@
port = 2283;
host = "localhost";
openFirewall = true;
machine-learning.enable = false;
machine-learning.enable = true;
mediaLocation = "/rice/immich";
};
nginx = {
@ -76,8 +81,8 @@
zramSwap.enable = false;
swapDevices = [
{
device = "/var/swapfile";
size = 4 * 1024;
device = "/swapfile";
size = 8 * 1024;
}
];
virtualisation.docker.enable = true;
@ -115,7 +120,7 @@
];
};
};
security.sudo.wheelNeedsPassword = false;
security.sudo-rs.wheelNeedsPassword = false;
security.acme = {
acceptTerms = true;
defaults.email = "acme@10110110.xyz";

View file

@ -6,6 +6,7 @@
...
}: let
defaultModules = [
./configuration.nix
inputs.sops-nix.nixosModules.sops
inputs.nix-index-database.nixosModules.nix-index
inputs.determinate.nixosModules.default
@ -23,7 +24,6 @@ in {
modules =
defaultModules
++ [
./configuration.nix
./t14/configuration.nix
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
];
@ -40,7 +40,6 @@ in {
modules =
defaultModules
++ [
./configuration.nix
./consensus/configuration.nix
];
};

View file

@ -17,6 +17,7 @@
paths = [
"/home/e/backmeup"
"/home/e/orgfiles"
"/home/e/.ssh"
"/home/e/.librewolf"
"/home/e/.runelite"

View file

@ -15,6 +15,7 @@ in {
cryptsetup
nfs-utils
nerdctl
(lib.hiPrio uutils-coreutils-noprefix)
];
extraInit = "[[ -f ${homeManagerSessionVars} ]] && source ${homeManagerSessionVars} && echo 'x' > /tmp/test";
};