Nix Flakes configuration for MacOS, NixOS and WSL
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add modules

+ hardware/networking
+ system/locale
+ system/time
+ system/xkb
rename system/bootloader -> system/boot/efi

cosmeak 9d4623e7 f5d4df83

+86 -31
+15
modules/nixos/hardware/networking/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.hardware.networking; 6 + in 7 + { 8 + options.${namespace}.hardware.networking = with types; { 9 + enable = mkBoolOpt false "Whether or not to enable networking."; 10 + }; 11 + 12 + config = mkIf cfg.enable { 13 + networking.networkmanager.enable = true; 14 + }; 15 + }
+2 -2
modules/nixos/system/bootloader/default.nix modules/nixos/system/boot/efi/default.nix
··· 2 2 with lib; 3 3 with lib.${namespace}; 4 4 let 5 - cfg = config.${namespace}.system.bootloader; 5 + cfg = config.${namespace}.system.boot.efi; 6 6 in 7 7 { 8 - options.${namespace}.system.bootloader = with types; { 8 + options.${namespace}.system.boot.efi = with types; { 9 9 enable = mkBoolOpt false "Whether or not to enable booting."; 10 10 }; 11 11
+29
modules/nixos/system/locale/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.system.locale; 6 + in 7 + { 8 + options.${namespace}.system.locale = with types; { 9 + enable = mkBoolOpt false "Whether or not to manage locale."; 10 + locale = mkOpt str "en_US.UTF-8" "Define your locale."; 11 + extraLocale = mkOpt str "fr_FR.UTF-8" "Define different locale for extra locale settings"; 12 + }; 13 + 14 + config = mkIf cfg.enable { 15 + i18n.defaultLocale = cfg.locale; 16 + 17 + i18n.extraLocaleSettings = { 18 + LC_ADDRESS = cfg.extraLocale; 19 + LC_IDENTIFICATION = cfg.extraLocale; 20 + LC_MEASUREMENT = cfg.extraLocale; 21 + LC_MONETARY = cfg.extraLocale; 22 + LC_NAME = cfg.extraLocale; 23 + LC_NUMERIC = cfg.extraLocale; 24 + LC_PAPER = cfg.extraLocale; 25 + LC_TELEPHONE = cfg.extraLocale; 26 + LC_TIME = cfg.extraLocale; 27 + }; 28 + }; 29 + }
+16
modules/nixos/system/time/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.system.time; 6 + in 7 + { 8 + options.${namespace}.system.time = with types; { 9 + enable = mkBoolOpt false "Whether or not to manage timezone."; 10 + timezone = mkOpt str "Europe/Paris" "Define your timezone."; 11 + }; 12 + 13 + config = mkIf cfg.enable { 14 + time.timeZone = cfg.timezone; 15 + }; 16 + }
+17
modules/nixos/system/xkb/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.system.xkb; 6 + in 7 + { 8 + options.${namespace}.system.xkb = with types; { 9 + enable = mkBoolOpt false "Whether or not to configure xkb."; 10 + layout = mkOpt str "us" "Define your xbk layout."; 11 + }; 12 + 13 + config = mkIf cfg.enable { 14 + services.xserver.xkb.layout = cfg.layout; 15 + # TODO : add alternative variant and layout switcher 16 + }; 17 + }
+7 -29
systems/x86_64-linux/loki/default.nix
··· 6 6 7 7 asgard = { 8 8 system = { 9 - bootloader.enable = true; 9 + boot.efi.enable = true; 10 10 fonts.enable = true; 11 + 12 + time.enable = true; 13 + locale.enable = true; 14 + 15 + xkb.enable = true; 11 16 }; 12 17 13 18 hardware = { 14 19 gpu.nvidia.enable = true; 15 20 audio.enable = true; 21 + networking.enable = true; 16 22 }; 17 23 18 24 desktop.budgie.enable = true; ··· 20 26 apps = { 21 27 steam.enable = true; 22 28 }; 23 - }; 24 - 25 - networking.hostName = "loki"; 26 - # Enable networking 27 - networking.networkmanager.enable = true; 28 - 29 - # Set your time zone. 30 - time.timeZone = "Europe/Paris"; 31 - 32 - # Select internationalisation properties. 33 - i18n.defaultLocale = "en_US.UTF-8"; 34 - 35 - i18n.extraLocaleSettings = { 36 - LC_ADDRESS = "fr_FR.UTF-8"; 37 - LC_IDENTIFICATION = "fr_FR.UTF-8"; 38 - LC_MEASUREMENT = "fr_FR.UTF-8"; 39 - LC_MONETARY = "fr_FR.UTF-8"; 40 - LC_NAME = "fr_FR.UTF-8"; 41 - LC_NUMERIC = "fr_FR.UTF-8"; 42 - LC_PAPER = "fr_FR.UTF-8"; 43 - LC_TELEPHONE = "fr_FR.UTF-8"; 44 - LC_TIME = "fr_FR.UTF-8"; 45 - }; 46 - 47 - # Configure keymap in X11 48 - services.xserver.xkb = { 49 - layout = "us"; 50 - variant = ""; 51 29 }; 52 30 53 31 # Enable automatic login for the user.