Files
nixos/modules/default.nix
T

66 lines
1.4 KiB
Nix
Raw Normal View History

2023-08-23 14:49:01 -05:00
{ pkgs, lib, ... }:
2022-09-07 20:01:51 -05:00
2023-12-29 23:36:40 -06:00
let
inherit (lib.strings) hasSuffix;
system = pkgs.system; in
2022-09-07 20:01:51 -05:00
{
2023-12-12 11:48:48 -06:00
imports = [
2023-12-29 23:36:40 -06:00
]
++ (if (lib.strings.hasSuffix "darwin" "nope") then [./darwin] else [])
++ (if (lib.strings.hasSuffix "linux" "linux") then [./linux] else []);
2023-12-12 11:48:48 -06:00
2023-05-02 00:36:29 -05:00
# Enable flakes
nix = {
package = pkgs.nixFlakes;
2023-08-21 13:14:51 -05:00
gc = {
automatic = true;
2023-08-23 15:02:12 -05:00
# Scheduling of them is different in nixos vs nix-darwin, so check for
# the extra details there
2023-08-21 13:14:51 -05:00
options = "--delete-older-than 30d";
};
2023-05-02 00:36:29 -05:00
settings = {
2023-08-23 14:49:01 -05:00
auto-optimise-store = (if lib.strings.hasSuffix "darwin" pkgs.system then false else true);
2023-05-02 00:36:29 -05:00
experimental-features = "nix-command flakes";
keep-outputs = true;
keep-derivations = true;
min-free = (toString (1024 * 1024 * 1024) );
max-free = (toString (5 * 1024 * 1024 * 1024) );
substituters = [
"https://cache.garnix.io"
2023-12-05 13:39:31 -06:00
"https://ai.cachix.org"
2023-05-02 00:36:29 -05:00
];
trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
2023-12-05 13:39:31 -06:00
"ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
2023-05-02 00:36:29 -05:00
];
};
};
2023-05-11 14:33:30 +00:00
nixpkgs.config = {
allowUnfree = true;
};
2023-05-02 00:36:29 -05:00
# Base packages that need to be in all my hosts
environment.systemPackages = with pkgs; [
agenix
android-file-transfer
bitwarden-cli
diffutils
git
gh
gnupatch
gregpy
findutils
hms # My own home manager switcher
htop
killall
nano
2023-06-07 19:56:37 -05:00
pciutils
2023-05-02 00:36:29 -05:00
pwgen
transcrypt
unzip
wget
2022-09-07 20:01:51 -05:00
];
}