mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-06-07 21:39:23 +02:00
Switch to snowfall flake configuration
This commit is contained in:
parent
bc0766220d
commit
d322a4f0a8
26 changed files with 1042 additions and 465 deletions
53
modules/nix/default.nix
Normal file
53
modules/nix/default.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
#with lib.internal;
|
||||
let cfg = config.custom.nix;
|
||||
in
|
||||
{
|
||||
options.custom.nix = with types; {
|
||||
enable = mkBoolOpt true "Whether or not to manage nix configuration.";
|
||||
package = mkOpt package pkgs.nix "Which nix package to use.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
deploy-rs
|
||||
nixfmt
|
||||
nix-index
|
||||
nix-prefetch-git
|
||||
nixpkgs-review
|
||||
nurl
|
||||
nix-init
|
||||
];
|
||||
|
||||
nix = {
|
||||
package = cfg.package;
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://prismlauncher.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"prismlauncher.cachix.org-1:GhJfjdP1RFKtFSH3gXTIQCvZwsb2cioisOf91y/bK0w="
|
||||
];
|
||||
trusted-users = [ "root" ];
|
||||
sandbox = true;
|
||||
require-sigs = true;
|
||||
max-jobs = "auto";
|
||||
auto-optimise-store = true;
|
||||
allowed-users = [ "*" ];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
warn-dirty = false;
|
||||
};
|
||||
|
||||
# flake-utils-plus
|
||||
generateRegistryFromInputs = true;
|
||||
generateNixPathFromInputs = true;
|
||||
linkInputs = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue