nix: use xdg.configFile instead of home.file where possible
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
7f34e497a2
commit
dd791f454e
21 changed files with 98 additions and 69 deletions
|
@ -14,7 +14,7 @@ in {
|
|||
# https://github.com/firecat53/bitwarden-menu
|
||||
#!! Options not available, files written directly
|
||||
# https://github.com/firecat53/bitwarden-menu/blob/main/docs/configure.md
|
||||
home.file.".config/bwm/config.ini".text = ''
|
||||
xdg.configFile."bwm/config.ini".text = ''
|
||||
[dmenu]
|
||||
dmenu_command = ${wofi} --dmenu
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ in {
|
|||
|
||||
home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/savedra1/clipse?tab=readme-ov-file#configuration
|
||||
home.file.".config/clipse/config.json".text = ''
|
||||
xdg.configFile."clipse/config.json".text = ''
|
||||
{
|
||||
"historyFile": "clipboard_history.json",
|
||||
"maxHistory": 50,
|
||||
|
|
|
@ -9,8 +9,9 @@ in {
|
|||
options.custom.programs.discord.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.myned = mkIf cfg.enable {
|
||||
home.file.".config/BetterDiscord".source =
|
||||
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink
|
||||
"/home/${config.custom.username}/SYNC/common/config/discord/BetterDiscord";
|
||||
xdg.configFile."BetterDiscord" = {
|
||||
force = true;
|
||||
source = config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink "${config.custom.sync}/common/config/discord/BetterDiscord";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ in {
|
|||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# Element Desktop custom themes
|
||||
# https://github.com/aaronraimist/element-themes
|
||||
home.file.".config/Element/config.json".text = ''
|
||||
xdg.configFile."Element/config.json".text = ''
|
||||
{
|
||||
"show_labs_settings": true,
|
||||
"setting_defaults": {
|
||||
|
|
|
@ -30,7 +30,7 @@ in {
|
|||
|
||||
# https://github.com/fastfetch-cli/fastfetch
|
||||
#!! Option not available, files written directly
|
||||
home-manager.users.${config.custom.username}.home.file.".config/fastfetch/config.jsonc".text = ''
|
||||
home-manager.users.${config.custom.username}.xdg.configFile."fastfetch/config.jsonc".text = ''
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
|
|
|
@ -17,8 +17,11 @@ in {
|
|||
environment.systemPackages = [cfg.package];
|
||||
|
||||
#!! Options not available, files synced
|
||||
home-manager.users.${config.custom.username}.home.file.".config/libreoffice/4/user".source =
|
||||
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink
|
||||
"/home/${config.custom.username}/SYNC/linux/config/libreoffice/user";
|
||||
home-manager.users.${config.custom.username} = {
|
||||
xdg.configFile.".config/libreoffice/4/user" = {
|
||||
force = true;
|
||||
source = config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink "${config.custom.sync}/linux/config/libreoffice/user";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,8 +10,9 @@ in {
|
|||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
#!! Synced imperative configuration
|
||||
home.file.".logseq/".source =
|
||||
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink
|
||||
"/home/${config.custom.username}/SYNC/common/config/logseq/";
|
||||
home.file.".logseq/" = {
|
||||
force = true;
|
||||
source = config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink "${config.custom.sync}/common/config/logseq/";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ in {
|
|||
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
|
||||
#!! Option not available, files written directly
|
||||
# FIXME: active_chars does not take effect
|
||||
home.file.".config/networkmanager-dmenu/config.ini".text = ''
|
||||
xdg.configFile."networkmanager-dmenu/config.ini".text = ''
|
||||
[dmenu]
|
||||
dmenu_command = ${menu} --input
|
||||
active_chars = >
|
||||
|
|
|
@ -12,7 +12,7 @@ in {
|
|||
# https://github.com/Syllo/nvtop
|
||||
#!! Options not available, config written directly
|
||||
#?? Imperative config generated by F12
|
||||
home.file.".config/nvtop/interface.ini".text = ''
|
||||
xdg.configFile."nvtop/interface.ini".text = ''
|
||||
[GeneralOption]
|
||||
UseColor = true
|
||||
UpdateInterval = 3000
|
||||
|
|
|
@ -15,14 +15,14 @@ in {
|
|||
#?? systemctl --user enable --now onedrive@onedrive.service
|
||||
|
||||
#!! Option not available, files written directly
|
||||
home.file = {
|
||||
xdg.configFile = {
|
||||
# https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#configuration
|
||||
".config/onedrive/config".text = ''
|
||||
"onedrive/config".text = ''
|
||||
sync_dir = "~/SYNC/edu/hawkeye"
|
||||
'';
|
||||
|
||||
# https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#performing-a-selective-sync-via-sync_list-file
|
||||
".config/onedrive/sync_list".text = ''
|
||||
"onedrive/sync_list".text = ''
|
||||
!/Apps/
|
||||
!/Attachments/
|
||||
/*
|
||||
|
|
|
@ -11,7 +11,10 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
home-manager.users.${config.custom.username} = {
|
||||
#!! Imperative configuration
|
||||
home.file.".config/remmina/remmina.pref".source = config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink "${config.custom.sync}/linux/config/remmina/remmina.pref";
|
||||
xdg.configFile."remmina/remmina.pref" = {
|
||||
force = true;
|
||||
source = config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink "${config.custom.sync}/linux/config/remmina/remmina.pref";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ in {
|
|||
# https://github.com/fdw/rofi-rbw?tab=readme-ov-file#configuration
|
||||
# TODO: Enable input emulation when merged (uinput.enable?)
|
||||
# https://github.com/NixOS/nixpkgs/pull/303745
|
||||
home.file.".config/rofi-rbw.rc".text = ''
|
||||
xdg.configFile."rofi-rbw.rc".text = ''
|
||||
action=copy
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -77,7 +77,6 @@ in {
|
|||
accounts.email.accounts.${config.custom.username}.thunderbird.enable = true;
|
||||
|
||||
# https://github.com/rafaelmardojai/thunderbird-gnome-theme
|
||||
home.file.".thunderbird/default/chrome/thunderbird-gnome-theme".source =
|
||||
inputs.thunderbird-gnome-theme;
|
||||
home.file.".thunderbird/default/chrome/thunderbird-gnome-theme".source = inputs.thunderbird-gnome-theme;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ in {
|
|||
|
||||
# https://github.com/tio/tio
|
||||
#!! Options not available, files written directly
|
||||
home-manager.users.${config.custom.username}.home.file.".config/tio/config".text = ''
|
||||
home-manager.users.${config.custom.username}.xdg.configFile."tio/config".text = ''
|
||||
baudrate = 9600
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -81,44 +81,59 @@ in {
|
|||
]);
|
||||
};
|
||||
|
||||
xdg.configFile = with config.home-manager.users.${config.custom.username}.lib.file; {
|
||||
# Imperative symlinks intended to be synced
|
||||
"VSCodium/User/settings.json" = {
|
||||
force = true;
|
||||
source = mkOutOfStoreSymlink "${config.custom.sync}/dev/config/vscode/settings.json";
|
||||
};
|
||||
|
||||
"VSCodium/User/keybindings.json" = {
|
||||
force = true;
|
||||
source = mkOutOfStoreSymlink "${config.custom.sync}/dev/config/vscode/keybindings.json";
|
||||
};
|
||||
|
||||
"VSCodium/User/snippets/" = {
|
||||
force = true;
|
||||
source = mkOutOfStoreSymlink "${config.custom.sync}/dev/config/vscode/snippets/";
|
||||
};
|
||||
|
||||
"VSCodium/User/profiles/" = {
|
||||
force = true;
|
||||
source = mkOutOfStoreSymlink "${config.custom.sync}/dev/config/vscode/profiles/";
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
# https://github.com/nix-community/nixd/blob/main/nixd/docs/features.md
|
||||
sessionVariables.NIXD_FLAGS = "--inlay-hints=false"; # Disable package versions in the editor
|
||||
|
||||
file = with config.home-manager.users.${config.custom.username}.lib.file; {
|
||||
# Imperative symlinks intended to be synced
|
||||
".config/VSCodium/User/settings.json".source = mkOutOfStoreSymlink "/home/${config.custom.username}/SYNC/dev/config/vscode/settings.json";
|
||||
".config/VSCodium/User/keybindings.json".source = mkOutOfStoreSymlink "/home/${config.custom.username}/SYNC/dev/config/vscode/keybindings.json";
|
||||
".config/VSCodium/User/snippets/".source = mkOutOfStoreSymlink "/home/${config.custom.username}/SYNC/dev/config/vscode/snippets/";
|
||||
".config/VSCodium/User/profiles/".source = mkOutOfStoreSymlink "/home/${config.custom.username}/SYNC/dev/config/vscode/profiles/";
|
||||
# Work around wrong wmclass
|
||||
# https://github.com/microsoft/vscode/issues/129953
|
||||
# https://github.com/VSCodium/vscodium/issues/1414
|
||||
#!! Keep updated with upstream desktop file
|
||||
#?? cat /etc/profiles/per-user/USER/share/applications/codium.desktop
|
||||
# file.".local/share/applications/codium.desktop".text = ''
|
||||
# [Desktop Entry]
|
||||
# Actions=new-empty-window
|
||||
# Categories=Utility;TextEditor;Development;IDE
|
||||
# Comment=Code Editing. Redefined.
|
||||
# Exec=codium %F
|
||||
# GenericName=Text Editor
|
||||
# Icon=vscodium
|
||||
# Keywords=vscode
|
||||
# MimeType=text/plain;inode/directory
|
||||
# Name=VSCodium
|
||||
# StartupNotify=true
|
||||
# StartupWMClass=codium-url-handler
|
||||
# Type=Application
|
||||
# Version=1.4
|
||||
|
||||
# Work around wrong wmclass
|
||||
# https://github.com/microsoft/vscode/issues/129953
|
||||
# https://github.com/VSCodium/vscodium/issues/1414
|
||||
#!! Keep updated with upstream desktop file
|
||||
#?? cat /etc/profiles/per-user/USER/share/applications/codium.desktop
|
||||
# ".local/share/applications/codium.desktop".text = ''
|
||||
# [Desktop Entry]
|
||||
# Actions=new-empty-window
|
||||
# Categories=Utility;TextEditor;Development;IDE
|
||||
# Comment=Code Editing. Redefined.
|
||||
# Exec=codium %F
|
||||
# GenericName=Text Editor
|
||||
# Icon=vscodium
|
||||
# Keywords=vscode
|
||||
# MimeType=text/plain;inode/directory
|
||||
# Name=VSCodium
|
||||
# StartupNotify=true
|
||||
# StartupWMClass=codium-url-handler
|
||||
# Type=Application
|
||||
# Version=1.4
|
||||
|
||||
# [Desktop Action new-empty-window]
|
||||
# Exec=codium --new-window %F
|
||||
# Icon=vscodium
|
||||
# Name=New Empty Window
|
||||
# '';
|
||||
};
|
||||
# [Desktop Action new-empty-window]
|
||||
# Exec=codium --new-window %F
|
||||
# Icon=vscodium
|
||||
# Name=New Empty Window
|
||||
# '';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -357,9 +357,9 @@ in {
|
|||
#?? text
|
||||
#?? tooltip
|
||||
#?? class
|
||||
home.file = {
|
||||
xdg.configFile = {
|
||||
# Return inhibit idle status
|
||||
".config/waybar/scripts/inhibitor.sh" = {
|
||||
"waybar/scripts/inhibitor.sh" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#! /usr/bin/env ${bash}
|
||||
|
@ -377,7 +377,7 @@ in {
|
|||
};
|
||||
|
||||
# Return tailscale status
|
||||
".config/waybar/scripts/vm.sh" = {
|
||||
"waybar/scripts/vm.sh" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#! /usr/bin/env ${bash}
|
||||
|
@ -404,7 +404,7 @@ in {
|
|||
};
|
||||
|
||||
# Return tailscale status
|
||||
".config/waybar/scripts/vpn.sh" = {
|
||||
"waybar/scripts/vpn.sh" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#! /usr/bin/env ${bash}
|
||||
|
|
|
@ -17,8 +17,8 @@ in {
|
|||
services.clipcat.enable = true;
|
||||
|
||||
# https://github.com/xrelkd/clipcat?tab=readme-ov-file#configuration
|
||||
home-manager.users.${config.custom.username}.home.file = {
|
||||
".config/clipcat/clipcatd.toml".text = ''
|
||||
home-manager.users.${config.custom.username}.xdg.configFile = {
|
||||
"clipcat/clipcatd.toml".text = ''
|
||||
daemonize = false
|
||||
max_history = 100
|
||||
|
||||
|
@ -30,7 +30,7 @@ in {
|
|||
enable_http = false
|
||||
'';
|
||||
|
||||
".config/clipcat/clipcat-menu.toml".text = ''
|
||||
"clipcat/clipcat-menu.toml".text = ''
|
||||
finder = "custom_finder"
|
||||
|
||||
[custom_finder]
|
||||
|
|
|
@ -15,9 +15,16 @@ in {
|
|||
|
||||
### PRESETS ###
|
||||
# https://github.com/Digitalone1/EasyEffects-Presets
|
||||
home.file = with config.home-manager.users.${config.custom.username}.lib.file; {
|
||||
".config/easyeffects/input".source = mkOutOfStoreSymlink "/home/${config.custom.username}/SYNC/linux/config/easyeffects/input";
|
||||
".config/easyeffects/output".source = mkOutOfStoreSymlink "/home/${config.custom.username}/SYNC/linux/config/easyeffects/output";
|
||||
xdg.configFile = with config.home-manager.users.${config.custom.username}.lib.file; {
|
||||
"easyeffects/input" = {
|
||||
force = true;
|
||||
source = mkOutOfStoreSymlink "${config.custom.sync}/linux/config/easyeffects/input";
|
||||
};
|
||||
|
||||
"easyeffects/output" = {
|
||||
force = true;
|
||||
source = mkOutOfStoreSymlink "${config.custom.sync}/linux/config/easyeffects/output";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ in {
|
|||
# https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html
|
||||
settings = {
|
||||
Public.path = "/home/${config.custom.username}/Public";
|
||||
SYNC.path = "/home/${config.custom.username}/SYNC";
|
||||
SYNC.path = config.custom.sync;
|
||||
|
||||
global = {
|
||||
"allow insecure wide links" = "yes";
|
||||
|
|
|
@ -15,6 +15,6 @@ in {
|
|||
### THEME ###
|
||||
# https://github.com/ErikReider/SwayOSD/blob/main/data/style/style.scss
|
||||
#!! Options not yet available, files written directly
|
||||
home.file.".config/swayosd/style.css".text = '''';
|
||||
xdg.configFile."swayosd/style.css".text = '''';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ in {
|
|||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
templates = "/home/${config.custom.username}/SYNC/linux/config/templates";
|
||||
templates = "${config.custom.sync}/linux/config/templates";
|
||||
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = "${config.home-manager.users.${config.custom.username}.xdg.userDirs.pictures}/Screenshots";
|
||||
|
|
Loading…
Reference in a new issue