diff options
author | notgne2 | 2020-09-28 16:17:31 -0700 |
---|---|---|
committer | notgne2 | 2020-09-28 16:17:31 -0700 |
commit | edaed825650eea32878441d3b8c7eb40e8877882 (patch) | |
tree | ba0e313a5cd2711de11e9fe9d973073171519ee5 /examples/system/common.nix | |
parent | 239d0f8999b47e9e76589ee1fa2d9f3459c47335 (diff) |
Add examples
Diffstat (limited to 'examples/system/common.nix')
-rw-r--r-- | examples/system/common.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/system/common.nix b/examples/system/common.nix new file mode 100644 index 0000000..7e7448e --- /dev/null +++ b/examples/system/common.nix @@ -0,0 +1,30 @@ +{ + boot.loader.systemd-boot.enable = true; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; + fsType = "btrfs"; + }; + + users.users.admin = { + isNormalUser = true; + extraGroups = [ "wheel" "sudo" ]; + password = "123"; + }; + + services.openssh = { enable = true; }; + + # Another option would be root on the server + security.sudo.extraRules = [{ + groups = [ "wheel" ]; + commands = [{ + command = "ALL"; + options = [ "NOPASSWD" ]; + }]; + }]; + + nix.binaryCachePublicKeys = [ + (builtins.readFile ./nix-pub.pem) + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; +} |