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