Modularize teams sops yazi

This commit is contained in:
DashieTM 2024-08-24 13:25:08 +02:00
parent 7730cbef59
commit c73cb37278
75 changed files with 3023 additions and 3573 deletions

View file

@ -1,8 +1,6 @@
{ config, ... }:
let
username = config.conf.username;
in
{
{ config, lib, options, ... }:
let username = config.conf.username;
in {
manual = {
html.enable = false;
json.enable = false;
@ -12,48 +10,31 @@ in
fonts.fontconfig.enable = true;
nixpkgs.config.allowUnfree = true;
home.username = username;
home.homeDirectory = "/home/${username}";
home.stateVersion = "24.05";
home = {
username = username;
homeDirectory = "/home/${username}";
stateVersion = "24.05";
home.sessionPath = [
"$HOME/.cargo/bin"
];
sessionPath = [ "$HOME/.cargo/bin" ];
home.sessionVariables = {
GOROOT = "$HOME/.go";
sessionVariables = { GOROOT = "$HOME/.go"; };
keyboard = null;
file.".local/share/flatpak/overrides/global".text = ''
[Context]
filesystems=xdg-config/gtk-3.0;xdg-config/gtk-4.0
'';
};
home.keyboard = null;
home.file.".local/share/flatpak/overrides/global".text = ''
[Context]
filesystems=xdg-config/gtk-3.0;xdg-config/gtk-4.0
'';
programs.nix-index = {
enable = true;
enableFishIntegration = true;
};
nix = {
extraOptions = ''
extraOptions = lib.mkIf (options ? config.sops.secrets.access.path) ''
!include ${config.sops.secrets.access.path}
'';
};
sops = {
gnupg = {
home = "~/.gnupg";
sshKeyPaths = [ ];
};
defaultSopsFile = ../secrets/secrets.yaml;
secrets.hub = { };
secrets.lab = { };
secrets.${username} = { };
secrets.nextcloud = { };
secrets.access = { };
};
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
}

View file

@ -15,31 +15,28 @@ let
inputs.sops-nix.homeManagerModules.sops
inputs.dashvim.homeManagerModules.dashvim
];
in
{
xdg.portal.config.common.default = "*";
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
};
home-manager.useGlobalPkgs = true;
# home-manager.backupFileExtension = "backup";
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit inputs;
in {
xdg = {
portal.config.common.default = "*";
portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
home-manager.users.${config.conf.username} = {
imports = [
./common.nix
./xdg.nix
./oxi/default.nix
./themes/default.nix
./individual_configs/default.nix
./sync.nix
] ++ base_imports
++ lib.optional (builtins.pathExists mod) mod;
users.${config.conf.username} = {
imports = [
./common.nix
./xdg.nix
./oxi/default.nix
./themes/default.nix
./individual_configs/default.nix
./sync.nix
] ++ base_imports ++ lib.optional (builtins.pathExists mod) mod;
};
};
}

View file

@ -1,9 +1 @@
{
imports = [
./kitty.nix
./yazi.nix
./fish.nix
./direnv.nix
./neovide.nix
];
}
{ imports = [ ./kitty.nix ./fish.nix ./direnv.nix ./neovide.nix ]; }

View file

@ -1,7 +1,6 @@
{ pkgs, ... }: {
xdg.configFile."direnv/direnv.toml".source = (pkgs.formats.toml { }).generate "direnv" {
global = {
warn_timeout = "-1s";
xdg.configFile."direnv/direnv.toml".source =
(pkgs.formats.toml { }).generate "direnv" {
global = { warn_timeout = "-1s"; };
};
};
}

View file

@ -1,140 +1,139 @@
{ config, ... }: {
xdg.configFile."fish/config.fish" = {
text =
''
if status is-interactive
# Commands to run in interactive sessions can go here
end
text = ''
if status is-interactive
# Commands to run in interactive sessions can go here
end
# =============================================================================
#
# Utility functions for zoxide.
#
# =============================================================================
#
# Utility functions for zoxide.
#
export NIX_PATH="$NIX_PATH:$HOME/gits/dotFiles/."
export NIX_PATH="$NIX_PATH:$HOME/gits/dotFiles/."
set EDITOR "neovide --no-fork"
set EDITOR "neovide --no-fork"
alias rebuild='sudo nixos-rebuild switch --flake /home/${config.conf.username}/gits/dotFiles/.'
abbr --add ls 'lsd'
abbr --add :q 'exit'
abbr --add gh 'git push origin'
abbr --add gl 'git pull origin'
abbr --add gm 'git commit -m'
abbr --add ga "git add -A"
abbr --add g+ 'bear -- g++ -Wextra -Werror -std=c++20'
abbr --add s "kitty +kitten ssh"
abbr --add zl 'z "" '
abbr --add nv 'neovide'
abbr --add cr 'cargo run'
abbr --add grep 'rg'
abbr --add cat 'bat'
abbr --add find 'fd'
abbr --add rm 'rip'
alias rebuild='sudo nixos-rebuild switch --flake /home/${config.conf.username}/gits/dotFiles/.'
abbr --add ls 'lsd'
abbr --add :q 'exit'
abbr --add gh 'git push origin'
abbr --add gl 'git pull origin'
abbr --add gm 'git commit -m'
abbr --add ga "git add -A"
abbr --add g+ 'bear -- g++ -Wextra -Werror -std=c++20'
abbr --add s "kitty +kitten ssh"
abbr --add zl 'z "" '
abbr --add nv 'neovide'
abbr --add cr 'cargo run'
abbr --add grep 'rg'
abbr --add cat 'bat'
abbr --add find 'fd'
abbr --add rm 'rip'
set fish_greeting
# pwd based on the value of _ZO_RESOLVE_SYMLINKS.
function __zoxide_pwd
builtin pwd -L
end
set fish_greeting
# pwd based on the value of _ZO_RESOLVE_SYMLINKS.
function __zoxide_pwd
builtin pwd -L
end
# A copy of fish's internal cd function. This makes it possible to use
# `alias cd=z` without causing an infinite loop.
if ! builtin functions --query __zoxide_cd_internal
if builtin functions --query cd
builtin functions --copy cd __zoxide_cd_internal
else
alias __zoxide_cd_internal='builtin cd'
end
end
# A copy of fish's internal cd function. This makes it possible to use
# `alias cd=z` without causing an infinite loop.
if ! builtin functions --query __zoxide_cd_internal
if builtin functions --query cd
builtin functions --copy cd __zoxide_cd_internal
else
alias __zoxide_cd_internal='builtin cd'
end
end
# cd + custom logic based on the value of _ZO_ECHO.
function __zoxide_cd
__zoxide_cd_internal $argv
end
# cd + custom logic based on the value of _ZO_ECHO.
function __zoxide_cd
__zoxide_cd_internal $argv
end
# =============================================================================
#
# Hook configuration for zoxide.
#
# =============================================================================
#
# Hook configuration for zoxide.
#
# Initialize hook to add new entries to the database.
function __zoxide_hook --on-variable PWD
test -z "$fish_private_mode"
and command zoxide add -- (__zoxide_pwd)
end
# Initialize hook to add new entries to the database.
function __zoxide_hook --on-variable PWD
test -z "$fish_private_mode"
and command zoxide add -- (__zoxide_pwd)
end
# =============================================================================
#
# When using zoxide with --no-cmd, alias these internal functions as desired.
#
# =============================================================================
#
# When using zoxide with --no-cmd, alias these internal functions as desired.
#
if test -z $__zoxide_z_prefix
set __zoxide_z_prefix 'z!'
end
set __zoxide_z_prefix_regex ^(string escape --style=regex $__zoxide_z_prefix)
if test -z $__zoxide_z_prefix
set __zoxide_z_prefix 'z!'
end
set __zoxide_z_prefix_regex ^(string escape --style=regex $__zoxide_z_prefix)
# Jump to a directory using only keywords.
function __zoxide_z
set -l argc (count $argv)
if test $argc -eq 0
__zoxide_cd $HOME
else if test "$argv" = -
__zoxide_cd -
else if test $argc -eq 1 -a -d $argv[1]
__zoxide_cd $argv[1]
else if set -l result (string replace --regex $__zoxide_z_prefix_regex \'\' $argv[-1]); and test -n $result
__zoxide_cd $result
else
set -l result (command zoxide query --exclude (__zoxide_pwd) -- $argv)
and __zoxide_cd $result
end
end
# Jump to a directory using only keywords.
function __zoxide_z
set -l argc (count $argv)
if test $argc -eq 0
__zoxide_cd $HOME
else if test "$argv" = -
__zoxide_cd -
else if test $argc -eq 1 -a -d $argv[1]
__zoxide_cd $argv[1]
else if set -l result (string replace --regex $__zoxide_z_prefix_regex \'\' $argv[-1]); and test -n $result
__zoxide_cd $result
else
set -l result (command zoxide query --exclude (__zoxide_pwd) -- $argv)
and __zoxide_cd $result
end
end
# Completions.
function __zoxide_z_complete
set -l tokens (commandline --current-process --tokenize)
set -l curr_tokens (commandline --cut-at-cursor --current-process --tokenize)
# Completions.
function __zoxide_z_complete
set -l tokens (commandline --current-process --tokenize)
set -l curr_tokens (commandline --cut-at-cursor --current-process --tokenize)
if test (count $tokens) -le 2 -a (count $curr_tokens) -eq 1
# If there are < 2 arguments, use `cd` completions.
complete --do-complete "\'\' "(commandline --cut-at-cursor --current-token) | string match --regex '.*/$'
else if test (count $tokens) -eq (count $curr_tokens); and ! string match --quiet --regex $__zoxide_z_prefix_regex. $tokens[-1]
# If the last argument is empty and the one before doesn't start with
# $__zoxide_z_prefix, use interactive selection.
set -l query $tokens[2..-1]
set -l result (zoxide query --exclude (__zoxide_pwd) --interactive -- $query)
and echo $__zoxide_z_prefix$result
commandline --function repaint
end
end
complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)'
if test (count $tokens) -le 2 -a (count $curr_tokens) -eq 1
# If there are < 2 arguments, use `cd` completions.
complete --do-complete "\'\' "(commandline --cut-at-cursor --current-token) | string match --regex '.*/$'
else if test (count $tokens) -eq (count $curr_tokens); and ! string match --quiet --regex $__zoxide_z_prefix_regex. $tokens[-1]
# If the last argument is empty and the one before doesn't start with
# $__zoxide_z_prefix, use interactive selection.
set -l query $tokens[2..-1]
set -l result (zoxide query --exclude (__zoxide_pwd) --interactive -- $query)
and echo $__zoxide_z_prefix$result
commandline --function repaint
end
end
complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)'
# Jump to a directory using interactive search.
function __zoxide_zi
set -l result (command zoxide query --interactive -- $argv)
and __zoxide_cd $result
end
# Jump to a directory using interactive search.
function __zoxide_zi
set -l result (command zoxide query --interactive -- $argv)
and __zoxide_cd $result
end
# =============================================================================
#
# Commands for zoxide. Disable these using --no-cmd.
#
# =============================================================================
#
# Commands for zoxide. Disable these using --no-cmd.
#
abbr --erase z &>/dev/null
alias z=__zoxide_z
abbr --erase z &>/dev/null
alias z=__zoxide_z
abbr --erase zi &>/dev/null
alias zi=__zoxide_zi
abbr --erase zi &>/dev/null
alias zi=__zoxide_zi
# =============================================================================
#
# To initialize zoxide, add this to your configuration (usually
# ~/.config/fish/config.fish):
#
# zoxide init fish | source
# =============================================================================
#
# To initialize zoxide, add this to your configuration (usually
# ~/.config/fish/config.fish):
#
# zoxide init fish | source
direnv hook fish | source
'';
direnv hook fish | source
'';
};
}

View file

@ -20,13 +20,14 @@ let
"e" = "d";
"f" = "e";
};
base = "#" + lib.strings.concatStrings ((lib.lists.take 5 (lib.strings.stringToCharacters scheme.base00)) ++ [ hexTable."${(lib.lists.last (lib.strings.stringToCharacters scheme.base00))}" ]);
in
{
base = "#" + lib.strings.concatStrings
((lib.lists.take 5 (lib.strings.stringToCharacters scheme.base00)) ++ [
hexTable."${(lib.lists.last
(lib.strings.stringToCharacters scheme.base00))}"
]);
in {
stylix.targets.kitty = {
enable = false;
};
stylix.targets.kitty = { enable = false; };
programs.kitty = {
enable = true;

View file

@ -1,38 +1,39 @@
{ pkgs, ... }: {
xdg.configFile."ncspot/config.toml".source = (pkgs.formats.toml { }).generate "ncspot" {
notify = true;
shuffle = true;
cover_max_scale = 2;
initial_screen = "library";
library_tabs = [ "playlists" ];
theme = {
background = "#1a1b26";
primary = "#9aa5ce";
secondary = "#414868";
title = "#9ece6a";
playing = "#7aa2f7";
playing_selected = "#bb9af7";
playing_bg = "#24283b";
highlight = "#c0caf5";
highlight_bg = "#24283b";
error = "#414868";
error_bg = "#f7768e";
statusbar = "#ff9e64";
statusbar_progress = "#7aa2f7";
statusbar_bg = "#1a1b26";
cmdline = "#c0caf5";
cmdline_bg = "#24283b";
search_match = "#f7768e";
xdg.configFile."ncspot/config.toml".source =
(pkgs.formats.toml { }).generate "ncspot" {
notify = true;
shuffle = true;
cover_max_scale = 2;
initial_screen = "library";
library_tabs = [ "playlists" ];
theme = {
background = "#1a1b26";
primary = "#9aa5ce";
secondary = "#414868";
title = "#9ece6a";
playing = "#7aa2f7";
playing_selected = "#bb9af7";
playing_bg = "#24283b";
highlight = "#c0caf5";
highlight_bg = "#24283b";
error = "#414868";
error_bg = "#f7768e";
statusbar = "#ff9e64";
statusbar_progress = "#7aa2f7";
statusbar_bg = "#1a1b26";
cmdline = "#c0caf5";
cmdline_bg = "#24283b";
search_match = "#f7768e";
};
keybindings = {
"j" = "move left 1";
"k" = "move down 1";
"l" = "move up 1";
";" = "move right 1";
};
notification_format = {
title = "%artists";
body = "%title";
};
};
keybindings = {
"j" = "move left 1";
"k" = "move down 1";
"l" = "move up 1";
";" = "move right 1";
};
notification_format = {
title = "%artists";
body = "%title";
};
};
}

View file

@ -1,3 +1,4 @@
{ pkgs, ... }: {
xdg.configFile."neovide/config.toml".source = (pkgs.formats.toml { }).generate "neovide" { };
xdg.configFile."neovide/config.toml".source =
(pkgs.formats.toml { }).generate "neovide" { };
}

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,2 @@
{
imports = [
./oxipaste.nix
./oxinoti.nix
./oxishut.nix
./oxidash.nix
];
}
{ imports = [ ./oxipaste.nix ./oxinoti.nix ./oxishut.nix ./oxidash.nix ]; }

View file

@ -1,53 +1,52 @@
{
xdg.configFile."oxidash/style.css" = {
text =
''
#MainWindow {
border-radius: 10px;
}
text = ''
#MainWindow {
border-radius: 10px;
}
#MainBox {
border-radius: 10px;
}
#MainBox {
border-radius: 10px;
}
#MainButtonBox {
padding: 10px;
margin: 5px 0px 5px 0px;
border-radius: 5px;
border: solid 2px #327cd5;
}
#MainButtonBox {
padding: 10px;
margin: 5px 0px 5px 0px;
border-radius: 5px;
border: solid 2px #327cd5;
}
#DoNotDisturbButton {
}
#DoNotDisturbButton {
}
#ExitButton {
}
#ExitButton {
}
#ClearNotificationsButton {
}
#ClearNotificationsButton {
}
#NotificationsWindow {
}
#NotificationsWindow {
}
.debugimage {
border: solid 3px blue;
}
.debugimage {
border: solid 3px blue;
}
.Notification {
padding: 10px;
margin: 5px 0px 5px 0px;
border: solid 2px #327cd5;
border-radius: 5px;
}
.Notification {
padding: 10px;
margin: 5px 0px 5px 0px;
border: solid 2px #327cd5;
border-radius: 5px;
}
.CloseNotificationButton {
margin: 0px 5px 0px 10px;
.CloseNotificationButton {
margin: 0px 5px 0px 10px;
}
.PictureButtonBox {
}
.BaseBox {
}
}
.PictureButtonBox {
}
.BaseBox {
}
}
'';
'';
};
}

