diff options
author | Linnnus <[email protected]> | 2024-11-16 12:53:33 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-11-16 12:53:33 +0100 |
commit | 1c3e554e7f77a6d2a2374ef4fe32bf0d287dfd40 (patch) | |
tree | f8fc7738b29b8a5c9c7190e5dbf8222862399bc7 | |
parent | a876fe32b44dac8d6db23e7cd6b6f96b75ba0bbb (diff) |
home+muhammed Add disable-sleep to shell-utils
-rw-r--r-- | home/shell-utils/default.nix | 10 | ||||
-rw-r--r-- | hosts/muhammed/configuration.nix | 5 |
2 files changed, 10 insertions, 5 deletions
diff --git a/home/shell-utils/default.nix b/home/shell-utils/default.nix index bd07597..0207d40 100644 --- a/home/shell-utils/default.nix +++ b/home/shell-utils/default.nix @@ -1,5 +1,8 @@ # This module adds some common shell utilities to my home managed environment. -{pkgs, ...}: { +{pkgs, ...}: let + isLinux = pkgs.stdenv.isLinux; + isDarwin = pkgs.stdenv.isDarwin; +in { home.packages = with pkgs; [ human-sleep @@ -7,11 +10,12 @@ jc jq ] - ++ lib.optionals (pkgs.stdenv.isLinux) [ + ++ lib.optionals isLinux [ file # File is not included in NixOS, but *is* included in Darwin. ] - ++ lib.optionals (pkgs.stdenv.isDarwin) [ + ++ lib.optionals isDarwin [ pbv trash + disable-sleep ]; } diff --git a/hosts/muhammed/configuration.nix b/hosts/muhammed/configuration.nix index b5d1aa8..dd9a737 100644 --- a/hosts/muhammed/configuration.nix +++ b/hosts/muhammed/configuration.nix @@ -1,7 +1,8 @@ # This file contains the configuration for my Macbook Pro. { flakeInputs, - config, + pkgs, + lib, ... }: { imports = [ @@ -37,7 +38,7 @@ environment.etc."sudoers.d/10-unauthenticated-commands".text = let commands = [ "/usr/bin/pmset" - "${config.users.users.linus.home}/.local/bin/monner" # TODO: We should really package this. + (lib.getExe pkgs.disable-sleep) ]; in '' %admin ALL=(ALL:ALL) NOPASSWD: ${builtins.concatStringsSep ", " commands} |