-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow building installers with custom configs
- Move previous config snippets into snippet files, used as default snippets (getCustomOrDefaultSnippet) - If a custom snippet is found in customConfigSnippets, it is used instead
- Loading branch information
1 parent
2d6e267
commit 65e3686
Showing
41 changed files
with
288 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Enable sound with pipewire. | ||
sound.enable = false; | ||
hardware.pulseaudio.enable = false; | ||
security.rtkit.enable = true; | ||
services.pipewire = { | ||
enable = true; | ||
alsa.enable = true; | ||
alsa.support32Bit = true; | ||
pulse.enable = true; | ||
# If you want to use JACK applications, uncomment this | ||
#jack.enable = true; | ||
|
||
# use the example session manager (no others are packaged yet so this is enabled by default, | ||
# no need to redefine it in your config for now) | ||
#media-session.enable = true; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Enable automatic login for the user. | ||
services.xserver.displayManager.autoLogin.enable = true; | ||
services.xserver.displayManager.autoLogin.user = "@@username@@"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 | ||
systemd.services."getty@tty1".enable = false; | ||
systemd.services."autovt@tty1".enable = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Enable automatic login for the user. | ||
services.getty.autologinUser = "@@username@@"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Bootloader. | ||
boot.loader.grub.enable = true; | ||
boot.loader.grub.device = "@@bootdev@@"; | ||
boot.loader.grub.useOSProber = true; | ||
boot.tmp.useTmpfs = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Bootloader. | ||
boot.loader.systemd-boot.enable = true; | ||
boot.loader.systemd-boot.configurationLimit = 42; | ||
boot.loader.efi.canTouchEfiVariables = true; | ||
boot.tmp.useTmpfs = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Setup keyfile | ||
boot.initrd.secrets = { | ||
"/boot/crypto_keyfile.bin" = null; | ||
}; | ||
|
||
boot.loader.grub.enableCryptodisk = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Disable bootloader. | ||
boot.loader.grub.enable = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Enable networking | ||
services.connman.enable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Configure console keymap | ||
console.keyMap = "@@vconsole@@"; |
6 changes: 6 additions & 0 deletions
6
modules/nixos/defaultConfigs/snippets/desktopEnv/budgie.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the Budgie Desktop environment. | ||
services.xserver.displayManager.lightdm.enable = true; | ||
services.xserver.desktopManager.budgie.enable = true; |
6 changes: 6 additions & 0 deletions
6
modules/nixos/defaultConfigs/snippets/desktopEnv/cinnamon.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the Cinnamon Desktop Environment. | ||
services.xserver.displayManager.lightdm.enable = true; | ||
services.xserver.desktopManager.cinnamon.enable = true; |
6 changes: 6 additions & 0 deletions
6
modules/nixos/defaultConfigs/snippets/desktopEnv/deepin.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the Deepin Desktop Environment. | ||
services.xserver.displayManager.lightdm.enable = true; | ||
services.xserver.desktopManager.deepin.enable = true; |
9 changes: 9 additions & 0 deletions
9
modules/nixos/defaultConfigs/snippets/desktopEnv/enlightment.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the Enlightenment Desktop Environment. | ||
services.xserver.displayManager.lightdm.enable = true; | ||
services.xserver.desktopManager.enlightenment.enable = true; | ||
|
||
# Enable acpid | ||
services.acpid.enable = true; |
6 changes: 6 additions & 0 deletions
6
modules/nixos/defaultConfigs/snippets/desktopEnv/gnome.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the GNOME Desktop Environment. | ||
services.xserver.displayManager.gdm.enable = true; | ||
services.xserver.desktopManager.gnome.enable = true; |
6 changes: 6 additions & 0 deletions
6
modules/nixos/defaultConfigs/snippets/desktopEnv/lumina.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the Lumina Desktop Environment. | ||
services.xserver.displayManager.lightdm.enable = true; | ||
services.xserver.desktopManager.lumina.enable = true; |
6 changes: 6 additions & 0 deletions
6
modules/nixos/defaultConfigs/snippets/desktopEnv/lxqt.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the LXQT Desktop Environment. | ||
services.xserver.displayManager.lightdm.enable = true; | ||
services.xserver.desktopManager.lxqt.enable = true; |
6 changes: 6 additions & 0 deletions
6
modules/nixos/defaultConfigs/snippets/desktopEnv/mate.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the MATE Desktop Environment. | ||
services.xserver.displayManager.lightdm.enable = true; | ||
services.xserver.desktopManager.mate.enable = true; |
6 changes: 6 additions & 0 deletions
6
modules/nixos/defaultConfigs/snippets/desktopEnv/pantheon.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the Pantheon Desktop Environment. | ||
services.xserver.displayManager.lightdm.enable = true; | ||
services.xserver.desktopManager.pantheon.enable = true; |
6 changes: 6 additions & 0 deletions
6
modules/nixos/defaultConfigs/snippets/desktopEnv/plasma5.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the KDE Plasma Desktop Environment. | ||
services.xserver.displayManager.sddm.enable = true; | ||
services.xserver.desktopManager.plasma5.enable = true; |
7 changes: 7 additions & 0 deletions
7
modules/nixos/defaultConfigs/snippets/desktopEnv/plasma6.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Enable the X11 windowing system. | ||
# You can disable this if you're only using the Wayland session. | ||
services.xserver.enable = true; | ||
|
||
# Enable the KDE Plasma Desktop Environment. | ||
services.displayManager.sddm.enable = true; | ||
services.desktopManager.plasma6.enable = true; |
6 changes: 6 additions & 0 deletions
6
modules/nixos/defaultConfigs/snippets/desktopEnv/xfce.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Enable the XFCE Desktop Environment. | ||
services.xserver.displayManager.lightdm.enable = true; | ||
services.xserver.desktopManager.xfce.enable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# intentionally empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
programs.firefox.enable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Edit this configuration file to define what should be installed on | ||
# your system. Help is available in the configuration.nix(5) man page | ||
# and in the NixOS manual (accessible by running ‘nixos-help’). | ||
|
||
{ config, pkgs, ... }: | ||
|
||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
imports = | ||
[ | ||
# Include the results of the hardware scan. | ||
./hardware-configuration.nix | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Configure keymap in X11 | ||
services.xserver.xkb = { | ||
layout = "@@kblayout@@"; | ||
variant = "@@kbvariant@@"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Select internationalisation properties. | ||
i18n.defaultLocale = "@@LANG@@"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
i18n.extraLocaleSettings = { | ||
LC_ADDRESS = "@@LC_ADDRESS@@"; | ||
LC_IDENTIFICATION = "@@LC_IDENTIFICATION@@"; | ||
LC_MEASUREMENT = "@@LC_MEASUREMENT@@"; | ||
LC_MONETARY = "@@LC_MONETARY@@"; | ||
LC_NAME = "@@LC_NAME@@"; | ||
LC_NUMERIC = "@@LC_NUMERIC@@"; | ||
LC_PAPER = "@@LC_PAPER@@"; | ||
LC_TELEPHONE = "@@LC_TELEPHONE@@"; | ||
LC_TIME = "@@LC_TIME@@"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Enable CUPS to print documents. | ||
services.printing.enable = true; | ||
|
||
# Enable touchpad support (enabled default in most desktopManager). | ||
# services.xserver.libinput.enable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
networking.hostName = "@@hostname@@"; # Define your hostname. | ||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | ||
|
||
# Configure network proxy if necessary | ||
# networking.proxy.default = "http://user:password@proxy:port/"; | ||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
networking.networkmanager.enable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Enable network manager applet | ||
programs.nm-applet.enable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# List packages installed in system profile. To search, run: | ||
# $ nix search wget | ||
environment.systemPackages = with pkgs; [ | ||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. | ||
# wget | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Some programs need SUID wrappers, can be configured further or are | ||
# started in user sessions. | ||
# programs.mtr.enable = true; | ||
# programs.gnupg.agent = { | ||
# enable = true; | ||
# enableSSHSupport = true; | ||
# }; | ||
|
||
# List services that you want to enable: | ||
|
||
# Enable the OpenSSH daemon. | ||
# services.openssh.enable = true; | ||
|
||
# Open ports in the firewall. | ||
# networking.firewall.allowedTCPPorts = [ ... ]; | ||
# networking.firewall.allowedUDPPorts = [ ... ]; | ||
# Or disable the firewall altogether. | ||
# networking.firewall.enable = false; | ||
|
||
# This value determines the NixOS release from which the default | ||
# settings for stateful data, like file locations and database versions | ||
# on your system were taken. It‘s perfectly fine and recommended to leave | ||
# this value at the release version of the first install of this system. | ||
# Before changing this value read the documentation for this option | ||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||
system.stateVersion = "@@nixosversion@@"; # Did you read the comment? | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
time.timeZone = "@@timezone@@"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Allow unfree packages | ||
nixpkgs.config.allowUnfree = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Define a user account. Don't forget to set a password with ‘passwd’. | ||
users.users.@@username@@ = { | ||
isNormalUser = true; | ||
description = "@@fullname@@"; | ||
extraGroups = [ @@groups@@ ]; | ||
packages = with pkgs; [@@pkgs@@]; | ||
}; |
Oops, something went wrong.