refactor nix settings
This commit is contained in:
parent
d32cf7e7f8
commit
7a66eb1ef5
6 changed files with 57 additions and 30 deletions
|
@ -19,6 +19,7 @@
|
||||||
repoFlake.inputs.sops-nix.nixosModules.sops
|
repoFlake.inputs.sops-nix.nixosModules.sops
|
||||||
|
|
||||||
../../profiles/common/user.nix
|
../../profiles/common/user.nix
|
||||||
|
../../snippets/nix-settings-holo-chain.nix
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
# ./network.nix
|
# ./network.nix
|
||||||
|
@ -47,19 +48,6 @@
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.openssh.settings.PermitRootLogin = "yes";
|
services.openssh.settings.PermitRootLogin = "yes";
|
||||||
|
|
||||||
nix.nixPath = [
|
|
||||||
"nixpkgs=${pkgs.path}"
|
|
||||||
];
|
|
||||||
|
|
||||||
nix.registry = {
|
|
||||||
nixpkgs.to = {
|
|
||||||
type = "path";
|
|
||||||
path = pkgs.path;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes" "ca-derivations"];
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernel = {
|
kernel = {
|
||||||
sysctl = {
|
sysctl = {
|
||||||
|
|
|
@ -8,21 +8,15 @@
|
||||||
}: let
|
}: let
|
||||||
passwords = import ../../../variables/passwords.crypt.nix;
|
passwords = import ../../../variables/passwords.crypt.nix;
|
||||||
in {
|
in {
|
||||||
nix.settings = {
|
imports = [
|
||||||
substituters = [
|
../../snippets/nix-settings-holo-chain.nix
|
||||||
"https://holochain-ci.cachix.org"
|
|
||||||
"https://holochain-ci-internal.cachix.org"
|
|
||||||
# "https://cache.holo.host/"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"holochain-ci.cachix.org-1:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8="
|
|
||||||
"holochain-ci-internal.cachix.org-1:QvVsSrTiearCjrLTVtNtJOdQCDTseXh7UXUuSMx46NE="
|
|
||||||
"cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE="
|
|
||||||
"cache.holo.host-2:ZJCkX3AUYZ8soxTLfTb60g+F3MkWD7hkH9y8CgqwhDQ="
|
|
||||||
];
|
];
|
||||||
|
|
||||||
extra-experimental-features = ["impure-derivations"];
|
nix.settings = {
|
||||||
system-features = ["recursive-nix" "big-parallel"];
|
substituters = [
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./pkg.nix
|
./pkg.nix
|
||||||
./system.nix
|
./system.nix
|
||||||
|
../../snippets/nix-settings.nix
|
||||||
./hw.nix
|
./hw.nix
|
||||||
|
|
||||||
./user.nix
|
./user.nix
|
||||||
|
|
|
@ -8,13 +8,6 @@
|
||||||
networking.hostName = builtins.elemAt (builtins.split "\\." nodeName) 0; # Define your hostname.
|
networking.hostName = builtins.elemAt (builtins.split "\\." nodeName) 0; # Define your hostname.
|
||||||
networking.domain = builtins.elemAt (builtins.split "(^[^\\.]+\.)" nodeName) 2;
|
networking.domain = builtins.elemAt (builtins.split "(^[^\\.]+\.)" nodeName) 2;
|
||||||
|
|
||||||
nix.daemonCPUSchedPolicy = "idle";
|
|
||||||
nix.daemonIOSchedClass = "idle";
|
|
||||||
nix.settings.max-jobs = lib.mkDefault "auto";
|
|
||||||
nix.settings.cores = lib.mkDefault 0;
|
|
||||||
nix.settings.sandbox = true;
|
|
||||||
nix.nixPath = ["nixpkgs=${pkgs.path}"];
|
|
||||||
|
|
||||||
environment.etc."lvm/lvm.conf".text = ''
|
environment.etc."lvm/lvm.conf".text = ''
|
||||||
devices {
|
devices {
|
||||||
issue_discards = 1
|
issue_discards = 1
|
||||||
|
|
16
nix/os/snippets/nix-settings-holo-chain.nix
Normal file
16
nix/os/snippets/nix-settings-holo-chain.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
nix.settings = {
|
||||||
|
substituters = [
|
||||||
|
"https://holochain-ci.cachix.org"
|
||||||
|
"https://holochain-ci-internal.cachix.org"
|
||||||
|
"https://cache.holo.host/"
|
||||||
|
];
|
||||||
|
|
||||||
|
trusted-public-keys = [
|
||||||
|
"holochain-ci.cachix.org-1:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8="
|
||||||
|
"holochain-ci-internal.cachix.org-1:QvVsSrTiearCjrLTVtNtJOdQCDTseXh7UXUuSMx46NE="
|
||||||
|
"cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE="
|
||||||
|
"cache.holo.host-2:ZJCkX3AUYZ8soxTLfTb60g+F3MkWD7hkH9y8CgqwhDQ="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
35
nix/os/snippets/nix-settings.nix
Normal file
35
nix/os/snippets/nix-settings.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
nix.daemonCPUSchedPolicy = "idle";
|
||||||
|
nix.daemonIOSchedClass = "idle";
|
||||||
|
nix.settings.max-jobs = lib.mkDefault "auto";
|
||||||
|
nix.settings.cores = lib.mkDefault 0;
|
||||||
|
nix.settings.sandbox = true;
|
||||||
|
nix.nixPath = [
|
||||||
|
"nixpkgs=${pkgs.path}"
|
||||||
|
];
|
||||||
|
|
||||||
|
nix.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
"ca-derivations"
|
||||||
|
"impure-derivations"
|
||||||
|
];
|
||||||
|
|
||||||
|
nix.system-features = [
|
||||||
|
"recursive-nix"
|
||||||
|
"big-parallel"
|
||||||
|
"kvm"
|
||||||
|
"nixos-test"
|
||||||
|
];
|
||||||
|
|
||||||
|
nix.registry = {
|
||||||
|
nixpkgs.to = {
|
||||||
|
type = "path";
|
||||||
|
path = pkgs.path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue