summaryrefslogtreecommitdiff
path: root/os/common/modules/nix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'os/common/modules/nix.nix')
-rw-r--r--os/common/modules/nix.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/os/common/modules/nix.nix b/os/common/modules/nix.nix
new file mode 100644
index 0000000..e04a156
--- /dev/null
+++ b/os/common/modules/nix.nix
@@ -0,0 +1,36 @@
+{
+ config,
+ ...
+}:
+let
+ user = config.global.userdata.name;
+in
+{
+ nix = {
+ gc = {
+ automatic = true;
+ dates = "weekly";
+ options = "--delete-older-than 30d";
+ };
+
+ settings = {
+ auto-optimise-store = true;
+ use-xdg-base-directories = true;
+ trusted-users = [ user ];
+
+ experimental-features = [
+ "flakes"
+ "nix-command"
+ ];
+
+ substituters = [
+ "https://nixbin.sinanmohd.com"
+ "https://nix-community.cachix.org"
+ ];
+ trusted-public-keys = [
+ "nixbin.sinanmohd.com:dXV3KDPVrm+cGJ2M1ZmTeQJqFGaEapqiVoWHgYDh03k="
+ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
+ ];
+ };
+ };
+}