diff --git a/flake.nix b/flake.nix index 4c7176c..1584165 100644 --- a/flake.nix +++ b/flake.nix @@ -60,6 +60,16 @@ } ]; }; + + miyamoto = nixpkgs.lib.nixosSystem { # Kid's game and music box + system = "x86_64-linux"; + + specialArgs.inputs = inputs; + + modules = [ + ./system/miyamoto.nix + ]; + }; }; }; } diff --git a/system/desktop.nix b/system/desktop.nix new file mode 100644 index 0000000..8122baa --- /dev/null +++ b/system/desktop.nix @@ -0,0 +1,16 @@ +{ config, pkgs, inputs, ... }: + +{ + nixpkgs.overlays = [ + (self: super: { + # Experimental features in Waybar gives us access to workspace selectors + waybar = super.waybar.overrideAttrs (oldAttrs: { + mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; + }); + }) + inputs.codeium.overlays.x86_64-linux.default + inputs.hyprcontrib.overlays.default + ]; + + virtualisation.docker.enable = true; +} diff --git a/system/miyamoto-hardware.nix b/system/miyamoto-hardware.nix new file mode 100644 index 0000000..5629484 --- /dev/null +++ b/system/miyamoto-hardware.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-label/ROOT"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-label/BOOT"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-label/SWAP"; } + ]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/system/miyamoto.nix b/system/miyamoto.nix new file mode 100644 index 0000000..913f050 --- /dev/null +++ b/system/miyamoto.nix @@ -0,0 +1,50 @@ + +{ config, pkgs, inputs, ... }: + +{ + imports = + [ + ./shared-configuration.nix + ./miyamoto-hardware.nix + ]; + + networking.hostName = "miyamoto"; + + users.users.kids = { + isNormalUser = true; + extraGroups = [ + "networkmanager" + ]; + initialPassword = "password"; + }; + services.getty.autologinUser = "kids"; + + services.xserver.enable = true; + services.xserver.displayManager.startx.enable = true; # TODO: Add DBus startup in script + + services.xserver = { + layout = "gb"; + xkbVariant = ""; + }; + + # Configure console keymap + console.keyMap = "uk"; + + environment.systemPackages = with pkgs; [ + vim + ratpoison + (retroarch.override { + # Cores defined at: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/emulators/retroarch/cores.nix + cores = with libretro; [ + beetle-gba + beetle-saturn + beetle-snes + beetle-vb + dolphin + gw + mame + nestopia + ]; + }) + ]; +} diff --git a/system/ritchie.nix b/system/ritchie.nix index 238496c..9f6a892 100644 --- a/system/ritchie.nix +++ b/system/ritchie.nix @@ -14,6 +14,7 @@ in imports = [ ./shared-configuration.nix + ./desktop.nix ./ritchie-hardware.nix ./filesystem.nix ]; diff --git a/system/shared-configuration.nix b/system/shared-configuration.nix index 353a4e3..6cb83ca 100644 --- a/system/shared-configuration.nix +++ b/system/shared-configuration.nix @@ -9,6 +9,19 @@ networking.networkmanager.enable = true; i18n.defaultLocale = "en_GB.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_GB.UTF-8"; + LC_IDENTIFICATION = "en_GB.UTF-8"; + LC_MEASUREMENT = "en_GB.UTF-8"; + LC_MONETARY = "en_GB.UTF-8"; + LC_NAME = "en_GB.UTF-8"; + LC_NUMERIC = "en_GB.UTF-8"; + LC_PAPER = "en_GB.UTF-8"; + LC_TELEPHONE = "en_GB.UTF-8"; + LC_TIME = "en_GB.UTF-8"; + }; + environment.variables.LC_ALL = "en_GB.UTF-8"; + time.timeZone = "Europe/London"; # Enable sound. @@ -68,24 +81,8 @@ pinentryFlavor = "curses"; }; - environment.variables.LC_ALL = "en_GB.UTF-8"; - nixpkgs.config.allowUnfree = true; - nixpkgs.overlays = [ - (self: super: { - # Experimental features in Waybar gives us access to workspace selectors - waybar = super.waybar.overrideAttrs (oldAttrs: { - mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; - }); - }) - inputs.codeium.overlays.x86_64-linux.default - inputs.hyprcontrib.overlays.default - ]; - - - virtualisation.docker.enable = true; - services.openssh = { enable = true; settings.PasswordAuthentication = false; diff --git a/system/thompson.nix b/system/thompson.nix index 51bcff5..c719faf 100644 --- a/system/thompson.nix +++ b/system/thompson.nix @@ -14,6 +14,7 @@ in imports = [ ./shared-configuration.nix + ./desktop.nix ./thompson-hardware.nix ./filesystem.nix ]; diff --git a/users/tsv/packages.nix b/users/tsv/packages.nix index 1e6e4c4..8fd9f04 100644 --- a/users/tsv/packages.nix +++ b/users/tsv/packages.nix @@ -11,6 +11,7 @@ cachix calibre chromium + comma delta # Nice diffing pager for Git docker-compose dunst @@ -36,6 +37,7 @@ kitty-themes lshw nerdfonts + nix-index pandoc pavucontrol pkg-config