This commit is contained in:
Chris Kruining 2026-03-25 06:45:43 +00:00
parent 59a1fbaf0f
commit ac3dac322d
78 changed files with 893 additions and 802 deletions

View file

@ -1,6 +1,6 @@
{ {
sharedSpecialArgs, baseNixosModules,
mkMachineModuleList, lib,
}: { }: {
meta = { meta = {
name = "arda"; name = "arda";
@ -67,35 +67,73 @@
}; };
}; };
inventory.instances = {
user-chris = {
module.name = "users";
module.input = "clan-core";
roles.default.machines.mandos.settings = {};
roles.default.machines.manwe.settings = {};
roles.default.machines.orome.settings = {};
roles.default.machines.tulkas.settings = {};
roles.default.settings = {
user = "chris";
groups = [ "wheel" ];
prompt = true;
share = true;
};
};
};
machines = { machines = {
mandos = { mandos = {
_module.args = sharedSpecialArgs; imports = baseNixosModules ++ [
imports = mkMachineModuleList "mandos"; {
nixpkgs.hostPlatform = "x86_64-linux"; networking.hostName = lib.mkDefault "mandos";
}
./machines/mandos/configuration.nix
./users/chris/mandos.nix
];
}; };
manwe = { manwe = {
_module.args = sharedSpecialArgs; imports = baseNixosModules ++ [
imports = mkMachineModuleList "manwe"; {
nixpkgs.hostPlatform = "x86_64-linux"; networking.hostName = lib.mkDefault "manwe";
}
./machines/manwe/configuration.nix
./users/chris/manwe.nix
];
}; };
orome = { orome = {
_module.args = sharedSpecialArgs; imports = baseNixosModules ++ [
imports = mkMachineModuleList "orome"; {
nixpkgs.hostPlatform = "x86_64-linux"; networking.hostName = lib.mkDefault "orome";
}
./machines/orome/configuration.nix
./users/chris/orome.nix
];
}; };
tulkas = { tulkas = {
_module.args = sharedSpecialArgs; imports = baseNixosModules ++ [
imports = mkMachineModuleList "tulkas"; {
nixpkgs.hostPlatform = "x86_64-linux"; networking.hostName = lib.mkDefault "tulkas";
}
./machines/tulkas/configuration.nix
./users/chris/tulkas.nix
];
}; };
ulmo = { ulmo = {
_module.args = sharedSpecialArgs; imports = baseNixosModules ++ [
imports = mkMachineModuleList "ulmo"; {
nixpkgs.hostPlatform = "x86_64-linux"; networking.hostName = lib.mkDefault "ulmo";
}
./machines/ulmo/configuration.nix
];
}; };
}; };
} }

287
flake.nix
View file

@ -98,292 +98,23 @@
}; };
}; };
outputs = inputs @ { outputs = inputs@{flake-parts, ...}:
flake-parts, flake-parts.lib.mkFlake {inherit inputs;} {
home-manager, systems = [
nixpkgs,
...
}: let
inherit (nixpkgs) lib;
namespace = "sneeuwvlok";
supportedSystems = [
"x86_64-linux" "x86_64-linux"
"aarch64-linux" "aarch64-linux"
"x86_64-darwin" "x86_64-darwin"
"aarch64-darwin" "aarch64-darwin"
]; ];
channelConfig = {
allowUnfree = true;
permittedInsecurePackages = [
# Due to *arr stack
"dotnet-sdk-6.0.428"
"aspnetcore-runtime-6.0.36"
# I think this is because of zen
"qtwebengine-5.15.19"
# For Nheko, the matrix client
"olm-3.2.16"
];
};
packageDefs = {
studio = {
path = ./packages/studio/default.nix;
extra = {
erosanixLib = inputs.erosanix.lib;
};
systems = ["x86_64-linux"];
};
vaultwarden = {
path = ./packages/vaultwarden/default.nix;
extra = {};
systems = supportedSystems;
};
};
mkPackageOverlay = name: def: final: prev:
lib.optionalAttrs (lib.elem final.stdenv.hostPlatform.system def.systems) {
${name} = final.callPackage def.path def.extra;
};
packageOverlays = {
"package/studio" = mkPackageOverlay "studio" packageDefs.studio;
"package/vaultwarden" = mkPackageOverlay "vaultwarden" packageDefs.vaultwarden;
};
systemOverlays = with inputs; [
fenix.overlays.default
nix-minecraft.overlay
flux.overlays.default
];
mkPkgs = system:
import nixpkgs {
inherit system;
overlays = systemOverlays;
config = channelConfig;
};
collectModules = root: let
recurse = prefix: dir: let
entries = builtins.readDir dir;
selfModule =
if builtins.pathExists (dir + "/default.nix")
then {
"${if prefix == "" then "__root" else prefix}" = dir;
}
else {};
in
lib.foldl' (acc: name: let
kind = entries.${name};
path = dir + "/${name}";
rel = if prefix == "" then name else "${prefix}/${name}";
children =
if kind == "directory"
then recurse rel path
else {};
current =
if kind == "directory" && builtins.pathExists (path + "/default.nix")
then {"${rel}" = path;}
else {};
in
acc // children // current) selfModule (builtins.attrNames entries);
in
recurse "" root;
nixosModules = collectModules ./modules/nixos;
homeModules = collectModules ./modules/home;
homeEntries = {
"chris@mandos" = {
machine = "mandos";
user = "chris";
path = ./homes/x86_64-linux + "/chris@mandos";
};
"chris@manwe" = {
machine = "manwe";
user = "chris";
path = ./homes/x86_64-linux + "/chris@manwe";
};
"chris@orome" = {
machine = "orome";
user = "chris";
path = ./homes/x86_64-linux + "/chris@orome";
};
"chris@tulkas" = {
machine = "tulkas";
user = "chris";
path = ./homes/x86_64-linux + "/chris@tulkas";
};
};
sneeuwvlokLib =
(import ./lib/options {inherit lib;})
// (import ./lib/strings {inherit lib;});
machineConfigPaths = builtins.listToAttrs (map (name: lib.nameValuePair name (./machines + "/${name}/configuration.nix")) [
"aule"
"mandos"
"manwe"
"melkor"
"orome"
"tulkas"
"ulmo"
"varda"
"yavanna"
]);
machineHomeModules = lib.mapAttrs' (_: spec: lib.nameValuePair spec.machine [{
users.users.${spec.user} = {
isNormalUser = lib.mkDefault true;
};
home-manager.users.${spec.user} = import spec.path;
}]) homeEntries;
sharedSpecialArgs = {
inherit namespace;
erosanixLib = inputs.erosanix.lib;
repoRoot = ./.;
inherit sneeuwvlokLib;
terranixLib = inputs.terranix.lib;
system = "x86_64-linux";
};
homeSharedModules =
[
inputs.stylix.homeModules.stylix
inputs.plasma-manager.homeModules.plasma-manager
inputs.zen-browser.homeModules.default
]
++ builtins.attrValues homeModules;
baseNixosModules =
[
{ _module.args = sharedSpecialArgs; }
inputs.grub2-themes.nixosModules.default
inputs.home-manager.nixosModules.home-manager
inputs.himmelblau.nixosModules.himmelblau
inputs.jovian.nixosModules.default
inputs.mydia.nixosModules.default
inputs.nix-minecraft.nixosModules.minecraft-servers
inputs.nvf.nixosModules.default
inputs.sops-nix.nixosModules.sops
{
nixpkgs = {
config = channelConfig;
overlays = systemOverlays;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = sharedSpecialArgs;
sharedModules = homeSharedModules;
};
}
]
++ builtins.attrValues nixosModules;
mkClanMachineModuleList = name:
baseNixosModules
++ (machineHomeModules.${name} or [])
++ [
{
networking.hostName = lib.mkDefault name;
}
];
mkMachineModuleList = name:
mkClanMachineModuleList name
++ [
machineConfigPaths.${name}
];
clanConfig = import ./clan.nix {
inherit sharedSpecialArgs;
mkMachineModuleList = mkClanMachineModuleList;
};
activeMachineNames = builtins.attrNames clanConfig.machines;
nixosConfigurations =
lib.genAttrs activeMachineNames (name:
lib.nixosSystem {
system = "x86_64-linux";
specialArgs = sharedSpecialArgs;
modules = mkMachineModuleList name;
});
homeConfigurations =
lib.mapAttrs (_: spec:
home-manager.lib.homeManagerConfiguration {
pkgs = mkPkgs "x86_64-linux";
extraSpecialArgs =
sharedSpecialArgs
// {
osConfig = nixosConfigurations.${spec.machine}.config;
};
modules =
homeSharedModules
++ [
{
home.username = spec.user;
home.homeDirectory = "/home/${spec.user}";
}
spec.path
];
})
homeEntries;
in
flake-parts.lib.mkFlake {inherit inputs;} {
systems = supportedSystems;
imports = [ imports = [
inputs.clan-core.flakeModules.default inputs.clan-core.flakeModules.default
inputs.home-manager.flakeModules.home-manager
./lib/default.nix
./machines/default.nix
./packages/default.nix
./shells/default/default.nix
./users/default.nix
]; ];
clan = clanConfig;
perSystem = {
system,
...
}: let
pkgs = mkPkgs system;
in {
_module.args.pkgs = pkgs;
packages = lib.filterAttrs (_: value: value != null) {
studio =
if lib.elem system packageDefs.studio.systems
then pkgs.callPackage packageDefs.studio.path packageDefs.studio.extra
else null;
vaultwarden =
if lib.elem system packageDefs.vaultwarden.systems
then pkgs.callPackage packageDefs.vaultwarden.path packageDefs.vaultwarden.extra
else null;
};
devShells.default = import ./shells/default/default.nix {
inherit inputs pkgs;
inherit (pkgs) mkShell stdenv;
};
};
flake = {
inherit homeConfigurations;
nixosConfigurations = lib.mkForce nixosConfigurations;
lib = sneeuwvlokLib;
overlays =
packageOverlays
// {
default = lib.composeManyExtensions (builtins.attrValues packageOverlays);
};
};
}; };
} }

View file

@ -1,36 +0,0 @@
{osConfig, ...}: {
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
settings.user = {
name = "Chris Kruining";
email = "chris@kruining.eu";
};
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
application = {
bitwarden.enable = true;
teamspeak.enable = true;
steam.enable = true;
zen.enable = true;
};
};
}

View file

@ -1,59 +0,0 @@
{osConfig, ...}: {
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
settings.user = {
name = "Chris Kruining";
email = "chris@kruining.eu";
};
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
development = {
rust.enable = true;
javascript.enable = true;
dotnet.enable = true;
};
application = {
bitwarden.enable = true;
discord.enable = true;
ladybird.enable = true;
matrix.enable = true;
obs.enable = true;
onlyoffice.enable = true;
signal.enable = true;
steam.enable = true;
studio.enable = true;
teamspeak.enable = true;
thunderbird.enable = true;
zen.enable = true;
};
shell.zsh.enable = true;
terminal.ghostty.enable = true;
editor = {
zed.enable = true;
nvim.enable = true;
nano.enable = true;
};
};
}

View file

@ -1,49 +0,0 @@
{osConfig, ...}: {
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
settings.user = {
name = "Chris Kruining";
email = "chris@kruining.eu";
};
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
development = {
javascript.enable = true;
dotnet.enable = true;
};
application = {
bitwarden.enable = true;
onlyoffice.enable = true;
signal.enable = true;
zen.enable = true;
};
shell.zsh.enable = true;
terminal.ghostty.enable = true;
editor = {
zed.enable = true;
nano.enable = true;
};
};
}

