summaryrefslogtreecommitdiff
path: root/hosts/muhammed
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2023-09-05 09:48:04 +0200
committerLinnnus <[email protected]>2023-09-05 09:48:04 +0200
commit7d4ab89f1e6264e124109bf25eafaafdf1aec02a (patch)
treeb6af29bfe66c231b1a71bb05c9df211afe4cf341 /hosts/muhammed
Initial commit
Diffstat (limited to 'hosts/muhammed')
-rw-r--r--hosts/muhammed/configuration.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/hosts/muhammed/configuration.nix b/hosts/muhammed/configuration.nix
new file mode 100644
index 0000000..2645b80
--- /dev/null
+++ b/hosts/muhammed/configuration.nix
@@ -0,0 +1,31 @@
+# This file contains the configuration for my Macbook Pro.
+
+{ pkgs, inputs, lib, ... }:
+
+{
+ # Specify the location of this configuration file. Very meta.
+ # environment.darwinConfig = inputs.self + "/hosts/muhammed/configuration.nix";
+
+ # Use the Nix daemon.
+ services.nix-daemon.enable = true;
+
+ # Set up main account.
+ users.users.linus = {
+ description = "Personal user account";
+ home = "/Users/linus";
+ };
+
+ # Don't request password for running pmset.
+ environment.etc."sudoers.d/10-unauthenticated-commands".text =
+ let
+ commands = [
+ "/usr/bin/pmset"
+ ];
+ in
+ ''
+ %admin ALL=(ALL:ALL) NOPASSWD: ${builtins.concatStringsSep ", " commands}
+ '';
+
+ # Backwards compatability. Check `darwin-rebuild changelog` before bumping.
+ system.stateVersion = 4;
+}