|
|
|
@ -1,15 +1,17 @@
|
|
|
|
|
local utils = require 'utils'
|
|
|
|
|
local silo = require 'silo'
|
|
|
|
|
local log = require 'log'
|
|
|
|
|
local path = require 'path'
|
|
|
|
|
|
|
|
|
|
local exports = {}
|
|
|
|
|
|
|
|
|
|
local shasum = utils.ext_piped "shasum"
|
|
|
|
|
local ha_checksum = ""
|
|
|
|
|
|
|
|
|
|
local homenix = path.join { silo.dirs.config, "home-manager/home.nix" }
|
|
|
|
|
|
|
|
|
|
if utils.nu("'" .. silo.dirs.config .. "/home-manager/home.nix' | path exists") == "true\n" then
|
|
|
|
|
ha_checksum = (shasum { silo.dirs.config .. "/home-manager/home.nix" }).stdout
|
|
|
|
|
if path.exists(homenix) then
|
|
|
|
|
ha_checksum = (shasum {homenix}).stdout
|
|
|
|
|
log.debug(ha_checksum)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -40,7 +42,7 @@ local function link_apps()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
exports.after_apply_all = function()
|
|
|
|
|
if utils.nu "which home-manager | is-empty" == "false\n" and (shasum { silo.dirs.config .. "/home-manager/home.nix" }).stdout ~= ha_checksum then
|
|
|
|
|
if utils.which "home-manager" == nil and (shasum {homenix}).stdout ~= ha_checksum then
|
|
|
|
|
local hm = utils.ext "home-manager"
|
|
|
|
|
|
|
|
|
|
log.info("Applying home-manager config")
|
|
|
|
|