View file

@ -1,36 +0,0 @@
{osConfig, ...}: {
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
settings.user = {
name = "Chris Kruining";
email = "chris@kruining.eu";
};
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
application = {
bitwarden.enable = true;
teamspeak.enable = true;
steam.enable = true;
zen.enable = true;
};
};
}

96
lib/default.nix Normal file
View file

@ -0,0 +1,96 @@
{
config,
inputs,
lib,
...
}: let
inherit (lib) mkOption types;
namespace = "sneeuwvlok";
channelConfig = {
allowUnfree = true;
permittedInsecurePackages = [
# Due to *arr stack
"dotnet-sdk-6.0.428"
"aspnetcore-runtime-6.0.36"
# I think this is because of zen
"qtwebengine-5.15.19"
# For Nheko, the matrix client
"olm-3.2.16"
];
};
systemOverlays = with inputs; [
fenix.overlays.default
nix-minecraft.overlay
flux.overlays.default
];
mkPkgs = system:
import inputs.nixpkgs {
inherit system;
overlays = systemOverlays;
config = channelConfig;
};
sharedContext = {
inherit inputs namespace;
erosanixLib = inputs.erosanix.lib;
repoRoot = ../.;
sneeuwvlokLib = config.localLib;
terranixLib = inputs.terranix.lib;
};
baseNixosModules =
[
inputs.grub2-themes.nixosModules.default
inputs.home-manager.nixosModules.home-manager
inputs.himmelblau.nixosModules.himmelblau
inputs.jovian.nixosModules.default
inputs.mydia.nixosModules.default
inputs.nix-minecraft.nixosModules.minecraft-servers
inputs.nvf.nixosModules.default
inputs.sops-nix.nixosModules.sops
{
nixpkgs = {
config = channelConfig;
overlays = systemOverlays;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = sharedContext;
sharedModules = config.localUsers.homeSharedModules;
};
}
]
++ [ ../modules/nixos ];
in {
imports = [
./options
./strings
];
options.localLib = mkOption {
type = types.lazyAttrsOf types.raw;
default = {};
};
config = {
_module.args = {
inherit
baseNixosModules
channelConfig
mkPkgs
sharedContext
systemOverlays
;
sneeuwvlokLib = config.localLib;
};
flake.lib = config.localLib;
};
}

View file

