642 lines
19 KiB
Nix
642 lines
19 KiB
Nix
{ hostname, ... }:
|
|
{
|
|
home-manager.users.user =
|
|
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
HOME = "/home/user";
|
|
in
|
|
{
|
|
home.username = "user";
|
|
home.homeDirectory = HOME;
|
|
home.stateVersion = "25.11";
|
|
home.sessionVariables = {
|
|
QMK_HOME = "${HOME}/var/qmk";
|
|
GOMODCACHE = "${HOME}/.cache/go_mod";
|
|
GOPATH = "${HOME}/.local/share/go";
|
|
};
|
|
|
|
imports = [
|
|
./nvim
|
|
./tmux.nix
|
|
];
|
|
|
|
sops.defaultSopsFile = ../secrets/home.yaml;
|
|
sops.age.keyFile = "/.persist/${HOME}/.config/sops/age/keys.txt";
|
|
sops.secrets."user/ssh/desktop" = {
|
|
path = "${HOME}/.ssh/desktop";
|
|
mode = "0600";
|
|
};
|
|
home.file."/.ssh/desktop.pub".text =
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILABd/iSJ4gn/ystDqNxLJTG0n0z5VIC9YXlmdUfOhHf desktop@icefox.sh";
|
|
sops.secrets."user/ssh/legacy_ed25519" = {
|
|
path = "${HOME}/.ssh/legacy_ed25519";
|
|
mode = "0600";
|
|
};
|
|
home.file."/.ssh/legacy_ed25519.pub".text =
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILkchxtY21PzSLHJ5SoYPrl03+NRzRqznbdCqNyGuOX/ master@michizure.net";
|
|
|
|
dconf.settings = {
|
|
"org/gnome/desktop/interface" = {
|
|
text-scaling-factor = 1.0;
|
|
};
|
|
};
|
|
# xresources.properties = {
|
|
# "Xcursor.size" = 14;
|
|
# # "Xft.dpi" = 144;
|
|
# "Xft.autohint" = 0;
|
|
# "Xft.lcdfilter" = "lcddefault";
|
|
# "Xft.hintstyle" = "hintfull";
|
|
# "Xft.hinting" = 1;
|
|
# "Xft.antialias" = 1;
|
|
# "Xft.rgba" = "rgb";
|
|
# };
|
|
|
|
systemd.user.services.waypipe-socket = {
|
|
Unit = {
|
|
Description = "start waypipe client";
|
|
};
|
|
Install = {
|
|
WantedBy = [ "graphical-session.target" ];
|
|
};
|
|
Service = {
|
|
ExecStart = "${pkgs.waypipe}/bin/waypipe --socket /tmp/waypipe.sock client";
|
|
ExecStartPost = "${pkgs.acl}/bin/setfacl -m u:agent:rw /tmp/waypipe.sock";
|
|
RuntimeDirectory = "waypipe";
|
|
Type = "simple";
|
|
Restart = "on-failure";
|
|
};
|
|
};
|
|
sops.secrets."user/gpg/legacy_fnzr" = { };
|
|
home.activation.importGpgKey = config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
|
if [[ -f "${config.sops.secrets."user/gpg/legacy_fnzr".path}" ]]; then
|
|
${pkgs.gnupg}/bin/gpg --batch --import "${
|
|
config.sops.secrets."user/gpg/legacy_fnzr".path
|
|
}" || true
|
|
echo "YOUR_KEY_FINGERPRINT:6:" | ${pkgs.gnupg}/bin/gpg --import-ownertrust || true
|
|
fi
|
|
'';
|
|
|
|
xdg.configFile."mimeapps.list".force = true;
|
|
|
|
xdg.configFile."containers/containers.conf".text = ''
|
|
[engine]
|
|
compose_warning_logs=false
|
|
events_logger="file"
|
|
|
|
[containers]
|
|
log_driver="k8s-file"
|
|
'';
|
|
|
|
xdg.configFile."lazygit/config.yml".text = lib.generators.toYAML { } {
|
|
gui = {
|
|
theme = {
|
|
selectedLineBgColor = [ "reverse" ];
|
|
};
|
|
};
|
|
};
|
|
|
|
xdg.desktopEntries = {
|
|
google-chrome = {
|
|
name = "Google Chrome";
|
|
genericName = "Web Browser";
|
|
exec = "/run/current-system/sw/bin/google-chrome-stable";
|
|
terminal = false;
|
|
icon = "google-chrome";
|
|
type = "Application";
|
|
categories = [
|
|
"Network"
|
|
"WebBrowser"
|
|
];
|
|
};
|
|
chromium-browser = {
|
|
name = "Chromium";
|
|
genericName = "Web Browser";
|
|
exec = "/run/current-system/sw/bin/chromium";
|
|
terminal = false;
|
|
icon = "chromium";
|
|
type = "Application";
|
|
categories = [
|
|
"Network"
|
|
"WebBrowser"
|
|
];
|
|
};
|
|
chromium-browser-sandbox = {
|
|
name = "Chromium (Sandbox)";
|
|
genericName = "Web Browser";
|
|
exec = "/run/current-system/sw/bin/chromium-sandbox --data-dir=/data/sandbox/chromium/data-dir";
|
|
terminal = false;
|
|
icon = "chromium";
|
|
type = "Application";
|
|
categories = [
|
|
"Network"
|
|
"WebBrowser"
|
|
];
|
|
};
|
|
};
|
|
|
|
xdg.mimeApps = {
|
|
enable = true;
|
|
defaultApplications = {
|
|
# text
|
|
"text/plain" = "nvim.desktop";
|
|
"text/markdown" = "nvim.desktop";
|
|
"text/x-python" = "nvim.desktop";
|
|
"text/x-shellscript" = "nvim.desktop";
|
|
"text/x-csrc" = "nvim.desktop";
|
|
"text/x-c++src" = "nvim.desktop";
|
|
"text/x-java" = "nvim.desktop";
|
|
"text/x-makefile" = "nvim.desktop";
|
|
"application/json" = "nvim.desktop";
|
|
"application/javascript" = "nvim.desktop";
|
|
"application/x-yaml" = "nvim.desktop";
|
|
"application/xml" = "nvim.desktop";
|
|
"text/*" = "nvim.desktop";
|
|
|
|
# browser
|
|
"text/html" = "firefox.desktop";
|
|
"x-scheme-handler/http" = "firefox.desktop";
|
|
"x-scheme-handler/https" = "firefox.desktop";
|
|
"x-scheme-handler/about" = "firefox.desktop";
|
|
"x-scheme-handler/unknown" = "firefox.desktop";
|
|
|
|
# swayimg
|
|
"image/jpeg" = "swayimg.desktop";
|
|
"image/jpg" = "swayimg.desktop";
|
|
"image/png" = "swayimg.desktop";
|
|
"image/gif" = "swayimg.desktop";
|
|
"image/webp" = "swayimg.desktop";
|
|
"image/bmp" = "swayimg.desktop";
|
|
"image/tiff" = "swayimg.desktop";
|
|
"image/svg+xml" = "swayimg.desktop";
|
|
"image/x-icon" = "swayimg.desktop";
|
|
"image/*" = "swayimg.desktop";
|
|
|
|
# pdf & readers
|
|
"application/pdf" = "org.pwmt.zathura.desktop";
|
|
"application/postscript" = "org.pwmt.zathura.desktop";
|
|
"image/vnd.djvu" = "org.pwmt.zathura.desktop";
|
|
"application/x-cbr" = "org.pwmt.zathura.desktop";
|
|
"application/x-cbz" = "org.pwmt.zathura.desktop";
|
|
"application/x-cb7" = "org.pwmt.zathura.desktop";
|
|
"application/x-cbt" = "org.pwmt.zathura.desktop";
|
|
"application/epub+zip" = "org.pwmt.zathura.desktop";
|
|
|
|
# video
|
|
"video/mp4" = "mpv.desktop";
|
|
"video/x-matroska" = "mpv.desktop";
|
|
"video/webm" = "mpv.desktop";
|
|
"video/mpeg" = "mpv.desktop";
|
|
"video/x-msvideo" = "mpv.desktop";
|
|
"video/quicktime" = "mpv.desktop";
|
|
"video/x-flv" = "mpv.desktop";
|
|
"video/3gpp" = "mpv.desktop";
|
|
"video/ogg" = "mpv.desktop";
|
|
"video/*" = "mpv.desktop";
|
|
|
|
# audio
|
|
"audio/mpeg" = "mpv.desktop";
|
|
"audio/mp4" = "mpv.desktop";
|
|
"audio/x-wav" = "mpv.desktop";
|
|
"audio/flac" = "mpv.desktop";
|
|
"audio/ogg" = "mpv.desktop";
|
|
"audio/x-vorbis+ogg" = "mpv.desktop";
|
|
"audio/x-opus+ogg" = "mpv.desktop";
|
|
"audio/aac" = "mpv.desktop";
|
|
"audio/x-m4a" = "mpv.desktop";
|
|
"audio/webm" = "mpv.desktop";
|
|
"audio/*" = "mpv.desktop";
|
|
};
|
|
};
|
|
|
|
xdg.userDirs = {
|
|
enable = true;
|
|
createDirectories = true;
|
|
setSessionVariables = true;
|
|
|
|
download = "${HOME}/downloads";
|
|
documents = "${HOME}/documents";
|
|
desktop = "${HOME}/desktop";
|
|
pictures = "${HOME}/pictures";
|
|
music = "${HOME}/music";
|
|
videos = "${HOME}/videos";
|
|
templates = "${HOME}";
|
|
publicShare = "${HOME}";
|
|
|
|
extraConfig = {
|
|
SCREENSHOTS = "$HOME/pictures/screenshots";
|
|
XDG_CACHE_HOME = "$HOME/.cache";
|
|
};
|
|
};
|
|
|
|
programs = {
|
|
dank-material-shell.enable = true;
|
|
ssh = {
|
|
enable = true;
|
|
enableDefaultConfig = false;
|
|
matchBlocks = {
|
|
"*" = {
|
|
serverAliveInterval = 60;
|
|
serverAliveCountMax = 3;
|
|
};
|
|
"github.com" = {
|
|
identityFile = config.sops.secrets."user/ssh/legacy_ed25519".path;
|
|
};
|
|
"icefox.sh" = {
|
|
user = "git";
|
|
identityFile = config.sops.secrets."user/ssh/desktop".path;
|
|
};
|
|
};
|
|
};
|
|
delta = {
|
|
enable = true;
|
|
options = {
|
|
navigate = true;
|
|
line-numbers = true;
|
|
side-by-side = true;
|
|
};
|
|
enableGitIntegration = true;
|
|
};
|
|
git = {
|
|
enable = true;
|
|
lfs.enable = true;
|
|
signing = {
|
|
key = "${HOME}/.ssh/desktop.pub";
|
|
signByDefault = true;
|
|
};
|
|
includes = [
|
|
{
|
|
condition = "gitdir:~/work/";
|
|
contents = {
|
|
user = {
|
|
name = "felipematos";
|
|
email = "5471818+fnzr@users.noreply.github.com";
|
|
signingkey = "${HOME}/.ssh/desktop.pub";
|
|
};
|
|
};
|
|
}
|
|
];
|
|
settings = {
|
|
user = {
|
|
email = "felipe@icefox.sh";
|
|
name = "icefox";
|
|
signingkey = "${HOME}/.ssh/desktop.pub";
|
|
};
|
|
gpg.format = "ssh";
|
|
commit.gpgsign = true;
|
|
tag.gpgsign = true;
|
|
core = {
|
|
editor = "nvim";
|
|
whitespace = "fix,only-indent-error,trailing-space,space-before-tab";
|
|
quotepath = false;
|
|
};
|
|
diff = {
|
|
algorithm = "histogram";
|
|
renames = "copies";
|
|
tool = "nvim";
|
|
};
|
|
difftool = {
|
|
prompt = false;
|
|
nvim.cmd = "nvim -d $LOCAL $REMOTE";
|
|
};
|
|
merge = {
|
|
conflictstyle = "zdiff3";
|
|
tool = "nvim";
|
|
};
|
|
mergetool = {
|
|
prompt = false;
|
|
keepBackup = false;
|
|
nvim.cmd = "nvim -d $LOCAL $REMOTE $MERGED -c 'wincmd w' -c 'wincmd J'";
|
|
};
|
|
init = {
|
|
defaultBranch = "master";
|
|
};
|
|
push = {
|
|
autoSetupRemote = true;
|
|
default = "current";
|
|
};
|
|
pull = {
|
|
rebase = true;
|
|
};
|
|
fetch = {
|
|
prune = true;
|
|
};
|
|
help = {
|
|
autocorrect = "prompt";
|
|
};
|
|
safe = {
|
|
directory = [
|
|
"/home/agent/*"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
xrdb
|
|
(writeShellScriptBin "agent" ''
|
|
machinectl shell agent@ ${waypipe}/bin/waypipe --socket /run/waypipe.sock server fish
|
|
'')
|
|
(writeShellApplication {
|
|
name = "tmux-sessionizer";
|
|
runtimeInputs = [
|
|
tmux
|
|
fzf
|
|
];
|
|
text = builtins.readFile ./bin/tmux-sessionizer;
|
|
})
|
|
];
|
|
custom.tmux.enable = true;
|
|
custom.neovim = {
|
|
enable = true;
|
|
colorscheme = "rose-pine-moon";
|
|
hostname = hostname;
|
|
};
|
|
|
|
programs.fish = {
|
|
enable = true;
|
|
plugins = [
|
|
{
|
|
name = "puffer";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "nickeb96";
|
|
repo = "puffer-fish";
|
|
rev = "83174b0";
|
|
sha256 = "sha256-Dhx5+XRxJvlhdnFyimNxFyFiASrGU4ZwyefsDwtKnSg=";
|
|
};
|
|
}
|
|
];
|
|
|
|
interactiveShellInit = ''
|
|
set fish_greeting
|
|
bind ctrl-space ""
|
|
'';
|
|
};
|
|
|
|
programs.starship = {
|
|
enable = true;
|
|
};
|
|
|
|
programs.zoxide = {
|
|
enable = true;
|
|
enableFishIntegration = true;
|
|
};
|
|
|
|
programs.ghostty = {
|
|
enable = true;
|
|
settings = {
|
|
theme = "Rose Pine Moon";
|
|
font-family = [
|
|
"MonaspiceNe Nerd Font Mono"
|
|
"Fire Code Symbol"
|
|
];
|
|
font-size = "10";
|
|
font-feature = "+calt, +liga, +dlig, +ss01, +ss02, +ss03, +ss04, +ss05, +ss06, +ss07, +ss08, +ss09, +ss10";
|
|
keybind = [
|
|
"shift+escape=unbind"
|
|
# "ctrl+c=copy_to_clipboard"
|
|
"ctrl+v=paste_from_clipboard"
|
|
];
|
|
};
|
|
enableFishIntegration = true;
|
|
systemd.enable = true;
|
|
};
|
|
|
|
programs.firefox = {
|
|
enable = true;
|
|
package = pkgs.firefox;
|
|
configPath = ".mozilla/firefox";
|
|
nativeMessagingHosts = [
|
|
pkgs.browserpass
|
|
pkgs.tridactyl-native
|
|
];
|
|
profiles.default = {
|
|
id = 0;
|
|
name = "default";
|
|
isDefault = true;
|
|
containersForce = true;
|
|
userChrome = ''
|
|
#TabsToolbar {
|
|
visibility: collapse;
|
|
}
|
|
'';
|
|
settings = {
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
|
};
|
|
# settings = {
|
|
# "tabopencontaineraware" = true;
|
|
# };
|
|
containers = {
|
|
personal = {
|
|
id = 1;
|
|
color = "blue";
|
|
icon = "fingerprint";
|
|
};
|
|
google = {
|
|
id = 2;
|
|
color = "pink";
|
|
icon = "fence";
|
|
};
|
|
london = {
|
|
id = 3;
|
|
color = "orange";
|
|
icon = "tree";
|
|
};
|
|
research = {
|
|
id = 4;
|
|
color = "green";
|
|
icon = "tree";
|
|
};
|
|
chill = {
|
|
id = 5;
|
|
color = "turquoise";
|
|
icon = "chill";
|
|
};
|
|
work = {
|
|
id = 6;
|
|
color = "red";
|
|
icon = "briefcase";
|
|
};
|
|
};
|
|
|
|
search = {
|
|
force = true;
|
|
default = "ddg";
|
|
order = [
|
|
"ddg"
|
|
"Kagi"
|
|
"MyNixOS"
|
|
"PHP"
|
|
];
|
|
engines = {
|
|
"PHP" = {
|
|
urls = [
|
|
{
|
|
template = "https://www.php.net/search.php";
|
|
params = [
|
|
{
|
|
name = "pattern";
|
|
value = "{searchTerms}";
|
|
}
|
|
];
|
|
}
|
|
];
|
|
definedAliases = [ "php" ];
|
|
};
|
|
"MyNixOS" = {
|
|
urls = [
|
|
{
|
|
template = "https://mynixos.com/search";
|
|
params = [
|
|
{
|
|
name = "q";
|
|
value = "{searchTerms}";
|
|
}
|
|
];
|
|
}
|
|
];
|
|
definedAliases = [ "nix" ];
|
|
};
|
|
"Kagi" = {
|
|
urls = [ { template = "https://kagi.com/search?q={searchTerms}"; } ];
|
|
icon = "https://kagi.com/favicon.ico";
|
|
updateInterval = 24 * 60 * 60 * 1000;
|
|
definedAliases = [ "kg" ];
|
|
};
|
|
"ddg" = {
|
|
metaData.alias = "dd";
|
|
};
|
|
"google".metaData.hidden = true;
|
|
"bing".metaData.hidden = true;
|
|
"amazondotcom-us".metaData.hidden = true;
|
|
"ebay".metaData.hidden = true;
|
|
};
|
|
};
|
|
|
|
# settings = {
|
|
# "layout.css.prefers-color-scheme.content-override" = 2;
|
|
# "privacy.resistFingerprinting" = true;
|
|
# "privacy.resistFingerprinting.exemptions" = "prefers-color-scheme";
|
|
# "browser.theme.dark-private-windows" = true;
|
|
# };
|
|
extensions = {
|
|
packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
ublock-origin
|
|
tridactyl
|
|
gopass-bridge
|
|
multi-account-containers
|
|
foxyproxy-standard
|
|
];
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.librewolf = {
|
|
enable = true;
|
|
package = pkgs.librewolf;
|
|
|
|
nativeMessagingHosts = [
|
|
pkgs.browserpass
|
|
pkgs.tridactyl-native
|
|
];
|
|
profiles.default = {
|
|
id = 0;
|
|
name = "default";
|
|
isDefault = true;
|
|
containersForce = true;
|
|
settings = {
|
|
"tabopencontaineraware" = true;
|
|
};
|
|
containers = {
|
|
personal = {
|
|
id = 1;
|
|
color = "blue";
|
|
icon = "fingerprint";
|
|
};
|
|
google = {
|
|
id = 2;
|
|
color = "pink";
|
|
icon = "fence";
|
|
};
|
|
london = {
|
|
id = 3;
|
|
color = "orange";
|
|
icon = "briefcase";
|
|
};
|
|
research = {
|
|
id = 4;
|
|
color = "green";
|
|
icon = "tree";
|
|
};
|
|
chill = {
|
|
id = 5;
|
|
color = "turquoise";
|
|
icon = "chill";
|
|
};
|
|
};
|
|
|
|
search = {
|
|
force = true;
|
|
default = "ddg";
|
|
order = [
|
|
"ddg"
|
|
"Kagi"
|
|
"NixOS"
|
|
];
|
|
engines = {
|
|
"Kagi" = {
|
|
urls = [ { template = "https://kagi.com/search?q={searchTerms}"; } ];
|
|
icon = "https://kagi.com/favicon.ico";
|
|
updateInterval = 24 * 60 * 60 * 1000;
|
|
definedAliases = [ "kg" ];
|
|
};
|
|
"nx" = {
|
|
urls = [ { template = "https://mynixos.com/search?q={searchTerms}"; } ];
|
|
icon = "https://mynixos.com/favicon.ico";
|
|
updateInterval = 24 * 60 * 60 * 1000;
|
|
definedAliases = [ "nx" ];
|
|
};
|
|
"ddg" = {
|
|
metaData.alias = "dd";
|
|
};
|
|
"google".metaData.hidden = true;
|
|
"bing".metaData.hidden = true;
|
|
"amazondotcom-us".metaData.hidden = true;
|
|
"ebay".metaData.hidden = true;
|
|
};
|
|
};
|
|
|
|
settings = {
|
|
"layout.css.prefers-color-scheme.content-override" = 2;
|
|
"privacy.resistFingerprinting" = false;
|
|
"privacy.resistFingerprinting.exemptions" = "prefers-color-scheme";
|
|
"browser.theme.dark-private-windows" = true;
|
|
};
|
|
extensions = {
|
|
packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
ublock-origin
|
|
tridactyl
|
|
gopass-bridge
|
|
multi-account-containers
|
|
foxyproxy-standard
|
|
];
|
|
# force = true;
|
|
# settings."uBlock0@raymondhill.net".settings = {
|
|
# selectedFilterLists = [
|
|
# "ublock-filters"
|
|
# "ublock-badware"
|
|
# "ublock-privacy"
|
|
# "ublock-unbreak"
|
|
# "ublock-quick-fixes"
|
|
# ];
|
|
# };
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|