feat: introduction of system_profiles

This commit is contained in:
Ranomier 2025-06-14 21:43:23 +02:00
parent 116aaaacff
commit 855b932cbd
15 changed files with 117 additions and 67 deletions

View file

@ -1,6 +1,6 @@
# For when to deploy to a container,
# can be used with minify to make things smaller
{lib, ...}: {
boot.isContainer = lib.mkDefault true;
boot.kernel.enable = lib.mkDefault false;
imports = [./mini.nix];
}

View file

@ -0,0 +1,16 @@
# This makes an installation smaller at the cost of
# features (and maybe even stability)
{lib, modulesPath, ...}: {
imports = [
(modulesPath + "/profiles/minimal.nix")
#(modulesPath + "/profiles/perlless.nix")
];
disabledModules = [
(modulesPath + "/profiles/all-hardware.nix")
(modulesPath + "/profiles/base.nix")
];
environment.defaultPackages = lib.mkDefault [];
nixpkgs.overlays = lib.mkDefault [(self: super: {})];
}

View file

@ -1,8 +1,6 @@
{
lib,
pkgs,
...
}: {
# This loads some nix and nixpkgs specific settints
# i often need
{lib, pkgs, ...}: {
# Disable if you don't want unfree packages
nixpkgs.config.allowUnfree = lib.mkDefault true;
@ -15,11 +13,9 @@
channel.enable = lib.mkDefault false;
settings.experimental-features = lib.mkDefault ["nix-command" "flakes"];
settings.experimental-features = lib.mkDefault [
"nix-command"
"flakes"
];
};
imports = [
../modules/locale.nix
../modules/sec_auth/sudo-rs.nix
];
}

View file

@ -0,0 +1,8 @@
{
imports = [
./components/nix-defaults.nix
./importers/desktop.nix
./importers/general.nix
];
}

View file

@ -0,0 +1,22 @@
# This basicly imports the whole modules folder
{rootPath, ...}: {
imports = [
(rootPath + /modules)
(rootPath + /modules/hardware)
(rootPath + /modules/pkg_mgrmnt)
(rootPath + /modules/sec_auth)
(rootPath + /modules/software)
(rootPath + /modules/software/browser)
(rootPath + /modules/software/nix-helper)
(rootPath + /modules/software/office)
(rootPath + /modules/software/shells)
(rootPath + /modules/users)
(rootPath + /modules/wm_and_de)
];
}

View file

@ -0,0 +1,7 @@
# This loads some "general" defaults
{rootPath, ...}: {
imports = [
(rootPath + /modules/locale.nix)
(rootPath + /modules/sec_auth/sudo-rs.nix)
];
}

View file

@ -0,0 +1,7 @@
{rootPath, ...}: {
imports = [
(rootPath + /modules/customisation.nix)
(rootPath + /modules/software/neovim.nix)
(rootPath + /modules/software/packages/core.nix)
];
}

View file

@ -1,26 +0,0 @@
{
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/minimal.nix")
#(modulesPath + "/profiles/perlless.nix")
{
environment.defaultPackages = lib.mkDefault [];
nixpkgs.overlays = lib.mkDefault [(self: super: {})];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
}
];
disabledModules = [
(modulesPath + "/profiles/all-hardware.nix")
(modulesPath + "/profiles/base.nix")
];
}

View file

@ -1,10 +1,9 @@
{
imports = [
./defaults.nix
./mini.nix
./components/minify.nix
./components/nix-defaults.nix
../modules/customisation.nix
../modules/software/neovim.nix
../modules/software/packages/core.nix
./importers/general.nix
./importers/server.nix
];
}