This commit is contained in:
Tasia Iso 2025-02-02 21:36:53 +01:00
parent 4611e2bace
commit 2b60fa5807
Signed by: tasiaiso
SSH key fingerprint: SHA256:KiRjUay5C9i6objsEOIycygBHn54pDBB3Lj7fyJ0Elw
2 changed files with 74 additions and 64 deletions

View file

@ -7,8 +7,7 @@
}: let
sshKeys = import ../../crypto/ssh-keys.nix;
in {
imports =
[
imports = [
# Defaults
./hardware-configuration.nix
../../common/base.nix
@ -54,7 +53,7 @@ in {
# ./yubikey.nix
# ./rtl-sdr.nix
];
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.loader.systemd-boot.enable = lib.mkForce false;
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
@ -65,10 +64,18 @@ boot.loader.systemd-boot.enable = lib.mkForce false;
"/crypto_keyfile.bin" = null;
};
boot.loader.grub.enableCryptodisk=true;
services.logind.extraConfig = ''
# dont shutdown when power button is short-pressed
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
'';
services.tailscale.enable = true;
services.syncthing.guiAddress = "0.0.0.0:8384";
boot.loader.grub.enableCryptodisk = true;
services.tailscale.enable = true;
services.syncthing.guiAddress = "0.0.0.0:8384";
boot.initrd.luks.devices."luks-7aa6742e-020d-49aa-a458-78ea5c3b85f8".keyFile = "/crypto_keyfile.bin";
networking.hostName = "jo"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -80,7 +87,7 @@ services.syncthing.guiAddress = "0.0.0.0:8384";
# Enable networking
networking.networkmanager.enable = true;
users.users.tasia.openssh.authorizedKeys.keys = [
users.users.tasia.openssh.authorizedKeys.keys = [
sshKeys.tasia.cave
];
@ -106,7 +113,7 @@ users.users.tasia.openssh.authorizedKeys.keys = [
users.users.tasia = {
isNormalUser = true;
description = "Tasia";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = ["networkmanager" "wheel"];
packages = with pkgs; [];
};
@ -143,5 +150,4 @@ users.users.tasia.openssh.authorizedKeys.keys = [
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -1,27 +1,31 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "firewire_ohci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "firewire_ohci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/e867382a-7ecb-4a93-bf7c-c972be061180";
fileSystems."/" = {
device = "/dev/disk/by-uuid/e867382a-7ecb-4a93-bf7c-c972be061180";
fsType = "btrfs";
options = [ "subvol=@" ];
options = ["subvol=@"];
};
boot.initrd.luks.devices."luks-7aa6742e-020d-49aa-a458-78ea5c3b85f8".device = "/dev/disk/by-uuid/7aa6742e-020d-49aa-a458-78ea5c3b85f8";
swapDevices = [ ];
swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's