restructured core modules
This commit is contained in:
36
modules/system/core/boot.nix
Normal file
36
modules/system/core/boot.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
16
modules/system/core/hardware.nix
Normal file
16
modules/system/core/hardware.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.hardware = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
hardware = {
|
||||||
|
bluetooth.enable = true;
|
||||||
|
xpadneo.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
32
modules/system/core/locale.nix
Normal file
32
modules/system/core/locale.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
||||||
53
modules/system/core/nix-settings.nix
Normal file
53
modules/system/core/nix-settings.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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 = [
|
||||||
|
|||||||
Reference in New Issue
Block a user