mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 15:00:14 +00:00
move all files to new nixfmt rfc
This commit is contained in:
@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
_1password = {
|
||||
@ -10,9 +16,16 @@
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.gui.enable && config._1password.enable) {
|
||||
unfreePackages = [ "1password" "_1password-gui" "1password-cli" ];
|
||||
unfreePackages = [
|
||||
"1password"
|
||||
"_1password-gui"
|
||||
"1password-cli"
|
||||
];
|
||||
home-manager.users.${config.user} = {
|
||||
home.packages = with pkgs; [ _1password-gui _1password ];
|
||||
home.packages = with pkgs; [
|
||||
_1password-gui
|
||||
_1password
|
||||
];
|
||||
};
|
||||
|
||||
# https://1password.community/discussion/135462/firefox-extension-does-not-connect-to-linux-app
|
||||
@ -26,5 +39,4 @@
|
||||
firefox
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
alacritty = {
|
||||
@ -28,7 +34,9 @@
|
||||
opacity = 1.0;
|
||||
};
|
||||
scrolling.history = 10000;
|
||||
font = { size = 14.0; };
|
||||
font = {
|
||||
size = 14.0;
|
||||
};
|
||||
key_bindings = [
|
||||
# Used for word completion in fish_user_key_bindings
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
./1password.nix
|
||||
@ -12,5 +13,4 @@
|
||||
./slack.nix
|
||||
./yt-dlp.nix
|
||||
];
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
discord = {
|
||||
|
@ -1,4 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
|
||||
@ -22,8 +27,7 @@
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package =
|
||||
if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
|
||||
package = if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
|
||||
profiles.default = {
|
||||
id = 0;
|
||||
name = "default";
|
||||
@ -49,32 +53,24 @@
|
||||
"app.update.auto" = false;
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.warnOnQuit" = false;
|
||||
"browser.quitShortcut.disabled" =
|
||||
if pkgs.stdenv.isLinux then true else false;
|
||||
"browser.quitShortcut.disabled" = if pkgs.stdenv.isLinux then true else false;
|
||||
"browser.theme.dark-private-windows" = true;
|
||||
"browser.toolbars.bookmarks.visibility" = false;
|
||||
"browser.startup.page" = 3; # Restore previous session
|
||||
"browser.newtabpage.enabled" = false; # Make new tabs blank
|
||||
"trailhead.firstrun.didSeeAboutWelcome" =
|
||||
true; # Disable welcome splash
|
||||
"trailhead.firstrun.didSeeAboutWelcome" = true; # Disable welcome splash
|
||||
"dom.forms.autocomplete.formautofill" = false; # Disable autofill
|
||||
"extensions.formautofill.creditCards.enabled" =
|
||||
false; # Disable credit cards
|
||||
"extensions.formautofill.creditCards.enabled" = false; # Disable credit cards
|
||||
"dom.payments.defaults.saveAddress" = false; # Disable address save
|
||||
"general.autoScroll" = true; # Drag middle-mouse to scroll
|
||||
"services.sync.prefs.sync.general.autoScroll" =
|
||||
false; # Prevent disabling autoscroll
|
||||
"services.sync.prefs.sync.general.autoScroll" = false; # Prevent disabling autoscroll
|
||||
"extensions.pocket.enabled" = false;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" =
|
||||
true; # Allow userChrome.css
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; # Allow userChrome.css
|
||||
"layout.css.color-mix.enabled" = true;
|
||||
"ui.systemUsesDarkTheme" =
|
||||
if config.theme.dark == true then 1 else 0;
|
||||
"media.ffmpeg.vaapi.enabled" =
|
||||
true; # Enable hardware video acceleration
|
||||
"ui.systemUsesDarkTheme" = if config.theme.dark == true then 1 else 0;
|
||||
"media.ffmpeg.vaapi.enabled" = true; # Enable hardware video acceleration
|
||||
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
|
||||
"devtools.command-button-screenshot.enabled" =
|
||||
true; # Scrolling screenshot of entire page
|
||||
"devtools.command-button-screenshot.enabled" = true; # Scrolling screenshot of entire page
|
||||
"svg.context-properties.content.enabled" = true; # Sidebery styling
|
||||
};
|
||||
userChrome = ''
|
||||
@ -160,33 +156,34 @@
|
||||
|
||||
extraConfig = "";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
xdg.mimeApps = {
|
||||
associations.added = { "text.html" = [ "firefox.desktop" ]; };
|
||||
defaultApplications = { "text.html" = [ "firefox.desktop" ]; };
|
||||
associations.added = {
|
||||
"text.html" = [ "firefox.desktop" ];
|
||||
};
|
||||
defaultApplications = {
|
||||
"text.html" = [ "firefox.desktop" ];
|
||||
};
|
||||
};
|
||||
|
||||
xsession.windowManager.i3.config.keybindings =
|
||||
lib.mkIf pkgs.stdenv.isLinux {
|
||||
"${
|
||||
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
|
||||
}+Shift+b" = "exec ${
|
||||
# Don't name the script `firefox` or it will affect grep
|
||||
builtins.toString (pkgs.writeShellScript "focus-ff.sh" ''
|
||||
count=$(ps aux | grep -c firefox)
|
||||
if [ "$count" -eq 1 ]; then
|
||||
i3-msg "exec --no-startup-id firefox"
|
||||
sleep 0.5
|
||||
fi
|
||||
i3-msg "[class=firefox] focus"
|
||||
'')
|
||||
}";
|
||||
};
|
||||
|
||||
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
|
||||
"${
|
||||
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
|
||||
}+Shift+b" = "exec ${
|
||||
# Don't name the script `firefox` or it will affect grep
|
||||
builtins.toString (
|
||||
pkgs.writeShellScript "focus-ff.sh" ''
|
||||
count=$(ps aux | grep -c firefox)
|
||||
if [ "$count" -eq 1 ]; then
|
||||
i3-msg "exec --no-startup-id firefox"
|
||||
sleep 0.5
|
||||
fi
|
||||
i3-msg "[class=firefox] focus"
|
||||
''
|
||||
)
|
||||
}";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
kitty = {
|
||||
@ -13,20 +19,19 @@
|
||||
|
||||
# Set the Rofi-Systemd terminal for viewing logs
|
||||
# Using optionalAttrs because only available in NixOS
|
||||
environment = { } // lib.attrsets.optionalAttrs
|
||||
(builtins.hasAttr "sessionVariables" config.environment) {
|
||||
environment =
|
||||
{ }
|
||||
// lib.attrsets.optionalAttrs (builtins.hasAttr "sessionVariables" config.environment) {
|
||||
sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.kitty}/bin/kitty";
|
||||
};
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
# Set the i3 terminal
|
||||
xsession.windowManager.i3.config.terminal =
|
||||
lib.mkIf pkgs.stdenv.isLinux "kitty";
|
||||
xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "kitty";
|
||||
|
||||
# Set the Rofi terminal for running programs
|
||||
programs.rofi.terminal =
|
||||
lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
|
||||
programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
|
||||
|
||||
# Display images in the terminal
|
||||
programs.fish.shellAliases = {
|
||||
@ -48,16 +53,14 @@
|
||||
|
||||
# Kitty scrollback nvim
|
||||
"kitty_mod+h" = "kitty_scrollback_nvim";
|
||||
"kitty_mod+g" =
|
||||
"kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||
"kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||
};
|
||||
settings = {
|
||||
|
||||
# Required for kitty-scrollback.nvim
|
||||
allow_remote_control = "socket-only";
|
||||
listen_on = "unix:/tmp/kitty";
|
||||
action_alias =
|
||||
"kitty_scrollback_nvim kitten ${pkgs.vimPlugins.kitty-scrollback-nvim}/python/kitty_scrollback_nvim.py";
|
||||
action_alias = "kitty_scrollback_nvim kitten ${pkgs.vimPlugins.kitty-scrollback-nvim}/python/kitty_scrollback_nvim.py";
|
||||
|
||||
# Colors (adapted from: https://github.com/kdrag0n/base16-kitty/blob/master/templates/default-256.mustache)
|
||||
background = config.theme.colors.base00;
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
media = {
|
||||
@ -44,7 +50,10 @@
|
||||
"image/*" = [ "nsxiv.desktop" ];
|
||||
};
|
||||
associations.removed = {
|
||||
"application/pdf" = [ "mupdf.desktop" "wine-extension-pdf.desktop" ];
|
||||
"application/pdf" = [
|
||||
"mupdf.desktop"
|
||||
"wine-extension-pdf.desktop"
|
||||
];
|
||||
};
|
||||
defaultApplications = {
|
||||
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
||||
@ -53,9 +62,6 @@
|
||||
"image/*" = [ "nsxiv.desktop" ];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
obsidian = {
|
||||
@ -18,7 +24,5 @@
|
||||
# Broken on 2023-12-11
|
||||
# https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8
|
||||
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
qbittorrent = {
|
||||
@ -14,8 +20,6 @@
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
home.packages = with pkgs; [ qbittorrent ];
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
slack = {
|
||||
@ -15,5 +21,4 @@
|
||||
home.packages = with pkgs; [ slack ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
yt-dlp = {
|
||||
@ -27,9 +33,6 @@
|
||||
};
|
||||
|
||||
programs.fish.shellAbbrs.yt = "yt-dlp";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user