nixfmt all
This commit is contained in:
parent
980500842d
commit
42238dc24f
20 changed files with 333 additions and 245 deletions
13
flake.nix
13
flake.nix
|
|
@ -77,7 +77,17 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nix-colors, automapaper, disko, hyprland, lazy, ... }@inputs:
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nix-colors,
|
||||||
|
automapaper,
|
||||||
|
disko,
|
||||||
|
hyprland,
|
||||||
|
lazy,
|
||||||
|
...
|
||||||
|
}@inputs:
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
lambdaOS = nixpkgs.lib.nixosSystem {
|
lambdaOS = nixpkgs.lib.nixosSystem {
|
||||||
|
|
@ -125,4 +135,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.apps;
|
cfg = config.modules.apps;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.apps.firefox;
|
cfg = config.modules.apps.firefox;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.apps.git;
|
cfg = config.modules.apps.git;
|
||||||
in
|
in
|
||||||
|
|
@ -18,14 +23,15 @@ in
|
||||||
do_sign = lib.mkEnableOption "enable commit signing";
|
do_sign = lib.mkEnableOption "enable commit signing";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = cfg.name;
|
userName = cfg.name;
|
||||||
userEmail = cfg.email;
|
userEmail = cfg.email;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
init = { defaultBranch = "main"; };
|
init = {
|
||||||
|
defaultBranch = "main";
|
||||||
|
};
|
||||||
safe.directory = "/etc/nixos";
|
safe.directory = "/etc/nixos";
|
||||||
pull.rebase = false;
|
pull.rebase = false;
|
||||||
commit.gpgsign = cfg.do_sign;
|
commit.gpgsign = cfg.do_sign;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.apps.thunderbird;
|
cfg = config.modules.apps.thunderbird;
|
||||||
in
|
in
|
||||||
|
|
@ -7,10 +12,10 @@ in
|
||||||
enable = lib.mkEnableOption "enable thunderbird";
|
enable = lib.mkEnableOption "enable thunderbird";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
accounts.email.accounts =
|
accounts.email.accounts =
|
||||||
let gpg_key = "A16CDCBF1472541F";
|
let
|
||||||
|
gpg_key = "A16CDCBF1472541F";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"noa-voorwaarts" = {
|
"noa-voorwaarts" = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
{ lib, config, pkgs, inputs, nix-colors, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
nix-colors,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.automapaper;
|
cfg = config.modules.automapaper;
|
||||||
in
|
in
|
||||||
|
|
@ -7,8 +14,7 @@ in
|
||||||
enable = lib.mkEnableOption "enable automapaper";
|
enable = lib.mkEnableOption "enable automapaper";
|
||||||
hyprland = lib.mkEnableOption "enable hyprland exec-once integration";
|
hyprland = lib.mkEnableOption "enable hyprland exec-once integration";
|
||||||
default-configuration = {
|
default-configuration = {
|
||||||
init = lib.mkOption
|
init = lib.mkOption {
|
||||||
{
|
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "the shader executed to get the state for the initialisation, and re-initialisation steps";
|
description = "the shader executed to get the state for the initialisation, and re-initialisation steps";
|
||||||
default = ''
|
default = ''
|
||||||
|
|
@ -136,11 +142,11 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable
|
config = lib.mkIf cfg.enable {
|
||||||
{
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once =
|
wayland.windowManager.hyprland.settings.exec-once =
|
||||||
let
|
let
|
||||||
mkDisplayConfig = conf:
|
mkDisplayConfig =
|
||||||
|
conf:
|
||||||
let
|
let
|
||||||
init = builtins.toFile "init.frag" conf.init;
|
init = builtins.toFile "init.frag" conf.init;
|
||||||
state = builtins.toFile "state.frag" conf.state;
|
state = builtins.toFile "state.frag" conf.state;
|
||||||
|
|
@ -162,7 +168,8 @@ in
|
||||||
let
|
let
|
||||||
def = config.modules.automapaper.default-configuration;
|
def = config.modules.automapaper.default-configuration;
|
||||||
in
|
in
|
||||||
conf: builtins.toFile "${conf.name}.toml" (mkDisplayConfig {
|
conf:
|
||||||
|
builtins.toFile "${conf.name}.toml" (mkDisplayConfig {
|
||||||
name = conf.name;
|
name = conf.name;
|
||||||
horizontal = builtins.div conf.horizontal def.horizontal;
|
horizontal = builtins.div conf.horizontal def.horizontal;
|
||||||
vertical = builtins.div conf.vertical def.vertical;
|
vertical = builtins.div conf.vertical def.vertical;
|
||||||
|
|
@ -175,13 +182,9 @@ in
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.hyprland (
|
lib.mkIf cfg.hyprland (
|
||||||
builtins.map
|
builtins.map (
|
||||||
(
|
conf: "${inputs.automapaper.packages.${pkgs.system}.default}/bin/automapaper -C ${confFile conf}"
|
||||||
conf:
|
) config.modules.hyprland.displays
|
||||||
"${inputs.automapaper.packages.${pkgs.system}.default}/bin/automapaper -C ${confFile conf}"
|
|
||||||
)
|
|
||||||
config.modules.hyprland.displays
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.dunst;
|
cfg = config.modules.dunst;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.games;
|
cfg = config.modules.games;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.games.lutris;
|
cfg = config.modules.games.lutris;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.games.minecraft;
|
cfg = config.modules.games.minecraft;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
options.modules.games.steam = {
|
options.modules.games.steam = {
|
||||||
enable = lib.mkEnableOption "enable steam";
|
enable = lib.mkEnableOption "enable steam";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.plasma;
|
cfg = config.modules.plasma;
|
||||||
in
|
in
|
||||||
|
|
@ -7,7 +13,6 @@ in
|
||||||
enable = lib.mkEnableOption "enable kde plasma 6";
|
enable = lib.mkEnableOption "enable kde plasma 6";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services = {
|
services = {
|
||||||
desktopManager.plasma6.enable = true;
|
desktopManager.plasma6.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
lib: name:
|
lib: name: {
|
||||||
{
|
|
||||||
left = lib.mkOption {
|
left = lib.mkOption {
|
||||||
type = with lib.types; listOf (enum [ name ]);
|
type = with lib.types; listOf (enum [ name ]);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
name = "clock";
|
name = "clock";
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.waybar;
|
cfg = config.modules.waybar;
|
||||||
in
|
in
|
||||||
|
|
@ -41,23 +46,23 @@ in
|
||||||
../../common/colors.nix
|
../../common/colors.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config =
|
config = lib.mkIf cfg.enable {
|
||||||
lib.mkIf cfg.enable
|
|
||||||
{
|
|
||||||
modules.waybar.enabled = (
|
modules.waybar.enabled = (
|
||||||
let
|
let
|
||||||
mods = config.modules.waybar.modules;
|
mods = config.modules.waybar.modules;
|
||||||
allmodules = mods.left ++ mods.center ++ mods.right;
|
allmodules = mods.left ++ mods.center ++ mods.right;
|
||||||
namedmodules = builtins.map
|
namedmodules = builtins.map (n: {
|
||||||
(n: { name = n; value = { enable = true; }; })
|
name = n;
|
||||||
allmodules;
|
value = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}) allmodules;
|
||||||
createmodules = builtins.listToAttrs namedmodules;
|
createmodules = builtins.listToAttrs namedmodules;
|
||||||
in
|
in
|
||||||
createmodules
|
createmodules
|
||||||
);
|
);
|
||||||
|
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs; [
|
||||||
[
|
|
||||||
font-awesome
|
font-awesome
|
||||||
];
|
];
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
|
|
@ -108,6 +113,5 @@ in
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
name = "custom/spotify";
|
name = "custom/spotify";
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,11 @@ in
|
||||||
hwmon-path = "/sys/class/hwmon/hwmon3/temp1_input";
|
hwmon-path = "/sys/class/hwmon/hwmon3/temp1_input";
|
||||||
critical-threshold = 80;
|
critical-threshold = 80;
|
||||||
format = "{temperatureC}°C {icon}";
|
format = "{temperatureC}°C {icon}";
|
||||||
format-icons = [ "" "" "" ];
|
format-icons = [
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,11 @@ in
|
||||||
format = "{volume}% {icon}";
|
format = "{volume}% {icon}";
|
||||||
format-muted = "";
|
format-muted = "";
|
||||||
on-click = "helvum";
|
on-click = "helvum";
|
||||||
format-icons = [ "" "" "" ];
|
format-icons = [
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
];
|
||||||
};
|
};
|
||||||
style = ''
|
style = ''
|
||||||
#wireplumber {
|
#wireplumber {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
{ config, options, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
options,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.websites;
|
cfg = config.modules.websites;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.websites =
|
options.modules.websites = {
|
||||||
{
|
|
||||||
enable = lib.mkEnableOption "enable web hosting";
|
enable = lib.mkEnableOption "enable web hosting";
|
||||||
certMail = lib.mkOption {
|
certMail = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|
@ -12,17 +16,21 @@ in
|
||||||
};
|
};
|
||||||
mainDomains = lib.mkOption {
|
mainDomains = lib.mkOption {
|
||||||
description = "nginx domains for which a certificate is needed";
|
description = "nginx domains for which a certificate is needed";
|
||||||
type = with lib.types; attrsOf (submodule {
|
type =
|
||||||
|
with lib.types;
|
||||||
|
attrsOf (submodule {
|
||||||
options =
|
options =
|
||||||
let
|
let
|
||||||
proxyOption = lib.mkOption { type = str; description = "what url to proxy the requests to"; };
|
proxyOption = lib.mkOption {
|
||||||
|
type = str;
|
||||||
|
description = "what url to proxy the requests to";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
enable = lib.mkEnableOption "enable this website";
|
enable = lib.mkEnableOption "enable this website";
|
||||||
extra_sites = lib.mkOption {
|
extra_sites = lib.mkOption {
|
||||||
description = "extra sites that use this certificate";
|
description = "extra sites that use this certificate";
|
||||||
type = attrsOf
|
type = attrsOf (submodule {
|
||||||
(submodule {
|
|
||||||
options = {
|
options = {
|
||||||
enable = lib.mkEnableOption "enable this website";
|
enable = lib.mkEnableOption "enable this website";
|
||||||
proxy = proxyOption;
|
proxy = proxyOption;
|
||||||
|
|
@ -37,28 +45,20 @@ in
|
||||||
config = lib.mkIf cfg.enable (
|
config = lib.mkIf cfg.enable (
|
||||||
let
|
let
|
||||||
hostnames = lib.lists.flatten (
|
hostnames = lib.lists.flatten (
|
||||||
lib.attrsets.mapAttrsToList
|
lib.attrsets.mapAttrsToList (
|
||||||
(
|
name: config: [ name ] ++ lib.attrsets.mapAttrsToList (n: c: lib.mkIf c.enable n) config.extra_sites
|
||||||
name: config:
|
) cfg.mainDomains
|
||||||
[ name ] ++ lib.attrsets.mapAttrsToList (n: c: lib.mkIf c.enable n) config.extra_sites
|
|
||||||
)
|
|
||||||
cfg.mainDomains
|
|
||||||
);
|
);
|
||||||
certs = lib.attrsets.mapAttrs
|
certs = lib.attrsets.mapAttrs (
|
||||||
(
|
|
||||||
name: config:
|
name: config:
|
||||||
lib.mkIf config.enable {
|
lib.mkIf config.enable {
|
||||||
extraDomainNames = lib.attrsets.mapAttrsToList
|
extraDomainNames = lib.attrsets.mapAttrsToList (
|
||||||
(
|
|
||||||
domain_name: domain_config: lib.mkIf domain_config.enable domain_name
|
domain_name: domain_config: lib.mkIf domain_config.enable domain_name
|
||||||
)
|
) config.extra_sites;
|
||||||
config.extra_sites;
|
|
||||||
webroot = lib.traceVal "/var/lib/acme/acme-challenge/${name}";
|
webroot = lib.traceVal "/var/lib/acme/acme-challenge/${name}";
|
||||||
}
|
}
|
||||||
)
|
) cfg.mainDomains;
|
||||||
cfg.mainDomains;
|
hosts = lib.attrsets.concatMapAttrs (
|
||||||
hosts = lib.attrsets.concatMapAttrs
|
|
||||||
(
|
|
||||||
name: config:
|
name: config:
|
||||||
let
|
let
|
||||||
extra = ''
|
extra = ''
|
||||||
|
|
@ -79,7 +79,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
lib.trace name (lib.mkIf config.enable (
|
lib.trace name (
|
||||||
|
lib.mkIf config.enable (
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
{
|
{
|
||||||
${name} = {
|
${name} = {
|
||||||
|
|
@ -92,15 +93,11 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
(lib.attrsets.mapAttrs
|
(lib.attrsets.mapAttrs (n: c: lib.traceSeq c (proxy c.proxy)) config.extra_sites)
|
||||||
(n: c:
|
|
||||||
lib.traceSeq c (proxy c.proxy)
|
|
||||||
)
|
|
||||||
config.extra_sites)
|
|
||||||
]
|
]
|
||||||
))
|
|
||||||
)
|
)
|
||||||
cfg.mainDomains;
|
)
|
||||||
|
) cfg.mainDomains;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.hosts = {
|
networking.hosts = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ lib, config, pkgs, inputs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.modules.wofi;
|
cfg = config.modules.wofi;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue