summary refs log tree commit diff stats
path: root/modules/configuration
diff options
context:
space:
mode:
Diffstat (limited to 'modules/configuration')
-rw-r--r--modules/configuration/berlin.nix8
-rw-r--r--modules/configuration/british-english.nix4
-rw-r--r--modules/configuration/nix.nix25
-rw-r--r--modules/configuration/user.nix11
4 files changed, 48 insertions, 0 deletions
diff --git a/modules/configuration/berlin.nix b/modules/configuration/berlin.nix
new file mode 100644
index 00000000..246510c4
--- /dev/null
+++ b/modules/configuration/berlin.nix
@@ -0,0 +1,8 @@
+{ config, pkgs, ... }:
+
+{ time.timeZone = "Europe/Berlin";
+  services.redshift = {
+    latitude = "52.586";
+    longitude = "13.300";
+  };
+}
diff --git a/modules/configuration/british-english.nix b/modules/configuration/british-english.nix
new file mode 100644
index 00000000..3ff93678
--- /dev/null
+++ b/modules/configuration/british-english.nix
@@ -0,0 +1,4 @@
+{ config, pkgs, ... }:
+
+{ i18n.defaultLocale = "en_GB.UTF-8";
+}
diff --git a/modules/configuration/nix.nix b/modules/configuration/nix.nix
new file mode 100644
index 00000000..504942ec
--- /dev/null
+++ b/modules/configuration/nix.nix
@@ -0,0 +1,25 @@
+{ config, pkgs, ... }:
+
+{ nix = {
+    buildCores = 0;
+
+    daemonNiceLevel = 10;
+    daemonIONiceLevel = 4;
+
+    autoOptimiseStore = true;
+    gc = {
+      automatic = true;
+      options = "--delete-older-than 30d";
+    };
+  };
+
+  system.autoUpgrade = {
+    enable = true;
+  };
+  systemd.services.nixos-upgrade = {
+    environment.NIXPKGS_ALLOW_UNFREE = "1";
+    script = ''
+      ${config.system.build.nixos-rebuild}/bin/nixos-rebuild boot ${toString config.system.autoUpgrade.flags}
+    '';
+  };
+}
diff --git a/modules/configuration/user.nix b/modules/configuration/user.nix
new file mode 100644
index 00000000..1b2b6747
--- /dev/null
+++ b/modules/configuration/user.nix
@@ -0,0 +1,11 @@
+{ config, pkgs, ... }:
+
+{ users.extraUsers.alan = {
+    description = "Alan Pearce";
+    isNormalUser = true;
+    extraGroups = [ "audio" "wheel" "adbusers" "docker" ];
+    shell = "/run/current-system/sw/bin/zsh";
+    home = "/home/alan";
+    uid = 1000;
+  };
+}