mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2026-01-29 01:03:02 +01:00
profile/core: migrate to nixosModule
This commit is contained in:
parent
a4d422e059
commit
a16d497ebb
10 changed files with 208 additions and 157 deletions
|
|
@ -1,36 +1,49 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
nix = {
|
||||
daemonCPUSchedPolicy = "idle";
|
||||
daemonIOSchedClass = "idle";
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.profiles.core.nix;
|
||||
in
|
||||
{
|
||||
options.my.profiles.core.nix.enable = lib.mkEnableOption "core nix profile";
|
||||
|
||||
settings = {
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
nix = {
|
||||
daemonCPUSchedPolicy = "idle";
|
||||
daemonIOSchedClass = "idle";
|
||||
|
||||
settings = {
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
registry = {
|
||||
nixpkgs.flake = inputs.nixpkgs;
|
||||
unstable.flake = inputs.nixpkgs-unstable;
|
||||
};
|
||||
};
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 30d";
|
||||
# auto upgrade with own flakes
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
flake = "github:Stunkymonkey/nixos";
|
||||
};
|
||||
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
registry = {
|
||||
nixpkgs.flake = inputs.nixpkgs;
|
||||
unstable.flake = inputs.nixpkgs-unstable;
|
||||
};
|
||||
};
|
||||
|
||||
# auto upgrade with own flakes
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
flake = "github:Stunkymonkey/nixos";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue