diff --git a/nixos/flake.nix b/nixos/flake.nix index d9158aa..60e1025 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -83,6 +83,7 @@ Tibo-NixDesk.modules = [ ./hosts/Tibo-NixDesk ]; Tibo-NixFat.modules = [ ./hosts/Tibo-NixFat ]; Tibo-NixTest.modules = [ ./hosts/Tibo-NixTest ]; + Tibo-NixTop.modules = [ ./hosts/Tibo-NixTop ]; }; }; } diff --git a/nixos/hosts/Tibo-NixTop/default.nix b/nixos/hosts/Tibo-NixTop/default.nix new file mode 100644 index 0000000..5de8df4 --- /dev/null +++ b/nixos/hosts/Tibo-NixTop/default.nix @@ -0,0 +1,193 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +{ config, lib, pkgs, ... }: + +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + sisyphus = { + desktop.hyprland.enable = true; + + hardware = { + eid.enable = true; + nvidia = { + enable = true; + model = "Quadro T2000"; + }; + yubikey.enable = true; + }; + + networking = { + networkmanager.enable = true; + openconnect-sso.enable = true; + }; + + nix = { + flakes.enable = true; + gc.onFull.enable = true; + }; + + programs = { + direnv.enable = true; + home-manager.enable = true; + sops.enable = true; + ssh.enable = true; + }; + + services = { + pipewire.enable = true; + tailscale.enable = true; + }; + + users.tdpeuter.enable = true; + + virtualisation = { + docker.enable = true; + virtualbox.enable = true; + }; + }; + + boot = { + initrd = { + # Use EFI and YubiKey + kernelModules = [ "vfat" "nls_cp437" "nls_iso8859-1" "usbhid" ]; + + luks = { + # Enable YubiKey PBA + yubikeySupport = true; + devices."encrypted".yubikey = { + slot = 2; + twoFactor = false; + gracePeriod = 10; + keyLength = 64; + saltLength = 16; + storage.device = "/dev/nvme0n1p1"; + }; + }; + }; + + loader = { + # Use the systemd-boot EFI boot loader. + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + # Use latest kernel. + kernelPackages = pkgs.linuxPackages_latest; + }; + + hardware.bluetooth = { + enable = true; + powerOnBoot = false; + }; + + programs.zsh.enable = true; + + services = { + auto-cpufreq = { + enable = true; + settings = { + battery = { + governor = "powersave"; + turbo = "never"; + }; + charger = { + governor = "performance"; + turbo = "auto"; + }; + }; + }; + + logind = { + # Handle the laptop lid switch as follows: + lidSwitch = "hybrid-sleep"; + lidSwitchExternalPower = "lock"; + lidSwitchDocked = "ignore"; + + # Handle the power key + powerKey = "suspend"; + }; + + + power-profiles-daemon.enable = false; + + thermald.enable = true; + + xserver = { + # Keyboard layout + xkb = { + layout = "us"; + variant = "altgr-intl"; + }; + }; + + # Touchpad + libinput.enable = true; + }; + + networking = { + hostName = "Tibo-NixTop"; # Define your hostname. + }; + + # Set your time zone. + time.timeZone = "Europe/Brussels"; + + # Select internationalisation properties. + i18n = { + defaultLocale = "en_GB.UTF-8"; # LANG + extraLocaleSettings.LC_TIME = "nl_BE.UTF-8"; + }; + + console = { + # font = "Lat2-Terminus16"; + # keyMap = "us"; + useXkbConfig = true; # use xkb.options in tty. + }; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable touchpad support (enabled default in most desktopManager). + # services.libinput.enable = true; + + # List packages installed in system profile. + # You can use https://search.nixos.org/ to find more packages (and options). + environment = { + # Enabled to allow installed binaries in ~/.local/bin + localBinInPath = true; + + systemPackages = with pkgs; [ + git + vim-full # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + w3m + wget + zenith-nvidia + ]; + }; + + # This option defines the first version of NixOS you have installed on this particular machine, + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. + # + # Most users should NEVER change this value after the initial install, for any reason, + # even if you've upgraded your system to a new NixOS release. + # + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, + # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how + # to actually do that. + # + # This value being lower than the current NixOS release does NOT mean your system is + # out of date, out of support, or vulnerable. + # + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, + # and migrated your data accordingly. + # + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . + system.stateVersion = "25.05"; # Did you read the comment? + +} + diff --git a/nixos/hosts/Tibo-NixTop/hardware-configuration.nix b/nixos/hosts/Tibo-NixTop/hardware-configuration.nix new file mode 100644 index 0000000..ac27dba --- /dev/null +++ b/nixos/hosts/Tibo-NixTop/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/e759b10f-7949-4094-9272-d91340dcc5b6"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."encrypted".device = "/dev/disk/by-uuid/2b6586fa-8823-4add-94f3-132aab17b7b8"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/12CE-A600"; + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno2.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; +}