|
|
@ -1,15 +1,17 @@
|
|
|
|
local utils = require 'utils'
|
|
|
|
local utils = require 'utils'
|
|
|
|
local silo = require 'silo'
|
|
|
|
local silo = require 'silo'
|
|
|
|
local log = require 'log'
|
|
|
|
local log = require 'log'
|
|
|
|
|
|
|
|
local path = require 'path'
|
|
|
|
|
|
|
|
|
|
|
|
local exports = {}
|
|
|
|
local exports = {}
|
|
|
|
|
|
|
|
|
|
|
|
local shasum = utils.ext_piped "shasum"
|
|
|
|
local shasum = utils.ext_piped "shasum"
|
|
|
|
local ha_checksum = ""
|
|
|
|
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
|
|
|
|
if path.exists(homenix) then
|
|
|
|
ha_checksum = (shasum { silo.dirs.config .. "/home-manager/home.nix" }).stdout
|
|
|
|
ha_checksum = (shasum {homenix}).stdout
|
|
|
|
log.debug(ha_checksum)
|
|
|
|
log.debug(ha_checksum)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -40,7 +42,7 @@ local function link_apps()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
exports.after_apply_all = function()
|
|
|
|
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"
|
|
|
|
local hm = utils.ext "home-manager"
|
|
|
|
|
|
|
|
|
|
|
|
log.info("Applying home-manager config")
|
|
|
|
log.info("Applying home-manager config")
|
|
|
|