feat: add minimal config support (WIP)

This commit is contained in:
Leon Schwarzäugl 2025-07-04 19:54:45 +02:00
parent 34badc91d5
commit 49b557befa
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
26 changed files with 726 additions and 599 deletions

View file

@ -1,6 +1,6 @@
{ lib, config, globals, ... }:
let
primaryUser = globals.user.name;
primaryUser = config.swarselsystems.mainUser;
inherit (config.repo.secrets.common) workHostName;
inherit (config.repo.secrets.local.syncthing) dev1 dev2 dev3 loc1;
serviceDomain = config.repo.secrets.common.services.domains.syncthing3;

View file

@ -1,14 +1,15 @@
{ self, config, inputs, lib, globals, ... }:
{ self, config, inputs, lib, ... }:
let
primaryUser = globals.user.name;
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isBtrfs = true;
isLinux = true;
sharescreen = "eDP-2";
profiles = {
personal = true;
work = true;
framework = true;
personal = lib.mkIf (!minimal) true;
minimal = lib.mkIf minimal true;
work = lib.mkIf (!minimal) true;
framework = lib.mkIf (!minimal) true;
};
};
in

View file

@ -1,6 +1,6 @@
{ lib, config, globals, ... }:
let
primaryUser = globals.user.name;
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isBtrfs = false;
isLinux = true;

View file

@ -1,11 +1,12 @@
{ self, inputs, pkgs, lib, ... }:
{ self, lib, minimal, ... }:
let
modulesPath = "${self}/modules";
sharedOptions = {
isBtrfs = true;
isLinux = true;
profiles = {
toto = true;
toto = lib.mkIf (!minimal) true;
minimal = lib.mkIf minimal true;
btrfs = lib.mkIf minimal true;
};
};
in
@ -14,41 +15,9 @@ in
imports = [
./disk-config.nix
./hardware-configuration.nix
"${modulesPath}/nixos/common/sharedsetup.nix"
"${modulesPath}/home/common/sharedsetup.nix"
"${self}/profiles/nixos"
inputs.home-manager.nixosModules.home-manager
{
home-manager.users."setup".imports = [
inputs.sops-nix.homeManagerModules.sops
"${modulesPath}/home/common/sharedsetup.nix"
"${self}/profiles/home"
];
}
];
environment.systemPackages = with pkgs; [
curl
git
gnupg
rsync
ssh-to-age
sops
vim
just
sbctl
];
system.stateVersion = lib.mkForce "23.05";
boot = {
supportedFilesystems = [ "btrfs" ];
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
};
networking = {
hostName = "toto";
@ -60,10 +29,10 @@ in
info = "~SwarselSystems~ remote install helper";
wallpaper = self + /files/wallpaper/lenovowp.png;
isImpermanence = true;
isCrypted = false;
isCrypted = true;
isSecureBoot = false;
isSwap = false;
swapSize = "8G";
isSwap = true;
swapSize = "2G";
# rootDisk = "/dev/nvme0n1";
rootDisk = "/dev/sda";
# rootDisk = "/dev/vda";

View file

@ -1,6 +1,6 @@
{ lib, config, globals, ... }:
{ lib, config, ... }:
let
primaryUser = globals.user.name;
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isBtrfs = false;
isLinux = true;