aboutsummaryrefslogtreecommitdiff
path: root/examples/system/common.nix
diff options
context:
space:
mode:
authornotgne22020-10-26 21:05:03 -0700
committernotgne22020-10-26 21:05:03 -0700
commit997d1151fd3d303eaa9c2c41312ff87eee986418 (patch)
tree229deae6687a5b454cf2417fcb022a78f8ac20b8 /examples/system/common.nix
parent30197f8a352c879f0070e059ebc117dc17e8270f (diff)
parentdf002c31a64409350a3cb8825364542c65a4d00a (diff)
Merge branch 'master' into review
Diffstat (limited to 'examples/system/common.nix')
-rw-r--r--examples/system/common.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/examples/system/common.nix b/examples/system/common.nix
new file mode 100644
index 0000000..83ea225
--- /dev/null
+++ b/examples/system/common.nix
@@ -0,0 +1,34 @@
+# SPDX-FileCopyrightText: 2020 Serokell <https://serokell.io/>
+#
+# SPDX-License-Identifier: MPL-2.0
+
+{
+ 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="
+ ];
+}