diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/notify-user.hs | 4 | ||||
-rw-r--r-- | custom/notify-users.nix | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/custom/notify-user.hs b/custom/notify-user.hs index f9cc2369..264d6f86 100644 --- a/custom/notify-user.hs +++ b/custom/notify-user.hs | |||
@@ -24,7 +24,7 @@ deriving instance Read Notify.Urgency | |||
24 | 24 | ||
25 | main :: IO () | 25 | main :: IO () |
26 | main = do | 26 | main = do |
27 | envFiles <- glob "@userHome@/.dbus/session-bus/*" | 27 | envFiles <- glob "@home@/.dbus/session-bus/*" |
28 | forM_ envFiles $ \envFile -> do | 28 | forM_ envFiles $ \envFile -> do |
29 | sessionAddr <- unQuote . tail . snd . break (== '=') . head . filter ("DBUS_SESSION_BUS_ADDRESS=" `isPrefixOf`) . lines <$> readFile envFile | 29 | sessionAddr <- unQuote . tail . snd . break (== '=') . head . filter ("DBUS_SESSION_BUS_ADDRESS=" `isPrefixOf`) . lines <$> readFile envFile |
30 | setEnv "DBUS_SESSION_BUS_ADDRESS" sessionAddr | 30 | setEnv "DBUS_SESSION_BUS_ADDRESS" sessionAddr |
@@ -37,7 +37,7 @@ main = do | |||
37 | ] | 37 | ] |
38 | let | 38 | let |
39 | urgency = fromMaybe Notify.Normal $ readMaybe . caseForRead =<< Map.lookup "urgency" opts | 39 | urgency = fromMaybe Notify.Normal $ readMaybe . caseForRead =<< Map.lookup "urgency" opts |
40 | appName = fromMaybe "notify-@userName@" $ Map.lookup "app-name" opts | 40 | appName = fromMaybe "notify-@user@" $ Map.lookup "app-name" opts |
41 | category = fromMaybe "" $ Map.lookup "category" opts | 41 | category = fromMaybe "" $ Map.lookup "category" opts |
42 | Notify.display_ $ Notify.summary summary <> Notify.body contents <> Notify.appName appName <> Notify.urgency urgency <> Notify.category category | 42 | Notify.display_ $ Notify.summary summary <> Notify.body contents <> Notify.appName appName <> Notify.urgency urgency <> Notify.category category |
43 | _ -> exitWith $ ExitFailure 2 | 43 | _ -> exitWith $ ExitFailure 2 |
diff --git a/custom/notify-users.nix b/custom/notify-users.nix index 82cbcc6c..296195f6 100644 --- a/custom/notify-users.nix +++ b/custom/notify-users.nix | |||
@@ -15,8 +15,8 @@ let | |||
15 | cp $src notify-user.hs | 15 | cp $src notify-user.hs |
16 | ''; | 16 | ''; |
17 | 17 | ||
18 | inherit userName; | 18 | inherit user; |
19 | userHome = config.users.users."${userName}".home; | 19 | home = config.users.users."${userName}".home; |
20 | 20 | ||
21 | buildPhase = '' | 21 | buildPhase = '' |
22 | substituteAllInPlace notify-user.hs | 22 | substituteAllInPlace notify-user.hs |