mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-11 13:20:04 +00:00
🎉📝 initialize v2
This commit is contained in:
parent
5087472710
commit
5abbdd12fb
95 changed files with 38 additions and 2693 deletions
|
@ -1,86 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
namespace,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
inputs.hardware.nixosModules.common-pc-laptop
|
||||
inputs.hardware.nixosModules.common-cpu-intel
|
||||
inputs.hardware.nixosModules.common-pc-laptop-ssd
|
||||
];
|
||||
|
||||
# Setup Sops
|
||||
sops.defaultSopsFile = lib.snowfall.fs.get-file "secrets/default.yaml";
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
sops.age.generateKey = true;
|
||||
|
||||
# Sops keys
|
||||
sops.secrets."services/cloudflare/api_key" = {};
|
||||
|
||||
# Set hostname
|
||||
# Todo: move to common/networking module
|
||||
networking.hostName = "absolutesolver";
|
||||
|
||||
# Set timezone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Enable docker and set it as the OCI container backend
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
oci-containers.backend = "docker";
|
||||
};
|
||||
|
||||
# Set system configuration
|
||||
puzzlevision = {
|
||||
archetypes.server.enable = true;
|
||||
|
||||
services = {
|
||||
traefik = {
|
||||
enable = true;
|
||||
cloudflareEmail = "johannesreckers2006@gmail.com";
|
||||
};
|
||||
|
||||
vaultwarden.enable = true;
|
||||
homepage.enable = true;
|
||||
duckdns.enable = true;
|
||||
bluesky.pds.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.cron = {
|
||||
enable = true;
|
||||
systemCronJobs = [
|
||||
"*/5 * * * * cyn docker exec -u www-data nextcloud-nextcloud-1 php /var/www/html/cron.php"
|
||||
"*/15 * * * * cyn docker exec -u www-data nextcloud-nextcloud-1 php /var/www/nextcloud/occ preview:pre-generate"
|
||||
#"*/30 * * * * cyn /home/jo/tools/FediFetcher/FediFetcher.sh"
|
||||
];
|
||||
};
|
||||
|
||||
# Configure users.
|
||||
snowfallorg.users.cyn.admin = true;
|
||||
users.users.cyn.isNormalUser = true;
|
||||
users.users.cyn.extraGroups = [ "dialout" "docker" ];
|
||||
|
||||
# Configure home-manager
|
||||
home-manager = {
|
||||
backupFileExtension = "homeManagerBackup";
|
||||
};
|
||||
|
||||
# Install required system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
### General
|
||||
nano
|
||||
vim
|
||||
|
||||
## Runtimes
|
||||
nodejs_22
|
||||
bun
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
# 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")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/3e3d6676-2bd6-44df-a8a7-c5e7647c4e95";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/1C8C-F906";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/b99e9370-10f7-4589-b7a2-59a256d75926"; }
|
||||
];
|
||||
|
||||
# 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
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
namespace,
|
||||
config,
|
||||
system,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
inputs.hardware.nixosModules.common-pc-laptop
|
||||
inputs.hardware.nixosModules.common-cpu-intel
|
||||
inputs.hardware.nixosModules.common-pc-laptop-ssd
|
||||
];
|
||||
|
||||
# Configure Sops
|
||||
sops.defaultSopsFile = lib.snowfall.fs.get-file "secrets/default.yaml";
|
||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt"; # The main AGE key is expected in this location, it is only needed for this system.
|
||||
|
||||
# Sops keys
|
||||
sops.secrets."user/jo/password_hash".neededForUsers = true;
|
||||
|
||||
# Set hostname
|
||||
# Todo: move to common/networking module
|
||||
networking.hostName = "puzzlevision";
|
||||
|
||||
boot = {
|
||||
# Configure additional kernel modules.
|
||||
extraModulePackages = [
|
||||
pkgs.linuxPackages_latest.rtl8821ce # Use custom network-card driver.
|
||||
];
|
||||
|
||||
blacklistedKernelModules = [
|
||||
"rtw88_8821ce" # Block the default network-card driver.
|
||||
];
|
||||
};
|
||||
|
||||
# Set timezone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Enable the power-profiles-daemon service for improved battery management.
|
||||
services.power-profiles-daemon.enable = true;
|
||||
|
||||
# Enable printing.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable docker
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# Set system configuration
|
||||
puzzlevision = {
|
||||
archetypes.workstation.enable = true;
|
||||
security.yubikey = {
|
||||
enable = true;
|
||||
enable-agent = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable flatpak support.
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Set trusted users (Primarily used for cachix)
|
||||
nix.settings.trusted-users = [ "root" "jo" ];
|
||||
|
||||
# Configure users.
|
||||
snowfallorg.users.jo.admin = true;
|
||||
users.users.jo.isNormalUser = true;
|
||||
users.users.jo.extraGroups = [ "dialout" "docker" ];
|
||||
users.users.jo.hashedPasswordFile = config.sops.secrets."user/jo/password_hash".path;
|
||||
|
||||
# Configure home-manager
|
||||
home-manager = {
|
||||
backupFileExtension = "homeManagerBackup";
|
||||
};
|
||||
|
||||
# Provide users with some sane default packages.
|
||||
environment.systemPackages = with pkgs; [
|
||||
### General
|
||||
nano
|
||||
inputs.zen-browser.packages."${system}".default
|
||||
inputs.ghostty.packages.x86_64-linux.default
|
||||
vlc
|
||||
|
||||
## Security
|
||||
pinentry-tty
|
||||
gnupg
|
||||
];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
# 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")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "vmd" "nvme" "usbhid" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/864b1287-89fd-4cc0-98a5-40a3caf804c6";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-5fd4fc76-d5c5-46c3-b952-1a7a7ff3a1fc".device = "/dev/disk/by-uuid/5fd4fc76-d5c5-46c3-b952-1a7a7ff3a1fc";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2429-4141";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
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
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.br-01571e4eda2f.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.br-20785fae249b.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.br-64a49a5722c1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.br-71e5fc5962fc.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.br-7df9905783da.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.br-9b746f4e7e2f.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.br-e2f470a56dfe.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s13f0u4u4.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.veth4e96b46.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.veth96a5ccd.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue