mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
WIP share configuraton between nixos / homemanager
This commit is contained in:
parent
641a0cd84d
commit
a1617e71bd
165 changed files with 994 additions and 1032 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{ self, inputs, config, lib, outputs, globals, nodes, minimal, configName, ... }:
|
||||
{ self, inputs, config, lib, outputs, globals, options, nodes, minimal, configName, ... }:
|
||||
{
|
||||
options.swarselsystems.modules.home-manager = lib.mkEnableOption "home-manager";
|
||||
config = lib.mkIf config.swarselsystems.modules.home-manager {
|
||||
options.swarselmodules.home-manager = lib.mkEnableOption "home-manager";
|
||||
config = lib.mkIf config.swarselmodules.home-manager {
|
||||
home-manager = lib.mkIf config.swarselsystems.withHomeManager {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ let
|
|||
inherit (config.swarselsystems) isImpermanence isCrypted;
|
||||
in
|
||||
{
|
||||
options.swarselsystems.modules.impermanence = lib.mkEnableOption "impermanence config";
|
||||
config = lib.mkIf config.swarselsystems.modules.impermanence {
|
||||
options.swarselmodules.impermanence = lib.mkEnableOption "impermanence config";
|
||||
config = lib.mkIf config.swarselmodules.impermanence {
|
||||
|
||||
|
||||
security.sudo.extraConfig = lib.mkIf isImpermanence ''
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, pkgs, config, minimal, ... }:
|
||||
{
|
||||
options.swarselsystems.modules.lanzaboote = lib.mkEnableOption "lanzaboote config";
|
||||
config = lib.mkIf config.swarselsystems.modules.lanzaboote {
|
||||
options.swarselmodules.lanzaboote = lib.mkEnableOption "lanzaboote config";
|
||||
config = lib.mkIf config.swarselmodules.lanzaboote {
|
||||
|
||||
environment.systemPackages = lib.mkIf config.swarselsystems.isSecureBoot [
|
||||
pkgs.sbctl
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ in
|
|||
description = "Exposes the loaded repo secrets. This option is read-only.";
|
||||
};
|
||||
};
|
||||
swarselsystems.modules.pii = lib.mkEnableOption "enable pii management";
|
||||
swarselmodules.pii = lib.mkEnableOption "enable pii management";
|
||||
};
|
||||
config = lib.mkIf config.swarselsystems.modules.pii {
|
||||
config = lib.mkIf config.swarselmodules.pii {
|
||||
repo.secretFiles =
|
||||
let
|
||||
local = config.node.secretsDir + "/pii.nix.enc";
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
options.swarselsystems.modules.general = lib.mkEnableOption "general nix settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.general
|
||||
options.swarselmodules.general = lib.mkEnableOption "general nix settings";
|
||||
config = lib.mkIf config.swarselmodules.general
|
||||
(lib.recursiveUpdate
|
||||
{
|
||||
sops.secrets.github-api-token = lib.mkIf (!minimal) {
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options = {
|
||||
swarselsystems = {
|
||||
withHomeManager = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
isSwap = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
swapSize = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "8G";
|
||||
};
|
||||
rootDisk = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
isCrypted = lib.mkEnableOption "uses full disk encryption";
|
||||
|
||||
isImpermanence = lib.mkEnableOption "use impermanence on this system";
|
||||
isSecureBoot = lib.mkEnableOption "use secure boot on this system";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.modules.time = lib.mkEnableOption "time config";
|
||||
config = lib.mkIf config.swarselsystems.modules.time {
|
||||
options.swarselmodules.time = lib.mkEnableOption "time config";
|
||||
config = lib.mkIf config.swarselmodules.time {
|
||||
time = {
|
||||
timeZone = "Europe/Vienna";
|
||||
# hardwareClockInLocalTime = true;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ let
|
|||
sopsFile = self + /secrets/general/secrets.yaml;
|
||||
in
|
||||
{
|
||||
options.swarselsystems.modules.users = lib.mkEnableOption "user config";
|
||||
config = lib.mkIf config.swarselsystems.modules.users {
|
||||
options.swarselmodules.users = lib.mkEnableOption "user config";
|
||||
config = lib.mkIf config.swarselmodules.users {
|
||||
sops.secrets.main-user-hashed-pw = lib.mkIf (!config.swarselsystems.isPublic) { inherit sopsFile; neededForUsers = true; };
|
||||
|
||||
users = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.modules.xserver = lib.mkEnableOption "xserver keymap";
|
||||
config = lib.mkIf config.swarselsystems.modules.packages {
|
||||
options.swarselmodules.xserver = lib.mkEnableOption "xserver keymap";
|
||||
config = lib.mkIf config.swarselmodules.packages {
|
||||
services.xserver = {
|
||||
xkb = {
|
||||
layout = "us";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue