initial
This commit is contained in:
24
modules/system/core/bootloader.nix
Normal file
24
modules/system/core/bootloader.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
flake.nixosModules.bootloader = {
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
boot = {
|
||||
loader = {
|
||||
timeout = 2;
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
};
|
||||
}
|
||||
39
modules/system/core/default.nix
Normal file
39
modules/system/core/default.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
flake.nixosModules.core = {
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
modules = with self.nixosModules; [
|
||||
user
|
||||
bootloader
|
||||
nix
|
||||
locale
|
||||
];
|
||||
in {
|
||||
imports =
|
||||
[
|
||||
# /etc/nixos/hardware-configuration.nix
|
||||
]
|
||||
++ modules;
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
avahi.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
unzip
|
||||
p7zip-rar
|
||||
usbutils
|
||||
lsof
|
||||
python315
|
||||
curlWithGnuTls
|
||||
wget
|
||||
];
|
||||
system.stateVersion = "26.02";
|
||||
};
|
||||
}
|
||||
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";
|
||||
};
|
||||
}
|
||||
52
modules/system/core/nix-settings.nix
Normal file
52
modules/system/core/nix-settings.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{inputs, ...}: {
|
||||
perSystem = {system, ...}: {
|
||||
_module.args.unfreePkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
flake.nixosModules.nix = {...}: {
|
||||
nix = {
|
||||
registry = {
|
||||
voidarc = {
|
||||
from = {
|
||||
id = "voidarc";
|
||||
type = "indirect";
|
||||
};
|
||||
to = {
|
||||
type = "git";
|
||||
url = "https://git.voidarc.co.uk/voidarc/flakes.git";
|
||||
};
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
cores = 2;
|
||||
trusted-users = ["root"];
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
24
modules/system/core/user.nix
Normal file
24
modules/system/core/user.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
flake.nixosModules.user = {
|
||||
pkgs,
|
||||
lib,
|
||||
inputs',
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
users.users.user01 = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "password";
|
||||
shell = inputs'.nix-config.packages.zsh;
|
||||
description = "user01";
|
||||
extraGroups = [
|
||||
"root"
|
||||
"wheel"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user