misc cleanup
This commit is contained in:
parent
1943a3c679
commit
cabf5f52e1
7 changed files with 111 additions and 52 deletions
|
|
@ -1,5 +1,13 @@
|
|||
{ host, config, lib, ...}:
|
||||
let cfg = config.system-sys; in {
|
||||
{
|
||||
host,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.system-sys;
|
||||
in
|
||||
{
|
||||
options.system-sys = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
@ -9,6 +17,10 @@ let cfg = config.system-sys; in {
|
|||
type = lib.types.int;
|
||||
default = 4;
|
||||
};
|
||||
swap = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
zram = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
|
|
@ -27,7 +39,7 @@ let cfg = config.system-sys; in {
|
|||
enable = true;
|
||||
wheelNeedsPassword = false;
|
||||
};
|
||||
swapDevices = [
|
||||
swapDevices = lib.mkIf cfg.swap [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = cfg.swapSize * 1024;
|
||||
|
|
@ -65,14 +77,14 @@ let cfg = config.system-sys; in {
|
|||
"network"
|
||||
];
|
||||
openssh.authorizedKeys.keys = [
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14''
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJou+k8HtIWdlztpWog7fVfJgxJnRIo7c5xVPUBhBxhi'' # phone
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJou+k8HtIWdlztpWog7fVfJgxJnRIo7c5xVPUBhBxhi" # phone
|
||||
];
|
||||
};
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDcL53Gdrj5V9YDwKlCBIcgqiS+zHtOQpJlnOHTevJCJ e@t14''
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14''
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDcL53Gdrj5V9YDwKlCBIcgqiS+zHtOQpJlnOHTevJCJ e@t14"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,9 @@ in
|
|||
};
|
||||
};
|
||||
system-net.nfs = true;
|
||||
system-sys.zram = false;
|
||||
system-sys.zram = true;
|
||||
system-sys.swap = false;
|
||||
system-sys.documentation = true;
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue