teml
This commit is contained in:
10
modules/nixos/boot/default.nix
Normal file
10
modules/nixos/boot/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
];
|
||||
};
|
||||
|
||||
zramSwap.enable = true;
|
||||
}
|
||||
6
modules/nixos/boot/plymouth/default.nix
Normal file
6
modules/nixos/boot/plymouth/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -87,6 +87,13 @@ in
|
||||
];
|
||||
mountpoint = "/etc";
|
||||
};
|
||||
"tmp" = {
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
mountpoint = "/tmp";
|
||||
};
|
||||
"log" = {
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
|
||||
14
modules/nixos/hardware/btrfs/default.nix
Normal file
14
modules/nixos/hardware/btrfs/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
services.btrfs = {
|
||||
autoScrub.enable = lib.mkDefault true;
|
||||
autoScrub.fileSystems = lib.mkDefault [
|
||||
"/nix"
|
||||
"/root"
|
||||
"/etc"
|
||||
"/tmp"
|
||||
"/var/log"
|
||||
"/home"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -43,6 +43,8 @@ in
|
||||
# Enable Network Manager
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
wifi.powersave = lib.mkDefault false;
|
||||
settings.connectivity.uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt";
|
||||
ensureProfiles = {
|
||||
environmentFiles = [
|
||||
config.sops.secrets.wifi.path
|
||||
|
||||
@@ -36,6 +36,11 @@ in
|
||||
default = "matt";
|
||||
description = "The name to use for the user account.";
|
||||
};
|
||||
passwordFile = lib.mkOption {
|
||||
type = nullOr path;
|
||||
default = null;
|
||||
description = "Path to the password file for this user account";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
@@ -44,6 +49,10 @@ in
|
||||
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"keys"
|
||||
"networkmanager"
|
||||
"ratbagd"
|
||||
"scanner"
|
||||
"systemd-journal"
|
||||
"mpd"
|
||||
"audio"
|
||||
@@ -54,13 +63,15 @@ in
|
||||
"tss"
|
||||
"power"
|
||||
"nix"
|
||||
"i2c"
|
||||
] ++ cfg.extraGroups;
|
||||
|
||||
group = "users";
|
||||
home = "/home/${cfg.name}";
|
||||
isNormalUser = true;
|
||||
shell = lib.mkDefault pkgs.zsh;
|
||||
shell = lib.mkForce pkgs.zsh;
|
||||
uid = 1000;
|
||||
hashedPasswordFile = cfg.passwordFile;
|
||||
} // cfg.extraOptions;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user