@ -1,10 +1,7 @@
{ lib, ...}: {lib, ...}: let
let inherit (lib) mkOption types;
inherit (builtins) isString typeOf; in {
inherit (lib) mkOption types throwIfNot concatStringsSep splitStringBy toLower map; localLib.options = {
in
{
options = {
mkUrlOptions = mkUrlOptions =
defaults: defaults:
{ {

View file

@ -1,10 +1,8 @@
{ lib, ...}: {lib, ...}: let
let
inherit (builtins) isString typeOf match toString head; inherit (builtins) isString typeOf match toString head;
inherit (lib) throwIfNot concatStringsSep splitStringBy toLower map concatMapAttrsStringSep; inherit (lib) throwIfNot concatStringsSep splitStringBy toLower map concatMapAttrsStringSep;
in in {
{ localLib.strings = {
strings = {
#======================================================================================== #========================================================================================
# Converts a string to snake case # Converts a string to snake case
# #

View file

@ -1,2 +1,3 @@
{ ... }: { { ... }: {
nixpkgs.hostPlatform = "x86_64-linux";
} }

9
machines/default.nix Normal file
View file

@ -0,0 +1,9 @@
{baseNixosModules, lib, sharedContext, ...}: {
clan =
(import ../clan.nix {
inherit baseNixosModules lib;
})
// {
specialArgs = sharedContext;
};
}

View file

@ -5,6 +5,8 @@
./hardware.nix ./hardware.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
sneeuwvlok = { sneeuwvlok = {
hardware.has = { hardware.has = {
gpu.nvidia = true; gpu.nvidia = true;

View file

@ -1,3 +0,0 @@
{ ... }: {
imports = [ ./configuration.nix ];
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, system, ... }: { config, lib, pkgs, modulesPath, ... }:
let let
inherit (lib.modules) mkDefault; inherit (lib.modules) mkDefault;
in in
@ -13,6 +13,6 @@ in
extraModulePackages = [ ]; extraModulePackages = [ ];
}; };
nixpkgs.hostPlatform = mkDefault system; nixpkgs.hostPlatform = mkDefault pkgs.stdenv.hostPlatform.system;
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -4,6 +4,8 @@
./hardware.nix ./hardware.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
system.activationScripts.remove-gtkrc.text = "rm -f /home/chris/.gtkrc-2.0"; system.activationScripts.remove-gtkrc.text = "rm -f /home/chris/.gtkrc-2.0";
services.logrotate.checkConfig = false; services.logrotate.checkConfig = false;

View file

@ -1,3 +0,0 @@
{ ... }: {
imports = [ ./configuration.nix ];
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, system, ... }: { config, lib, pkgs, modulesPath, ... }:
let let
inherit (lib.modules) mkDefault; inherit (lib.modules) mkDefault;
in in
@ -13,6 +13,6 @@ in
extraModulePackages = [ ]; extraModulePackages = [ ];
}; };
nixpkgs.hostPlatform = mkDefault system; nixpkgs.hostPlatform = mkDefault pkgs.stdenv.hostPlatform.system;
hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,2 +1,3 @@
{ ... }: { { ... }: {
nixpkgs.hostPlatform = "x86_64-linux";
} }

View file

@ -4,6 +4,8 @@
./hardware.nix ./hardware.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
azure-cli azure-cli
github-copilot-cli github-copilot-cli

View file

@ -1,3 +0,0 @@
{ ... }: {
imports = [ ./configuration.nix ];
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, system, ... }: { config, lib, pkgs, modulesPath, ... }:
let let
inherit (lib.modules) mkDefault; inherit (lib.modules) mkDefault;
in in
@ -13,6 +13,6 @@ in
extraModulePackages = [ ]; extraModulePackages = [ ];
}; };
nixpkgs.hostPlatform = mkDefault system; nixpkgs.hostPlatform = mkDefault pkgs.stdenv.hostPlatform.system;
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -5,6 +5,8 @@
./hardware.nix ./hardware.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
sneeuwvlok = { sneeuwvlok = {
hardware.has = { hardware.has = {
gpu.amd = true; gpu.amd = true;

View file

@ -1,3 +0,0 @@
{ ... }: {
imports = [ ./configuration.nix ];
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, system, ... }: { config, lib, pkgs, modulesPath, ... }:
let let
inherit (lib.modules) mkDefault; inherit (lib.modules) mkDefault;
in in
@ -13,6 +13,6 @@ in
extraModulePackages = [ ]; extraModulePackages = [ ];
}; };
nixpkgs.hostPlatform = mkDefault system; nixpkgs.hostPlatform = mkDefault pkgs.stdenv.hostPlatform.system;
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -4,6 +4,8 @@
./hardware.nix ./hardware.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
networking = { networking = {
interfaces.enp2s0 = { interfaces.enp2s0 = {
ipv6.addresses = [ ipv6.addresses = [

View file

@ -1,3 +0,0 @@
{ ... }: {
imports = [ ./configuration.nix ];
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, system, ... }: { config, lib, pkgs, modulesPath, ... }:
let let
inherit (lib.modules) mkDefault; inherit (lib.modules) mkDefault;
in in
@ -13,6 +13,6 @@ in
extraModulePackages = [ ]; extraModulePackages = [ ];
}; };
nixpkgs.hostPlatform = mkDefault system; nixpkgs.hostPlatform = mkDefault pkgs.stdenv.hostPlatform.system;
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,2 +1,3 @@
{ ... }: { { ... }: {
nixpkgs.hostPlatform = "x86_64-linux";
} }

View file

@ -1,2 +1,3 @@
{ ... }: { { ... }: {
nixpkgs.hostPlatform = "x86_64-linux";
} }

View file

@ -0,0 +1,17 @@
{
imports = [
./bitwarden
./chrome
./discord
./ladybird
./matrix
./obs
./onlyoffice
./signal
./steam
./studio
./teamspeak
./thunderbird
./zen
];
}

View file

@ -3,7 +3,7 @@ let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.application.studio; cfg = config.${namespace}.application.studio;
studioPackage = pkgs.callPackage (repoRoot + "/packages/studio/default.nix") { studioPackage = pkgs.callPackage (repoRoot + "/packages/studio/package.nix") {
inherit erosanixLib; inherit erosanixLib;
}; };
in in

View file

@ -5,6 +5,18 @@ let
cfg = config.${namespace}.defaults; cfg = config.${namespace}.defaults;
in { in {
imports = [
./application
./desktop
./development
./editor
./game
./home-manager
./shell
./terminal
./themes
];
options.${namespace}.defaults = { options.${namespace}.defaults = {
editor = mkOption { editor = mkOption {
type = enum [ "nano" "nvim" "zed" ]; type = enum [ "nano" "nvim" "zed" ];

View file

@ -0,0 +1,5 @@
{
imports = [
./plasma
];
}

View file

@ -0,0 +1,7 @@
{
imports = [
./dotnet
./javascript
./rust
];
}

View file

@ -0,0 +1,7 @@
{
imports = [
./nano
./nvim
./zed
];
}

View file

@ -0,0 +1,5 @@
{
imports = [
./minecraft
];
}

View file

@ -5,6 +5,11 @@ let
cfg = config.${namespace}.shell; cfg = config.${namespace}.shell;
in in
{ {
imports = [
./toolset
./zsh
];
options.${namespace}.shell = { options.${namespace}.shell = {
corePkgs.enable = mkEnableOption "core shell packages"; corePkgs.enable = mkEnableOption "core shell packages";
}; };

View file

@ -0,0 +1,16 @@
{
imports = [
./bat
./btop
./eza
./fzf
./git
./gnugpg
./just
./starship
./tmux
./yazi
./zellij
./zoxide
];
}

View file

@ -0,0 +1,6 @@
{
imports = [
./alacritty
./ghostty
];
}

View file

@ -0,0 +1,5 @@
{
imports = [
./steam
];
}

14
modules/nixos/default.nix Normal file
View file

@ -0,0 +1,14 @@
{
imports = [
./application
./boot
./desktop
./editor
./hardware
./home-manager
./nix
./services
./shells
./system
];
}

View file

@ -9,6 +9,13 @@
cfg = config.${namespace}.desktop; cfg = config.${namespace}.desktop;
in { in {
imports = [
./cosmic
./gamescope
./gnome
./plasma
];
options.${namespace}.desktop = { options.${namespace}.desktop = {
use = mkOption { use = mkOption {
type = nullOr (enum ["plasma" "gamescope" "gnome" "cosmic"]); type = nullOr (enum ["plasma" "gamescope" "gnome" "cosmic"]);

View file

@ -0,0 +1,6 @@
{
imports = [
./nano
./nvim
];
}

View file

@ -0,0 +1,7 @@
{
imports = [
./audio
./bluetooth
./gpu
];
}

View file

@ -0,0 +1,6 @@
{
imports = [
./amd
./nvidia
];
}

View file

@ -0,0 +1,7 @@
{
imports = [
./authelia
./himmelblau
./zitadel
];
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, namespace, system, terranixLib, sneeuwvlokLib, ... }: { config, lib, pkgs, namespace, terranixLib, sneeuwvlokLib, ... }:
let let
inherit (lib) mkIf mkEnableOption mkOption types toUpper toSentenceCase nameValuePair mapAttrs mapAttrs' concatMapAttrs concatMapStringsSep filterAttrsRecursive listToAttrs imap0 head drop length literalExpression attrNames; inherit (lib) mkIf mkEnableOption mkOption types toUpper toSentenceCase nameValuePair mapAttrs mapAttrs' concatMapAttrs concatMapStringsSep filterAttrsRecursive listToAttrs imap0 head drop length literalExpression attrNames;
inherit (sneeuwvlokLib.strings) toSnakeCase; inherit (sneeuwvlokLib.strings) toSnakeCase;
@ -340,7 +340,7 @@ in
# this is a nix package, the generated json file to be exact # this is a nix package, the generated json file to be exact
terraformConfiguration = terranixLib.terranixConfiguration { terraformConfiguration = terranixLib.terranixConfiguration {
inherit system; system = pkgs.stdenv.hostPlatform.system;
modules = [ modules = [
({ config, lib, ... }: { ({ config, lib, ... }: {

View file

@ -0,0 +1,5 @@
{
imports = [
./borg
];
}

View file

@ -0,0 +1,5 @@
{
imports = [
./matrix
];
}

View file

@ -0,0 +1,15 @@
{
imports = [
./authentication
./backup
./communication
./development
./games
./media
./networking
./observability
./persistance
./security
./virtualisation
];
}

View file

@ -0,0 +1,5 @@
{
imports = [
./forgejo
];
}

View file

@ -0,0 +1,7 @@
{
imports = [
./minecraft
./palworld
./openrct.nix
];
}

View file

@ -10,6 +10,15 @@
cfg = config.${namespace}.services.media; cfg = config.${namespace}.services.media;
in { in {
imports = [
./glance
./jellyfin
./mydia
./nextcloud
./nfs
./servarr
];
options.${namespace}.services.media = { options.${namespace}.services.media = {
enable = mkEnableOption "Enable media services"; enable = mkEnableOption "Enable media services";

View file

@ -4,7 +4,6 @@
lib, lib,
namespace, namespace,
inputs, inputs,
system,
... ...
}: let }: let
inherit (builtins) toString; inherit (builtins) toString;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
namespace, namespace,
system,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -3,7 +3,6 @@
config, config,
lib, lib,
namespace, namespace,
system,
terranixLib, terranixLib,
... ...
}: let }: let
@ -156,7 +155,7 @@ in {
lib' = lib; lib' = lib;
terraformConfiguration = terranixLib.terranixConfiguration { terraformConfiguration = terranixLib.terranixConfiguration {
inherit system; system = pkgs.stdenv.hostPlatform.system;
modules = [ modules = [
({ ({

View file

@ -0,0 +1,7 @@
{
imports = [
./caddy
./ssh
./wireguard
];
}

View file

@ -0,0 +1,9 @@
{
imports = [
./grafana
./loki
./prometheus
./promtail
./uptime-kuma
];
}

View file

@ -0,0 +1,5 @@
{
imports = [
./postgesql
];
}

View file

@ -0,0 +1,5 @@
{
imports = [
./vaultwarden
];
}

View file

@ -120,7 +120,7 @@ in {
enable = true; enable = true;
dbBackend = "postgresql"; dbBackend = "postgresql";
package = pkgs.callPackage (repoRoot + "/packages/vaultwarden/default.nix") {}; package = pkgs.callPackage (repoRoot + "/packages/vaultwarden/package.nix") {};
config = { config = {
SIGNUPS_ALLOWED = false; SIGNUPS_ALLOWED = false;

View file

@ -0,0 +1,5 @@
{
imports = [
./podman
];
}

View file

@ -0,0 +1,6 @@
{
imports = [
./networking
./security
];
}

View file

@ -3,6 +3,12 @@ let
cfg = config.${namespace}.system.security; cfg = config.${namespace}.system.security;
in in
{ {
imports = [
./boot
./sops
./sudo
];
options.${namespace}.system.security = {}; options.${namespace}.system.security = {};
config = { config = {

View file

@ -1,4 +1,4 @@
{ pkgs, config, namespace, repoRoot, system, ... }: { pkgs, config, namespace, repoRoot, ... }:
let let
cfg = config.${namespace}.system.security.sops; cfg = config.${namespace}.system.security.sops;
in in
@ -10,7 +10,7 @@ in
sops = { sops = {
defaultSopsFormat = "yaml"; defaultSopsFormat = "yaml";
defaultSopsFile = repoRoot + "/systems/${system}/${config.networking.hostName}/secrets.yml"; defaultSopsFile = repoRoot + "/systems/${pkgs.stdenv.hostPlatform.system}/${config.networking.hostName}/secrets.yml";
age = { age = {
# keyFile = "~/.config/sops/age/keys.txt"; # keyFile = "~/.config/sops/age/keys.txt";

24
packages/default.nix Normal file
View file

@ -0,0 +1,24 @@
{
config,
lib,
mkPkgs,
...
}: {
imports = [
./studio
./vaultwarden
];
perSystem = {system, ...}: let
pkgs = mkPkgs system;
in {
_module.args.pkgs = pkgs;
clan.pkgs = pkgs;
};
flake.overlays.default = lib.composeManyExtensions [
config.flake.overlays."package/studio"
config.flake.overlays."package/vaultwarden"
];
}

View file

@ -1,109 +1,16 @@
{ {inputs, lib, ...}: {
pkgs, perSystem = {pkgs, system, ...}: {
erosanixLib, packages = lib.optionalAttrs (system == "x86_64-linux") {
}: let studio = pkgs.callPackage ./package.nix {
inherit (builtins) fetchurl replaceStrings; erosanixLib = inputs.erosanix.lib;
inherit (pkgs) makeDesktopItem copyDesktopItems wineWow64Packages; };
inherit (erosanixLib.x86_64-linux) mkWindowsAppNoCC makeDesktopIcon copyDesktopIcons; };
wine = wineWow64Packages.base;
in
mkWindowsAppNoCC rec {
inherit wine;
pname = "studio";
version = "2.25.12";
src = fetchurl {
url = "https://studio.download.bricklink.info/Studio2.0+EarlyAccess/Archive/2.25.12_1/Studio+2.0+EarlyAccess.exe";
sha256 = "sha256:1xl3zvzkzr64zphk7rnpfx3whhbaykzw06m3nd5dc12r2p4sdh3v";
}; };
enableMonoBootPrompt = false; flake.overlays."package/studio" = final: _prev:
dontUnpack = true; lib.optionalAttrs (final.stdenv.hostPlatform.system == "x86_64-linux") {
studio = final.callPackage ./package.nix {
wineArch = "win64"; erosanixLib = inputs.erosanix.lib;
enableInstallNotification = true;
fileMap = {
"$HOME/.config/${pname}/Stud.io" = "drive_c/users/$USER/AppData/Local/Stud.io";
"$HOME/.config/${pname}/Bricklink" = "drive_c/users/$USER/AppData/LocalLow/Bricklink";
}; };
fileMapDuringAppInstall = false;
persistRegistry = false;
persistRuntimeLayer = true;
inputHashMethod = "version";
# Can be used to precisely select the Direct3D implementation.
#
# | enableVulkan | rendererOverride | Direct3D implementation |
# |--------------|------------------|-------------------------|
# | false | null | OpenGL |
# | true | null | Vulkan (DXVK) |
# | * | dxvk-vulkan | Vulkan (DXVK) |
# | * | wine-opengl | OpenGL |
# | * | wine-vulkan | Vulkan (VKD3D) |
enableVulkan = false;
rendererOverride = null;
enableHUD = false;
enabledWineSymlinks = {};
graphicsDriver = "auto";
inhibitIdle = false;
nativeBuildInputs = [copyDesktopIcons copyDesktopItems];
winAppInstall = replaceStrings ["\r"] [""] ''
wine64 ${src}
wineserver -W
wine64 reg add 'HKEY_CURRENT_USER\Software\Wine\X11 Driver' /t REG_SZ /v UseTakeFocus /d N /f
'';
winAppPreRun = replaceStrings ["\r"] [""] ''
wineserver -W
wine64 reg add 'HKEY_CURRENT_USER\Software\Wine\X11 Driver' /t REG_SZ /v UseTakeFocus /d N /f
'';
winAppRun = replaceStrings ["\r"] [""] ''
wine64 "$WINEPREFIX/drive_c/Program Files/Studio 2.0/Studio.exe" "$ARGS"
'';
winAppPostRun = "";
installPhase = replaceStrings ["\r"] [""] ''
runHook preInstall
ln -s $out/bin/.launcher $out/bin/${pname}
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
mimeTypes = [];
name = pname;
exec = pname;
icon = pname;
desktopName = "Bricklink studio";
genericName = "Lego creation app";
categories = [];
})
];
desktopIcon = makeDesktopIcon {
name = pname;
src = ./studio.png;
}; };
}
meta = {
description = "App for creating lego builds";
homepage = "https://www.bricklink.com/v3/studio/main.page";
license = "";
maintainers = [];
platforms = ["x86_64-linux"];
};
}

100
packages/studio/package.nix Normal file
View file

@ -0,0 +1,100 @@
{
pkgs,
erosanixLib,
}: let
inherit (builtins) fetchurl replaceStrings;
inherit (pkgs) makeDesktopItem copyDesktopItems wineWow64Packages;
inherit (erosanixLib.x86_64-linux) mkWindowsAppNoCC makeDesktopIcon copyDesktopIcons;
wine = wineWow64Packages.base;
in
mkWindowsAppNoCC rec {
inherit wine;
pname = "studio";
version = "2.25.12";
src = fetchurl {
url = "https://studio.download.bricklink.info/Studio2.0+EarlyAccess/Archive/2.25.12_1/Studio+2.0+EarlyAccess.exe";
sha256 = "sha256:1xl3zvzkzr64zphk7rnpfx3whhbaykzw06m3nd5dc12r2p4sdh3v";
};
enableMonoBootPrompt = false;
dontUnpack = true;
wineArch = "win64";
enableInstallNotification = true;
fileMap = {
"$HOME/.config/${pname}/Stud.io" = "drive_c/users/$USER/AppData/Local/Stud.io";
"$HOME/.config/${pname}/Bricklink" = "drive_c/users/$USER/AppData/LocalLow/Bricklink";
};
fileMapDuringAppInstall = false;
persistRegistry = false;
persistRuntimeLayer = true;
inputHashMethod = "version";
enableVulkan = false;
rendererOverride = null;
enableHUD = false;
enabledWineSymlinks = {};
graphicsDriver = "auto";
inhibitIdle = false;
nativeBuildInputs = [copyDesktopIcons copyDesktopItems];
winAppInstall = replaceStrings ["\r"] [""] ''
wine64 ${src}
wineserver -W
wine64 reg add 'HKEY_CURRENT_USER\Software\Wine\X11 Driver' /t REG_SZ /v UseTakeFocus /d N /f
'';
winAppPreRun = replaceStrings ["\r"] [""] ''
wineserver -W
wine64 reg add 'HKEY_CURRENT_USER\Software\Wine\X11 Driver' /t REG_SZ /v UseTakeFocus /d N /f
'';
winAppRun = replaceStrings ["\r"] [""] ''
wine64 "$WINEPREFIX/drive_c/Program Files/Studio 2.0/Studio.exe" "$ARGS"
'';
winAppPostRun = "";
installPhase = replaceStrings ["\r"] [""] ''
runHook preInstall
ln -s $out/bin/.launcher $out/bin/${pname}
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
mimeTypes = [];
name = pname;
exec = pname;
icon = pname;
desktopName = "Bricklink studio";
genericName = "Lego creation app";
categories = [];
})
];
desktopIcon = makeDesktopIcon {
name = pname;
src = ./studio.png;
};
meta = {
description = "App for creating lego builds";
homepage = "https://www.bricklink.com/v3/studio/main.page";
license = "";
maintainers = [];
platforms = ["x86_64-linux"];
};
}

View file

@ -1,29 +1,9 @@
{ lib, stdenv, rustPlatform, fetchFromGitHub, openssl, pkg-config, postgresql, dbBackend ? "postgresql", ... }: {lib, ...}: {
rustPlatform.buildRustPackage rec { perSystem = {pkgs, ...}: {
pname = "vaultwarden"; packages.vaultwarden = pkgs.callPackage ./package.nix {};
version = "1.34.3";
src = fetchFromGitHub {
owner = "Timshel";
repo = "vaultwarden";
rev = "1.34.3";
hash = "sha256-Dj0ySVRvBZ/57+UHas3VI8bi/0JBRqn0IW1Dq+405J0=";
}; };
cargoHash = "sha256-4sDagd2XGamBz1XvDj4ycRVJ0F+4iwHOPlj/RglNDqE="; flake.overlays."package/vaultwarden" = final: _prev: {
vaultwarden = final.callPackage ./package.nix {};
# used for "Server Installed" version in admin panel
env.VW_VERSION = version;
nativeBuildInputs = [ pkg-config ];
buildInputs =
[ openssl ]
++ lib.optional (dbBackend == "postgresql") postgresql;
buildFeatures = dbBackend;
meta = with lib; {
license = licenses.agpl3Only;
mainProgram = "vaultwarden";
}; };
} }

View file

@ -0,0 +1,28 @@
{lib, stdenv, rustPlatform, fetchFromGitHub, openssl, pkg-config, postgresql, dbBackend ? "postgresql", ...}:
rustPlatform.buildRustPackage rec {
pname = "vaultwarden";
version = "1.34.3";
src = fetchFromGitHub {
owner = "Timshel";
repo = "vaultwarden";
rev = "1.34.3";
hash = "sha256-Dj0ySVRvBZ/57+UHas3VI8bi/0JBRqn0IW1Dq+405J0=";
};
cargoHash = "sha256-4sDagd2XGamBz1XvDj4ycRVJ0F+4iwHOPlj/RglNDqE=";
env.VW_VERSION = version;
nativeBuildInputs = [pkg-config];
buildInputs =
[openssl]
++ lib.optional (dbBackend == "postgresql") postgresql;
buildFeatures = dbBackend;
meta = with lib; {
license = licenses.agpl3Only;
mainProgram = "vaultwarden";
};
}

1
scratchpad Normal file
View file

@ -0,0 +1 @@
--resume=18a19308-41c9-4898-ab01-594195fd75a1

View file

@ -1,11 +1,9 @@
{ {
mkShell,
inputs, inputs,
pkgs,
stdenv,
... ...
}: }: {
mkShell { perSystem = {pkgs, system, ...}: {
devShells.default = pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
bash bash
sops sops
@ -16,7 +14,9 @@ mkShell {
nil nil
nixd nixd
openssl openssl
inputs.clan-core.packages.${stdenv.hostPlatform.system}.clan-cli inputs.clan-core.packages.${system}.clan-cli
nix-output-monitor nix-output-monitor
]; ];
};
};
} }

View file

@ -1,121 +0,0 @@
{ pkgs, lib, ... }:
let
inherit (lib) mkForce;
in
{
boot = {
supportedFilesystems = mkForce ["btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs"];
loader.efi.canTouchEfiVariables = true;
};
networking = {
wireless.enable = mkForce false;
networkmanager.enable = true;
};
nix = {
enable = true;
extraOptions = "experimental-features = nix-command flakes";
channel.enable = false;
settings = {
experimental-features = [ "nix-command" "flakes" ];
allowed-users = [ "@wheel" ];
trusted-users = [ "@wheel" ];
auto-optimise-store = true;
connect-timeout = 5;
http-connections = 50;
log-lines = 50; # more log lines in case of error
min-free = 1 * (1024 * 1024 * 1024); # GiB # start garbage collector
max-free = 50 * (1024 * 1024 * 1024); # GiB # until
warn-dirty = false;
};
};
services = {
qemuGuest.enable = true;
openssh = {
enable = true;
settings.PermitRootLogin = mkForce "yes";
};
};
users.users.nixos = {
initialPassword = "kaas";
initialHashedPassword = mkForce null;
extraGroups = [ "networkmanager" ];
};
environment.systemPackages = with pkgs; [
# sbctl
git
# gum
# (
# writeShellScriptBin "rescue" ''
# #!/usr/bin/env bash
# set -euo pipefail
# gum "device name"
# sudo mkdir -p /mnt/{dev,proc,sys,boot}
# sudo mount -o bind /dev /mnt/dev
# sudo mount -o bind /proc /mnt/proc
# sudo mount -o bind /sys /mnt/sys
# sudo chroot /mnt /nix/var/nix/profiles/system/activate
# sudo chroot /mnt /run/current-system/sw/bin/bash
# sudo mount /dev/vda1 /mnt/boot
# sudo cryptsetup open /dev/vda3 cryptroot
# sudo mount /dev/mapper/cryptroot /mnt/
# sudo nixos-enter
# ''
# )
# (
# writeShellScriptBin "nix_installer"
# ''
# #!/usr/bin/env bash
# set -euo pipefail
# if [ "$(id -u)" -eq 0 ]; then
# echo "ERROR! $(basename "$0") should be run as a regular user"
# exit 1
# fi
# if [ ! -d "$HOME/github/sneeuwvlok/.git" ]; then
# git clone https://github.com/chris-kruining/sneeuwvlok.git "$HOME/github/sneeuwvlok"
# fi
# TARGET_HOST=$(ls -1 ~/github/sneeuwvlok/systems/*/default.nix | cut -d'/' -f6 | grep -v iso | gum choose)
# if [ ! -e "$HOME/github/sneeuwvlok/hosts/$TARGET_HOST/disks.nix" ]; then
# echo "ERROR! $(basename "$0") could not find the required $HOME/github/sneeuwvlok/hosts/$TARGET_HOST/disks.nix"
# exit 1
# fi
# gum confirm --default=false \
# "🔥 🔥 🔥 WARNING!!!! This will ERASE ALL DATA on the disk $TARGET_HOST. Are you sure you want to continue?"
# echo "Partitioning Disks"
# sudo nix run github:nix-community/disko \
# --extra-experimental-features "nix-command flakes" \
# --no-write-lock-file \
# -- \
# --mode zap_create_mount \
# "$HOME/dotfiles/hosts/$TARGET_HOST/disks.nix"
# #echo "Creating blank volume"
# #sudo btrfs subvolume snapshot -r /mnt/ /mnt/root-blank
# #echo "Set up attic binary cache"
# #attic use prod || true
# sudo nixos-install --flake "$HOME/dotfiles#$TARGET_HOST"
# ''
# )
];
system.stateVersion = "23.11";
}

38
users/chris/mandos.nix Normal file
View file

@ -0,0 +1,38 @@
{...}: {
home-manager.users.chris = {osConfig, ...}: {
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
settings.user = {
name = "Chris Kruining";
email = "chris@kruining.eu";
};
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
application = {
bitwarden.enable = true;
teamspeak.enable = true;
steam.enable = true;
zen.enable = true;
};
};
};
}

61
users/chris/manwe.nix Normal file
View file

@ -0,0 +1,61 @@
{...}: {
home-manager.users.chris = {osConfig, ...}: {
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
settings.user = {
name = "Chris Kruining";
email = "chris@kruining.eu";
};
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
development = {
rust.enable = true;
javascript.enable = true;
dotnet.enable = true;
};
application = {
bitwarden.enable = true;
discord.enable = true;
ladybird.enable = true;
matrix.enable = true;
obs.enable = true;
onlyoffice.enable = true;
signal.enable = true;
steam.enable = true;
studio.enable = true;
teamspeak.enable = true;
thunderbird.enable = true;
zen.enable = true;
};
shell.zsh.enable = true;
terminal.ghostty.enable = true;
editor = {
zed.enable = true;
nvim.enable = true;
nano.enable = true;
};
};
};
}

51
users/chris/orome.nix Normal file
View file

@ -0,0 +1,51 @@
{...}: {
home-manager.users.chris = {osConfig, ...}: {
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
settings.user = {
name = "Chris Kruining";
email = "chris@kruining.eu";
};
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
development = {
javascript.enable = true;
dotnet.enable = true;
};
application = {
bitwarden.enable = true;
onlyoffice.enable = true;
signal.enable = true;
zen.enable = true;
};
shell.zsh.enable = true;
terminal.ghostty.enable = true;
editor = {
zed.enable = true;
nano.enable = true;
};
};
};
}

38
users/chris/tulkas.nix Normal file
View file

@ -0,0 +1,38 @@
{...}: {
home-manager.users.chris = {osConfig, ...}: {
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
settings.user = {
name = "Chris Kruining";
email = "chris@kruining.eu";
};
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
application = {
bitwarden.enable = true;
teamspeak.enable = true;
steam.enable = true;
zen.enable = true;
};
};
};
}

78
users/default.nix Normal file
View file

@ -0,0 +1,78 @@
{
config,
inputs,
lib,
mkPkgs,
sharedContext,
...
}: let
inherit (lib) mkOption types;
mkHomeUserModule = spec:
(import spec.path {}).home-manager.users.${spec.user};
in {
options.localUsers = {
homeEntries = mkOption {
type = types.attrsOf types.raw;
default = {};
};
homeSharedModules = mkOption {
type = types.listOf types.raw;
default = [];
};
};
config = {
localUsers.homeEntries = {
"chris@mandos" = {
machine = "mandos";
user = "chris";
path = ../users/chris/mandos.nix;
};
"chris@manwe" = {
machine = "manwe";
user = "chris";
path = ../users/chris/manwe.nix;
};
"chris@orome" = {
machine = "orome";
user = "chris";
path = ../users/chris/orome.nix;
};
"chris@tulkas" = {
machine = "tulkas";
user = "chris";
path = ../users/chris/tulkas.nix;
};
};
localUsers.homeSharedModules =
[
inputs.stylix.homeModules.stylix
inputs.plasma-manager.homeModules.plasma-manager
inputs.zen-browser.homeModules.default
]
++ [ ../modules/home ];
flake.homeConfigurations = lib.mapAttrs (_: spec:
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = mkPkgs "x86_64-linux";
extraSpecialArgs =
sharedContext
// {
osConfig = config.flake.nixosConfigurations.${spec.machine}.config;
};
modules =
config.localUsers.homeSharedModules
++ [
{
home.username = spec.user;
home.homeDirectory = "/home/${spec.user}";
}
(mkHomeUserModule spec)
];
})
config.localUsers.homeEntries;
};
}