Modularize nix config
This commit is contained in:
parent
f2e34e4c77
commit
d0b1495ede
4 changed files with 28 additions and 24 deletions
8
hosts/common/default.nix
Normal file
8
hosts/common/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./nix.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
18
hosts/common/nix.nix
Normal file
18
hosts/common/nix.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
auto-optimise-store = true;
|
||||||
|
trusted-users = [ "jhemono" ];
|
||||||
|
};
|
||||||
|
channel.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../common
|
||||||
./home.nix
|
./home.nix
|
||||||
# Services
|
# Services
|
||||||
./btrbk.nix
|
./btrbk.nix
|
||||||
|
|
@ -87,21 +88,6 @@
|
||||||
|
|
||||||
environment.variables.EDITOR = "vim";
|
environment.variables.EDITOR = "vim";
|
||||||
|
|
||||||
# Nix configuration
|
|
||||||
nix = {
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 7d";
|
|
||||||
};
|
|
||||||
settings = {
|
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
trusted-users = [ "jhemono" ];
|
|
||||||
};
|
|
||||||
channel.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../common
|
||||||
# Supporting
|
# Supporting
|
||||||
./buckets.nix
|
./buckets.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
|
|
@ -69,15 +70,6 @@
|
||||||
|
|
||||||
environment.variables.EDITOR = "vim";
|
environment.variables.EDITOR = "vim";
|
||||||
|
|
||||||
# Nix configuration
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 7d";
|
|
||||||
};
|
|
||||||
nix.settings.auto-optimise-store = true;
|
|
||||||
|
|
||||||
# OpenSSH
|
# OpenSSH
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue