diff --git a/flake.nix b/flake.nix index ce593e5..87b7fef 100644 --- a/flake.nix +++ b/flake.nix @@ -137,6 +137,25 @@ home-manager.nixosModules.home-manager ]; }; + tuny = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ + ./systems/tuny + ./modules/audio + ./modules/bluetooth + ./modules/local + ./modules/nix + ./modules/auto-update + ./overlays + nixos-hardware.nixosModules.common-cpu-intel + nixos-hardware.nixosModules.common-gpu-nvidia + nixos-hardware.nixosModules.common-pc-laptop + nixos-hardware.nixosModules.common-pc-laptop-hdd + nur.nixosModules.nur + home-manager.nixosModules.home-manager + ]; + }; }; }; } diff --git a/systems/tuny/default.nix b/systems/tuny/default.nix new file mode 100644 index 0000000..89cc6fa --- /dev/null +++ b/systems/tuny/default.nix @@ -0,0 +1,48 @@ +{ pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ]; + + networking.hostName = "tuny"; + + programs = { + git = { + enable = true; + lfs.enable = true; + }; + }; + + users.users.musicp = { + isNormalUser = true; + description = "Music Player"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + firefox + ]; + }; + + environment.systemPackages = with pkgs; [ + mixxx + ]; + + networking.networkmanager.enable = true; + + time.timeZone = "Europe/Berlin"; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + # Enable automatic login for the user. + services.xserver.displayManager.autoLogin.enable = true; + services.xserver.displayManager.autoLogin.user = "musicp"; + + # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 + systemd.services."getty@tty1".enable = false; + systemd.services."autovt@tty1".enable = false; +} diff --git a/systems/tuny/hardware-configuration.nix b/systems/tuny/hardware-configuration.nix new file mode 100644 index 0000000..b32a710 --- /dev/null +++ b/systems/tuny/hardware-configuration.nix @@ -0,0 +1,35 @@ +# 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" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/1cae8f88-5db6-4c97-88e4-350c35275d5c"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/8569ee66-b939-4ce8-a94a-dca7df5e301b"; } + ]; + + # 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.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}