summary refs log tree commit diff stats
path: root/modules/configuration
diff options
context:
space:
mode:
authorAlan Pearce2017-09-23 13:59:19 +0200
committerAlan Pearce2017-09-23 14:10:26 +0200
commit0f2c55992677e78d5d2908d0648e410ef9b27436 (patch)
treeb2a3432e15dd9af506c317af608ea69721979a41 /modules/configuration
parent496b4ed379afe7f1e0563243a0a5efe0857fe3bb (diff)
downloadnixfiles-0f2c55992677e78d5d2908d0648e410ef9b27436.tar.lz
nixfiles-0f2c55992677e78d5d2908d0648e410ef9b27436.tar.zst
nixfiles-0f2c55992677e78d5d2908d0648e410ef9b27436.zip
Organise modules into folders
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;
+  };
+}