Skip to content

Commit 59b19cc

Browse files
committed
feat: add /usr/bin and /usr/local/bin to PATH
1 parent f95d2c7 commit 59b19cc

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/Commands/Create.hs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ createSystemdService name homeDir command ramLimit cpuLimit = do
4747
replacePlaceholders
4848
dummyService
4949
[ ("name", name),
50-
("home", homeDir <> "/mountpoint/src"),
50+
("home", homeDir <> "/mountpoint"),
5151
("command", command),
5252
("ram-limit", ramLimit),
5353
("cpu-limit", cpuLimit)
@@ -110,7 +110,15 @@ makeUserHomeNonWritable homeDir = do
110110
writeUserShellConfig :: String -> Step
111111
writeUserShellConfig homeDir = do
112112
let shells = ["bash", "zsh"]
113-
let shellConfig = "export HOME=" <> homeDir <> "/mountpoint" <> "\n" <> "cd $HOME" <> "\n"
113+
let shellConfig =
114+
"export HOME="
115+
<> homeDir
116+
<> "/mountpoint"
117+
<> "\n"
118+
<> "export PATH=\"$PATH:/usr/bin:/usr/local/bin:$HOME/.bin\""
119+
<> "\n"
120+
<> "cd $HOME"
121+
<> "\n"
114122
let shellConfigPath shell = homeDir <> "/." <> shell <> "rc"
115123

116124
liftIO $ forM_ shells $ \shell -> writeFile (shellConfigPath shell) shellConfig

0 commit comments

Comments
 (0)