From b7a4ae6a186a147bb52059999827430f673eb43c Mon Sep 17 00:00:00 2001 From: osbm Date: Sat, 26 Oct 2024 18:16:39 +0300 Subject: [PATCH] seperate out nix settings --- common/nix-settings.nix | 18 ++++++++++++++++++ hosts/tartarus/configuration.nix | 16 +--------------- 2 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 common/nix-settings.nix diff --git a/common/nix-settings.nix b/common/nix-settings.nix new file mode 100644 index 0000000..c2aef9d --- /dev/null +++ b/common/nix-settings.nix @@ -0,0 +1,18 @@ +{ pkgs, lib, config, ... }: { + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # enable nix flakes + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + + # disable the database error TODO add nix-index search + programs.command-not-found.enable = false; + +} \ No newline at end of file diff --git a/hosts/tartarus/configuration.nix b/hosts/tartarus/configuration.nix index 19dc58b..aaa34c8 100644 --- a/hosts/tartarus/configuration.nix +++ b/hosts/tartarus/configuration.nix @@ -8,6 +8,7 @@ imports = [ ./hardware-configuration.nix ../../common/fonts.nix + ../../common/nix-settings.nix ]; # Bootloader. @@ -101,21 +102,6 @@ # Install firefox. programs.firefox.enable = true; - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - - # enable nix flakes - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - - # disable the database error TODO add nix-index search - programs.command-not-found.enable = false; - programs.steam = { enable = true; remotePlay.openFirewall =