View file

@ -1,21 +1,21 @@
{ config, ... }: {
xdg.configFile."oxinoti/style.css" = {
text = /*css*/
text = # css
''
@import url("/home/${config.conf.username}/.config/gtk-3.0/gtk.css");
#MainWindow {
background-color: transparent;
padding: 0px;
/* opacity: 0; */
}
.MainBox {
background-color: transparent;
padding: 0px;
/* opacity: 0; */
}
.NotificationBox {
background-color: #353747;
border-radius: 5px;
@ -23,61 +23,61 @@
margin: 0px;
padding: 5px;
}
.NotificationLow {
border-color: green;
}
.NotificationNormal {
border-color: purple;
}
.NotificationUrgent {
border-color: red;
}
.miscbox {
margin: 0px 10px 0px 0px;
}
.bodybox {
}
.imagebox {
margin: 0px 0px 0px 10px;
}
.appname {
font-size: 0.8rem;
}
.timestamp {
font-size: 0.8rem;
}
.summary {
font-size: 0.8rem;
}
.body {
font-size: 1.2rem;
}
.icon {
font-size: 2rem;
}
.image {
}
.bold {
font-weight: bold;
}
.italic {
font-style: italic;
}
.underline {
text-decoration-line: underline;
}

View file

@ -1,31 +1,30 @@
{
xdg.configFile."oxipaste/style.css" = {
text =
''
.main-window {
padding: 10px;
border-radius: 10px;
border: 2px solid #2AC3DE;
}
.item-window {
padding: 10px;
border-radius: 10px;
border: 2px solid #C0CAF5;
}
.item-button {
background-color: #1A1B26;
border-radius: 5px;
border: 1px solid #6D728D;
}
.delete-button {
margin: 5px 25px 5px 5px;
}
.item-box {
}
'';
text = ''
.main-window {
padding: 10px;
border-radius: 10px;
border: 2px solid #2AC3DE;
}
.item-window {
padding: 10px;
border-radius: 10px;
border: 2px solid #C0CAF5;
}
.item-button {
background-color: #1A1B26;
border-radius: 5px;
border: 1px solid #6D728D;
}
.delete-button {
margin: 5px 25px 5px 5px;
}
.item-box {
}
'';
};
}

View file

@ -1,25 +1,24 @@
{
xdg.configFile."oxishut/style.css" = {
text =
''
#mainwindow {
border-radius: 10px;
}
.mainbox {
border-radius: 5px;
padding: 20px;
}
.button {
margin: 5px;
background-color: #2b2c3b;
-gtk-icon-size: 5rem;
}
.button:hover {
background-color: #3e4152;
}
'';
text = ''
#mainwindow {
border-radius: 10px;
}
.mainbox {
border-radius: 5px;
padding: 20px;
}
.button {
margin: 5px;
background-color: #2b2c3b;
-gtk-icon-size: 5rem;
}
.button:hover {
background-color: #3e4152;
}
'';
};
}

