mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-01-09 09:21:04 +00:00
get system.stateVersion from "deployment" argument
This commit is contained in:
parent
9dde55159b
commit
4c4aef5363
|
@ -74,7 +74,6 @@
|
||||||
allowReboot = config.selfprivacy.autoUpgrade.allowReboot;
|
allowReboot = config.selfprivacy.autoUpgrade.allowReboot;
|
||||||
channel = "https://channel.selfprivacy.org/nixos-selfpricacy";
|
channel = "https://channel.selfprivacy.org/nixos-selfpricacy";
|
||||||
};
|
};
|
||||||
system.stateVersion = config.selfprivacy.stateVersion;
|
|
||||||
nix = {
|
nix = {
|
||||||
# TODO uncomment when NixOS version is at least 23.05
|
# TODO uncomment when NixOS version is at least 23.05
|
||||||
# nix.channel.enable = false;
|
# nix.channel.enable = false;
|
||||||
|
@ -86,7 +85,7 @@
|
||||||
# optimise.automatic = true;
|
# optimise.automatic = true;
|
||||||
|
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true; # TODO it's debatable, because of IO&CPU load
|
||||||
options = "--delete-older-than 7d";
|
options = "--delete-older-than 7d";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -107,8 +106,9 @@
|
||||||
nixpkgs.hostPlatform = system;
|
nixpkgs.hostPlatform = system;
|
||||||
services.journald.extraConfig = "SystemMaxUse=500M";
|
services.journald.extraConfig = "SystemMaxUse=500M";
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"net.ipv4.ip_forward" = 1; # TODO why is it here by default?
|
"net.ipv4.ip_forward" = 1; # TODO why is it here by default, for VPN only?
|
||||||
};
|
};
|
||||||
|
# TODO must be configurable and determined at nixos-infect stage
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
device = "/swapfile";
|
device = "/swapfile";
|
||||||
|
@ -116,6 +116,7 @@
|
||||||
size = 2048;
|
size = 2048;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
# TODO why is sudo needed?
|
||||||
security = {
|
security = {
|
||||||
sudo = {
|
sudo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
nixosConfigurations-fun =
|
nixosConfigurations-fun =
|
||||||
{ system
|
{ system
|
||||||
, hardware-configuration
|
, hardware-configuration
|
||||||
|
, deployment
|
||||||
, userdata
|
, userdata
|
||||||
, top-level-flake
|
, top-level-flake
|
||||||
, sp-modules
|
, sp-modules
|
||||||
|
@ -23,6 +24,7 @@
|
||||||
specialArgs = { inherit system; };
|
specialArgs = { inherit system; };
|
||||||
modules = [
|
modules = [
|
||||||
hardware-configuration
|
hardware-configuration
|
||||||
|
deployment
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
(import ./files.nix top-level-flake.outPath)
|
(import ./files.nix top-level-flake.outPath)
|
||||||
(import ./userdata-variables.nix userdata)
|
(import ./userdata-variables.nix userdata)
|
||||||
|
|
Loading…
Reference in a new issue