Merge branch 'miyamoto'

This commit is contained in:
Trevor Vallender 2023-07-02 10:00:27 +01:00
commit a6f27bb00f
8 changed files with 123 additions and 16 deletions

View File

@ -69,6 +69,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 =
[
./shared-configuration.nix
./desktop.nix
./ritchie-hardware.nix
./filesystem.nix
];

View File

@ -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";
# security.polkit.enable = true;
@ -80,24 +93,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;

View File

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

View File

@ -12,6 +12,7 @@
calibre
cdrkit
chromium
comma
delta # Nice diffing pager for Git
docker-compose
dunst