diff --git a/modules/system/core/boot.nix b/modules/system/core/boot.nix new file mode 100644 index 0000000..4ea3e94 --- /dev/null +++ b/modules/system/core/boot.nix @@ -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; + }; + }; +} diff --git a/modules/system/core.nix b/modules/system/core/default.nix similarity index 53% rename from modules/system/core.nix rename to modules/system/core/default.nix index a70e8bd..787d28e 100644 --- a/modules/system/core.nix +++ b/modules/system/core/default.nix @@ -9,10 +9,11 @@ ... }: let modules = with self.nixosModules; [ - userConfiguration - hyprland - zsh - kitty + user + bootloader + nix + hardware + locale ]; in { imports = @@ -20,13 +21,5 @@ /etc/nixos/hardware-configuration.nix ] ++ modules; - nix.settings = { - cores = 6; - download-buffer-size = 524288000; - experimental-features = [ - "nix-command" - "flakes" - ]; - }; }; } diff --git a/modules/system/core/hardware.nix b/modules/system/core/hardware.nix new file mode 100644 index 0000000..ea931b8 --- /dev/null +++ b/modules/system/core/hardware.nix @@ -0,0 +1,16 @@ +{ + self, + inputs, + ... +}: { + flake.nixosModules.hardware = { + pkgs, + lib, + ... + }: { + hardware = { + bluetooth.enable = true; + xpadneo.enable = true; + }; + }; +} diff --git a/modules/system/core/locale.nix b/modules/system/core/locale.nix new file mode 100644 index 0000000..df67371 --- /dev/null +++ b/modules/system/core/locale.nix @@ -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"; + }; +} diff --git a/modules/system/core/nix-settings.nix b/modules/system/core/nix-settings.nix new file mode 100644 index 0000000..e7d8a83 --- /dev/null +++ b/modules/system/core/nix-settings.nix @@ -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; + }; + }; + }; + }; + }; + }; +} diff --git a/modules/system/core/user.nix b/modules/system/core/user.nix index 057c88c..58174bb 100644 --- a/modules/system/core/user.nix +++ b/modules/system/core/user.nix @@ -3,14 +3,19 @@ inputs, ... }: { - flake.nixosModules.userConfiguration = { + flake.nixosModules.user = { pkgs, lib, ... - }: { + }: let + modules = with self.nixosModules; [ + zsh + ]; + in { + imports = modules; users.users.user01 = { isNormalUser = true; - initialPassword = "password"; + initialPassword = "qwer"; shell = pkgs.zsh; description = "user01"; extraGroups = [