Move hardware and locales into flake.nix

This commit is contained in:
Evie Litherland-Smith 2023-06-22 12:30:36 +01:00
parent 99f2dc3a18
commit 41b4f0d987
4 changed files with 50 additions and 49 deletions

View file

@ -13,15 +13,60 @@
self,
nixpkgs,
home-manager,
}: {
}: let
locale-en_GB = {
services.xserver = {
layout = "gb";
xkbVariant = "";
};
console.keyMap = "uk";
# Set your time zone.
time.timeZone = "Europe/London";
# Select internationalisation properties.
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";
};
};
hardware-audio = {pkgs, ...}: {
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.noisetorch.enable = true;
};
hardware-bluetooth = {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
};
in {
nixosConfigurations = {
Legion = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
locale-en_GB
./hosts/Legion/configuration.nix
./common.nix
./locales/en_GB.nix
./services/Legion.nix
];
};
@ -29,11 +74,11 @@
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
locale-en_GB
hardware-audio
hardware-bluetooth
./hosts/N0245/configuration.nix
./common.nix
./hardware/audio.nix
./hardware/bluetooth.nix
./locales/en_GB.nix
./wm/sway.nix
./services/syncthing/N0245.nix
];

View file

@ -1,13 +0,0 @@
{pkgs, ...}: {
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.noisetorch.enable = true;
}

View file

@ -1,6 +0,0 @@
{...}: {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
}

View file

@ -1,25 +0,0 @@
{...}: {
services.xserver = {
layout = "gb";
xkbVariant = "";
};
console.keyMap = "uk";
# Set your time zone.
time.timeZone = "Europe/London";
# Select internationalisation properties.
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";
};
}