Add penguin configuration
This commit is contained in:
42
modules/nixos/my_nix/default.nix
Normal file
42
modules/nixos/my_nix/default.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my_nix;
|
||||
inherit (lib) mkEnableOption mkIf mkOption;
|
||||
types = lib.types;
|
||||
in
|
||||
{
|
||||
options.my_nix = {
|
||||
enable = mkEnableOption "Custom nix options";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.cachix ];
|
||||
nix = {
|
||||
optimise = {
|
||||
automatic = true;
|
||||
};
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
];
|
||||
};
|
||||
};
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user