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,54 +7,53 @@
}: let }: let
sshKeys = import ../../crypto/ssh-keys.nix; sshKeys = import ../../crypto/ssh-keys.nix;
in { in {
imports = imports = [
[ # Defaults
# Defaults ./hardware-configuration.nix
./hardware-configuration.nix ../../common/base.nix
../../common/base.nix ../../common/full-install.nix
../../common/full-install.nix
# Localization # Localization
../../common/locales/en.nix ../../common/locales/en.nix
../../common/locales/de-keymap.nix ../../common/locales/de-keymap.nix
# Hardware # Hardware
# ../../common/hardware/tpm2.nix # ../../common/hardware/tpm2.nix
../../common/hardware/wireless.nix ../../common/hardware/wireless.nix
../../common/hardware/ssd.nix ../../common/hardware/ssd.nix
# ../../common/hardware/btrfs.nix # ../../common/hardware/btrfs.nix
# ../../common/components/lanzaboote.nix # ../../common/components/lanzaboote.nix
# Software components # Software components
# ../../common/components/de/greetd.nix # ../../common/components/de/greetd.nix
# ../../common/components/de/sway.nix # ../../common/components/de/sway.nix
# ../../common/components/de/plasma6.nix # ../../common/components/de/plasma6.nix
# Programs # Programs
# ../../common/programs/steam.nix # ../../common/programs/steam.nix
# Services # Services
# ../../common/services/auditd.nix # ../../common/services/auditd.nix
# ../../common/services/nix-gc.nix # ../../common/services/nix-gc.nix
# ../../common/services/opensnitch.nix # ../../common/services/opensnitch.nix
# ../../common/services/adguardhome.nix # ../../common/services/adguardhome.nix
../../common/services/syncthing.nix ../../common/services/syncthing.nix
# ../../common/services/usbguard.nix # ../../common/services/usbguard.nix
# ../../common/services/autoupgrade.nix # ../../common/services/autoupgrade.nix
# Home-manager # Home-manager
# ../../home/tasia/home.nix # ../../home/tasia/home.nix
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
../../common/components/wifi-secrets.nix ../../common/components/wifi-secrets.nix
# inputs.thymis.nixosModules.thymis-controller # inputs.thymis.nixosModules.thymis-controller
# Personal modules # Personal modules
# ../../modules/nixos/tildefriends.nix # ../../modules/nixos/tildefriends.nix
# ./yubikey.nix # ./yubikey.nix
# ./rtl-sdr.nix # ./rtl-sdr.nix
]; ];
boot.loader.systemd-boot.enable = lib.mkForce false; boot.loader.systemd-boot.enable = lib.mkForce false;
# Bootloader. # Bootloader.
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda"; boot.loader.grub.device = "/dev/sda";
@ -65,10 +64,18 @@ boot.loader.systemd-boot.enable = lib.mkForce false;
"/crypto_keyfile.bin" = null; "/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"; boot.initrd.luks.devices."luks-7aa6742e-020d-49aa-a458-78ea5c3b85f8".keyFile = "/crypto_keyfile.bin";
networking.hostName = "jo"; # Define your hostname. networking.hostName = "jo"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -80,7 +87,7 @@ services.syncthing.guiAddress = "0.0.0.0:8384";
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
users.users.tasia.openssh.authorizedKeys.keys = [ users.users.tasia.openssh.authorizedKeys.keys = [
sshKeys.tasia.cave sshKeys.tasia.cave
]; ];
@ -93,7 +100,7 @@ users.users.tasia.openssh.authorizedKeys.keys = [
# xkbVariant = ""; # xkbVariant = "";
# }; # };
services.syncthing = { services.syncthing = {
user = "tasia"; user = "tasia";
dataDir = lib.mkForce "/home/tasia/Sync/data"; dataDir = lib.mkForce "/home/tasia/Sync/data";
configDir = lib.mkForce "/home/tasia/Sync/configuration"; configDir = lib.mkForce "/home/tasia/Sync/configuration";
@ -106,15 +113,15 @@ users.users.tasia.openssh.authorizedKeys.keys = [
users.users.tasia = { users.users.tasia = {
isNormalUser = true; isNormalUser = true;
description = "Tasia"; description = "Tasia";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = ["networkmanager" "wheel"];
packages = with pkgs; []; packages = with pkgs; [];
}; };
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget # wget
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
@ -143,5 +150,4 @@ users.users.tasia.openssh.authorizedKeys.keys = [
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment? 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 # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") 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.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "firewire_ohci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ ]; boot.kernelModules = [];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/e867382a-7ecb-4a93-bf7c-c972be061180"; device = "/dev/disk/by-uuid/e867382a-7ecb-4a93-bf7c-c972be061180";
fsType = "btrfs"; 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"; 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 # 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 # (the default) this is the recommended approach. When using systemd-networkd it's