Adding miyamoto

First pass at configuration for miyamoto, the retro games/music machine
This commit is contained in:
Trevor Vallender 2023-06-10 19:55:42 +01:00
parent 8fe1fa04b0
commit bb4952f6f6
8 changed files with 124 additions and 16 deletions

View File

@ -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
];
};
}; };
}; };
} }

16
system/desktop.nix Normal file
View File

@ -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;
}

View File

@ -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;
}

50
system/miyamoto.nix Normal file
View File

@ -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
];
})
];
}

View File

@ -14,6 +14,7 @@ in
imports = imports =
[ [
./shared-configuration.nix ./shared-configuration.nix
./desktop.nix
./ritchie-hardware.nix ./ritchie-hardware.nix
./filesystem.nix ./filesystem.nix
]; ];

View File

@ -9,6 +9,19 @@
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
i18n.defaultLocale = "en_GB.UTF-8"; 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"; time.timeZone = "Europe/London";
# Enable sound. # Enable sound.
@ -68,24 +81,8 @@
pinentryFlavor = "curses"; pinentryFlavor = "curses";
}; };
environment.variables.LC_ALL = "en_GB.UTF-8";
nixpkgs.config.allowUnfree = true; 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 = { services.openssh = {
enable = true; enable = true;
settings.PasswordAuthentication = false; settings.PasswordAuthentication = false;

View File

@ -14,6 +14,7 @@ in
imports = imports =
[ [
./shared-configuration.nix ./shared-configuration.nix
./desktop.nix
./thompson-hardware.nix ./thompson-hardware.nix
./filesystem.nix ./filesystem.nix
]; ];

View File

@ -11,6 +11,7 @@
cachix cachix
calibre calibre
chromium chromium
comma
delta # Nice diffing pager for Git delta # Nice diffing pager for Git
docker-compose docker-compose
dunst dunst
@ -36,6 +37,7 @@
kitty-themes kitty-themes
lshw lshw
nerdfonts nerdfonts
nix-index
pandoc pandoc
pavucontrol pavucontrol
pkg-config pkg-config