mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-06-07 21:39:23 +02:00
Switch to snowfall flake configuration
This commit is contained in:
parent
bc0766220d
commit
d322a4f0a8
26 changed files with 1042 additions and 465 deletions
23
modules/system/boot/uboot/default.nix
Normal file
23
modules/system/boot/uboot/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
#with lib.internal;
|
||||
let cfg = config.custom.system.boot.uboot;
|
||||
in
|
||||
{
|
||||
options.custom.system.boot.uboot = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable booting on uboot system.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot = {
|
||||
# Boot loader configutation
|
||||
loader = {
|
||||
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
||||
grub.enable = false;
|
||||
# Enables the generation of /boot/extlinux/extlinux.conf
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
22
modules/system/boot/uefi/default.nix
Normal file
22
modules/system/boot/uefi/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
#with lib.internal;
|
||||
let cfg = config.custom.system.boot.uefi;
|
||||
in
|
||||
{
|
||||
options.custom.system.boot.uefi = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable booting on a uefi system.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
||||
boot.loader.systemd-boot.configurationLimit = 10;
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/blob/c32c39d6f3b1fe6514598fa40ad2cf9ce22c3fb7/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L66
|
||||
boot.loader.systemd-boot.editor = false;
|
||||
};
|
||||
}
|
30
modules/system/fonts/default.nix
Normal file
30
modules/system/fonts/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
#with lib.internal;
|
||||
let cfg = config.custom.system.fonts;
|
||||
in
|
||||
{
|
||||
options.custom.system.fonts = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to manage fonts.";
|
||||
fonts = mkOpt (listOf package) [ ] "Custom font packages to install.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.variables = {
|
||||
# Enable icons in tooling since we have nerdfonts.
|
||||
LOG_ICONS = "true";
|
||||
};
|
||||
|
||||
fonts.fontDir.enable = true;
|
||||
|
||||
fonts.fonts = with pkgs;
|
||||
[
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override { fonts = [ "Hack" ]; })
|
||||
] ++ cfg.fonts;
|
||||
};
|
||||
}
|
40
modules/system/locale/default.nix
Normal file
40
modules/system/locale/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
#with lib.internal;
|
||||
let cfg = config.custom.system.locale;
|
||||
in
|
||||
{
|
||||
options.custom.system.locale = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to manage locale settings.";
|
||||
layout = mkOpt str "de" "The Keyboard layout to use.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
i18n = {
|
||||
defaultLocale = "en_NZ.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
LC_CTYPE = "de_DE.UTF-8";
|
||||
LC_COLLATE = "de_DE.UTF-8";
|
||||
LC_MESSAGES = "en_NZ.UTF-8";
|
||||
};
|
||||
};
|
||||
console = {
|
||||
enable = true;
|
||||
keyMap = mkForce cfg.layout;
|
||||
};
|
||||
services.xserver = {
|
||||
layout = cfg.layout;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
25
modules/system/xdg/default.nix
Normal file
25
modules/system/xdg/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
#with lib.internal;
|
||||
let cfg = config.custom.system.xdg;
|
||||
in
|
||||
{
|
||||
options.custom.system.xdg = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable xdg.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
xdg = {
|
||||
sounds.enable = true;
|
||||
mime.enable = true;
|
||||
menus.enable = true;
|
||||
icons.enable = true;
|
||||
autostart.enable = true;
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue