aboutsummaryrefslogtreecommitdiff
path: root/modules/nixos
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/nixos/base.nix65
-rw-r--r--modules/nixos/cgroups.nix (renamed from profiles/core/cgroups.nix)0
-rw-r--r--modules/nixos/default.nix8
-rw-r--r--modules/nixos/ssh.nix (renamed from profiles/core/ssh.nix)0
4 files changed, 73 insertions, 0 deletions
diff --git a/modules/nixos/base.nix b/modules/nixos/base.nix
new file mode 100644
index 0000000..f3dece1
--- /dev/null
+++ b/modules/nixos/base.nix
@@ -0,0 +1,65 @@
+{
+ self,
+ config,
+ pkgs,
+ lib,
+ ...
+}:
+{
+ boot = {
+ kernelPackages = pkgs.linuxPackages_latest;
+ kernel.sysctl = {
+ "net.ipv4.tcp_congestion_control" = "bbr";
+ "net.ipv4.tcp_ecn" = 1;
+ "net.ipv4.tcp_fastopen" = 3;
+ "net.ipv4.tcp_tw_reuse" = 1;
+ };
+ };
+
+ i18n = {
+ defaultLocale = "en_US.UTF-8";
+ supportedLocales = [
+ "en_US.UTF-8/UTF-8"
+ ];
+ };
+
+ time.timeZone = "America/Los_Angeles";
+
+ users.motdFile = "/etc/motd";
+
+ environment.etc.motd.text = ''
+ Machine ${config.networking.hostName}
+ NixOS ${config.system.nixos.release}
+ @ ${self.shortRev or self.dirtyShortRev}
+ '';
+
+ ## disable that slow "building man-cache" step
+ documentation.man.generateCaches = lib.mkForce false;
+
+ users = {
+ mutableUsers = false;
+ users.root.openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBkozy+X96u5ciX766bJ/AyQ3xm1tXZTIr5+4PVFZFi"
+ ];
+ };
+
+ security.sudo.wheelNeedsPassword = false;
+
+ environment.systemPackages = with pkgs; [
+ curl
+ dysk
+ fd
+ fish
+ git
+ htop
+ jq
+ mtr
+ pciutils
+ powertop
+ ripgrep
+ tcpdump
+ traceroute
+ vim
+ wireguard-tools
+ ];
+}
diff --git a/profiles/core/cgroups.nix b/modules/nixos/cgroups.nix
index 07dc964..07dc964 100644
--- a/profiles/core/cgroups.nix
+++ b/modules/nixos/cgroups.nix
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
new file mode 100644
index 0000000..669cd75
--- /dev/null
+++ b/modules/nixos/default.nix
@@ -0,0 +1,8 @@
+{ ... }:
+{
+ imports = [
+ ./base.nix
+ ./cgroups.nix
+ ./ssh.nix
+ ];
+}
diff --git a/profiles/core/ssh.nix b/modules/nixos/ssh.nix
index b4c8772..b4c8772 100644
--- a/profiles/core/ssh.nix
+++ b/modules/nixos/ssh.nix