mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-26 05:24:34 +00:00
Add optional system modules
This commit is contained in:
parent
58d9a3c908
commit
ae1c7b257e
|
@ -4,8 +4,11 @@ in {
|
|||
vboxnix = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
../system
|
||||
./vbox_nix
|
||||
../system
|
||||
../system/options/systemd-boot.nix
|
||||
../system/options/cachix.nix
|
||||
../system/options/oomd.nix
|
||||
../modules/services/ssh.nix
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
{lib, ...}:
|
||||
{ lib, pkgs, ...}:
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
nix.settings = {
|
||||
max-jobs = 6;
|
||||
cores = 6;
|
||||
};
|
||||
|
||||
security.sudo.package = pkgs.sudo.override { withInsults = true; };
|
||||
security.polkit.enable = true;
|
||||
services = {
|
||||
udisks2.enable = true;
|
||||
};
|
||||
|
||||
networking.hostName = "vboxnix";
|
||||
|
|
|
@ -9,5 +9,18 @@
|
|||
};
|
||||
};
|
||||
|
||||
services.resolved.enable = true;
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
fallbackDns = [
|
||||
"9.9.9.9"
|
||||
"2620:fe::fe"
|
||||
];
|
||||
};
|
||||
|
||||
# don't wait for network to boot faster
|
||||
# https://old.reddit.com/r/NixOS/comments/vdz86j/how_to_remove_boot_dependency_on_network_for_a
|
||||
systemd = {
|
||||
targets.network-online.wantedBy = lib.mkForce []; # default is [ "multi-user.target" ]
|
||||
services.NetworkManager-wait-online.wantedBy = lib.mkForce []; # default is [ "network-online.target" ]
|
||||
};
|
||||
}
|
||||
|
|
14
system/options/cachix.nix
Normal file
14
system/options/cachix.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
_: {
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nixpkgs-wayland.cachix.org"
|
||||
"https://viperml.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||
"viperml.cachix.org-1:qZhKBMTfmcLL+OG6fj/hzsMEedgKvZVFRRAhq7j8Vh8="
|
||||
];
|
||||
};
|
||||
}
|
9
system/options/oomd.nix
Normal file
9
system/options/oomd.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
_: {
|
||||
systemd.oomd = {
|
||||
enable = true;
|
||||
enableSystemSlice = true;
|
||||
enableRootSlice = true;
|
||||
enableUserSlices = true;
|
||||
};
|
||||
}
|
||||
|
12
system/options/systemd-boot.nix
Normal file
12
system/options/systemd-boot.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
_: {
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
memtest86.enable = true;
|
||||
editor = true;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in a new issue