View file

@ -2,48 +2,42 @@
{ config, pkgs, lib, ... }:
let
username = config.mods.nextcloud.username;
password = if (config.sops.secrets?nextcloud.path) then config.sops.secrets.nextcloud.path else "";
password = if (config.sops.secrets ? nextcloud.path) then
config.sops.secrets.nextcloud.path
else
"";
url = config.mods.nextcloud.url;
synclist = config.mods.nextcloud.synclist;
in
lib.mkIf config.mods.nextcloud.enable {
in lib.mkIf config.mods.nextcloud.enable {
systemd.user = {
services =
(builtins.listToAttrs
(map
(opts: {
name = "${opts.name}";
value = {
Unit = {
Description = "Auto sync Nextcloud";
After = "network-online.target";
};
Service = {
Type = "simple";
ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.nextcloud-client}/bin/nextcloudcmd -h --path ${opts.remote} ${opts.local} https://${username}:$(bat ${password})@${url}'";
TimeoutStopSec = "180";
KillMode = "process";
KillSignal = "SIGINT";
};
Install.WantedBy = [ "multi-user.target" ];
};
})
synclist
));
timers =
(builtins.listToAttrs
(map
(opts: {
name = "${opts.name}";
value = {
Unit.Description = "Automatic sync files with Nextcloud when booted up after 1 minute then rerun every 60 minutes";
Timer.OnBootSec = "1min";
Timer.OnUnitActiveSec = "60min";
Install.WantedBy = [ "multi-user.target" "timers.target" ];
};
})
synclist
));
services = (builtins.listToAttrs (map (opts: {
name = "${opts.name}";
value = {
Unit = {
Description = "Auto sync Nextcloud";
After = "network-online.target";
};
Service = {
Type = "simple";
ExecStart =
"${pkgs.bash}/bin/bash -c '${pkgs.nextcloud-client}/bin/nextcloudcmd -h --path ${opts.remote} ${opts.local} https://${username}:$(bat ${password})@${url}'";
TimeoutStopSec = "180";
KillMode = "process";
KillSignal = "SIGINT";
};
Install.WantedBy = [ "multi-user.target" ];
};
}) synclist));
timers = (builtins.listToAttrs (map (opts: {
name = "${opts.name}";
value = {
Unit.Description =
"Automatic sync files with Nextcloud when booted up after 1 minute then rerun every 60 minutes";
Timer.OnBootSec = "1min";
Timer.OnUnitActiveSec = "60min";
Install.WantedBy = [ "multi-user.target" "timers.target" ];
};
}) synclist));
startServices = true;
};
}

View file

@ -1,6 +1,2 @@
{
imports = [
./qt.nix
];
}
{ imports = [ ./qt.nix ]; }

View file

@ -22,91 +22,82 @@ let
border: none;
}
'';
in
{
xdg.configFile."qt5ct/colors/tokyonight.conf" = {
text = "${color}";
};
xdg.configFile."qt6ct/colors/tokyonight.conf" = {
text = "${color}";
};
xdg.configFile."qt5ct/qss/tab.qss" = {
text = "${qss}";
};
in {
xdg.configFile."qt5ct/colors/tokyonight.conf" = { text = "${color}"; };
xdg.configFile."qt6ct/colors/tokyonight.conf" = { text = "${color}"; };
xdg.configFile."qt5ct/qss/tab.qss" = { text = "${qss}"; };
xdg.configFile."qt5ct/qt5ct.conf" = {
text =
''
[Appearance]
color_scheme_path=/home/${username}/.config/qt5ct/colors/tokyonight.conf
custom_palette=true
icon_theme=MoreWaita
standard_dialogs=gtk3
style=Breeze
text = ''
[Appearance]
color_scheme_path=/home/${username}/.config/qt5ct/colors/tokyonight.conf
custom_palette=true
icon_theme=MoreWaita
standard_dialogs=gtk3
style=Breeze
[Fonts]
fixed="Noto Sans,12,-1,5,50,0,0,0,0,0"
general="Noto Sans,12,-1,5,50,0,0,0,0,0"
[Fonts]
fixed="Noto Sans,12,-1,5,50,0,0,0,0,0"
general="Noto Sans,12,-1,5,50,0,0,0,0,0"
[Interface]
activate_item_on_single_click=2
buttonbox_layout=3
cursor_flash_time=1000
dialog_buttons_have_icons=0
double_click_interval=400
gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox
keyboard_scheme=4
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=/home/${username}/.config/qt5ct/qss/tab.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/fusion-fixes.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/scrollbar-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/sliders-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/tooltip-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/traynotification-simple.qss
toolbutton_style=4
underline_shortcut=0
wheel_scroll_lines=3
[Interface]
activate_item_on_single_click=2
buttonbox_layout=3
cursor_flash_time=1000
dialog_buttons_have_icons=0
double_click_interval=400
gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox
keyboard_scheme=4
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=/home/${username}/.config/qt5ct/qss/tab.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/fusion-fixes.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/scrollbar-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/sliders-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/tooltip-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/traynotification-simple.qss
toolbutton_style=4
underline_shortcut=0
wheel_scroll_lines=3
[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q\0\0\n\0\0\0\0\0\0\0\r[\0\0\x5\x7f\0\0\0\0\x2\0\0\0\rp\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q)
[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q\0\0\n\0\0\0\0\0\0\0\r[\0\0\x5\x7f\0\0\0\0\x2\0\0\0\rp\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q)
[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()
'';
[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()
'';
};
xdg.configFile."qt6ct/qt6ct.conf" = {
text =
''
[Appearance]
color_scheme_path=/home/${username}/.config/qt6ct/colors/toykonight.conf
custom_palette=true
standard_dialogs=default
style=Adwaita-Dark
text = ''
[Appearance]
color_scheme_path=/home/${username}/.config/qt6ct/colors/toykonight.conf
custom_palette=true
standard_dialogs=default
style=Adwaita-Dark
[Fonts]
fixed="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
general="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
[Fonts]
fixed="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
general="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
[Interface]
activate_item_on_single_click=2
buttonbox_layout=3
cursor_flash_time=1000
dialog_buttons_have_icons=0
double_click_interval=400
gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox
keyboard_scheme=4
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
[Interface]
activate_item_on_single_click=2
buttonbox_layout=3
cursor_flash_time=1000
dialog_buttons_have_icons=0
double_click_interval=400
gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox
keyboard_scheme=4
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
[PaletteEditor]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x2\x30\0\0\x1\xf4\0\0\0\0\0\0\0\0\0\0\x2\x30\0\0\x1\xf4\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x2\x30\0\0\x1\xf4)
[PaletteEditor]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x2\x30\0\0\x1\xf4\0\0\0\0\0\0\0\0\0\0\x2\x30\0\0\x1\xf4\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x2\x30\0\0\x1\xf4)
[SettingsWindow]
geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\xec\0\0\x3,\0\0\0\0\0\0\0\0\0\0\x3\xec\0\0\x3,\0\0\0\0\0\0\0\0\rp\0\0\0\0\0\0\0\0\0\0\x3\xec\0\0\x3,)"
[SettingsWindow]
geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\xec\0\0\x3,\0\0\0\0\0\0\0\0\0\0\x3\xec\0\0\x3,\0\0\0\0\0\0\0\0\rp\0\0\0\0\0\0\0\0\0\0\x3\xec\0\0\x3,)"
[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()
'';
[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()
'';
};
}

View file

@ -1,8 +1,6 @@
# Copyright (c) 2020-2021 Mihai Fufezan
# credits to fufexan https://github.com/fufexan/dotfiles/blob/main/home/terminal/programs/xdg.nix
{ config
, ...
}:
{ config, ... }:
let
browser = [ "firefox" ];
imageViewer = [ "imv" ];
@ -10,32 +8,28 @@ let
audioPlayer = [ "io.bassi.Amberol" ];
xdgAssociations = type: program: list:
builtins.listToAttrs (map
(e: {
name = "${type}/${e}";
value = program;
})
list);
builtins.listToAttrs (map (e: {
name = "${type}/${e}";
value = program;
}) list);
image = xdgAssociations "image" imageViewer [ "png" "svg" "jpeg" "gif" ];
video = xdgAssociations "video" videoPlayer [ "mp4" "avi" "mkv" ];
audio = xdgAssociations "audio" audioPlayer [ "mp3" "flac" "wav" "aac" ];
browserTypes =
(xdgAssociations "application" browser [
"json"
"x-extension-htm"
"x-extension-html"
"x-extension-shtml"
"x-extension-xht"
"x-extension-xhtml"
])
// (xdgAssociations "x-scheme-handler" browser [
"about"
"ftp"
"http"
"https"
"unknown"
]);
browserTypes = (xdgAssociations "application" browser [
"json"
"x-extension-htm"
"x-extension-html"
"x-extension-shtml"
"x-extension-xht"
"x-extension-xhtml"
]) // (xdgAssociations "x-scheme-handler" browser [
"about"
"ftp"
"http"
"https"
"unknown"
]);
# XDG MIME types
associations = builtins.mapAttrs (_: v: (map (e: "${e}.desktop") v)) ({
@ -44,13 +38,8 @@ let
"text/plain" = [ "neovide" ];
"x-scheme-handler/chrome" = [ "com.brave.browser" ];
"inode/directory" = [ "yazi" ];
}
// image
// video
// audio
// browserTypes);
in
{
} // image // video // audio // browserTypes);
in {
xdg = {
enable = true;
cacheHome = config.home.homeDirectory + "/.local/cache";