Bunch of stuff to get this ready for a two user system
This commit is contained in:
parent
2144d9ef61
commit
7eb3b1a0fa
119 changed files with 214 additions and 214 deletions
9
system/settings/default.nix
Normal file
9
system/settings/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./minimal
|
||||
./nix
|
||||
./security
|
||||
./timezone
|
||||
];
|
||||
}
|
21
system/settings/minimal/default.nix
Normal file
21
system/settings/minimal/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ ... }:
|
||||
{
|
||||
environment = {
|
||||
defaultPackages = [ ];
|
||||
stub-ld.enable = false;
|
||||
};
|
||||
|
||||
documentation = {
|
||||
doc.enable = false;
|
||||
info.enable = false;
|
||||
nixos.enable = false;
|
||||
};
|
||||
|
||||
programs = {
|
||||
nano.enable = false;
|
||||
less.lessopen = null;
|
||||
command-not-found.enable = false;
|
||||
};
|
||||
|
||||
services.logrotate.enable = false;
|
||||
}
|
23
system/settings/nix/default.nix
Normal file
23
system/settings/nix/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, unstable, ... }:
|
||||
{
|
||||
imports = [ ./gc ];
|
||||
|
||||
options.nixpkgs.allowUnfreePackages = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
};
|
||||
|
||||
config = {
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
_module.args.pkgsUnstable = import unstable {
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
inherit (config.nixpkgs) config;
|
||||
};
|
||||
};
|
||||
}
|
8
system/settings/nix/gc/default.nix
Normal file
8
system/settings/nix/gc/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
}
|
4
system/settings/security/apparmor/default.nix
Normal file
4
system/settings/security/apparmor/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
security.apparmor.enable = true;
|
||||
}
|
7
system/settings/security/default.nix
Normal file
7
system/settings/security/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./apparmor
|
||||
./doas
|
||||
];
|
||||
}
|
18
system/settings/security/doas/default.nix
Normal file
18
system/settings/security/doas/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
security = {
|
||||
sudo.enable = false;
|
||||
doas = {
|
||||
enable = true;
|
||||
extraRules = [
|
||||
{ # Give wheel root access
|
||||
groups = [ "wheel" ];
|
||||
keepEnv = true;
|
||||
persist = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ doas-sudo-shim ];
|
||||
}
|
4
system/settings/timezone/default.nix
Normal file
4
system/settings/timezone/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
time.timeZone = "America/Toronto";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue