refactor: move nix settings to system module, remove unused modules
This commit is contained in:
parent
573020d857
commit
8a9b7280c6
27
common/system/default.nix
Normal file
27
common/system/default.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
nix.optimise.automatic = true;
|
||||
nix.settings = {
|
||||
extra-experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
keep-outputs = true;
|
||||
log-lines = 25;
|
||||
tarball-ttl = 43200;
|
||||
trusted-users = [
|
||||
"root"
|
||||
config.my.user
|
||||
];
|
||||
};
|
||||
nix.package = pkgs.nix;
|
||||
programs.zsh.enable = true;
|
||||
time.timeZone = "America/New_York";
|
||||
}
|
@ -51,15 +51,9 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
baseHomeModule = {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {inherit inputs;};
|
||||
};
|
||||
fullNixOSModules =
|
||||
defaultModules
|
||||
++ [
|
||||
baseHomeModule
|
||||
{
|
||||
home-manager.users.michael = import ../user/environments/nixos/home.nix;
|
||||
}
|
||||
@ -102,8 +96,6 @@ in {
|
||||
modules =
|
||||
defaultModules
|
||||
++ [
|
||||
../modules/nix.nix
|
||||
baseHomeModule
|
||||
{
|
||||
home-manager.users.michael = import ../user/environments/nixos-server/home.nix;
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
./flatpak.nix
|
||||
./fonts.nix
|
||||
./hosts.nix
|
||||
./nix.nix
|
||||
./sound.nix
|
||||
];
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = flakes nix-command
|
||||
'';
|
||||
# this is required until nix 2.4 is released
|
||||
package = pkgs.nixFlakes;
|
||||
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
trusted-users = ["root" "michael"];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user