summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/shell-utils/default.nix10
-rw-r--r--hosts/muhammed/configuration.nix5
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}