some reorganizing
This commit is contained in:
parent
df9e8ae8bf
commit
113e015135
182 changed files with 443 additions and 449 deletions
9
home/profiles/default.nix
Normal file
9
home/profiles/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
home = {
|
||||
username = "xun";
|
||||
homeDirectory = "/home/xun";
|
||||
extraOutputsToInstall = ["doc" "devdoc"];
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
9
home/profiles/develop/common.nix
Normal file
9
home/profiles/develop/common.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
cmake
|
||||
clang
|
||||
gnumake
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
}
|
3
home/profiles/develop/devenv.nix
Normal file
3
home/profiles/develop/devenv.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [devenv];
|
||||
}
|
3
home/profiles/develop/docs.nix
Normal file
3
home/profiles/develop/docs.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.man.generateCaches = true;
|
||||
}
|
3
home/profiles/develop/langs/c.nix
Normal file
3
home/profiles/develop/langs/c.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [clang-tools buckle gdb lldb];
|
||||
}
|
9
home/profiles/develop/langs/haskell.nix
Normal file
9
home/profiles/develop/langs/haskell.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
ghc
|
||||
haskell-language-server
|
||||
cabal-install
|
||||
hlint
|
||||
haskellPackages.retrie
|
||||
];
|
||||
}
|
6
home/profiles/develop/langs/lua.nix
Normal file
6
home/profiles/develop/langs/lua.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
stylua
|
||||
lua-language-server
|
||||
];
|
||||
}
|
3
home/profiles/develop/langs/nix.nix
Normal file
3
home/profiles/develop/langs/nix.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [nil nixd alejandra nixfmt-rfc-style];
|
||||
}
|
5
home/profiles/develop/langs/rust.nix
Normal file
5
home/profiles/develop/langs/rust.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
rustup
|
||||
];
|
||||
}
|
6
home/profiles/develop/langs/uiua.nix
Normal file
6
home/profiles/develop/langs/uiua.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
(uiua.overrideAttrs {buildFeatures = "full";})
|
||||
uiua386
|
||||
];
|
||||
}
|
3
home/profiles/develop/langs/zig.nix
Normal file
3
home/profiles/develop/langs/zig.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [zig zls];
|
||||
}
|
3
home/profiles/develop/tools.nix
Normal file
3
home/profiles/develop/tools.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [tokei];
|
||||
}
|
11
home/profiles/editors/emacs.nix
Normal file
11
home/profiles/editors/emacs.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{pkgs, ...}: {
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacs29-pgtk;
|
||||
extraPackages = e: [
|
||||
e.vterm
|
||||
pkgs.texlive.combined.scheme-medium
|
||||
pkgs.sqlite
|
||||
];
|
||||
};
|
||||
}
|
3
home/profiles/editors/jetbrains/android-studio.nix
Normal file
3
home/profiles/editors/jetbrains/android-studio.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [android-studio];
|
||||
}
|
3
home/profiles/editors/jetbrains/rider.nix
Normal file
3
home/profiles/editors/jetbrains/rider.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs.jetbrains; [rider];
|
||||
}
|
8
home/profiles/editors/nvim.nix
Normal file
8
home/profiles/editors/nvim.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
home.packages = [inputs.nvim-nix.packages.${pkgs.system}.default];
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../editors/emacs.nix
|
||||
../../editors/nvim.nix
|
||||
|
||||
../../terminal/shell/zsh.nix
|
||||
../../terminal/programs/xdg.nix
|
||||
../../terminal/programs/direnv.nix
|
||||
../../terminal/programs/comma.nix
|
||||
../../terminal/programs/tmux.nix
|
||||
../../terminal/programs/irssi.nix
|
||||
|
||||
../../develop/langs/nix.nix
|
||||
../../develop/tools.nix
|
||||
../../develop/devenv.nix
|
||||
|
||||
../../terminal/programs/git.nix
|
||||
../../terminal/programs/github.nix
|
||||
../../terminal/programs/lazygit.nix
|
||||
];
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
{
|
||||
self,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./defaults.nix
|
||||
|
||||
../../secrets
|
||||
|
||||
../../terminal/shell/zsh.nix
|
||||
|
||||
../../terminal/programs/xdg.nix
|
||||
../../terminal/programs/direnv.nix
|
||||
../../terminal/programs/tmux.nix
|
||||
../../terminal/programs/comma.nix
|
||||
../../terminal/programs/zoxide.nix
|
||||
../../terminal/programs/tdf.nix
|
||||
../../terminal/programs/irssi.nix
|
||||
../../terminal/programs/git.nix
|
||||
../../terminal/programs/github.nix
|
||||
../../terminal/programs/lazygit.nix
|
||||
|
||||
../../editors/emacs.nix
|
||||
../../editors/nvim.nix
|
||||
../../editors/jetbrains
|
||||
../../editors/jetbrains/android-studio.nix
|
||||
|
||||
../../programs/browsers/firefox
|
||||
../../programs/browsers/tor.nix
|
||||
../../programs/browsers/chromium.nix
|
||||
|
||||
../../terminal/emulator/wezterm.nix
|
||||
../../terminal/emulator/foot.nix
|
||||
|
||||
# desktop
|
||||
../../programs/desktop
|
||||
../../programs/desktop/sway
|
||||
|
||||
# development
|
||||
../../develop/common.nix
|
||||
../../develop/tools.nix
|
||||
../../develop/docs.nix
|
||||
../../develop/devenv.nix
|
||||
|
||||
../../develop/langs/haskell.nix
|
||||
../../develop/langs/rust.nix
|
||||
../../develop/langs/uiua.nix
|
||||
../../develop/langs/nix.nix
|
||||
../../develop/langs/zig.nix
|
||||
../../develop/langs/lua.nix
|
||||
../../develop/langs/c.nix
|
||||
|
||||
# programs
|
||||
../../programs/misc/keepassxc.nix
|
||||
../../programs/misc/discord.nix
|
||||
../../programs/misc/element.nix
|
||||
../../programs/misc/obs.nix
|
||||
../../programs/misc/krita.nix
|
||||
../../programs/misc/foliate.nix
|
||||
../../programs/misc/blender.nix
|
||||
../../programs/misc/obsidian.nix
|
||||
../../programs/misc/pwvucontrol.nix
|
||||
../../programs/misc/qpwgraph.nix
|
||||
../../programs/misc/libreoffice.nix
|
||||
../../programs/music/puddletag.nix
|
||||
../../programs/music/picard.nix
|
||||
../../programs/music/cmus.nix
|
||||
../../programs/media/mpv.nix
|
||||
../../programs/media/jellyfin.nix
|
||||
|
||||
# gaming
|
||||
../../programs/games/lutris.nix
|
||||
../../programs/games/heroic.nix
|
||||
../../programs/games/minecraft.nix
|
||||
../../programs/games/roblox.nix
|
||||
../../programs/games/krunker.nix
|
||||
|
||||
../../services/playerctl.nix
|
||||
../../services/polkit-agent.nix
|
||||
../../services/udiskie.nix # although i dont need this for usb memory, it is quite convenient for flashing qmk
|
||||
];
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = {
|
||||
name = "gtk3";
|
||||
package = [
|
||||
pkgs.libsForQt5.qtstyleplugins
|
||||
pkgs.qt6.qtbase
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"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";
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables.DEFAULT_BROWSER = lib.getExe pkgs.firefox;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
settings = [
|
||||
{
|
||||
profile.name = "default";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "DP-3";
|
||||
mode = "1920x1080@165Hz";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "HDMI-A-1";
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
9
home/profiles/programs/browsers/chromium.nix
Normal file
9
home/profiles/programs/browsers/chromium.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
# package = pkgs.ungoogled-chromium;
|
||||
extensions = [
|
||||
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # ublock origin
|
||||
];
|
||||
};
|
||||
}
|
139
home/profiles/programs/browsers/firefox/default.nix
Normal file
139
home/profiles/programs/browsers/firefox/default.nix
Normal file
|
@ -0,0 +1,139 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./search-engines.nix
|
||||
];
|
||||
xdg.configFile."tridactyl/tridactylrc" = {
|
||||
text = ''
|
||||
unbind <C-e>
|
||||
unbind <C-b>
|
||||
unbind <C-a> # why would you ever want to increment the current url??
|
||||
bind J tabnext
|
||||
bind K tabprev
|
||||
|
||||
set smoothscroll true
|
||||
set newtab about:blank
|
||||
set modeindicator false
|
||||
'';
|
||||
};
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox.override {
|
||||
nativeMessagingHosts = with pkgs; [
|
||||
tridactyl-native
|
||||
keepassxc
|
||||
];
|
||||
};
|
||||
profiles.xun = {
|
||||
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
|
||||
ublock-origin
|
||||
# (lib.mkIf (config.xun.desktop.colorscheme == "dark") darkreader)
|
||||
darkreader
|
||||
sponsorblock
|
||||
tridactyl
|
||||
translate-web-pages
|
||||
cookie-quick-manager
|
||||
istilldontcareaboutcookies
|
||||
sidebery
|
||||
mal-sync
|
||||
(lib.mkIf (builtins.elem pkgs.keepassxc config.home.packages) keepassxc-browser)
|
||||
#(buildFirefoxXpiAddon rec {
|
||||
# pname = "roseal";
|
||||
# version = "1.3.44";
|
||||
# addonId = "{f4f4223a-ff30-4961-b9c0-6a71b7a32aaf}";
|
||||
# url = "https://addons.mozilla.org/firefox/downloads/file/4323142/roseal-${version}.xpi";
|
||||
# sha256 = "sha256-Qvd/EUMsSqYCvwUuxjM/ejnn7/TRuhyD82/Azu0dAfE=";
|
||||
# meta = {};
|
||||
#})
|
||||
];
|
||||
userChrome = builtins.readFile ./userChrome.css;
|
||||
# extraConfig = let
|
||||
# inherit (config.xun.desktop) colorscheme;
|
||||
# in
|
||||
# lib.mkIf (colorscheme != null)
|
||||
# "browser.management.setEnabled(\"${
|
||||
# if colorscheme == "dark"
|
||||
# then "{30756de5-da3b-43c4-8b35-1db7bb01680a}"
|
||||
# else if colorscheme == "light"
|
||||
# then "firefox-compact-light@mozilla.org"
|
||||
# else null
|
||||
# }\", true);";
|
||||
settings = {
|
||||
"browser.display.use_system_colors" = true; # about:blank colour match colourscheme
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; # enable userChrome
|
||||
"browser.tabs.inTitleBar" = "0"; # use system title bar
|
||||
"browser.newtabpage.enabled" = false;
|
||||
"browser.newtab.url" = "about:blank";
|
||||
"general.autoScroll" = true; # mmb scroll mode
|
||||
|
||||
"browser.newtabpage.enhanced" = false;
|
||||
"browser.newtabpage.introShown" = true;
|
||||
"browser.newtab.preload" = false;
|
||||
"browser.newtabpage.directory.ping" = "";
|
||||
"browser.newtabpage.directory.source" = "data:text/plain,{}";
|
||||
# Reduce search engine noise in the urlbar's completion window. The
|
||||
# shortcuts and suggestions will still work, but Firefox won't clutter
|
||||
# its UI with reminders that they exist.
|
||||
"browser.urlbar.suggest.searches" = false;
|
||||
"browser.urlbar.shortcuts.bookmarks" = false;
|
||||
"browser.urlbar.shortcuts.history" = false;
|
||||
"browser.urlbar.shortcuts.tabs" = false;
|
||||
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
||||
"browser.urlbar.speculativeConnect.enabled" = false;
|
||||
|
||||
"browser.download.useDownloadDir" = false;
|
||||
"signon.rememberSignons" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
# Show whole URL in address bar
|
||||
"browser.urlbar.trimURLs" = false;
|
||||
# Disable some not so useful functionality.
|
||||
"browser.disableResetPrompt" = true; # "Looks like you haven't started Firefox in a while."
|
||||
"browser.onboarding.enabled" = false; # "New to Firefox? Let's get started!" tour
|
||||
"browser.aboutConfig.showWarning" = false; # Warning when opening about:config
|
||||
# "media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
|
||||
"extensions.autoDisableScopes" = "0"; # Automatically enable extensions
|
||||
# "extensions.pocket.enabled" = true;
|
||||
"extensions.shield-recipe-client.enabled" = false;
|
||||
#"reader.parse-on-load.enabled" = false; # "reader view"
|
||||
|
||||
# disable telemetry
|
||||
# https://github.com/hlissner/dotfiles/blob/089f1a9da9018df9e5fc200c2d7bef70f4546026/modules/desktop/browsers/firefox.nix
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.server" = "data:,";
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"toolkit.telemetry.coverage.opt-out" = true;
|
||||
"toolkit.coverage.opt-out" = true;
|
||||
"toolkit.coverage.endpoint.base" = "";
|
||||
"experiments.supported" = false;
|
||||
"experiments.enabled" = false;
|
||||
"experiments.manifest.uri" = "";
|
||||
"browser.ping-centre.telemetry" = false;
|
||||
"app.normandy.enabled" = false;
|
||||
"app.normandy.api_url" = "";
|
||||
"app.shield.optoutstudies.enabled" = false;
|
||||
"datareporting.healthreport.uploadEnabled" = false;
|
||||
"datareporting.healthreport.service.enabled" = false;
|
||||
"datareporting.policy.dataSubmissionEnabled" = false;
|
||||
# Disable crash reports
|
||||
"breakpad.reportURL" = "";
|
||||
"browser.tabs.crashReporting.sendReport" = false;
|
||||
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
|
||||
|
||||
# Disable Form autofill
|
||||
# https://wiki.mozilla.org/Firefox/Features/Form_Autofill
|
||||
"browser.formfill.enable" = false;
|
||||
"extensions.formautofill.addresses.enabled" = false;
|
||||
"extensions.formautofill.available" = "off";
|
||||
"extensions.formautofill.creditCards.available" = false;
|
||||
"extensions.formautofill.creditCards.enabled" = false;
|
||||
"extensions.formautofill.heuristics.enabled" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
111
home/profiles/programs/browsers/firefox/search-engines.nix
Normal file
111
home/profiles/programs/browsers/firefox/search-engines.nix
Normal file
|
@ -0,0 +1,111 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.firefox.profiles.xun.search = let
|
||||
inherit (lib) attrsToList singleton;
|
||||
in {
|
||||
force = true;
|
||||
default = "Brave";
|
||||
order = [
|
||||
"Brave"
|
||||
"Google"
|
||||
"DuckDuckGo"
|
||||
];
|
||||
|
||||
engines = {
|
||||
"Home Manager" = {
|
||||
urls = singleton {
|
||||
template = "https://home-manager-options.extranix.com";
|
||||
params = attrsToList {
|
||||
query = "{searchTerms}";
|
||||
release = "master";
|
||||
};
|
||||
};
|
||||
iconUpdateURL = "https://home-manager-options.extranix.com/images/favicon.png";
|
||||
definedAliases = ["@hm"];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = singleton {
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = attrsToList {
|
||||
query = "{searchTerms}";
|
||||
channel = "unstable";
|
||||
};
|
||||
};
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@np"];
|
||||
};
|
||||
"NixOS Options" = {
|
||||
urls = singleton {
|
||||
template = "https://search.nixos.org/options";
|
||||
params = attrsToList {
|
||||
query = "{searchTerms}";
|
||||
channel = "unstable";
|
||||
};
|
||||
};
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@no"];
|
||||
};
|
||||
"GitHub" = {
|
||||
urls = singleton {
|
||||
template = "https://github.com/search";
|
||||
params = attrsToList {
|
||||
q = "{searchTerms}";
|
||||
type = "code";
|
||||
};
|
||||
};
|
||||
iconUpdateURL = "https://github.githubassets.com/favicons/favicon-dark.svg";
|
||||
definedAliases = ["@gh"];
|
||||
};
|
||||
"GitHub Repos" = {
|
||||
urls = singleton {
|
||||
template = "https://github.com/search";
|
||||
params = attrsToList {
|
||||
q = "{searchTerms}";
|
||||
type = "repositories";
|
||||
};
|
||||
};
|
||||
iconUpdateURL = "https://github.githubassets.com/favicons/favicon-dark.svg";
|
||||
definedAliases = ["@ghr"];
|
||||
};
|
||||
"GitHub Nix" = {
|
||||
urls = singleton {
|
||||
template = "https://github.com/search";
|
||||
params = attrsToList {
|
||||
"q" = "lang:nix {searchTerms}";
|
||||
"type" = "code";
|
||||
};
|
||||
};
|
||||
iconUpdateURL = "https://github.githubassets.com/favicons/favicon-dark.svg";
|
||||
definedAliases = ["@ghn"];
|
||||
};
|
||||
"Brave" = {
|
||||
urls = singleton {
|
||||
template = "https://search.brave.com/search";
|
||||
params = attrsToList {
|
||||
"q" = "{searchTerms}";
|
||||
};
|
||||
};
|
||||
iconUpdateURL = "https://brave.com/static-assets/images/brave-favicon.png";
|
||||
definedAliases = ["@b"];
|
||||
};
|
||||
"YouTube" = {
|
||||
urls = singleton {
|
||||
template = "https://www.youtube.com/results";
|
||||
params = attrsToList {
|
||||
"search_query" = "{searchTerms}";
|
||||
};
|
||||
};
|
||||
iconUpdateURL = "https://www.youtube.com/favicon.ico";
|
||||
definedAliases = ["@yt"];
|
||||
};
|
||||
|
||||
"Google".metaData.alias = "@go";
|
||||
"DuckDuckGo".metaData.alias = "@ddg";
|
||||
"Wikipedia".metaData.alias = "@wiki";
|
||||
"Bing".metaData.alias = "@bi";
|
||||
};
|
||||
};
|
||||
}
|
19
home/profiles/programs/browsers/firefox/userChrome.css
Normal file
19
home/profiles/programs/browsers/firefox/userChrome.css
Normal file
|
@ -0,0 +1,19 @@
|
|||
/* Hide sidebar header */
|
||||
#sidebar-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hide tab bar */
|
||||
#TabsToolbar {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
/* urlbar same color as background */
|
||||
#urlbar-background, #searchbar {
|
||||
background-color: var(--toolbar-bgcolor) !important;
|
||||
}
|
||||
|
||||
/* Hide tiny strip below the main top bar */
|
||||
#navigator-toolbox {
|
||||
border-bottom: none !important;
|
||||
}
|
7
home/profiles/programs/browsers/tor.nix
Normal file
7
home/profiles/programs/browsers/tor.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
(tor-browser.override {
|
||||
mediaSupport = false;
|
||||
})
|
||||
];
|
||||
}
|
38
home/profiles/programs/desktop/common/fuzzel.nix
Normal file
38
home/profiles/programs/desktop/common/fuzzel.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
colors = {
|
||||
dark = {
|
||||
background = "#181818ff";
|
||||
text = "#a4c6d9ff";
|
||||
match = "#ae61b5ff";
|
||||
border = "#feafffff";
|
||||
selection = "#242424ff";
|
||||
selection-text = "#ffffffff";
|
||||
selection-match = "#fac1ffff";
|
||||
};
|
||||
light = {
|
||||
background = "#ffffffff";
|
||||
text = "#000000ff";
|
||||
match = "#a60000ff";
|
||||
border = "#000000ff";
|
||||
selection = "#bfbfbfff";
|
||||
selection-text = "#000000ff";
|
||||
selection-match = "#2544bbff";
|
||||
};
|
||||
};
|
||||
in {
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
terminal = "${lib.getExe pkgs.foot}";
|
||||
layer = "overlay";
|
||||
};
|
||||
# colors = colors."${config.xun.desktop.colorscheme}";
|
||||
};
|
||||
};
|
||||
}
|
5
home/profiles/programs/desktop/common/wl-clipboard.nix
Normal file
5
home/profiles/programs/desktop/common/wl-clipboard.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
];
|
||||
}
|
5
home/profiles/programs/desktop/common/wob.nix
Normal file
5
home/profiles/programs/desktop/common/wob.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.wob = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
16
home/profiles/programs/desktop/default.nix
Normal file
16
home/profiles/programs/desktop/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{pkgs, ...}: {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
config = {
|
||||
preferred = {
|
||||
default = "gtk";
|
||||
"org.freedesktop.impl.portal.Screenshot" = "wlr";
|
||||
"org.freedesktop.impl.portal.Screencast" = "wlr";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
150
home/profiles/programs/desktop/sway/default.nix
Normal file
150
home/profiles/programs/desktop/sway/default.nix
Normal file
|
@ -0,0 +1,150 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../common/fuzzel.nix
|
||||
../common/wob.nix
|
||||
../common/wl-clipboard.nix
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
services.cliphist = {
|
||||
enable = true;
|
||||
systemdTarget = "sway-session.target";
|
||||
extraOptions = ["-max-items" "150"];
|
||||
};
|
||||
|
||||
# notification center
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
positionX = "right";
|
||||
positionY = "top";
|
||||
layer = "overlay";
|
||||
control-center-layer = "top";
|
||||
layer-shell = true;
|
||||
cssPriority = "application";
|
||||
control-center-margin-top = 0;
|
||||
control-center-margin-bottom = 0;
|
||||
control-center-margin-right = 0;
|
||||
control-center-margin-left = 0;
|
||||
notification-2fa-action = true;
|
||||
notification-inline-replies = false;
|
||||
notification-icon-size = 64;
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
checkConfig = false; # doesnt work with custom wallpaper
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland,x11,windows
|
||||
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
'';
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
output = {
|
||||
"DP-3" = {
|
||||
mode = "1920x1080@165Hz";
|
||||
position = "1920 0";
|
||||
allow_tearing = "yes";
|
||||
};
|
||||
"HDMI-A-1" = {
|
||||
position = "0 0";
|
||||
};
|
||||
};
|
||||
# output = {
|
||||
# "*".bg = "${config.xdg.userDirs.pictures}/wallpaper fill";
|
||||
# };
|
||||
input."type:keyboard".xkb_layout = osConfig.services.xserver.xkb.layout;
|
||||
bars = []; # i use waybar instead
|
||||
window = {
|
||||
titlebar = false;
|
||||
};
|
||||
menu = "${lib.getExe pkgs.fuzzel}";
|
||||
keybindings = let
|
||||
mod = config.wayland.windowManager.sway.config.modifier;
|
||||
wobVolume = "${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_SINK@ | awk '{print $2*100}' > $XDG_RUNTIME_DIR/wob.sock";
|
||||
setVolume = limit: amount: "${pkgs.wireplumber}/bin/wpctl set-volume -l ${limit} @DEFAULT_AUDIO_SINK@ ${amount}";
|
||||
monitorId = pkgs.writers.writeBash "monitor-id" ''
|
||||
swaymsg -t get_outputs \
|
||||
| ${lib.getExe pkgs.jq} -r '.[] | select (.focused == true).name' \
|
||||
| ${lib.getExe pkgs.perl} -ne '$s=0;for(split//){$s+=ord}print"$s"'
|
||||
'';
|
||||
pauseApp = pkgs.writers.writeBash "pause-app" ''
|
||||
set -e
|
||||
pid=$(swaymsg -t get_tree \
|
||||
| ${lib.getExe pkgs.jq} -re '.. | select (.type? == "con" and .focused? == true).pid')
|
||||
|
||||
if [ $(cat "/proc/$pid/wchan") == "do_signal_stop" ]; then
|
||||
kill -s SIGCONT $pid
|
||||
else
|
||||
kill -s SIGSTOP $pid
|
||||
fi
|
||||
'';
|
||||
dir = {
|
||||
inherit (config.wayland.windowManager.sway.config) up down left right;
|
||||
};
|
||||
in
|
||||
lib.mkOptionDefault (
|
||||
{
|
||||
"${mod}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t";
|
||||
"${mod}+Shift+v" = "exec ${lib.getExe pkgs.cliphist} list | ${lib.getExe pkgs.wofi} --dmenu | ${lib.getExe pkgs.cliphist} decode | ${pkgs.wl-clipboard}/bin/wl-copy";
|
||||
"${mod}+Ctrl+${dir.left}" = "focus output left";
|
||||
"${mod}+Ctrl+${dir.right}" = "focus output right";
|
||||
"${mod}+Ctrl+${dir.up}" = "focus output up";
|
||||
"${mod}+Ctrl+${dir.down}" = "focus output down";
|
||||
|
||||
"${mod}+Ctrl+Shift+${dir.left}" = "move output left";
|
||||
"${mod}+Ctrl+Shift+${dir.right}" = "move output right";
|
||||
"${mod}+Ctrl+Shift+${dir.up}" = "move output up";
|
||||
"${mod}+Ctrl+Shift+${dir.down}" = "move output down";
|
||||
|
||||
"${mod}+t" = "sticky toggle";
|
||||
|
||||
"${mod}+Shift+Backspace" = "exec systemctl suspend";
|
||||
"${mod}+Shift+s" = "exec ${lib.getExe pkgs.wayfreeze} --after-freeze-cmd '${lib.getExe pkgs.sway-contrib.grimshot} copy anything && pkill wayfreeze'";
|
||||
"${mod}+Ctrl+Shift+s" = "exec ${lib.getExe pkgs.wayfreeze} --after-freeze-cmd '${lib.getExe pkgs.sway-contrib.grimshot} savecopy anything && pkill wayfreeze'";
|
||||
"${mod}+Alt+s" = "exec ${lib.getExe pkgs.wayfreeze} --after-freeze-cmd '${lib.getExe pkgs.sway-contrib.grimshot} save anything - | ${lib.getExe pkgs.tesseract} -l eng - - | wl-copy && pkill wayfreeze'";
|
||||
|
||||
"${mod}+Shift+p" = "exec ${pauseApp}";
|
||||
"${mod}+period" = "exec ${lib.getExe pkgs.bemoji}";
|
||||
|
||||
"XF86AudioRaiseVolume" = "exec ${setVolume "1.5" "3%+"} && ${wobVolume}";
|
||||
"XF86AudioLowerVolume" = "exec ${setVolume "1.5" "3%-"} && ${wobVolume}";
|
||||
"XF86AudioPlay" = "exec ${lib.getExe pkgs.playerctl} play-pause";
|
||||
"XF86AudioStop" = "exec ${lib.getExe pkgs.playerctl} stop";
|
||||
"XF86AudioNext" = "exec ${lib.getExe pkgs.playerctl} next";
|
||||
"XF86AudioPrev" = "exec ${lib.getExe pkgs.playerctl} previous";
|
||||
}
|
||||
// (let
|
||||
inherit (builtins) foldl';
|
||||
inherit (lib) range;
|
||||
in
|
||||
foldl' (acc: x:
|
||||
acc
|
||||
// (let
|
||||
y = toString x;
|
||||
in {
|
||||
"${mod}+${y}" = "exec swaymsg workspace number \"$(${monitorId})${y}:${y}\"";
|
||||
"${mod}+Shift+${y}" = "exec swaymsg move container to workspace number \"$(${monitorId})${y}:${y}\"";
|
||||
}))
|
||||
{}
|
||||
(range 0 9))
|
||||
);
|
||||
};
|
||||
extraConfig = ''
|
||||
bindcode 202 exec ${lib.getExe pkgs.obs-cmd} replay save # F24/numpad 1 on my ID75
|
||||
'';
|
||||
};
|
||||
}
|
16
home/profiles/programs/desktop/sway/waybar-workspace.patch
Normal file
16
home/profiles/programs/desktop/sway/waybar-workspace.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
diff --git a/src/modules/sway/workspaces.cpp b/src/modules/sway/workspaces.cpp
|
||||
index 8f273300..faed503c 100644
|
||||
--- a/src/modules/sway/workspaces.cpp
|
||||
+++ b/src/modules/sway/workspaces.cpp
|
||||
@@ -343,9 +343,9 @@ auto Workspaces::update() -> void {
|
||||
fmt::arg("output", (*it)["output"].asString()));
|
||||
}
|
||||
if (!config_["disable-markup"].asBool()) {
|
||||
- static_cast<Gtk::Label *>(button.get_children()[0])->set_markup(output);
|
||||
+ static_cast<Gtk::Label *>(button.get_children()[0])->set_markup(trimWorkspaceName(output));
|
||||
} else {
|
||||
- button.set_label(output);
|
||||
+ button.set_label(trimWorkspaceName(output));
|
||||
}
|
||||
onButtonReady(*it, button);
|
||||
}
|
58
home/profiles/programs/desktop/sway/waybar.nix
Normal file
58
home/profiles/programs/desktop/sway/waybar.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{pkgs, ...}: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (final: prev: {
|
||||
patches = prev.patches ++ [./waybar-workspace.patch];
|
||||
});
|
||||
settings = [
|
||||
{
|
||||
height = 24;
|
||||
spacing = 4;
|
||||
position = "top";
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
];
|
||||
modules-center = [
|
||||
"sway/window"
|
||||
];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"clock"
|
||||
];
|
||||
"sway/workspaces" = {
|
||||
format = "{icon}";
|
||||
};
|
||||
clock = {
|
||||
format = "{:%a %H:%M}";
|
||||
tooltip-format = "<big>{:%a %Y-%m-%d %H:%M}</big>\n<small>{calendar}</small>";
|
||||
};
|
||||
}
|
||||
];
|
||||
style = ''
|
||||
* {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
button {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
box-shadow: inset 0 -3px blue;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding: 0 10px;
|
||||
}
|
||||
'';
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "sway-session.target";
|
||||
};
|
||||
};
|
||||
}
|
40
home/profiles/programs/desktop/theme.nix
Normal file
40
home/profiles/programs/desktop/theme.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{pkgs, ...}: {
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
package = pkgs.apple-cursor;
|
||||
name = "macOS-BigSur";
|
||||
size = 16;
|
||||
};
|
||||
|
||||
# Also sets org.freedesktop.appearance color-scheme
|
||||
# dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
# theme = {
|
||||
# package = pkgs.gnome-themes-extra;
|
||||
# name = "Adwaita-dark";
|
||||
# };
|
||||
# iconTheme = {
|
||||
# package = pkgs.adwaita-icon-theme;
|
||||
# name = "Adwaita-dark";
|
||||
# };
|
||||
font = {
|
||||
name = "Sans";
|
||||
size = 11;
|
||||
};
|
||||
# gtk2.extraConfig = "gtk-application-prefer-dark-theme=1";
|
||||
# gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
# gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
# platformTheme.name = "gtk3";
|
||||
# style = {
|
||||
# name = "Adwaita-dark";
|
||||
# package = pkgs.adwaita-qt;
|
||||
# };
|
||||
};
|
||||
}
|
8
home/profiles/programs/games/default.nix
Normal file
8
home/profiles/programs/games/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
home.packages = [self.packages.${pkgs.system}.gamesand];
|
||||
programs.mangohud.enable = true;
|
||||
}
|
3
home/profiles/programs/games/heroic.nix
Normal file
3
home/profiles/programs/games/heroic.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [heroic];
|
||||
}
|
9
home/profiles/programs/games/krunker.nix
Normal file
9
home/profiles/programs/games/krunker.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
self,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = [
|
||||
self.packages.${pkgs.system}.krunker
|
||||
];
|
||||
}
|
3
home/profiles/programs/games/lutris.nix
Normal file
3
home/profiles/programs/games/lutris.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [lutris];
|
||||
}
|
3
home/profiles/programs/games/minecraft.nix
Normal file
3
home/profiles/programs/games/minecraft.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [prismlauncher];
|
||||
}
|
10
home/profiles/programs/games/roblox.nix
Normal file
10
home/profiles/programs/games/roblox.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# i have sober installed imperatively through flatpak
|
||||
home.packages = [
|
||||
inputs.sobercookie.packages.${pkgs.system}.default
|
||||
];
|
||||
}
|
6
home/profiles/programs/media/jellyfin.nix
Normal file
6
home/profiles/programs/media/jellyfin.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
jellyfin-media-player
|
||||
feishin
|
||||
];
|
||||
}
|
36
home/profiles/programs/media/mpv.nix
Normal file
36
home/profiles/programs/media/mpv.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{pkgs, ...}: {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
vo = "gpu-next";
|
||||
gpu-api = "vulkan";
|
||||
scale = "ewa_lanczos";
|
||||
deband = true;
|
||||
|
||||
sub-auto = "fuzzy";
|
||||
slang = ["eng" "en"];
|
||||
|
||||
save-position-on-quit = true;
|
||||
|
||||
# update watch history
|
||||
ytdl-raw-options = "mark-watched=,cookies-from-browser=firefox";
|
||||
};
|
||||
profiles = {
|
||||
"extension.gif" = {
|
||||
cache = false;
|
||||
loop-file = true;
|
||||
};
|
||||
"protocol.https" = {
|
||||
cache-secs = 100;
|
||||
user-agent = "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0";
|
||||
};
|
||||
"protocol.http" = {
|
||||
cache-secs = 100;
|
||||
user-agent = "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0";
|
||||
};
|
||||
};
|
||||
scripts = with pkgs.mpvScripts; [
|
||||
cutter
|
||||
];
|
||||
};
|
||||
}
|
3
home/profiles/programs/misc/blender.nix
Normal file
3
home/profiles/programs/misc/blender.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [blender];
|
||||
}
|
9
home/profiles/programs/misc/discord.nix
Normal file
9
home/profiles/programs/misc/discord.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
vesktop
|
||||
(discord.override {
|
||||
withOpenASAR = true;
|
||||
})
|
||||
];
|
||||
services.arrpc.enable = true; # RPC with vesktop (has issues with cpu usage sometimes ime)
|
||||
}
|
3
home/profiles/programs/misc/element.nix
Normal file
3
home/profiles/programs/misc/element.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [element-desktop];
|
||||
}
|
5
home/profiles/programs/misc/foliate.nix
Normal file
5
home/profiles/programs/misc/foliate.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
foliate
|
||||
];
|
||||
}
|
3
home/profiles/programs/misc/keepassxc.nix
Normal file
3
home/profiles/programs/misc/keepassxc.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.keepassxc];
|
||||
}
|
3
home/profiles/programs/misc/krita.nix
Normal file
3
home/profiles/programs/misc/krita.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.krita];
|
||||
}
|
3
home/profiles/programs/misc/libreoffice.nix
Normal file
3
home/profiles/programs/misc/libreoffice.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [libreoffice-qt6];
|
||||
}
|
10
home/profiles/programs/misc/obs.nix
Normal file
10
home/profiles/programs/misc/obs.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{pkgs, ...}: {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
obs-vaapi
|
||||
wlrobs
|
||||
obs-vkcapture
|
||||
];
|
||||
};
|
||||
}
|
3
home/profiles/programs/misc/obsidian.nix
Normal file
3
home/profiles/programs/misc/obsidian.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [obsidian];
|
||||
}
|
5
home/profiles/programs/misc/pwvucontrol.nix
Normal file
5
home/profiles/programs/misc/pwvucontrol.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
pwvucontrol
|
||||
];
|
||||
}
|
5
home/profiles/programs/misc/qpwgraph.nix
Normal file
5
home/profiles/programs/misc/qpwgraph.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
qpwgraph
|
||||
];
|
||||
}
|
8
home/profiles/programs/music/cmus.nix
Normal file
8
home/profiles/programs/music/cmus.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
programs.cmus = {
|
||||
enable = true;
|
||||
theme = "spotify";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
}
|
3
home/profiles/programs/music/picard.nix
Normal file
3
home/profiles/programs/music/picard.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.picard];
|
||||
}
|
3
home/profiles/programs/music/puddletag.nix
Normal file
3
home/profiles/programs/music/puddletag.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.puddletag];
|
||||
}
|
9
home/profiles/secrets/default.nix
Normal file
9
home/profiles/secrets/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{config, ...}: {
|
||||
sops = {
|
||||
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
||||
};
|
||||
|
||||
imports = [
|
||||
./wakatime.nix
|
||||
];
|
||||
}
|
20
home/profiles/secrets/wakatime
Normal file
20
home/profiles/secrets/wakatime
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"data": "ENC[AES256_GCM,data:7AM1HQJtfUtF9IzP1snk8ULWYQNj2FNECp4Ioro2Btm49kV/sKYNn28CvBU5Pxz7X3vt/D8As2aAiFCh6rKGqYcBFUnm4/+JIZjiz7JIoNq9WoBY67Dj1xmwFeq648beLAVIKaKrMg==,iv:WQRPJsHOrmTMflN4hbdG6q7mevJjm1vgGz7Vgh3HtzU=,tag:iuhVjV8V49qqxCGK3phRQA==,type:str]",
|
||||
"sops": {
|
||||
"kms": null,
|
||||
"gcp_kms": null,
|
||||
"azure_kv": null,
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age17pdqkpfh6kc6wm7gxzdnwf6vphlwddv9yfpdu3j76e24y3amd9tq3avfc8",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnOEEwKzRKc1FPSGlHbXk0\ncnQvN2oyRERxY0d5eEdmczBpYlZrb2M0eVcwCjNrTUc2dEcyYkFwMERTSEVnTldy\nWHhjeXVkOGFGRUdoM3dIdlJiZmRFTUUKLS0tIGM0S2MxZUYvUCtIZ3pKbDl1Vi9S\nNVQ4Yk5BWFlRK1RZNWtCNDltemxtaTQKFggxv58s2w9VTvQUZPv9ryzxRinGBz8s\n62TOAVxlWL3EdUqWd7o8kK83Ryw+Vor7Rjoe6ee9RSRNJSDmEPjJCA==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2024-06-26T03:19:42Z",
|
||||
"mac": "ENC[AES256_GCM,data:fHi0HLAtklALyIbtQzmmi++uWpgVAqApLbHVZ4fQEafkdcJ8IsargeiYh9GULiVdFUp5lVLQ42HqIOte0jRC+fTKspv1TURS4rgFxLZMTwZJcbbRkwBxYMYtEd1L/AutKZfDCWxYJgS1ovhwSWZTXdB5XUd4CjIeqqLngjIDzTY=,iv:43AA3sFEABB5aNdBuHzJ9PAIBWEb/xv3LgG/YJdL8Ek=,tag:PHq16PyAET8l/dxKHUJXEA==,type:str]",
|
||||
"pgp": null,
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.8.1"
|
||||
}
|
||||
}
|
7
home/profiles/secrets/wakatime.nix
Normal file
7
home/profiles/secrets/wakatime.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{config, ...}: {
|
||||
sops.secrets.wakatime = {
|
||||
format = "binary";
|
||||
sopsFile = ./wakatime;
|
||||
path = "${config.home.homeDirectory}/.wakatime.cfg";
|
||||
};
|
||||
}
|
4
home/profiles/services/playerctl.nix
Normal file
4
home/profiles/services/playerctl.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.playerctl];
|
||||
services.playerctld.enable = true;
|
||||
}
|
19
home/profiles/services/polkit-agent.nix
Normal file
19
home/profiles/services/polkit-agent.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{pkgs, ...}: {
|
||||
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
||||
Unit.Description = "polkit-gnome-authentication-agent-1";
|
||||
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
Wants = ["graphical-session.target"];
|
||||
After = ["graphical-session.target"];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
}
|
3
home/profiles/services/udiskie.nix
Normal file
3
home/profiles/services/udiskie.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.udiskie.enable = true;
|
||||
}
|
12
home/profiles/terminal/emulator/foot.nix
Normal file
12
home/profiles/terminal/emulator/foot.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{pkgs, ...}: {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
# include = "${pkgs.foot.themes}/share/foot/themes/modus-operandi";
|
||||
# font = "monospace:size=9";
|
||||
};
|
||||
mouse.hide-when-typing = true;
|
||||
};
|
||||
};
|
||||
}
|
93
home/profiles/terminal/emulator/wezterm.nix
Normal file
93
home/profiles/terminal/emulator/wezterm.nix
Normal file
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
local wezterm = require'wezterm'
|
||||
local c = {}
|
||||
if wezterm.config_builder then
|
||||
c = wezterm.config_builder()
|
||||
end
|
||||
c.hide_tab_bar_if_only_one_tab = true
|
||||
c.color_scheme = "deep"
|
||||
c.window_padding = { left = 10, right = 10, top = 5, bottom = 5 }
|
||||
c.window_decorations = 'RESIZE'
|
||||
c.window_close_confirmation = "NeverPrompt"
|
||||
c.use_fancy_tab_bar = false
|
||||
|
||||
c.font_size = 9
|
||||
c.adjust_window_size_when_changing_font_size = true
|
||||
|
||||
|
||||
-- Keys
|
||||
c.leader = { key = 'j', mods = 'CTRL', timeout_milliseconds = 1000 }
|
||||
c.keys = {
|
||||
{
|
||||
key = 'q',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.CloseCurrentPane { confirm = false },
|
||||
},
|
||||
{
|
||||
key = 'f',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.TogglePaneZoomState,
|
||||
},
|
||||
{
|
||||
key = 'h',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.ActivatePaneDirection('Left'),
|
||||
},
|
||||
{
|
||||
key = 'j',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.ActivatePaneDirection('Down'),
|
||||
},
|
||||
{
|
||||
key = 'k',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.ActivatePaneDirection('Up'),
|
||||
},
|
||||
{
|
||||
key = 'l',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.ActivatePaneDirection('Right'),
|
||||
},
|
||||
{
|
||||
key = 'H',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.SplitPane { direction = 'Left' },
|
||||
},
|
||||
{
|
||||
key = 'J',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.SplitPane { direction = 'Down' },
|
||||
},
|
||||
{
|
||||
key = 'K',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.SplitPane { direction = 'Up' },
|
||||
},
|
||||
{
|
||||
key = 'L',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.SplitPane { direction = 'Right' },
|
||||
},
|
||||
{
|
||||
key = 's',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.PaneSelect {
|
||||
mode = "Activate"
|
||||
},
|
||||
},
|
||||
{
|
||||
key = ';',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.PaneSelect {
|
||||
mode = "SwapWithActive"
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return c
|
||||
'';
|
||||
};
|
||||
}
|
12
home/profiles/terminal/programs/comma.nix
Normal file
12
home/profiles/terminal/programs/comma.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{inputs, ...}: {
|
||||
imports = [inputs.nix-index-database.hmModules.nix-index];
|
||||
|
||||
programs = {
|
||||
nix-index-database.comma.enable = true;
|
||||
nix-index = {
|
||||
enableBashIntegration = false;
|
||||
enableFishIntegration = false;
|
||||
enableZshIntegration = false;
|
||||
};
|
||||
};
|
||||
}
|
7
home/profiles/terminal/programs/direnv.nix
Normal file
7
home/profiles/terminal/programs/direnv.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
28
home/profiles/terminal/programs/git.nix
Normal file
28
home/profiles/terminal/programs/git.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
delta.enable = true;
|
||||
lfs.enable = true;
|
||||
|
||||
ignores = ["*~" ".direnv"];
|
||||
|
||||
signing = {
|
||||
key = "${config.home.homeDirectory}/.ssh/id_ed25519";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
gpg.format = "ssh";
|
||||
push.autoSetupRemote = true;
|
||||
pull.rebase = true;
|
||||
rebase.autostash = true;
|
||||
};
|
||||
|
||||
userEmail = "xunuwu@gmail.com";
|
||||
userName = "xunuwu";
|
||||
};
|
||||
}
|
4
home/profiles/terminal/programs/github.nix
Normal file
4
home/profiles/terminal/programs/github.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
programs.gh.enable = true;
|
||||
programs.gh-dash.enable = true;
|
||||
}
|
22
home/profiles/terminal/programs/irssi.nix
Normal file
22
home/profiles/terminal/programs/irssi.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{pkgs, ...}: {
|
||||
programs.irssi = {
|
||||
enable = true;
|
||||
networks = {
|
||||
liberachat = {
|
||||
nick = "wheat";
|
||||
server = {
|
||||
address = "irc.libera.chat";
|
||||
port = 6697;
|
||||
autoConnect = true;
|
||||
};
|
||||
channels = {
|
||||
nixos.autoJoin = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
home.file.".irssi/default.theme".source = pkgs.fetchurl {
|
||||
url = "https://irssi-import.github.io/themes/h3rbz.theme";
|
||||
hash = "sha256-2nB+jvDXPgkMXTd6f305R2aBt/D4kbsIGbqcIllHADo=";
|
||||
};
|
||||
}
|
3
home/profiles/terminal/programs/lazygit.nix
Normal file
3
home/profiles/terminal/programs/lazygit.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.lazygit.enable = true;
|
||||
}
|
3
home/profiles/terminal/programs/tdf.nix
Normal file
3
home/profiles/terminal/programs/tdf.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [tdf];
|
||||
}
|
24
home/profiles/terminal/programs/tmux.nix
Normal file
24
home/profiles/terminal/programs/tmux.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
baseIndex = 1;
|
||||
clock24 = true;
|
||||
mouse = true;
|
||||
escapeTime = 0;
|
||||
extraConfig = ''
|
||||
bind '"' split-window -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}";
|
||||
|
||||
set -g status-style bg=default
|
||||
setw -g window-status-current-style fg=#be95ff
|
||||
set -g status-justify absolute-centre
|
||||
set -g status-interval 5
|
||||
set -g status-right "#[fg=#25be6a]#(free -h | awk 'NR==2{print $3\"/\"$2}')"
|
||||
set -ag status-right "#[fg=default] %a %d %b %H:%M"
|
||||
|
||||
set-option -g default-terminal "xterm-256color"
|
||||
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
||||
'';
|
||||
};
|
||||
}
|
29
home/profiles/terminal/programs/xdg.nix
Normal file
29
home/profiles/terminal/programs/xdg.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
# TODO: move this somewhere more reasonable
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
home = config.home.homeDirectory;
|
||||
in {
|
||||
xdg = {
|
||||
enable = true;
|
||||
cacheHome = config.home.homeDirectory + "/.local/cache";
|
||||
|
||||
userDirs = {
|
||||
enable = true;
|
||||
desktop = home + "/desktop";
|
||||
documents = home + "/docs";
|
||||
download = home + "/down";
|
||||
music = home + "/music";
|
||||
pictures = home + "/pics";
|
||||
publicShare = home + "/share";
|
||||
videos = home + "/vids";
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = config.xdg.userDirs.pictures + "/screenshots";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [pkgs.xdg-utils];
|
||||
}
|
3
home/profiles/terminal/programs/zoxide.nix
Normal file
3
home/profiles/terminal/programs/zoxide.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.zoxide.enable = true;
|
||||
}
|
73
home/profiles/terminal/shell/zsh.nix
Normal file
73
home/profiles/terminal/shell/zsh.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{config, ...}: {
|
||||
programs.fzf.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
defaultKeymap = "emacs";
|
||||
|
||||
history = {
|
||||
expireDuplicatesFirst = true;
|
||||
extended = true;
|
||||
save = 100 * 1000;
|
||||
path = "${config.xdg.dataHome}/zsh_history";
|
||||
};
|
||||
initExtra = ''
|
||||
unsetopt beep
|
||||
|
||||
## KEYBINDS ##
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[1;5C" forward-word
|
||||
|
||||
# improve ^w behaviour
|
||||
WORDCHARS=
|
||||
|
||||
# pretty completion menu
|
||||
zstyle ':completion:*' menu select
|
||||
|
||||
# shift-tab in completion menu
|
||||
bindkey '^[[Z' reverse-menu-complete
|
||||
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' # Case insensitive completion
|
||||
|
||||
|
||||
## MISC ##
|
||||
setopt extendedglob
|
||||
|
||||
|
||||
# Show completion categories
|
||||
zstyle ':completion:*:*:*:*:descriptions' format '%F{magenta}<-%d->%f'
|
||||
|
||||
|
||||
## PROMPT ##
|
||||
function preexec() {
|
||||
timer=$(date +%s%3N)
|
||||
}
|
||||
|
||||
function precmd_timer() {
|
||||
if [ $timer ]; then
|
||||
now=$(date +%s%3N)
|
||||
elapsed=$(($now-$timer))
|
||||
|
||||
if [[ elapsed -gt 100 ]]; then
|
||||
export RPROMPT="%F{cyan}''${elapsed}ms %f"
|
||||
else
|
||||
unset RPROMPT
|
||||
fi
|
||||
unset timer
|
||||
fi
|
||||
}
|
||||
|
||||
autoload -Uz vcs_info
|
||||
precmd_vcs_info() { vcs_info }
|
||||
precmd_functions+=( precmd_vcs_info precmd_timer )
|
||||
zstyle ':vcs_info:git:*' formats ' %b '
|
||||
setopt prompt_subst
|
||||
|
||||
PROMPT='%F{blue}[%F{magenta}%n%F{blue}@%F{magenta}%M%F{blue}] %~%f %F{green}$vcs_info_msg_0_%f%(?..%F{red}| %? )%#%f '
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue