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