mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2025-01-21 13:31:53 +01:00
remove hard-coded username
This commit is contained in:
parent
28df534c5f
commit
5d5f4dd6d1
3 changed files with 13 additions and 3 deletions
10
confgen.lua
10
confgen.lua
|
@ -2,6 +2,7 @@ cg.addPath ".config"
|
|||
cg.addPath ".local"
|
||||
cg.addPath ".ssh"
|
||||
cg.addPath ".cargo"
|
||||
cg.addPath "etc"
|
||||
|
||||
for k, v in pairs(require "cg_opts") do
|
||||
cg.opt[k] = v
|
||||
|
@ -18,3 +19,12 @@ cg.opt.getDeviceConf = function(id)
|
|||
|
||||
return file:read "*a"
|
||||
end
|
||||
|
||||
-- Get the output of a system command
|
||||
cg.opt.system = function(cmd)
|
||||
local handle = io.popen(cmd)
|
||||
if handle == nil then
|
||||
error("Failed to spawn process" .. cmd)
|
||||
end
|
||||
return handle:read("*a"):gsub("%s+", "")
|
||||
end
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty -o '-p -- lordmzte' --noclear --skip-login - $TERM
|
|
@ -0,0 +1,3 @@
|
|||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty -o '-p -- <% opt.system "whoami" %>' --noclear --skip-login - $TERM
|
Loading…
Add table
Reference in a new issue