From 0f2c55992677e78d5d2908d0648e410ef9b27436 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 23 Sep 2017 13:59:19 +0200 Subject: Organise modules into folders --- modules/configuration/berlin.nix | 8 ++++++++ modules/configuration/british-english.nix | 4 ++++ modules/configuration/nix.nix | 25 +++++++++++++++++++++++++ modules/configuration/user.nix | 11 +++++++++++ 4 files changed, 48 insertions(+) create mode 100644 modules/configuration/berlin.nix create mode 100644 modules/configuration/british-english.nix create mode 100644 modules/configuration/nix.nix create mode 100644 modules/configuration/user.nix (limited to 'modules/configuration') diff --git a/modules/configuration/berlin.nix b/modules/configuration/berlin.nix new file mode 100644 index 0000000..246510c --- /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 0000000..3ff9367 --- /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 0000000..504942e --- /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 0000000..1b2b674 --- /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; + }; +} -- cgit 1.4.1