chore: flake cleanup

This commit is contained in:
Leon Schwarzäugl 2025-07-17 21:50:14 +02:00
parent e7d3def830
commit 1468f3d0fc
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
19 changed files with 267 additions and 391 deletions

View file

@ -840,9 +840,12 @@ The rest of the outputs either define or help define the actual configurations:
};
swarselprofiles = {
minimal = lib.mkIf minimal true;
minimal = lib.mkIf minimal (lib.mkDefault true);
};
swarselsystems = {
mainUser = lib.mkDefault "swarsel";
};
}
];
};
@ -2028,13 +2031,7 @@ My personal laptop.
{ self, config, inputs, lib, minimal, ... }:
let
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isLaptop = true;
isNixos = true;
isBtrfs = true;
isLinux = true;
sharescreen = "eDP-1";
};
sharedOptions = { };
in
{
@ -2046,14 +2043,20 @@ My personal laptop.
];
swarselprofiles = {
reduced = lib.mkIf (!minimal) true;
minimal = lib.mkIf minimal true;
btrfs = true;
};
swarselprofiles = {
reduced = lib.mkIf (!minimal) true;
btrfs = true;
};
swarselsystems = lib.recursiveUpdate
{
isLaptop = true;
isNixos = true;
isBtrfs = true;
isLinux = true;
lowResolution = "1280x800";
highResolution = "1920x1080";
sharescreen = "eDP-1";
info = "Lenovo ThinkPad";
firewall = lib.mkForce true;
wallpaper = self + /files/wallpaper/lenovowp.png;
@ -2070,27 +2073,19 @@ My personal laptop.
sharedOptions;
home-manager.users."${primaryUser}" = {
swarselprofiles = {
reduced = lib.mkIf (!minimal) true;
minimal = lib.mkIf minimal true;
};
# home.stateVersion = lib.mkForce "23.05";
swarselsystems = lib.recursiveUpdate
{
lowResolution = "1280x800";
highResolution = "1920x1080";
monitors = {
main = {
name = "LG Display 0x04EF Unknown";
mode = "1920x1080"; # TEMPLATE
scale = "1";
position = "1920,0";
workspace = "15:L";
output = "eDP-1";
};
swarselsystems = {
monitors = {
main = {
name = "LG Display 0x04EF Unknown";
mode = "1920x1080"; # TEMPLATE
scale = "1";
position = "1920,0";
workspace = "15:L";
output = "eDP-1";
};
}
sharedOptions;
};
};
};
}
@ -2270,15 +2265,7 @@ This is my main server that I run at home. It handles most tasks that require bi
:CUSTOM_ID: h:8ad68406-4a75-45ba-97ad-4c310b921124
:END:
#+begin_src nix-ts :tangle hosts/nixos/winters/default.nix
{ lib, config, ... }:
let
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isBtrfs = false;
isLinux = true;
isNixos = true;
};
in
{ config, ... }:
{
imports = [
@ -2299,24 +2286,20 @@ This is my main server that I run at home. It handles most tasks that require bi
};
swarselprofiles = {
server.local = true;
};
swarselsystems = lib.recursiveUpdate
{
info = "ASRock J4105-ITX, 32GB RAM";
isImpermanence = false;
isSecureBoot = true;
isCrypted = true;
}
sharedOptions;
home-manager.users."${primaryUser}" = {
home.stateVersion = lib.mkForce "23.05";
swarselsystems = lib.recursiveUpdate
{ }
sharedOptions;
swarselprofiles = {
server.local = true;
};
swarselsystems = {
info = "ASRock J4105-ITX, 32GB RAM";
isImpermanence = false;
isSecureBoot = true;
isCrypted = true;
isBtrfs = false;
isLinux = true;
isNixos = true;
};
}
@ -2492,15 +2475,7 @@ This machine mainly acts as an external sync helper. It manages the following th
:END:
#+begin_src nix-ts :tangle hosts/nixos/milkywell/default.nix
{ lib, config, minimal, ... }:
let
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isBtrfs = true;
isLinux = true;
isNixos = true;
};
in
{ lib, minimal, ... }:
{
imports = [
./hardware-configuration.nix
@ -2525,24 +2500,19 @@ This machine mainly acts as an external sync helper. It manages the following th
swarselprofiles = {
minimal = lib.mkIf minimal true;
server.syncserver = true;
server.syncserver = true;
};
swarselsystems = lib.recursiveUpdate
{
info = "VM.Standard.E2.1.Micro";
isImpermanence = true;
isSecureBoot = false;
isCrypted = true;
isSwap = true;
rootDisk = "/dev/sda";
swapSize = "4G";
}
sharedOptions;
home-manager.users."${primaryUser}" = {
swarselsystems = lib.recursiveUpdate
{ }
sharedOptions;
swarselsystems = {
info = "VM.Standard.E2.1.Micro";
isImpermanence = true;
isSecureBoot = false;
isCrypted = true;
isSwap = true;
rootDisk = "/dev/sda";
swapSize = "4G";
isBtrfs = true;
isLinux = true;
isNixos = true;
};
}
@ -2696,17 +2666,10 @@ This machine mainly acts as an external sync helper. It manages the following th
#+begin_src nix-ts :tangle hosts/nixos/moonside/default.nix
{ lib, config, globals, ... }:
let
primaryUser = config.swarselsystems.mainUser;
inherit (config.repo.secrets.common) workHostName;
inherit (config.repo.secrets.local.syncthing) dev1 dev2 dev3 loc1;
inherit (config.swarselsystems) sopsFile;
serviceDomain = config.repo.secrets.common.services.domains.syncthing3;
sharedOptions = {
isBtrfs = true;
isNixos = true;
isLinux = true;
};
in
{
imports = [
@ -2905,27 +2868,21 @@ This machine mainly acts as an external sync helper. It manages the following th
};
};
swarselprofiles = {
server.moonside = true;
};
swarselsystems = lib.recursiveUpdate
{
info = "VM.Standard.A1.Flex, 4 OCPUs, 24GB RAM";
isImpermanence = true;
isSecureBoot = false;
isCrypted = false;
isSwap = false;
rootDisk = "/dev/sda";
}
sharedOptions;
home-manager.users."${primaryUser}" = {
home.stateVersion = lib.mkForce "23.11";
swarselsystems = lib.recursiveUpdate
{ }
sharedOptions;
swarselprofiles = {
server.moonside = true;
};
swarselsystems = {
info = "VM.Standard.A1.Flex, 4 OCPUs, 24GB RAM";
isImpermanence = true;
isSecureBoot = false;
isCrypted = false;
isSwap = false;
rootDisk = "/dev/sda";
isBtrfs = true;
isNixos = true;
isLinux = true;
};
}
#+end_src
@ -3100,14 +3057,7 @@ This is a slim setup for developing base configuration. I do not track the hardw
:CUSTOM_ID: h:4e53b40b-98b2-4615-b1b0-3696a75edd6e
:END:
#+begin_src nix-ts :tangle hosts/nixos/toto/default.nix
{ self, config, lib, minimal, ... }:
let
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isBtrfs = true;
isLinux = true;
};
in
{ self, lib, minimal, ... }:
{
imports = [
@ -3115,42 +3065,33 @@ This is a slim setup for developing base configuration. I do not track the hardw
./hardware-configuration.nix
];
networking = {
hostName = "toto";
firewall.enable = false;
};
swarselprofiles = {
toto = lib.mkIf (!minimal) true;
minimal = lib.mkIf minimal true;
btrfs = true;
};
swarselsystems = lib.recursiveUpdate
{
info = "~SwarselSystems~ remote install helper";
wallpaper = self + /files/wallpaper/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;
isSwap = true;
swapSize = "2G";
# rootDisk = "/dev/nvme0n1";
rootDisk = "/dev/vda";
# rootDisk = "/dev/vda";
}
sharedOptions;
home-manager.users.${primaryUser} = {
home.stateVersion = lib.mkForce "23.05";
swarselsystems = lib.recursiveUpdate
{
isLaptop = false;
isNixos = true;
}
sharedOptions;
swarselprofiles = {
toto = lib.mkIf (!minimal) true;
btrfs = true;
};
swarselsystems = {
info = "~SwarselSystems~ remote install helper";
wallpaper = self + /files/wallpaper/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;
isSwap = true;
swapSize = "2G";
# rootDisk = "/dev/nvme0n1";
rootDisk = "/dev/vda";
# rootDisk = "/dev/vda";
isBtrfs = true;
isLinux = true;
isLaptop = false;
isNixos = true;
};
}
@ -3537,67 +3478,56 @@ I also set the =WLR_RENDERER_ALLOW_SOFTWARE=1= to allow this configuration to ru
{ self, config, pkgs, lib, minimal, ... }:
let
mainUser = "demo";
sharedOptions = {
inherit mainUser;
in
{
imports = [
./hardware-configuration.nix
./disk-config.nix
{
_module.args.diskDevice = config.swarselsystems.rootDisk;
}
];
environment.variables = {
WLR_RENDERER_ALLOW_SOFTWARE = 1;
};
services.qemuGuest.enable = true;
boot = {
loader.systemd-boot.enable = lib.mkForce true;
loader.efi.canTouchEfiVariables = true;
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
};
networking = {
hostName = "chaostheatre";
firewall.enable = true;
};
swarselprofiles = {
chaostheatre = lib.mkIf (!minimal) true;
minimal = lib.mkIf minimal true;
btrfs = true;
};
swarselsystems = {
info = "~SwarselSystems~ demo host";
wallpaper = self + /files/wallpaper/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;
isSwap = true;
swapSize = "4G";
rootDisk = "/dev/vda";
isBtrfs = false;
inherit mainUser;
isLinux = true;
isPublic = true;
isNixos = true;
};
in
{
imports = [
./hardware-configuration.nix
./disk-config.nix
{
_module.args.diskDevice = config.swarselsystems.rootDisk;
}
];
environment.variables = {
WLR_RENDERER_ALLOW_SOFTWARE = 1;
};
services.qemuGuest.enable = true;
boot = {
loader.systemd-boot.enable = lib.mkForce true;
loader.efi.canTouchEfiVariables = true;
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
};
networking = {
hostName = "chaostheatre";
firewall.enable = true;
};
swarselprofiles = {
chaostheatre = lib.mkIf (!minimal) true;
minimal = lib.mkIf minimal true;
btrfs = true;
};
swarselsystems = lib.recursiveUpdate
{
info = "~SwarselSystems~ demo host";
wallpaper = self + /files/wallpaper/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;
isSwap = true;
swapSize = "4G";
rootDisk = "/dev/vda";
}
sharedOptions;
home-manager.users.${mainUser} = {
home.stateVersion = lib.mkForce "23.05";
swarselsystems = lib.recursiveUpdate
{
isNixos = true;
}
sharedOptions;
};
}
}
#+end_src
@ -4158,7 +4088,7 @@ We enable the use of =home-manager= as a NixoS module. A nice trick here is the
useGlobalPkgs = true;
useUserPackages = true;
verbose = true;
users.swarsel.imports = [
users.${config.swarselsystems.mainUser}.imports = [
inputs.nix-index-database.hmModules.nix-index
inputs.sops-nix.homeManagerModules.sops
# inputs.stylix.homeModules.stylix
@ -4209,8 +4139,8 @@ For that reason, make sure that =sops-nix= is properly working before finishing
users."${config.swarselsystems.mainUser}" = {
isNormalUser = true;
description = "Leon S";
password = lib.mkIf minimal "setup";
hashedPasswordFile = lib.mkIf (!minimal) config.sops.secrets.main-user-hashed-pw.path;
password = lib.mkIf (minimal || config.swarselsystems.isPublic) "setup";
hashedPasswordFile = lib.mkIf (!minimal && !config.swarselsystems.isPublic) config.sops.secrets.main-user-hashed-pw.path;
extraGroups = [ "wheel" ] ++ lib.optionals (!minimal) [ "networkmanager" "syncthing" "docker" "lp" "audio" "video" "vboxusers" "libvirtd" "scanner" ];
packages = with pkgs; [ ];
};
@ -10273,6 +10203,9 @@ Options that I need specifically at work. There are more options at [[#h:f0b2ea9
spice-protocol
win-virtio
win-spice
powershell
gh
];
@ -16123,7 +16056,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
:END:
#+begin_src nix-ts :tangle profiles/nixos/personal/default.nix :mkdirp yes
{ lib, config, minimal, ... }:
{ lib, config, ... }:
{
options.swarselprofiles.personal = lib.mkEnableOption "is this a personal host";
config = lib.mkIf config.swarselprofiles.personal {
@ -16182,7 +16115,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
};
home-manager.users."${config.swarselsystems.mainUser}" = {
swarselprofiles = {
personal = lib.mkIf (!minimal) true;
personal = lib.mkDefault true;
};
};
@ -16249,6 +16182,11 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
ssh = lib.mkDefault true;
};
};
home-manager.users."${config.swarselsystems.mainUser}" = {
swarselprofiles = {
personal = lib.mkDefault true;
};
};
};
@ -16308,6 +16246,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
home-manager = lib.mkDefault true;
xserver = lib.mkDefault true;
users = lib.mkDefault true;
sops = lib.mkDefault true;
env = lib.mkDefault true;
security = lib.mkDefault true;
systemdTimeout = lib.mkDefault true;
@ -16316,7 +16255,6 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
pipewire = lib.mkDefault true;
network = lib.mkDefault true;
time = lib.mkDefault true;
sops = lib.mkDefault false;
stylix = lib.mkDefault true;
programs = lib.mkDefault true;
zsh = lib.mkDefault true;
@ -16327,7 +16265,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
interceptionTools = lib.mkDefault true;
swayosd = lib.mkDefault true;
ppd = lib.mkDefault true;
yubikey = lib.mkDefault true;
yubikey = lib.mkDefault false;
ledger = lib.mkDefault true;
keyboards = lib.mkDefault true;
login = lib.mkDefault true;
@ -16389,7 +16327,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
:END:
#+begin_src nix-ts :tangle profiles/nixos/work/default.nix :mkdirp yes
{ lib, config, minimal, ... }:
{ lib, config, ... }:
{
options.swarselprofiles.work = lib.mkEnableOption "is this a work host";
config = lib.mkIf config.swarselprofiles.work {
@ -16400,7 +16338,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
};
home-manager.users."${config.swarselsystems.mainUser}" = {
swarselprofiles = {
work = lib.mkIf (!minimal) true;
work = lib.mkDefault true;
};
};
@ -16416,7 +16354,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
:END:
#+begin_src nix-ts :tangle profiles/nixos/framework/default.nix :mkdirp yes
{ lib, config, minimal, ... }:
{ lib, config, ... }:
{
options.swarselprofiles.framework = lib.mkEnableOption "is this a framework brand host";
config = lib.mkIf config.swarselprofiles.framework {
@ -16427,7 +16365,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
};
home-manager.users."${config.swarselsystems.mainUser}" = {
swarselprofiles = {
framework = lib.mkIf (!minimal) true;
framework = lib.mkDefault true;
};
};
@ -20847,7 +20785,7 @@ This file defines a few workflows that I often need to run when working on my co
sudo dd if=$(eza --sort changed {{ISO}} | tail -n1) of={{DRIVE}} bs=4M status=progress oflag=sync
sync USER HOST:
rsync -av --filter=':- .gitignore' -e "ssh -l {{USER}}" . {{USER}}@{{HOST}}:.dotfiles/
rsync -rltv --filter=':- .gitignore' -e "ssh -l {{USER}}" . {{USER}}@{{HOST}}:.dotfiles/
#+end_src
** aspell.conf

6
flake.lock generated
View file

@ -1618,11 +1618,11 @@
},
"nixpkgs-dev": {
"locked": {
"lastModified": 1752440522,
"narHash": "sha256-CInQkEG3f8XwIBQxYFhuFCT+T++JPstThfifAMD0yRk=",
"lastModified": 1752736260,
"narHash": "sha256-90Gt98hmw/20aOAd7KaSW6otXu7MOBctRmI9RlXD/s0=",
"owner": "Swarsel",
"repo": "nixpkgs",
"rev": "1f569e3bd49502cb4ec312214662d93619cf2c54",
"rev": "169c3483f7c06fbb58c9346e4d9d112c8aa7827e",
"type": "github"
},
"original": {

View file

@ -1,13 +1,7 @@
{ self, config, inputs, lib, minimal, ... }:
let
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isLaptop = true;
isNixos = true;
isBtrfs = true;
isLinux = true;
sharescreen = "eDP-1";
};
sharedOptions = { };
in
{
@ -21,12 +15,18 @@ in
swarselprofiles = {
reduced = lib.mkIf (!minimal) true;
minimal = lib.mkIf minimal true;
btrfs = true;
};
swarselsystems = lib.recursiveUpdate
{
isLaptop = true;
isNixos = true;
isBtrfs = true;
isLinux = true;
lowResolution = "1280x800";
highResolution = "1920x1080";
sharescreen = "eDP-1";
info = "Lenovo ThinkPad";
firewall = lib.mkForce true;
wallpaper = self + /files/wallpaper/lenovowp.png;
@ -43,26 +43,18 @@ in
sharedOptions;
home-manager.users."${primaryUser}" = {
swarselprofiles = {
reduced = lib.mkIf (!minimal) true;
minimal = lib.mkIf minimal true;
};
# home.stateVersion = lib.mkForce "23.05";
swarselsystems = lib.recursiveUpdate
{
lowResolution = "1280x800";
highResolution = "1920x1080";
monitors = {
main = {
name = "LG Display 0x04EF Unknown";
mode = "1920x1080"; # TEMPLATE
scale = "1";
position = "1920,0";
workspace = "15:L";
output = "eDP-1";
};
swarselsystems = {
monitors = {
main = {
name = "LG Display 0x04EF Unknown";
mode = "1920x1080"; # TEMPLATE
scale = "1";
position = "1920,0";
workspace = "15:L";
output = "eDP-1";
};
}
sharedOptions;
};
};
};
}

View file

@ -1,12 +1,6 @@
{ self, config, pkgs, lib, minimal, ... }:
let
mainUser = "demo";
sharedOptions = {
inherit mainUser;
isBtrfs = false;
isLinux = true;
isPublic = true;
};
in
{
@ -40,25 +34,20 @@ in
minimal = lib.mkIf minimal true;
btrfs = true;
};
swarselsystems = lib.recursiveUpdate
{
info = "~SwarselSystems~ demo host";
wallpaper = self + /files/wallpaper/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;
isSwap = true;
swapSize = "4G";
rootDisk = "/dev/vda";
}
sharedOptions;
home-manager.users.${mainUser} = {
home.stateVersion = lib.mkForce "23.05";
swarselsystems = lib.recursiveUpdate
{
isNixos = true;
}
sharedOptions;
swarselsystems = {
info = "~SwarselSystems~ demo host";
wallpaper = self + /files/wallpaper/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;
isSwap = true;
swapSize = "4G";
rootDisk = "/dev/vda";
isBtrfs = false;
inherit mainUser;
isLinux = true;
isPublic = true;
isNixos = true;
};
}

View file

@ -1,12 +1,4 @@
{ lib, config, minimal, ... }:
let
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isBtrfs = true;
isLinux = true;
isNixos = true;
};
in
{ lib, minimal, ... }:
{
imports = [
./hardware-configuration.nix
@ -33,22 +25,17 @@ in
minimal = lib.mkIf minimal true;
server.syncserver = true;
};
swarselsystems = lib.recursiveUpdate
{
info = "VM.Standard.E2.1.Micro";
isImpermanence = true;
isSecureBoot = false;
isCrypted = true;
isSwap = true;
rootDisk = "/dev/sda";
swapSize = "4G";
}
sharedOptions;
home-manager.users."${primaryUser}" = {
swarselsystems = lib.recursiveUpdate
{ }
sharedOptions;
swarselsystems = {
info = "VM.Standard.E2.1.Micro";
isImpermanence = true;
isSecureBoot = false;
isCrypted = true;
isSwap = true;
rootDisk = "/dev/sda";
swapSize = "4G";
isBtrfs = true;
isLinux = true;
isNixos = true;
};
}

View file

@ -1,16 +1,9 @@
{ lib, config, globals, ... }:
let
primaryUser = config.swarselsystems.mainUser;
inherit (config.repo.secrets.common) workHostName;
inherit (config.repo.secrets.local.syncthing) dev1 dev2 dev3 loc1;
inherit (config.swarselsystems) sopsFile;
serviceDomain = config.repo.secrets.common.services.domains.syncthing3;
sharedOptions = {
isBtrfs = true;
isNixos = true;
isLinux = true;
};
in
{
imports = [
@ -212,22 +205,16 @@ in
swarselprofiles = {
server.moonside = true;
};
swarselsystems = lib.recursiveUpdate
{
info = "VM.Standard.A1.Flex, 4 OCPUs, 24GB RAM";
isImpermanence = true;
isSecureBoot = false;
isCrypted = false;
isSwap = false;
rootDisk = "/dev/sda";
}
sharedOptions;
home-manager.users."${primaryUser}" = {
home.stateVersion = lib.mkForce "23.11";
swarselsystems = lib.recursiveUpdate
{ }
sharedOptions;
swarselsystems = {
info = "VM.Standard.A1.Flex, 4 OCPUs, 24GB RAM";
isImpermanence = true;
isSecureBoot = false;
isCrypted = false;
isSwap = false;
rootDisk = "/dev/sda";
isBtrfs = true;
isNixos = true;
isLinux = true;
};
}

View file

@ -1,11 +1,4 @@
{ self, config, lib, minimal, ... }:
let
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isBtrfs = true;
isLinux = true;
};
in
{ self, lib, minimal, ... }:
{
imports = [
@ -13,8 +6,6 @@ in
./hardware-configuration.nix
];
networking = {
hostName = "toto";
firewall.enable = false;
@ -22,31 +13,24 @@ in
swarselprofiles = {
toto = lib.mkIf (!minimal) true;
minimal = lib.mkIf minimal true;
btrfs = true;
};
swarselsystems = lib.recursiveUpdate
{
info = "~SwarselSystems~ remote install helper";
wallpaper = self + /files/wallpaper/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;
isSwap = true;
swapSize = "2G";
# rootDisk = "/dev/nvme0n1";
rootDisk = "/dev/vda";
# rootDisk = "/dev/vda";
}
sharedOptions;
home-manager.users.${primaryUser} = {
home.stateVersion = lib.mkForce "23.05";
swarselsystems = lib.recursiveUpdate
{
isLaptop = false;
isNixos = true;
}
sharedOptions;
swarselsystems = {
info = "~SwarselSystems~ remote install helper";
wallpaper = self + /files/wallpaper/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;
isSwap = true;
swapSize = "2G";
# rootDisk = "/dev/nvme0n1";
rootDisk = "/dev/vda";
# rootDisk = "/dev/vda";
isBtrfs = true;
isLinux = true;
isLaptop = false;
isNixos = true;
};
}

View file

@ -1,12 +1,4 @@
{ lib, config, ... }:
let
primaryUser = config.swarselsystems.mainUser;
sharedOptions = {
isBtrfs = false;
isLinux = true;
isNixos = true;
};
in
{ config, ... }:
{
imports = [
@ -30,19 +22,15 @@ in
swarselprofiles = {
server.local = true;
};
swarselsystems = lib.recursiveUpdate
{
info = "ASRock J4105-ITX, 32GB RAM";
isImpermanence = false;
isSecureBoot = true;
isCrypted = true;
}
sharedOptions;
home-manager.users."${primaryUser}" = {
home.stateVersion = lib.mkForce "23.05";
swarselsystems = lib.recursiveUpdate
{ }
sharedOptions;
swarselsystems = {
info = "ASRock J4105-ITX, 32GB RAM";
isImpermanence = false;
isSecureBoot = true;
isCrypted = true;
isBtrfs = false;
isLinux = true;
isNixos = true;
};
}

View file

@ -24,4 +24,4 @@ dd DRIVE ISO:
sudo dd if=$(eza --sort changed {{ISO}} | tail -n1) of={{DRIVE}} bs=4M status=progress oflag=sync
sync USER HOST:
rsync -av --filter=':- .gitignore' -e "ssh -l {{USER}}" . {{USER}}@{{HOST}}:.dotfiles/
rsync -rltv --filter=':- .gitignore' -e "ssh -l {{USER}}" . {{USER}}@{{HOST}}:.dotfiles/

View file

@ -6,7 +6,7 @@
useGlobalPkgs = true;
useUserPackages = true;
verbose = true;
users.swarsel.imports = [
users.${config.swarselsystems.mainUser}.imports = [
inputs.nix-index-database.hmModules.nix-index
inputs.sops-nix.homeManagerModules.sops
# inputs.stylix.homeModules.stylix

View file

@ -12,8 +12,8 @@ in
users."${config.swarselsystems.mainUser}" = {
isNormalUser = true;
description = "Leon S";
password = lib.mkIf minimal "setup";
hashedPasswordFile = lib.mkIf (!minimal) config.sops.secrets.main-user-hashed-pw.path;
password = lib.mkIf (minimal || config.swarselsystems.isPublic) "setup";
hashedPasswordFile = lib.mkIf (!minimal && !config.swarselsystems.isPublic) config.sops.secrets.main-user-hashed-pw.path;
extraGroups = [ "wheel" ] ++ lib.optionals (!minimal) [ "networkmanager" "syncthing" "docker" "lp" "audio" "video" "vboxusers" "libvirtd" "scanner" ];
packages = with pkgs; [ ];
};

View file

@ -208,6 +208,9 @@ in
spice-protocol
win-virtio
win-spice
powershell
gh
];

View file

@ -28,9 +28,12 @@
};
swarselprofiles = {
minimal = lib.mkIf minimal true;
minimal = lib.mkIf minimal (lib.mkDefault true);
};
swarselsystems = {
mainUser = lib.mkDefault "swarsel";
};
}
];
};

View file

@ -8,6 +8,7 @@
home-manager = lib.mkDefault true;
xserver = lib.mkDefault true;
users = lib.mkDefault true;
sops = lib.mkDefault true;
env = lib.mkDefault true;
security = lib.mkDefault true;
systemdTimeout = lib.mkDefault true;
@ -16,7 +17,6 @@
pipewire = lib.mkDefault true;
network = lib.mkDefault true;
time = lib.mkDefault true;
sops = lib.mkDefault false;
stylix = lib.mkDefault true;
programs = lib.mkDefault true;
zsh = lib.mkDefault true;
@ -27,7 +27,7 @@
interceptionTools = lib.mkDefault true;
swayosd = lib.mkDefault true;
ppd = lib.mkDefault true;
yubikey = lib.mkDefault true;
yubikey = lib.mkDefault false;
ledger = lib.mkDefault true;
keyboards = lib.mkDefault true;
login = lib.mkDefault true;

View file

@ -1,4 +1,4 @@
{ lib, config, minimal, ... }:
{ lib, config, ... }:
{
options.swarselprofiles.framework = lib.mkEnableOption "is this a framework brand host";
config = lib.mkIf config.swarselprofiles.framework {
@ -9,7 +9,7 @@
};
home-manager.users."${config.swarselsystems.mainUser}" = {
swarselprofiles = {
framework = lib.mkIf (!minimal) true;
framework = lib.mkDefault true;
};
};

View file

@ -1,4 +1,4 @@
{ lib, config, minimal, ... }:
{ lib, config, ... }:
{
options.swarselprofiles.personal = lib.mkEnableOption "is this a personal host";
config = lib.mkIf config.swarselprofiles.personal {
@ -57,7 +57,7 @@
};
home-manager.users."${config.swarselsystems.mainUser}" = {
swarselprofiles = {
personal = lib.mkIf (!minimal) true;
personal = lib.mkDefault true;
};
};

View file

@ -49,6 +49,11 @@
ssh = lib.mkDefault true;
};
};
home-manager.users."${config.swarselsystems.mainUser}" = {
swarselprofiles = {
personal = lib.mkDefault true;
};
};
};

View file

@ -1,4 +1,4 @@
{ lib, config, minimal, ... }:
{ lib, config, ... }:
{
options.swarselprofiles.work = lib.mkEnableOption "is this a work host";
config = lib.mkIf config.swarselprofiles.work {
@ -9,7 +9,7 @@
};
home-manager.users."${config.swarselsystems.mainUser}" = {
swarselprofiles = {
work = lib.mkIf (!minimal) true;
work = lib.mkDefault true;
};
};

View file

@ -1,5 +1,5 @@
{
"data": "ENC[AES256_GCM,data:EF0WWDO7RbeBETTY74hH+dPkI0gxqZwJcciHT687Jj/w4T5MuiVBHd61LPhYsnMmoN//yBzRGgNqHr5Cw5EZiwnK2X2/tobv6f8iD56CLM8wQvtUtmRaqjwirSL2MVJlDuaGkUS2D+6hdzqGnRFRiL9FN0Lt/FLU4mX+Iv4iy+SOfd6gaGjJBq34ZdrL1EU5hdzoRFhQKWRi8GyBq5jhyn7JgTDF2q99Cx5EwuN1NrgKsMhtW0VaYxwL6wnhO/iHO0WIIf+ORXuRVZBLFr6AOAg4nG7JL9HWn+QZ8uUBCzYYryqPcUWZ/2V6e/gVsLCNpfVB0MqGnn8zLYx0ADeBnlKTWID2zp8Mb4Ygxx+2pj6pbVKWj2kPG1pMXH58NxaqSU1ouoh8+uhnGj/VMIvJ7I13eo/rf5ju13Qj9mh5MCFMTh8uBN9M6euGgHgwS41N/GmZIGa01qVDjIc4r0NQjIa5/31IcedTzrVaChjV5RVFJIMD0NmqKv4zkv95Q0+mlee/9SZXirXAfgA4bvUnBR/dTOogC7c2MrANyl/mUAch6UmA0FG5ALC+trlvfY2FYdsbKuL4TWN3CqUCO+bD2Nfeg1y7PK/2xZ5gVNCbIRQy/AdZMWU4NX1N4Hrm+seT9cP6etIu2JjFDg4VIyCCgnFW2O95GOHkBRcVZmBE6Y6ttZ7D+UNSsctXO4duerjMd1Hf2NwaDS0KBNPct2wbCfx5L6iCN4/5KW+vzzy3TPxti1qarZG7jyUeWWAsgn27mKq8v7xbAKIPs6+ebsAH2GB4d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ht9d1v/EMkLUW6dwbhTNCVMyZZvfHKt1mIh4k7YQrn+nqW7xPFUZd5P8Dvqag/yuNjiMpeEof2fgavo5lJzw1tVMSQZX3vdIiKlEepNZ8t9WuP5kgjN6nzAxW+ZAgSIRKSmWtdBuVjpuFAKOfw9W6ruqRS1HycwtQicFBJ1Anewq20OwPm2nADN62vnhmNzQF2TuRJJDXLZaQcoG9GvW67IyFdPkroh1Gshhzvu5RKNR7yZrpjOlIMV1+hKdgZzxZkfhihaABeumFWlDWZPDRzqzLHtTKDvkVWPNFHbu1oVKTdMFMGTRdYSLIdMqkMJwkEiLSf58qE8Tuf5tk8L6XFXdT8XejUlajz3vhq4WzN9LjW1zQ==,iv:2AkTWN5WCYjf9DWJGCsmRf3CLA/EMgpLaORWcB2pGvs=,tag:cbwxW35me7T1OZipxdHfvw==,type:str]",
"sops": {
"age": [
{
@ -27,8 +27,8 @@
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBtU240VjVRZmJ5TGsrclJF\nRXRLbTRCZURtR0Z3d2E2eDNNeGRDODlXVEY4CllTeVFYbDJQWlRSS1RFLzAxSnlM\nZi9NU1c3cWo3YWRLcUJ2U2ZFWFBBVEEKLS0tIGtmZU9qSWdBT3RDeStaaFFDSWtk\ndkUzZXJwZUl4LzVxYXdidmxXRnNnclUKyAMZqCKSY/RQvTR4bbjLaPnGKwdBcHXc\nvtiVSrLdIdzMa6id/J07TJH5UesUmcp0wjU41MDa4aMBLy+cXhuBHA==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-07-14T02:08:47Z",
"mac": "ENC[AES256_GCM,data:ZT2q2cHleWw+h7JNzWi+UnFo7G72xMMjzkbr4Ixp09xT9jqHjeHRitRveoNyh8jcRSbWxVeYf1fpKEKPEAxqU77NORhD/QBFjQm1iG/UH/xkRNBTQ/kE+yp/6jlkyfJ/m8ulTSbegz2eQkko9HP9qG7+QMcESP6zE7ko8UFPXAY=,iv:AvQDzn9kQYj1cr6K/luFZkv2G1UAQT27cA9/pQMRJl0=,tag:uuH3aZSI644HrJXYR5I7UQ==,type:str]",
"lastmodified": "2025-07-17T19:47:10Z",
"mac": "ENC[AES256_GCM,data:rSJPK8zMaT+VGj92885MrhHf3VPWKChIGeoWAjWYzGS0GNd+ENThrx7SmKSA2GRgcvT52Xap+wZi8Vzzl0wZPyKiM3LwtQ1JDH401m+RJzqYmEmSmNWtBaXijMYzlW82oG6dJxsHPNAiZfV3iIrXfq4mDIs8KEjl/PwiW+5n3Is=,iv:WRFWcPwFD+Al+EsUMDnCKzXLGiH+xQXMa1ZOGMKgDKI=,tag:h9ObzyxKSXhQB84XVGv6Vw==,type:str]",
"pgp": [
{
"created_at": "2025-06-13T20:13:06Z",