aboutsummaryrefslogtreecommitdiff
path: root/modules/nix.nix
diff options
context:
space:
mode:
authorDylan <boss@tehbox.org>2025-09-16 16:43:55 +1200
committerDylan <boss@tehbox.org>2025-09-16 16:43:55 +1200
commitd1395f9e6768551967f85128ccab19d12dec4c6f (patch)
tree804d86634796edd5e378cb05ee2fda0a71d02497 /modules/nix.nix
parentc1b48e9f2bfc4ae0e48d0c8e35ad1f4a2189ec30 (diff)
downloadnixos-configuration-d1395f9e6768551967f85128ccab19d12dec4c6f.tar.gz
nixos-configuration-d1395f9e6768551967f85128ccab19d12dec4c6f.zip
feat: added server configuration and setup sops-nix
Diffstat (limited to 'modules/nix.nix')
-rw-r--r--modules/nix.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/nix.nix b/modules/nix.nix
new file mode 100644
index 0000000..2c4ef83
--- /dev/null
+++ b/modules/nix.nix
@@ -0,0 +1,29 @@
+{ inputs, ... }:
+{
+ nix.nixPath = [ "/etc/nix/path" ];
+ nix.registry.nixpkgs.flake = inputs.nixpkgs;
+ environment.etc."nix/path/nixpkgs".source = inputs.nixpkgs;
+
+ nix = {
+ settings = {
+ experimental-features = [ "nix-command" "flakes" ];
+ auto-optimise-store = true;
+
+ trusted-users = [ "boss" ];
+
+ substituters = [
+ "https://cache.nixos.org"
+ ];
+
+ # trusted-public-keys = [
+ # "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
+ # ];
+ };
+ gc = {
+ automatic = true;
+ dates = "weekly";
+ options = "--delete-older-than +7";
+ };
+ optimise.automatic = true;
+ };
+}