@@ -111,71 +111,21 @@ in {
111111 TESTING_FARM_PUBLIC_IP_RESOLVE_TRIES = 10 ;
112112 } ;
113113
114- # Restore host specific configuration links, before checking link targets
115- home . activation . restoreNixLinks = lib . hm . dag . entryBefore [ "checkLinkTargets" ] ''
116- files="
117- $HOME/.config/foot/foot.ini
118- $HOME/.config/sway/config
119- $HOME/.config/waybar/config
120- $HOME/.config/waybar/style.css
121- $HOME/.local/share/applications/mimeapps.list
122- $HOME/.mozilla/firefox/profiles.ini
123- $HOME/.mozilla/firefox/${ username } /containers.json
124- $HOME/.mozilla/firefox/${ username } /search.json.mozlz4
125- $HOME/.mozilla/firefox/${ username } /user.js
126- "
127-
128- for file in $files; do
129- [ ! -L "$file".lnk ] && continue
130- echo -e "\e[32mRestoring link '$file' from '$file.lnk'\e[0m"
131- mv "$file".lnk "$file"
132- done
133- '' ;
134-
135- # For host configuration we need to create copy of the files, so the host system can see them
136- home . activation . createHostConfig = lib . hm . dag . entryAfter [ "linkGeneration" ] ''
137- files="
138- $HOME/.config/foot/foot.ini
139- $HOME/.config/sway/config
140- $HOME/.config/waybar/config
141- $HOME/.config/waybar/style.css
142- $HOME/.local/share/applications/mimeapps.list
143- $HOME/.mozilla/firefox/profiles.ini
144- $HOME/.mozilla/firefox/${ username } /containers.json
145- $HOME/.mozilla/firefox/${ username } /search.json.mozlz4
146- $HOME/.mozilla/firefox/${ username } /user.js
147- "
148-
149- for file in $files; do
150- # Ignore if the file is an ordinary file, home-manager will replace it if needed
151- [ ! -L "$file" ] && continue
152-
153- # Create copy of the symlinked file
154- echo -e "\e[32mStoring link '$file.lnk'\e[0m"
155- target=$(readlink -f "$file")
156- mv "$file" "$file".lnk
157-
158- echo -e "\e[32mCopying '$target' to '$file'\e[0m"
159- cp "$target" "$file"
160- chmod 644 "$file"
161- done
162-
163- # NOTE: slack disabled
164- desktop_entries="
165- 1password
166- discord
167- "
168-
169- for entry in $desktop_entries; do
170- src="$HOME/.nix-profile/share/applications/$entry.desktop"
171-
172- # do not break if the file does not yet exist
173- test -e $src || continue
174-
175- echo -e "\e[32mCreating desktop entry '$entry.desktop'\e[0m"
176- cp -f $src $HOME/.local/share/applications
177- done
178- '' ;
114+ hostConfig = {
115+ enable = true ;
116+ xdgDesktopEntries = true ;
117+ files = [
118+ ".config/foot/foot.ini"
119+ ".config/sway/config"
120+ ".config/waybar/config"
121+ ".config/waybar/style.css"
122+ ".local/share/applications/mimeapps.list"
123+ ".mozilla/firefox/profiles.ini"
124+ ".mozilla/firefox/${ username } /containers.json"
125+ ".mozilla/firefox/${ username } /search.json.mozlz4"
126+ ".mozilla/firefox/${ username } /user.js"
127+ ] ;
128+ } ;
179129
180130 # For various final configurations
181131 home . activation . toolboxSetup = lib . hm . dag . entryAfter [ "reloadSystemd" ] ''
0 commit comments