restructured core modules

This commit is contained in:
2026-07-04 18:25:35 +01:00
parent 2d9e205897
commit 05b0864145
6 changed files with 150 additions and 15 deletions

View File

@@ -0,0 +1,36 @@
{
self,
inputs,
...
}: {
flake.nixosModules.bootloader = {
pkgs,
lib,
...
}: {
boot = {
loader = {
timeout = 2;
efi = {
canTouchEfiVariables = true;
};
grub = {
efiSupport = true;
device = "nodev";
theme = pkgs.catppuccin-grub;
};
};
plymouth = {
enable = true;
theme = "catppuccin-mocha";
themePackages = with pkgs; [
# By default we would install all themes
(catppuccin-plymouth.override {
variant = "mocha";
})
];
};
kernelPackages = pkgs.linuxPackages_latest;
};
};
}

View File

@@ -9,10 +9,11 @@
... ...
}: let }: let
modules = with self.nixosModules; [ modules = with self.nixosModules; [
userConfiguration user
hyprland bootloader
zsh nix
kitty hardware
locale
]; ];
in { in {
imports = imports =
@@ -20,13 +21,5 @@
/etc/nixos/hardware-configuration.nix /etc/nixos/hardware-configuration.nix
] ]
++ modules; ++ modules;
nix.settings = {
cores = 6;
download-buffer-size = 524288000;
experimental-features = [
"nix-command"
"flakes"
];
};
}; };
} }

View File

@@ -0,0 +1,16 @@
{
self,
inputs,
...
}: {
flake.nixosModules.hardware = {
pkgs,
lib,
...
}: {
hardware = {
bluetooth.enable = true;
xpadneo.enable = true;
};
};
}

View File

@@ -0,0 +1,32 @@
{
self,
inputs,
...
}: {
flake.nixosModules.locale = {
pkgs,
lib,
...
}: {
time.timeZone = "Europe/London";
i18n = {
defaultLocale = "en_GB.UTF-8";
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";
};
};
services.xserver.xkb = {
layout = "gb";
variant = "";
};
console.keyMap = "uk";
};
}

View File

@@ -0,0 +1,53 @@
{
self,
inputs,
...
}: {
flake.nixosModules.nix = {
pkgs,
lib,
...
}: {
nix = {
registry = {
voidarc = {
from = {
id = "voidarc";
type = "indirect";
};
to = {
type = "git";
url = "https://git.voidarc.co.uk/voidarc/flakes.git";
};
};
};
settings = {
cores = 6;
download-buffer-size = 524288000;
experimental-features = [
"nix-command"
"flakes"
];
};
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
optimise.automatic = true;
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 5d";
};
};
nixpkgs = {
config = {
allowUnfree = true;
packageOverrides = pkgs: {
unstable = import inputs.nixpkgs-unstable {
config = {
allowUnfree = true;
};
};
};
};
};
};
}

View File

@@ -3,14 +3,19 @@
inputs, inputs,
... ...
}: { }: {
flake.nixosModules.userConfiguration = { flake.nixosModules.user = {
pkgs, pkgs,
lib, lib,
... ...
}: { }: let
modules = with self.nixosModules; [
zsh
];
in {
imports = modules;
users.users.user01 = { users.users.user01 = {
isNormalUser = true; isNormalUser = true;
initialPassword = "password"; initialPassword = "qwer";
shell = pkgs.zsh; shell = pkgs.zsh;
description = "user01"; description = "user01";
extraGroups = [ extraGroups = [