diff --git a/common/locales/de-keymap.nix b/common/locales/de-keymap.nix new file mode 100644 index 0000000..1a0cda8 --- /dev/null +++ b/common/locales/de-keymap.nix @@ -0,0 +1,5 @@ +{ + services.xserver.xkb = { + layout = "de"; + }; +} diff --git a/flake.nix b/flake.nix index 0884865..9671ead 100644 --- a/flake.nix +++ b/flake.nix @@ -152,6 +152,14 @@ ./hosts/vulpecula-vps/configuration.nix ]; }; + + jo = stable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs outputs;}; + modules = [ + ./hosts/jo/configuration.nix + ]; + }; }; }; } diff --git a/hosts/jo/configuration.nix b/hosts/jo/configuration.nix new file mode 100644 index 0000000..6810559 --- /dev/null +++ b/hosts/jo/configuration.nix @@ -0,0 +1,147 @@ +{ + pkgs, + lib, + inputs, + config, + ... +}: let + sshKeys = import ../../crypto/ssh-keys.nix; +in { + imports = + [ + # Defaults + ./hardware-configuration.nix + ../../common/base.nix + ../../common/full-install.nix + + # Localization + ../../common/locales/en.nix + ../../common/locales/de-keymap.nix + + # Hardware + # ../../common/hardware/tpm2.nix + ../../common/hardware/wireless.nix + ../../common/hardware/ssd.nix + # ../../common/hardware/btrfs.nix + # ../../common/components/lanzaboote.nix + + # Software components + # ../../common/components/de/greetd.nix + # ../../common/components/de/sway.nix + # ../../common/components/de/plasma6.nix + + # Programs + # ../../common/programs/steam.nix + + # Services + # ../../common/services/auditd.nix + # ../../common/services/nix-gc.nix + # ../../common/services/opensnitch.nix + # ../../common/services/adguardhome.nix + ../../common/services/syncthing.nix + # ../../common/services/usbguard.nix + # ../../common/services/autoupgrade.nix + + # Home-manager + # ../../home/tasia/home.nix + + inputs.agenix.nixosModules.default + ../../common/components/wifi-secrets.nix + + # inputs.thymis.nixosModules.thymis-controller + # Personal modules + # ../../modules/nixos/tildefriends.nix + # ./yubikey.nix + # ./rtl-sdr.nix + ]; + + # Bootloader. + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.useOSProber = true; + + # Setup keyfile + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; + }; + + 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. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + +users.users.tasia.openssh.authorizedKeys.keys = [ + sshKeys.tasia.cave + ]; + + # Set your time zone. + time.timeZone = "Europe/Paris"; + + # Configure keymap in X11 + # services.xserver = { + # layout = "de"; + # xkbVariant = ""; + # }; + + services.syncthing = { + user = "tasia"; + dataDir = lib.mkForce "/home/tasia/Sync/data"; + configDir = lib.mkForce "/home/tasia/Sync/configuration"; + }; + + # Configure console keymap + console.keyMap = "de"; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.tasia = { + isNormalUser = true; + description = "Tasia"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; + }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # 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? + +} diff --git a/hosts/jo/hardware-configuration.nix b/hosts/jo/hardware-configuration.nix new file mode 100644 index 0000000..088c483 --- /dev/null +++ b/hosts/jo/hardware-configuration.nix @@ -0,0 +1,36 @@ +# 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 = [ "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"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + boot.initrd.luks.devices."luks-7aa6742e-020d-49aa-a458-78ea5c3b85f8".device = "/dev/disk/by-uuid/7aa6742e-020d-49aa-a458-78ea5c3b85f8"; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp12s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}