summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/core.nix53
-rw-r--r--common/default.nix9
2 files changed, 62 insertions, 0 deletions
diff --git a/common/core.nix b/common/core.nix
new file mode 100644
index 0000000..5d36646
--- /dev/null
+++ b/common/core.nix
@@ -0,0 +1,53 @@
+# Boot, networking, locale, and Nix settings shared by all machines.
+{ pkgs, ... }:
+
+{
+ # Editor available on every machine (even a headless one).
+ environment.systemPackages = [ pkgs.neovim ];
+ programs.neovim = {
+ enable = true;
+ defaultEditor = true;
+ };
+
+ # Bootloader.
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+
+ # Enable networking
+ networking.networkmanager.enable = true;
+
+ # for tailscale
+ networking.firewall.trustedInterfaces = [ "tailscale0" ];
+ networking.firewall.allowedUDPPorts = [ 41641 ];
+ services.tailscale.enable = true;
+
+ # Set your time zone.
+ time.timeZone = "America/Chicago";
+
+ # Select internationalisation properties.
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "en_US.UTF-8";
+ LC_IDENTIFICATION = "en_US.UTF-8";
+ LC_MEASUREMENT = "en_US.UTF-8";
+ LC_MONETARY = "en_US.UTF-8";
+ LC_NAME = "en_US.UTF-8";
+ LC_NUMERIC = "en_US.UTF-8";
+ LC_PAPER = "en_US.UTF-8";
+ LC_TELEPHONE = "en_US.UTF-8";
+ LC_TIME = "en_US.UTF-8";
+ };
+
+ # trusted-users is set per-machine (see machines/<host>/default.nix).
+
+ nix.settings.experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
+
+ # Allow unfree packages
+ nixpkgs.config.allowUnfree = true;
+
+ environment.localBinInPath = true;
+}
diff --git a/common/default.nix b/common/default.nix
new file mode 100644
index 0000000..946b3a7
--- /dev/null
+++ b/common/default.nix
@@ -0,0 +1,9 @@
+# Configuration shared by all machines. Machine-specific settings live under
+# ../machines/<hostname>/default.nix.
+{ ... }:
+
+{
+ imports = [
+ ./core.nix
+ ];
+}