diff options
-rw-r--r-- | custom/thinklight.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/custom/thinklight.nix b/custom/thinklight.nix index f001f9fd..ced11d02 100644 --- a/custom/thinklight.nix +++ b/custom/thinklight.nix | |||
@@ -21,7 +21,7 @@ stdenv.mkDerivation { | |||
21 | import Prelude hiding (readFile) | 21 | import Prelude hiding (readFile) |
22 | import Data.List (intersperse) | 22 | import Data.List (intersperse) |
23 | import Data.Maybe (fromMaybe) | 23 | import Data.Maybe (fromMaybe) |
24 | import System.Posix.User (setUserID) | 24 | import System.Posix.User (setEffectiveUserID) |
25 | 25 | ||
26 | data Mode = On | Off | Toggle | Blink deriving (Read, Show, Eq) | 26 | data Mode = On | Off | Toggle | Blink deriving (Read, Show, Eq) |
27 | 27 | ||
@@ -29,7 +29,7 @@ stdenv.mkDerivation { | |||
29 | main = do | 29 | main = do |
30 | args <- getArgs | 30 | args <- getArgs |
31 | let mode = if length args >= 1 then read $ head args else Toggle | 31 | let mode = if length args >= 1 then read $ head args else Toggle |
32 | setUserID 0 | 32 | setEffectiveUserID 0 |
33 | sequence $ map (\g -> catchIOError g (\e -> if isDoesNotExistError e then return () else ioError e)) [thinklight mode] | 33 | sequence $ map (\g -> catchIOError g (\e -> if isDoesNotExistError e then return () else ioError e)) [thinklight mode] |
34 | return () | 34 | return () |
35 | 35 | ||