chore: format nix files treewide

This commit is contained in:
Mohammad Rafiq 2025-05-20 12:53:13 +08:00
parent e1652efa53
commit 90d10606bc
No known key found for this signature in database
30 changed files with 387 additions and 319 deletions

View file

@ -1,12 +1,19 @@
{ config, lib, ... }:
{ config, lib, ... }:
{
config = lib.mkMerge [
{
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.loader.efi.canTouchEfiVariables = true;
}
(lib.mkIf (config.system.bootloader == "systemd-boot"){
boot.loader.systemd-boot.enable = true;
(lib.mkIf (config.system.bootloader == "systemd-boot") {
boot.loader.systemd-boot.enable = true;
})
];
}

View file

@ -1,4 +1,4 @@
{ config, lib, ...}:
{ config, lib, ... }:
{
imports = [
./boot.nix
@ -9,10 +9,10 @@
];
options.system = {
hostname = lib.pantheon.mkStrOption;
mainUser.name = lib.pantheon.mkStrOption;
mainUser.publicKey = lib.pantheon.mkStrOption;
bootloader = lib.pantheon.mkStrOption;
hostname = lib.pantheon.mkStrOption;
mainUser.name = lib.pantheon.mkStrOption;
mainUser.publicKey = lib.pantheon.mkStrOption;
bootloader = lib.pantheon.mkStrOption;
};
config = {

View file

@ -2,8 +2,8 @@
{
config = lib.mkMerge [
{
time.timeZone = "Asia/Singapore";
i18n.defaultLocale = "en_US.UTF-8";
time.timeZone = "Asia/Singapore";
i18n.defaultLocale = "en_US.UTF-8";
}
];
}

View file

@ -2,9 +2,9 @@
{
sops = {
defaultSopsFile = lib.snowfall.fs.get-file "secrets/secrets.yaml";
age.sshKeyPaths = ["/persist/home/rafiq/.ssh/id_ed25519"];
age.sshKeyPaths = [ "/persist/home/rafiq/.ssh/id_ed25519" ];
secrets = {
"keys/tailscale" = {};
"keys/tailscale" = { };
"rafiq/hashedPassword".neededForUsers = true;
};
};

View file

@ -1,19 +1,24 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkMerge [
{
users.mutableUsers = false;
users.groups.users = {
gid = 100;
members = [ "${config.system.mainUser.name}" ];
};
users.mutableUsers = false;
users.groups.users = {
gid = 100;
members = [ "${config.system.mainUser.name}" ];
};
users.users."${config.system.mainUser.name}" = {
linger = true;
uid = 1000;
linger = true;
uid = 1000;
isNormalUser = true;
hashedPasswordFile = config.sops.secrets."${config.system.mainUser.name}/hashedPassword".path;
hashedPasswordFile = config.sops.secrets."${config.system.mainUser.name}/hashedPassword".path;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [ config.system.mainUser.publicKey ];
openssh.authorizedKeys.keys = [ config.system.mainUser.publicKey ];
};
services.getty.autologinUser = config.system.mainUser.name;
security.sudo.wheelNeedsPassword = false;