diff --git a/flake.nix b/flake.nix index fd57e46..6272b70 100644 --- a/flake.nix +++ b/flake.nix @@ -45,13 +45,25 @@ nixosModules.default = ./modules/nixos; nixosConfigurations = { + # Yes, my computers are named after the Earthbound Immortals from Yu-Gi-Oh! 5D's :3 + # Main desktop for games & workstation + # Alternative Name: Aslla piscu hummingbird = lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ ./hosts/hummingbird ]; }; + + # smol Thinkpad Yoga + # Alternative Name: Uru + spider = lib.nixosSystem { + specialArgs = {inherit inputs outputs;}; + modules = [ + ./hosts/spider + ]; + }; }; homeConfigurations = { diff --git a/home-manager/luna/spider.nix b/home-manager/luna/spider.nix new file mode 100644 index 0000000..0a402b4 --- /dev/null +++ b/home-manager/luna/spider.nix @@ -0,0 +1,8 @@ +{...}: { + imports = [ + ./common + + ./categories/cli + ./categories/desktop/common + ]; +} \ No newline at end of file diff --git a/hosts/common/optional/fingerprint.nix b/hosts/common/optional/fingerprint.nix new file mode 100644 index 0000000..eaa87f0 --- /dev/null +++ b/hosts/common/optional/fingerprint.nix @@ -0,0 +1,10 @@ +{pkgs, ...}:{ + # Fingerprint Scanner + systemd.services.fprintd = { + wantedBy = [ "multi-user.target" ]; + serviceConfig.Type = "simple"; + }; + services.fprintd.enable = true; + services.fprintd.tod.enable = true; + services.fprintd.tod.driver = pkgs.libfprint-2-tod1-vfs0090; +} \ No newline at end of file diff --git a/hosts/common/optional/thinkpad.nix b/hosts/common/optional/thinkpad.nix new file mode 100644 index 0000000..4150095 --- /dev/null +++ b/hosts/common/optional/thinkpad.nix @@ -0,0 +1,6 @@ +{lib, config, ...}:{ + # Thinkpad + hardware.sensor.iio.enable = true; + hardware.trackpoint.enable = lib.mkDefault true; + hardware.trackpoint.emulateWheel = lib.mkDefault config.hardware.trackpoint.enable; +} \ No newline at end of file diff --git a/hosts/common/users/luna/default.nix b/hosts/common/users/luna/default.nix index 851f999..401807c 100644 --- a/hosts/common/users/luna/default.nix +++ b/hosts/common/users/luna/default.nix @@ -19,7 +19,6 @@ neovim rustup vscode.fhs - nix-inspect protonvpn-gui ]; }; diff --git a/hosts/spider/configuration.nix b/hosts/spider/configuration.nix new file mode 100644 index 0000000..f801fbf --- /dev/null +++ b/hosts/spider/configuration.nix @@ -0,0 +1,70 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). +{ + pkgs, + inputs, + ... +}: { + imports = [ + inputs.home-manager.nixosModules.home-manager + + ../common/global + ../common/users/luna + + # optional stuff + ../common/optional/gnome.nix + ../common/optional/pipewire.nix + + # thinkpad-related + ../common/optional/thinkpad.nix + ../common/optional/fingerprint.nix + + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "spider"; # Define your hostname. + + # Enable networking + networking.networkmanager.enable = true; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "de"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "de"; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # flatpak + services.flatpak.enable = true; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # 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 + gnome-menus + ]; + + # ssh agent + programs.ssh.startAgent = true; + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + }; +} diff --git a/hosts/spider/default.nix b/hosts/spider/default.nix new file mode 100644 index 0000000..187a110 --- /dev/null +++ b/hosts/spider/default.nix @@ -0,0 +1,6 @@ +{...}: { + imports = [ + ./configuration.nix + ./hardware-configuration.nix + ]; +} diff --git a/hosts/spider/hardware-configuration.nix b/hosts/spider/hardware-configuration.nix new file mode 100644 index 0000000..b24bd7a --- /dev/null +++ b/hosts/spider/hardware-configuration.nix @@ -0,0 +1,45 @@ +# 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" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/951f8c69-070f-4e2c-9af9-b52e43a72577"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/BF5F-3F1E"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/8bf53e75-628e-4a1b-a19f-1ac55be2af35"; + fsType = "ext4"; + }; + + 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.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wwp0s20f0u2.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}