2024-02-24 02:30:17 -08:00
|
|
|
{
|
2024-12-07 15:45:10 -08:00
|
|
|
config,
|
2024-02-24 02:30:17 -08:00
|
|
|
pkgs,
|
|
|
|
|
inputs,
|
2024-04-02 11:17:11 -07:00
|
|
|
lib,
|
2024-02-24 02:30:17 -08:00
|
|
|
...
|
2024-03-17 00:22:50 -07:00
|
|
|
}: let
|
|
|
|
|
cargoFile = builtins.readFile ./cargo.toml;
|
2024-05-25 18:35:30 -07:00
|
|
|
cargoConfig = builtins.replaceStrings ["/path/to/sccache" "/path/to/mold"] ["${pkgs.sccache}/bin/sccache" "${pkgs.mold}/bin/mold}"] cargoFile;
|
2024-12-07 15:45:10 -08:00
|
|
|
age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age;
|
|
|
|
|
age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age;
|
|
|
|
|
age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age;
|
2024-03-17 00:22:50 -07:00
|
|
|
in {
|
2024-01-30 11:08:42 -08:00
|
|
|
imports = [
|
2024-04-28 10:56:51 -07:00
|
|
|
./boxxy.nix
|
2024-02-24 02:30:17 -08:00
|
|
|
(import ./helix.nix {inherit pkgs inputs;})
|
2024-03-20 17:29:48 -07:00
|
|
|
# ./plasma.nix
|
2024-03-23 01:24:31 -07:00
|
|
|
# ./firefox.nix
|
2024-01-30 11:08:42 -08:00
|
|
|
];
|
|
|
|
|
|
2024-04-19 13:12:45 -07:00
|
|
|
# home.sessionPath = [
|
|
|
|
|
# "/home/tao/.cargo/bin"
|
|
|
|
|
# ];
|
2024-03-17 00:22:50 -07:00
|
|
|
home.file.".cargo/config.toml".text = cargoConfig;
|
2024-04-04 02:50:30 -07:00
|
|
|
home.file.".config/autostart" = {
|
2024-04-02 10:32:20 -07:00
|
|
|
source = ./autostart;
|
2024-04-01 17:38:14 -07:00
|
|
|
recursive = true;
|
|
|
|
|
};
|
2025-02-20 14:55:55 -08:00
|
|
|
home.file.".config/direnv/lib/".source = ./direnv;
|
|
|
|
|
home.file.".config/direnv/lib/".recursive = true;
|
2024-03-16 18:54:05 -07:00
|
|
|
|
2024-02-01 10:00:03 -08:00
|
|
|
programs = {
|
2025-01-30 17:42:24 -08:00
|
|
|
bacon = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings.jobs.default = {
|
|
|
|
|
command = [
|
|
|
|
|
"cargo"
|
|
|
|
|
"clippy"
|
|
|
|
|
"--"
|
|
|
|
|
"-A"
|
|
|
|
|
"clippy::bool_to_int_with_if"
|
|
|
|
|
"-A"
|
|
|
|
|
"clippy::collapsible_else_if"
|
|
|
|
|
"-A"
|
|
|
|
|
"clippy::collapsible_if"
|
|
|
|
|
"-A"
|
|
|
|
|
"clippy::derive_partial_eq_without_eq"
|
|
|
|
|
"-A"
|
|
|
|
|
"clippy::get_first"
|
|
|
|
|
"-A"
|
|
|
|
|
"clippy::if_same_then_else"
|
|
|
|
|
"-A"
|
|
|
|
|
"clippy::len_without_is_empty"
|
|
|
|
|
"-A"
|
|
|
|
|
"clippy::map_entry"
|
|
|
|
|
"-A"
|
|
|
|
|
"clippy::while_let_on_iterator"
|
|
|
|
|
];
|
|
|
|
|
need_stdout = false;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-05-16 03:51:55 -07:00
|
|
|
bat = {
|
|
|
|
|
enable = true;
|
|
|
|
|
config = {
|
|
|
|
|
theme = "gruvbox-dark";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-04-02 10:40:35 -07:00
|
|
|
bottom = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
2024-05-16 03:51:55 -07:00
|
|
|
color = "gruvbox";
|
2024-04-11 08:32:50 -07:00
|
|
|
flags = {
|
|
|
|
|
battery =
|
2024-10-13 23:28:53 -07:00
|
|
|
# if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname)
|
|
|
|
|
# then true
|
|
|
|
|
# else false;
|
|
|
|
|
true;
|
2024-04-11 08:32:50 -07:00
|
|
|
hide_time = true;
|
|
|
|
|
enable_gpu = true;
|
|
|
|
|
};
|
2024-04-02 10:40:35 -07:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-04-22 12:38:23 -07:00
|
|
|
direnv = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableNushellIntegration = true;
|
|
|
|
|
nix-direnv.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2024-02-06 11:08:27 -08:00
|
|
|
jujutsu = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
user = {
|
|
|
|
|
name = "Tao Tien";
|
|
|
|
|
email = "29749622+taotien@users.noreply.github.com";
|
|
|
|
|
};
|
2024-02-24 02:30:17 -08:00
|
|
|
ui = {
|
|
|
|
|
default-command = "log";
|
|
|
|
|
};
|
2024-02-06 11:08:27 -08:00
|
|
|
};
|
2024-04-04 02:50:30 -07:00
|
|
|
# package = inputs.jujutsu.packages.${pkgs.system}.default;
|
2024-02-06 11:08:27 -08:00
|
|
|
};
|
|
|
|
|
|
2024-02-01 09:41:23 -08:00
|
|
|
git = {
|
2024-02-01 10:00:03 -08:00
|
|
|
enable = true;
|
2024-02-01 09:41:23 -08:00
|
|
|
userName = "Tao Tien";
|
|
|
|
|
userEmail = "29749622+taotien@users.noreply.github.com";
|
2024-04-05 14:18:27 -07:00
|
|
|
# extraConfig = {
|
|
|
|
|
# };
|
2024-02-01 09:41:23 -08:00
|
|
|
};
|
2024-01-30 10:46:26 -08:00
|
|
|
|
2024-02-01 09:41:23 -08:00
|
|
|
nushell = {
|
2024-02-01 10:00:03 -08:00
|
|
|
enable = true;
|
2024-03-15 12:47:44 -07:00
|
|
|
configFile.source = ./nushell/config.nu;
|
|
|
|
|
envFile.source = ./nushell/env.nu;
|
2025-02-20 14:55:55 -08:00
|
|
|
# extraConfig = builtins.readFile ./nushell/stuff.nu;
|
2025-02-20 19:05:45 -08:00
|
|
|
extraConfig = lib.concatStrings (map builtins.readFile (map (x: ./nushell/extras/. + x) (map (x: "/" + x) (builtins.attrNames (builtins.readDir ./nushell/extras)))));
|
2024-02-01 09:41:23 -08:00
|
|
|
};
|
2024-01-30 10:46:26 -08:00
|
|
|
|
2024-08-21 18:31:46 -07:00
|
|
|
ssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
addKeysToAgent = "yes";
|
|
|
|
|
compression = true;
|
|
|
|
|
matchBlocks = {
|
|
|
|
|
"stargate" = {
|
|
|
|
|
hostname = "stargate.cs.usfca.edu";
|
|
|
|
|
user = "tltien";
|
|
|
|
|
forwardAgent = true;
|
|
|
|
|
identityFile = "/home/tao/.ssh/id_ed25519";
|
|
|
|
|
};
|
|
|
|
|
"beagle" = {
|
|
|
|
|
hostname = "beagle";
|
|
|
|
|
user = "tltien";
|
|
|
|
|
forwardAgent = true;
|
|
|
|
|
identityFile = "/home/tao/.ssh/id_ed25519";
|
|
|
|
|
proxyCommand = "ssh stargate -W %h:%p";
|
|
|
|
|
};
|
|
|
|
|
"github" = {
|
|
|
|
|
hostname = "github.com";
|
|
|
|
|
forwardAgent = true;
|
|
|
|
|
identityFile = "/home/tao/.ssh/id_ed25519";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2025-02-20 23:15:58 -08:00
|
|
|
starship = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableNushellIntegration = true;
|
|
|
|
|
settings = builtins.fromTOML (builtins.readFile ./starship.toml);
|
|
|
|
|
};
|
2024-02-01 08:56:18 -08:00
|
|
|
|
2024-03-16 18:54:05 -07:00
|
|
|
taskwarrior = {
|
|
|
|
|
enable = true;
|
2024-08-22 14:29:12 -07:00
|
|
|
package = pkgs.taskwarrior3;
|
2024-04-08 17:40:16 -07:00
|
|
|
dataLocation = "/home/tao/sync";
|
2024-03-16 18:54:05 -07:00
|
|
|
};
|
2024-03-15 12:47:44 -07:00
|
|
|
|
2024-02-01 09:41:23 -08:00
|
|
|
wezterm = {
|
2024-02-01 10:00:03 -08:00
|
|
|
enable = true;
|
2024-02-01 09:41:23 -08:00
|
|
|
extraConfig = builtins.readFile ./wezterm.lua;
|
|
|
|
|
};
|
2024-02-01 08:56:18 -08:00
|
|
|
|
2024-04-09 10:51:12 -07:00
|
|
|
zathura = {
|
|
|
|
|
enable = true;
|
|
|
|
|
options = {
|
|
|
|
|
selection-clipboard = "clipboard";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-04-29 17:47:29 -07:00
|
|
|
zellij = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {};
|
|
|
|
|
};
|
2024-02-11 02:29:23 -08:00
|
|
|
|
2024-02-01 09:41:23 -08:00
|
|
|
zoxide = {
|
2024-02-01 10:00:03 -08:00
|
|
|
enable = true;
|
2024-02-01 09:41:23 -08:00
|
|
|
enableNushellIntegration = true;
|
|
|
|
|
};
|
2024-02-01 08:56:18 -08:00
|
|
|
};
|
|
|
|
|
|
2024-03-16 18:54:05 -07:00
|
|
|
services = {
|
|
|
|
|
pueue = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {};
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-02-24 14:51:33 -08:00
|
|
|
|
2024-12-07 15:45:10 -08:00
|
|
|
services.syncthing = {
|
|
|
|
|
enable = true;
|
|
|
|
|
# user = "tao";
|
|
|
|
|
# dataDir = "/home/tao/sync";
|
|
|
|
|
# configDir = "/home/tao/.config/syncthing";
|
|
|
|
|
overrideDevices = true;
|
|
|
|
|
overrideFolders = true;
|
|
|
|
|
# openDefaultPorts = true;
|
|
|
|
|
settings = {
|
|
|
|
|
devices = {
|
|
|
|
|
# we do a lil anti-patterns https://github.com/ryantm/agenix?tab=readme-ov-file#builtinsreadfile-anti-pattern
|
|
|
|
|
# bootstrap by commenting out devices first and rebuild switch impurely
|
|
|
|
|
"nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path;
|
|
|
|
|
"nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path;
|
|
|
|
|
"uwuraid".id = builtins.readFile config.age.secrets.syncthing-uwuraid.path;
|
|
|
|
|
};
|
|
|
|
|
folders = let
|
|
|
|
|
devs = [
|
|
|
|
|
"nocomputer"
|
|
|
|
|
"nolaptop"
|
|
|
|
|
"uwuraid"
|
|
|
|
|
];
|
|
|
|
|
in {
|
|
|
|
|
# "documents" = {
|
|
|
|
|
# path = "/home/tao/documents";
|
|
|
|
|
# devices = devs;
|
|
|
|
|
# };
|
|
|
|
|
"pictures" = {
|
|
|
|
|
path = "/home/tao/pictures";
|
|
|
|
|
devices = devs;
|
|
|
|
|
};
|
|
|
|
|
"projects" = {
|
|
|
|
|
path = "/home/tao/projects";
|
|
|
|
|
devices = devs;
|
|
|
|
|
};
|
|
|
|
|
"school" = {
|
|
|
|
|
path = "/home/tao/school";
|
|
|
|
|
devices = devs;
|
|
|
|
|
};
|
|
|
|
|
"sync" = {
|
|
|
|
|
path = "/home/tao/sync";
|
|
|
|
|
devices = devs;
|
|
|
|
|
};
|
|
|
|
|
# "work" = {
|
|
|
|
|
# path = "/home/tao/work";
|
|
|
|
|
# devices = devs;
|
|
|
|
|
# };
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-04-04 02:50:30 -07:00
|
|
|
xdg.userDirs = {
|
2024-04-09 10:06:48 -07:00
|
|
|
desktop = "desktop";
|
2024-04-04 02:50:30 -07:00
|
|
|
documents = "documents";
|
|
|
|
|
download = "downloads";
|
|
|
|
|
music = "music";
|
|
|
|
|
pictures = "pictures";
|
|
|
|
|
templates = "templates";
|
|
|
|
|
videos = "videos";
|
|
|
|
|
publicShare = null;
|
|
|
|
|
createDirectories = true;
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2024-01-30 09:41:31 -08:00
|
|
|
home.username = "tao";
|
|
|
|
|
home.homeDirectory = "/home/tao";
|
|
|
|
|
home.stateVersion = "23.11";
|
|
|
|
|
}
|