summary refs log tree commit diff stats
path: root/system/modules/configuration
diff options
context:
space:
mode:
Diffstat (limited to 'system/modules/configuration')
-rw-r--r--system/modules/configuration/berlin.nix8
-rw-r--r--system/modules/configuration/british-english.nix4
-rw-r--r--system/modules/configuration/england.nix8
-rw-r--r--system/modules/configuration/nix.nix38
-rw-r--r--system/modules/configuration/user.nix11
5 files changed, 69 insertions, 0 deletions
diff --git a/system/modules/configuration/berlin.nix b/system/modules/configuration/berlin.nix
new file mode 100644
index 00000000..246510c4
--- /dev/null
+++ b/system/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/system/modules/configuration/british-english.nix b/system/modules/configuration/british-english.nix
new file mode 100644
index 00000000..3ff93678
--- /dev/null
+++ b/system/modules/configuration/british-english.nix
@@ -0,0 +1,4 @@
+{ config, pkgs, ... }:
+
+{ i18n.defaultLocale = "en_GB.UTF-8";
+}
diff --git a/system/modules/configuration/england.nix b/system/modules/configuration/england.nix
new file mode 100644
index 00000000..b2f799cd
--- /dev/null
+++ b/system/modules/configuration/england.nix
@@ -0,0 +1,8 @@
+{ config, pkgs, ... }:
+
+{ time.timeZone = "Europe/London";
+  services.redshift = {
+    latitude = "52.2394";
+    longitude = "-0.9416";
+  };
+}
diff --git a/system/modules/configuration/nix.nix b/system/modules/configuration/nix.nix
new file mode 100644
index 00000000..9aa83435
--- /dev/null
+++ b/system/modules/configuration/nix.nix
@@ -0,0 +1,38 @@
+{ config, pkgs, ... }:
+
+{ nix = {
+    buildCores = 0;
+
+    daemonNiceLevel = 19;
+    daemonIONiceLevel = 7;
+
+    autoOptimiseStore = true;
+    gc = {
+      automatic = true;
+      options = "--delete-older-than 14d";
+    };
+  };
+
+  nixpkgs.config = {
+    packageOverrides = pkgs: {
+      unstable = import <nixos-unstable> {
+        config = config.nixpkgs.config;
+      };
+    };
+  };
+
+  environment.systemPackages = with pkgs; [
+    cachix
+  ];
+
+  system.autoUpgrade = {
+    enable = true;
+    flags = [ "--max-jobs" "1" ];
+  };
+  systemd.services.nixos-upgrade = {
+    script = pkgs.lib.mkForce ''
+      ${pkgs.nix}/bin/nix-channel --update nixos-unstable
+      ${config.system.build.nixos-rebuild}/bin/nixos-rebuild boot --no-build-output --upgrade ${toString config.system.autoUpgrade.flags}
+    '';
+  };
+}
diff --git a/system/modules/configuration/user.nix b/system/modules/configuration/user.nix
new file mode 100644
index 00000000..e7362bce
--- /dev/null
+++ b/system/modules/configuration/user.nix
@@ -0,0 +1,11 @@
+{ config, pkgs, ... }:
+
+{ users.extraUsers.alan = {
+    description = "Alan Pearce";
+    isNormalUser = true;
+    extraGroups = [ "audio" "wheel" "lp" "adbusers" "docker" "nitrokey" "dialout" "networkmanager" ];
+    shell = "/run/current-system/sw/bin/zsh";
+    home = "/home/alan";
+    uid = 1000;
+  };
+}