mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
modules: move profiles
custom namespace to suites
We now have a "proper" profiles modules ala-nixpkgs so we'll have to move these to make it less confusing.
This commit is contained in:
parent
44ae723bd9
commit
9b7cc8a850
@ -1,7 +1,7 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
profiles = {
|
||||
suites = {
|
||||
dev = {
|
||||
enable = true;
|
||||
shell.enable = true;
|
||||
|
@ -10,7 +10,7 @@ in
|
||||
lib.mkEnableOption "configuration of foo-dogsquared's shell of choice and its toolbelt";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
profiles.dev.shell.enable = lib.mkDefault true;
|
||||
suites.dev.shell.enable = lib.mkDefault true;
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
|
@ -11,7 +11,7 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Install all of the desktop stuff.
|
||||
profiles.desktop = {
|
||||
suites.desktop = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
audio.pipewire.enable = true;
|
||||
|
@ -18,7 +18,7 @@ in
|
||||
terminal-multiplexer.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
profiles.dev = {
|
||||
suites.dev = {
|
||||
enable = true;
|
||||
extras.enable = true;
|
||||
coreutils-replacement.enable = true;
|
||||
|
@ -26,7 +26,7 @@ in
|
||||
];
|
||||
|
||||
# Enable the desktop audio profile for extra auditorial goodies.
|
||||
profiles.desktop.audio = {
|
||||
suites.desktop.audio = {
|
||||
enable = lib.mkDefault true;
|
||||
pipewire.enable = lib.mkDefault true;
|
||||
};
|
||||
|
@ -21,7 +21,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
profiles = {
|
||||
suites = {
|
||||
dev = {
|
||||
enable = true;
|
||||
shell.enable = true;
|
||||
|
@ -30,7 +30,7 @@
|
||||
};
|
||||
|
||||
# Some niceties.
|
||||
profiles.desktop.enable = true;
|
||||
suites.desktop.enable = true;
|
||||
|
||||
services.xserver.displayManager = {
|
||||
gdm = {
|
||||
|
@ -39,7 +39,7 @@
|
||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
|
||||
# My custom configuration with my custom modules starts here.
|
||||
profiles = {
|
||||
suites = {
|
||||
archiving.enable = true;
|
||||
browsers.chromium.enable = true;
|
||||
filesystem.setups.personal-webstorage.enable = true;
|
||||
|
@ -11,7 +11,7 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Bring in some of them good tools.
|
||||
profiles.filesystem.tools.enable = true;
|
||||
suites.filesystem.tools.enable = true;
|
||||
|
||||
# We're using some better filesystems so we're using it.
|
||||
boot.initrd.supportedFilesystems = [ "btrfs" ];
|
||||
|
@ -43,7 +43,7 @@ in
|
||||
];
|
||||
|
||||
# Put on your cloak, kid.
|
||||
profiles.vpn.personal.enable = true;
|
||||
suites.vpn.personal.enable = true;
|
||||
|
||||
# We'll go with a software firewall. We're mostly configuring it as if we're
|
||||
# using a server even though the chances of that is pretty slim.
|
||||
|
@ -60,7 +60,7 @@ in
|
||||
"ssh-key" = { };
|
||||
});
|
||||
|
||||
profiles.filesystem.setups = {
|
||||
suites.filesystem.setups = {
|
||||
archive.enable = true;
|
||||
external-hdd.enable = true;
|
||||
};
|
||||
|
@ -100,7 +100,7 @@ in
|
||||
"secrets-config" = { };
|
||||
});
|
||||
|
||||
profiles.filesystem.setups.archive.enable = true;
|
||||
suites.filesystem.setups.archive.enable = true;
|
||||
|
||||
services.yt-dlp = {
|
||||
enable = true;
|
||||
|
@ -14,7 +14,7 @@ in
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
# Bring all of the desktop goodies.
|
||||
profiles.desktop = {
|
||||
suites.desktop = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
fonts.enable = true;
|
||||
@ -35,7 +35,7 @@ in
|
||||
|
||||
# Make it in multiple languages. Take note the input method engine is set
|
||||
# up by the workflow module of choice...
|
||||
profiles.i18n.enable = true;
|
||||
suites.i18n.enable = true;
|
||||
|
||||
# ...which is by the way is this one.
|
||||
workflows.workflows.a-happy-gnome.enable = true;
|
||||
@ -43,7 +43,7 @@ in
|
||||
|
||||
(lib.mkIf (hasAnyWorkflowEnabled [ "a-happy-gnome" "knome" "mosey-branch" ]) {
|
||||
hosts.ni.networking.setup = "networkmanager";
|
||||
profiles.i18n.setup = "ibus";
|
||||
suites.i18n.setup = "ibus";
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ in
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
# Bring all of the software development goodies.
|
||||
profiles.dev = {
|
||||
suites.dev = {
|
||||
enable = true;
|
||||
extras.enable = true;
|
||||
hardware.enable = true;
|
||||
|
@ -10,7 +10,7 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Bring all of the goodies.
|
||||
profiles.gaming = {
|
||||
suites.gaming = {
|
||||
enable = true;
|
||||
emulators.enable = true;
|
||||
retro-computing.enable = true;
|
||||
@ -28,7 +28,7 @@ in
|
||||
programs.steam.remotePlay.openFirewall = true;
|
||||
|
||||
# Enable the Wine setup for Linux gaming with Windows games.
|
||||
profiles.desktop.wine.enable = true;
|
||||
suites.desktop.wine.enable = true;
|
||||
|
||||
# Yes... Play your Brawl Stars and Clash Royale in NixOS. :)
|
||||
virtualisation.waydroid.enable = true;
|
||||
|
@ -53,7 +53,7 @@
|
||||
# All of the keys required to deploy the secrets.
|
||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
|
||||
profiles.server = {
|
||||
suites.server = {
|
||||
enable = true;
|
||||
cleanup.enable = true;
|
||||
};
|
||||
|
@ -30,6 +30,6 @@
|
||||
programs.git.package = lib.mkForce pkgs.git;
|
||||
|
||||
# Setting the development environment mainly for container-related work.
|
||||
profiles.dev.enable = true;
|
||||
profiles.dev.containers.enable = true;
|
||||
suites.dev.enable = true;
|
||||
suites.dev.containers.enable = true;
|
||||
}
|
||||
|
@ -2,10 +2,10 @@
|
||||
{ config, lib, pkgs, ... }@attrs:
|
||||
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
cfg = config.suites.desktop;
|
||||
in
|
||||
{
|
||||
options.profiles.desktop = {
|
||||
options.suites.desktop = {
|
||||
enable = lib.mkEnableOption "installations of desktop apps";
|
||||
graphics.enable =
|
||||
lib.mkEnableOption "installations of graphics-related apps";
|
||||
|
@ -2,9 +2,9 @@
|
||||
# If you're looking for text editors, go to `./editors.nix`.
|
||||
{ config, lib, pkgs, ... }@attrs:
|
||||
|
||||
let cfg = config.profiles.dev;
|
||||
let cfg = config.suites.dev;
|
||||
in {
|
||||
options.profiles.dev = {
|
||||
options.suites.dev = {
|
||||
enable =
|
||||
lib.mkEnableOption "basic set of programs for development setup";
|
||||
shell.enable =
|
||||
|
@ -7,9 +7,9 @@
|
||||
# for me is not worth to maintain.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.profiles.editors;
|
||||
let cfg = config.suites.editors;
|
||||
in {
|
||||
options.profiles.editors = {
|
||||
options.suites.editors = {
|
||||
neovim.enable = lib.mkEnableOption "basic Neovim setup";
|
||||
vscode.enable = lib.mkEnableOption "basic Visual Studio Code setup";
|
||||
};
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Instant setup for using internationalized languages.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.profiles.i18n;
|
||||
let cfg = config.suites.i18n;
|
||||
in {
|
||||
options.profiles.i18n.enable =
|
||||
options.suites.i18n.enable =
|
||||
lib.mkEnableOption "fcitx5 as input method engine";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -1,9 +1,9 @@
|
||||
# All of your embarrassing moments, marked here forever.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.profiles.archiving;
|
||||
let cfg = config.suites.archiving;
|
||||
in {
|
||||
options.profiles.archiving.enable =
|
||||
options.suites.archiving.enable =
|
||||
lib.mkEnableOption "installation of various archiving tools";
|
||||
|
||||
# This is not going to set BorgBackup NixOS services for you.
|
||||
|
@ -4,10 +4,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.profiles.browsers;
|
||||
cfg = config.suites.browsers;
|
||||
in
|
||||
{
|
||||
options.profiles.browsers = {
|
||||
options.suites.browsers = {
|
||||
firefox.enable = lib.mkEnableOption "Firefox and its fixed configuration";
|
||||
chromium.enable = lib.mkEnableOption "Chromium and its fixed configuration";
|
||||
};
|
||||
|
@ -3,9 +3,9 @@
|
||||
# That can be found in the `themes` module.
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
let cfg = config.profiles.desktop;
|
||||
let cfg = config.suites.desktop;
|
||||
in {
|
||||
options.profiles.desktop = {
|
||||
options.suites.desktop = {
|
||||
enable =
|
||||
lib.mkEnableOption "basic desktop-related services and default programs";
|
||||
audio.enable =
|
||||
|
@ -1,9 +1,9 @@
|
||||
# The module for anything dev-related.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.profiles.dev;
|
||||
let cfg = config.suites.dev;
|
||||
in {
|
||||
options.profiles.dev = {
|
||||
options.suites.dev = {
|
||||
enable = lib.mkEnableOption "basic configuration for software development";
|
||||
extras.enable = lib.mkEnableOption "additional shell utilities";
|
||||
hardware.enable = lib.mkEnableOption "additional hardware-related dev utilities";
|
||||
|
@ -1,6 +1,6 @@
|
||||
# A bunch of predefined filesystem configurations for several devices. This is
|
||||
# nice for setting up shop for certain tasks with the flick of the switch to ON
|
||||
# (e.g., `config.profiles.filesystem.archive.enable = true`) and not have
|
||||
# (e.g., `config.suites.filesystem.archive.enable = true`) and not have
|
||||
# conflicting settings all throughout the configuration.
|
||||
#
|
||||
# Much of the filesystem setups are taking advantage of systemd's fstab
|
||||
@ -9,10 +9,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.profiles.filesystem;
|
||||
cfg = config.suites.filesystem;
|
||||
in
|
||||
{
|
||||
options.profiles.filesystem = {
|
||||
options.suites.filesystem = {
|
||||
tools.enable = lib.mkEnableOption "filesystem-related settings";
|
||||
setups = {
|
||||
archive.enable = lib.mkEnableOption "automounting offline archive";
|
||||
|
@ -2,10 +2,10 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.profiles.gaming;
|
||||
cfg = config.suites.gaming;
|
||||
in
|
||||
{
|
||||
options.profiles.gaming = {
|
||||
options.suites.gaming = {
|
||||
enable = lib.mkEnableOption "basic gaming setup";
|
||||
emulators.enable = lib.mkEnableOption "installation of individual game emulators";
|
||||
retro-computing.enable = lib.mkEnableOption "installation of retro computer systems";
|
||||
|
@ -4,10 +4,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.profiles.i18n;
|
||||
cfg = config.suites.i18n;
|
||||
in
|
||||
{
|
||||
options.profiles.i18n = {
|
||||
options.suites.i18n = {
|
||||
enable = lib.mkEnableOption "main i18n config";
|
||||
setup = lib.mkOption {
|
||||
type = lib.types.enum [ "fcitx5" "ibus" ];
|
||||
|
@ -4,10 +4,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.profiles.server;
|
||||
cfg = config.suites.server;
|
||||
in
|
||||
{
|
||||
options.profiles.server = {
|
||||
options.suites.server = {
|
||||
enable = lib.mkEnableOption "server-related settings";
|
||||
cleanup.enable = lib.mkEnableOption "cleanup service for the system";
|
||||
auto-upgrade.enable = lib.mkEnableOption "unattended system upgrades";
|
||||
@ -17,7 +17,7 @@ in
|
||||
({
|
||||
assertions = [{
|
||||
assertion =
|
||||
!config.profiles.desktop.enable || !config.profiles.server.enable;
|
||||
!config.suites.desktop.enable || !config.suites.server.enable;
|
||||
message = ''
|
||||
Desktop profile is also enabled. The profiles `desktop` and `server`
|
||||
are mutually exclusive.
|
||||
|
@ -1,10 +1,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.profiles.vpn;
|
||||
cfg = config.suites.vpn;
|
||||
in
|
||||
{
|
||||
options.profiles.vpn = {
|
||||
options.suites.vpn = {
|
||||
personal.enable = lib.mkEnableOption "personal VPN configuration with Wireguard";
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user