Run nixfmt
Some checks failed
/ check (push) Failing after 2m46s

This commit is contained in:
Erwin Boskma 2024-02-05 11:46:52 +01:00
parent 7598353413
commit 4cd0f83ce8
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk
125 changed files with 2194 additions and 1556 deletions

View file

@ -1,19 +1,27 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.alacritty; cfg = config.eboskma.programs.alacritty;
importYAML = name: yamlFile: (lib.importJSON ((pkgs.runCommandNoCC name { } '' importYAML =
mkdir -p $out name: yamlFile:
${pkgs.yaml2json}/bin/yaml2json < ${yamlFile} | ${pkgs.jq}/bin/jq -a '.' > $out/tmp.json (lib.importJSON (
'').outPath (pkgs.runCommandNoCC name { } ''
+ "/tmp.json")); mkdir -p $out
theme = importYAML "theme" (builtins.fetchurl { ${pkgs.yaml2json}/bin/yaml2json < ${yamlFile} | ${pkgs.jq}/bin/jq -a '.' > $out/tmp.json
url = "https://raw.githubusercontent.com/dracula/alacritty/77aff04b9f2651eac10e5cfa80a3d85ce43e7985/dracula.yml"; '').outPath
sha256 = "NoEBy8cUs6KDfougzAIcuX9oSAltO7y9OOeXJbSQKrY="; + "/tmp.json"
}); ));
theme = importYAML "theme" (
builtins.fetchurl {
url = "https://raw.githubusercontent.com/dracula/alacritty/77aff04b9f2651eac10e5cfa80a3d85ce43e7985/dracula.yml";
sha256 = "NoEBy8cUs6KDfougzAIcuX9oSAltO7y9OOeXJbSQKrY=";
}
);
in in
{ {
options.eboskma.programs.alacritty.enable = mkEnableOption "Enable alacritty"; options.eboskma.programs.alacritty.enable = mkEnableOption "Enable alacritty";

View file

@ -1,11 +1,19 @@
{ pkgs, config, lib, flake-inputs, ... }: {
pkgs,
config,
lib,
flake-inputs,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.programs.anyrun; cfg = config.eboskma.programs.anyrun;
anyrunPkgs = flake-inputs.anyrun.packages."${pkgs.system}"; anyrunPkgs = flake-inputs.anyrun.packages."${pkgs.system}";
in in
{ {
options.eboskma.programs.anyrun = { enable = mkEnableOption "anyrun"; }; options.eboskma.programs.anyrun = {
enable = mkEnableOption "anyrun";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.anyrun = { programs.anyrun = {
@ -20,9 +28,15 @@ in
symbols symbols
translate translate
]; ];
width = { fraction = 0.3; }; width = {
x = { fraction = 0.5; }; fraction = 0.3;
y = { absolute = 60; }; };
x = {
fraction = 0.5;
};
y = {
absolute = 60;
};
layer = "overlay"; layer = "overlay";
}; };

View file

@ -4,13 +4,14 @@ let
cfg = config.eboskma.programs.atuin; cfg = config.eboskma.programs.atuin;
in in
{ {
options.eboskma.programs.atuin = { enable = mkEnableOption "atuin"; }; options.eboskma.programs.atuin = {
enable = mkEnableOption "atuin";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.atuin = { programs.atuin = {
enable = true; enable = true;
flags = [ flags = [ ];
];
settings = { settings = {
dialect = "uk"; dialect = "uk";

View file

@ -1,8 +1,6 @@
{ config { config, lib, ... }:
, lib with lib;
, ... let
}:
with lib; let
cfg = config.eboskma.programs.bat; cfg = config.eboskma.programs.bat;
in in
{ {
@ -16,9 +14,7 @@ in
config = { config = {
theme = "Monokai Extended Bright"; theme = "Monokai Extended Bright";
pager = "less -FR"; pager = "less -FR";
map-syntax = [ map-syntax = [ "*.heex:HTML (EEx)" ];
"*.heex:HTML (EEx)"
];
}; };
}; };
}; };

View file

@ -1,13 +1,16 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.programs.cargo; cfg = config.eboskma.programs.cargo;
tomlFormat = pkgs.formats.toml { }; tomlFormat = pkgs.formats.toml { };
cargoConfig = types.submodule { cargoConfig = types.submodule { freeformType = tomlFormat.type; };
freeformType = tomlFormat.type;
};
in in
{ {
options.eboskma.programs.cargo = { options.eboskma.programs.cargo = {

View file

@ -1,13 +1,17 @@
{ pkgs {
, lib pkgs,
, config lib,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.dropbox; cfg = config.eboskma.programs.dropbox;
in in
{ {
options.eboskma.programs.dropbox = { enable = mkEnableOption "dropbox using the maestral client"; }; options.eboskma.programs.dropbox = {
enable = mkEnableOption "dropbox using the maestral client";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.user.services = { systemd.user.services = {
@ -31,6 +35,9 @@ in
}; };
}; };
home.packages = [ pkgs.maestral-gui pkgs.maestral ]; home.packages = [
pkgs.maestral-gui
pkgs.maestral
];
}; };
} }

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.dunst; cfg = config.eboskma.programs.dunst;
in in
{ {

View file

@ -1,8 +1,6 @@
{ config { config, lib, ... }:
, lib with lib;
, ... let
}:
with lib; let
cfg = config.eboskma.programs.electron; cfg = config.eboskma.programs.electron;
in in
{ {

View file

@ -1,16 +1,20 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.emacs; cfg = config.eboskma.programs.emacs;
tangleEmacsConfig = initFile: pkgs.runCommand "tangled-emacs-${initFile}" { } '' tangleEmacsConfig =
cp ${./config.org} ./config.org initFile:
${cfg.package}/bin/emacs --batch --quick --load org ./config.org --funcall org-babel-tangle pkgs.runCommand "tangled-emacs-${initFile}" { } ''
cp ${initFile} $out cp ${./config.org} ./config.org
''; ${cfg.package}/bin/emacs --batch --quick --load org ./config.org --funcall org-babel-tangle
cp ${initFile} $out
'';
tree-sitter-hare = pkgs.tree-sitter.buildGrammar { tree-sitter-hare = pkgs.tree-sitter.buildGrammar {
language = "tree-sitter-hare"; language = "tree-sitter-hare";
@ -45,80 +49,86 @@ with lib; let
package = cfg.package; package = cfg.package;
alwaysEnsure = true; alwaysEnsure = true;
alwaysTangle = true; alwaysTangle = true;
extraEmacsPackages = epkgs: with epkgs; [ extraEmacsPackages =
hare-mode epkgs: with epkgs; [
vterm hare-mode
(treesit-grammars.with-grammars (p: with p; [ vterm
tree-sitter-bash (treesit-grammars.with-grammars (
tree-sitter-c p: with p; [
tree-sitter-c-sharp tree-sitter-bash
tree-sitter-css tree-sitter-c
tree-sitter-cmake tree-sitter-c-sharp
tree-sitter-comment tree-sitter-css
tree-sitter-commonlisp tree-sitter-cmake
tree-sitter-cpp tree-sitter-comment
tree-sitter-css tree-sitter-commonlisp
tree-sitter-cuda tree-sitter-cpp
tree-sitter-devicetree tree-sitter-css
tree-sitter-dockerfile tree-sitter-cuda
tree-sitter-dot tree-sitter-devicetree
tree-sitter-eex tree-sitter-dockerfile
tree-sitter-elisp tree-sitter-dot
tree-sitter-elixir tree-sitter-eex
tree-sitter-embedded-template tree-sitter-elisp
tree-sitter-erlang tree-sitter-elixir
tree-sitter-fish tree-sitter-embedded-template
tree-sitter-glsl tree-sitter-erlang
tree-sitter-go tree-sitter-fish
tree-sitter-gomod tree-sitter-glsl
tree-sitter-gowork tree-sitter-go
tree-sitter-graphql tree-sitter-gomod
tree-sitter-hare tree-sitter-gowork
tree-sitter-haskell tree-sitter-graphql
tree-sitter-hcl tree-sitter-hare
tree-sitter-heex tree-sitter-haskell
tree-sitter-html tree-sitter-hcl
tree-sitter-http tree-sitter-heex
tree-sitter-javascript tree-sitter-html
tree-sitter-jsdoc tree-sitter-http
tree-sitter-json tree-sitter-javascript
tree-sitter-latex tree-sitter-jsdoc
tree-sitter-llvm tree-sitter-json
tree-sitter-lua tree-sitter-latex
tree-sitter-make tree-sitter-llvm
tree-sitter-markdown tree-sitter-lua
tree-sitter-markdown-inline tree-sitter-make
tree-sitter-nix tree-sitter-markdown
tree-sitter-nu tree-sitter-markdown-inline
tree-sitter-pioasm tree-sitter-nix
tree-sitter-python tree-sitter-nu
tree-sitter-query tree-sitter-pioasm
tree-sitter-regex tree-sitter-python
tree-sitter-rst tree-sitter-query
tree-sitter-ruby tree-sitter-regex
tree-sitter-rust tree-sitter-rst
tree-sitter-scheme tree-sitter-ruby
tree-sitter-scss tree-sitter-rust
tree-sitter-sql tree-sitter-scheme
tree-sitter-surface tree-sitter-scss
tree-sitter-svelte tree-sitter-sql
tree-sitter-toml tree-sitter-surface
tree-sitter-tsx tree-sitter-svelte
tree-sitter-typescript tree-sitter-toml
tree-sitter-verilog tree-sitter-tsx
tree-sitter-yaml tree-sitter-typescript
tree-sitter-zig tree-sitter-verilog
])) tree-sitter-yaml
emacsql tree-sitter-zig
emacsql-sqlite ]
]; ))
emacsql
emacsql-sqlite
];
}; };
orgProtocolDesktop = pkgs.makeDesktopItem { orgProtocolDesktop = pkgs.makeDesktopItem {
name = "org-protocol"; name = "org-protocol";
desktopName = "Emacs Org Protocol Handler"; desktopName = "Emacs Org Protocol Handler";
icon = "emacs"; icon = "emacs";
categories = [ "Development" "TextEditor" ]; categories = [
"Development"
"TextEditor"
];
keywords = [ "org-protocol" ]; keywords = [ "org-protocol" ];
type = "Application"; type = "Application";
exec = "${emacsWithPackages}/bin/emacsclient -- %u"; exec = "${emacsWithPackages}/bin/emacsclient -- %u";
@ -157,19 +167,31 @@ in
home.file."emacs.d/early-init.el".source = tangleEmacsConfig "early-init.el"; home.file."emacs.d/early-init.el".source = tangleEmacsConfig "early-init.el";
home.packages = with pkgs; [ home.packages =
(texlive.combine { with pkgs;
inherit (texlive) scheme-small wrapfig ulem capt-of; [
}) (texlive.combine {
orgProtocolDesktop inherit (texlive)
nodePackages.bash-language-server scheme-small
aspell wrapfig
lldb ulem
(nil.overrideAttrs (_: { doCheck = false; })) capt-of
nixpkgs-fmt ;
python3 })
] ++ orgProtocolDesktop
(with aspellDicts; [ en en-computers en-science fy nl ]); nodePackages.bash-language-server
aspell
lldb
(nil.overrideAttrs (_: { doCheck = false; }))
nixpkgs-fmt
python3
]
++ (with aspellDicts; [
en
en-computers
en-science
fy
nl
]);
}; };
} }

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.programs.eww; cfg = config.eboskma.programs.eww;

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.firefox; cfg = config.eboskma.programs.firefox;
profileSettings = { profileSettings = {
@ -24,31 +26,16 @@ with lib; let
}; };
nonDefaultDesktop = pkgs.makeDesktopItem { nonDefaultDesktop = pkgs.makeDesktopItem {
name = name = "firefox-" + (if cfg.work then "private" else "horus");
"firefox-" desktopName = "Firefox (" + (if cfg.work then "Personal" else "Horus") + ")";
+ ( exec = "firefox -P " + (if cfg.work then "private" else "horus") + " %u";
if cfg.work
then "private"
else "horus"
);
desktopName =
"Firefox ("
+ (
if cfg.work
then "Personal"
else "Horus"
)
+ ")";
exec =
"firefox -P "
+ (
if cfg.work
then "private"
else "horus"
)
+ " %u";
icon = "firefox"; icon = "firefox";
categories = [ "GNOME" "GTK" "Network" "WebBrowser" ]; categories = [
"GNOME"
"GTK"
"Network"
"WebBrowser"
];
mimeTypes = [ mimeTypes = [
"text/html" "text/html"
"text/xml" "text/xml"

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.fish; cfg = config.eboskma.programs.fish;
in in
{ {
@ -37,8 +39,7 @@ in
vim = mkIf config.eboskma.programs.neovim.enable "nvim"; vim = mkIf config.eboskma.programs.neovim.enable "nvim";
vi = mkIf config.eboskma.programs.neovim.enable "nvim"; vi = mkIf config.eboskma.programs.neovim.enable "nvim";
}; };
interactiveShellInit = '' interactiveShellInit = "";
'';
}; };
fzf = { fzf = {

View file

@ -1,4 +1,5 @@
{ git, coreutils }: { { git, coreutils }:
{
mark_prompt_start = { mark_prompt_start = {
onEvent = "fish_prompt"; onEvent = "fish_prompt";
body = '' body = ''

View file

@ -1,5 +1,11 @@
{ pkgs, lib, config, ... }: {
with lib; let pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.eboskma.programs.foot; cfg = config.eboskma.programs.foot;
in in
{ {

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.git; cfg = config.eboskma.programs.git;
in in
{ {
@ -34,7 +36,11 @@ in
signingKeyFormat = mkOption { signingKeyFormat = mkOption {
description = "the type of signing key"; description = "the type of signing key";
type = types.enum [ "openpgp" "x509" "ssh" ]; type = types.enum [
"openpgp"
"x509"
"ssh"
];
default = "openpgp"; default = "openpgp";
}; };
}; };

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.gpg; cfg = config.eboskma.programs.gpg;
in in
{ {
@ -12,9 +14,7 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [ pinentry-gnome ];
pinentry-gnome
];
programs.gpg = { programs.gpg = {
enable = true; enable = true;

View file

@ -2,18 +2,17 @@
with lib; with lib;
let let
cfg = config.eboskma.programs.hyprland; cfg = config.eboskma.programs.hyprland;
# terminal = "${pkgs.foot}/bin/footclient";
# dmenu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab";
# menu = "${pkgs.rofi}/bin/rofi -show run -no-lazy-grab";
# rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ../sway/powermenu.sh);
# powerMenu = "${rofiPower}/bin/rofi-power";
# swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --image ${../../../wallpapers/river-2560.png} --scaling fill";
in in
# terminal = "${pkgs.foot}/bin/footclient";
# dmenu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab";
# menu = "${pkgs.rofi}/bin/rofi -show run -no-lazy-grab";
# rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ../sway/powermenu.sh);
# powerMenu = "${rofiPower}/bin/rofi-power";
# swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --image ${../../../wallpapers/river-2560.png} --scaling fill";
{ {
options.eboskma.programs.hyprland = { enable = mkEnableOption "Hyprland"; }; options.eboskma.programs.hyprland = {
enable = mkEnableOption "Hyprland";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
# wayland.windowManager.hyprland = { # wayland.windowManager.hyprland = {

View file

@ -1,9 +1,11 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.i3; cfg = config.eboskma.programs.i3;
mod = "Mod4"; mod = "Mod4";
i3lockcmd = "${pkgs.i3lock-color}/bin/i3lock-color --image ${toString ../../../wallpapers/river-3840.png} --color=333333ff --tiling --ignore-empty-password --show-failed-attempts --screen=0 --clock --pass-volume-keys"; i3lockcmd = "${pkgs.i3lock-color}/bin/i3lock-color --image ${toString ../../../wallpapers/river-3840.png} --color=333333ff --tiling --ignore-empty-password --show-failed-attempts --screen=0 --clock --pass-volume-keys";
@ -13,8 +15,7 @@ with lib; let
up = "i"; up = "i";
right = "o"; right = "o";
workspacePartition = workspacePartition = builtins.partition (n: (trivial.mod n 2) != 0) (lists.range 1 10);
builtins.partition (n: (trivial.mod n 2) != 0) (lists.range 1 10);
menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab"; menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab";
in in
@ -40,10 +41,19 @@ in
modifier = mod; modifier = mod;
assigns = { assigns = {
"1" = [{ class = "Firefox"; }]; "1" = [ { class = "Firefox"; } ];
"2" = [{ class = "Alacritty"; } { class = "foot"; }]; "2" = [
"3" = [{ class = "Code"; } { class = "Emacs"; }]; { class = "Alacritty"; }
"4" = [{ class = "telegramdesktop"; } { class = "Signal"; }]; { class = "foot"; }
];
"3" = [
{ class = "Code"; }
{ class = "Emacs"; }
];
"4" = [
{ class = "telegramdesktop"; }
{ class = "Signal"; }
];
}; };
# Dracula theme # Dracula theme
colors = { colors = {
@ -86,7 +96,10 @@ in
}; };
floating = { floating = {
criteria = [{ instance = "gnome-calculator"; } { class = "Pavucontrol"; }]; criteria = [
{ instance = "gnome-calculator"; }
{ class = "Pavucontrol"; }
];
modifier = mod; modifier = mod;
}; };
@ -202,23 +215,24 @@ in
bars = [ ]; bars = [ ];
workspaceAutoBackAndForth = true; workspaceAutoBackAndForth = true;
workspaceOutputAssign = builtins.concatLists (builtins.attrValues (builtins.mapAttrs workspaceOutputAssign = builtins.concatLists (
( builtins.attrValues (
name: workspaces: builtins.mapAttrs
let (
output = name: workspaces:
if name == "right" let
then "DP-0" output = if name == "right" then "DP-0" else "DP-4";
else "DP-4"; in
in builtins.map
builtins.map (ws: {
(ws: { inherit output;
inherit output; workspace = toString ws;
workspace = toString ws; })
}) workspaces
workspaces )
workspacePartition
) )
workspacePartition)); );
# [ # [
# { output = "DP-0"; workspace = "1"; } # { output = "DP-0"; workspace = "1"; }
# ]; # ];
@ -234,15 +248,12 @@ in
} }
] ++ cfg.startupCommands; ] ++ cfg.startupCommands;
}; };
extraConfig = '' extraConfig = "";
'';
}; };
}; };
home = { home = {
packages = with pkgs; [ packages = with pkgs; [ dunst ];
dunst
];
}; };
}; };
} }

View file

@ -1,13 +1,17 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.mpd; cfg = config.eboskma.programs.mpd;
in in
{ {
options.eboskma.programs.mpd = { enable = mkEnableOption "mpd"; }; options.eboskma.programs.mpd = {
enable = mkEnableOption "mpd";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.mpd = { services.mpd = {
@ -28,6 +32,9 @@ in
notifications = true; notifications = true;
}; };
home.packages = with pkgs; [ mpc-cli (ncmpcpp.override { visualizerSupport = true; }) ]; home.packages = with pkgs; [
mpc-cli
(ncmpcpp.override { visualizerSupport = true; })
];
}; };
} }

View file

@ -1,13 +1,17 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.neovim; cfg = config.eboskma.programs.neovim;
in in
{ {
options.eboskma.programs.neovim = { enable = mkEnableOption "neovim"; }; options.eboskma.programs.neovim = {
enable = mkEnableOption "neovim";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
# unfortunately this does properly support a Lua based config # unfortunately this does properly support a Lua based config
@ -28,7 +32,10 @@ in
# ''; # '';
# }; # };
home.packages = with pkgs; [ neovim tree-sitter ]; home.packages = with pkgs; [
neovim
tree-sitter
];
xdg.configFile.nvim = { xdg.configFile.nvim = {
source = ./config; source = ./config;

View file

@ -1,37 +1,49 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.programs.nnn; cfg = config.eboskma.programs.nnn;
in in
{ {
options.eboskma.programs.nnn = { enable = mkEnableOption "nnn"; }; options.eboskma.programs.nnn = {
enable = mkEnableOption "nnn";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.nnn = { programs.nnn = {
enable = true; enable = true;
package = (pkgs.nnn.overrideAttrs package =
(_prevAttrs: { (pkgs.nnn.overrideAttrs (
version = "unstable-2023-10-08"; _prevAttrs: {
src = pkgs.fetchFromGitHub version = "unstable-2023-10-08";
{ src = pkgs.fetchFromGitHub {
owner = "jarun"; owner = "jarun";
repo = "nnn"; repo = "nnn";
rev = "7f63bef4d6c9f70b99a4c98435c9c0a68e05be44"; rev = "7f63bef4d6c9f70b99a4c98435c9c0a68e05be44";
sha256 = "B9WRQW4wbs3+lJ9ACFheTaO+0+G/r67yJZJJPMDIQXI="; sha256 = "B9WRQW4wbs3+lJ9ACFheTaO+0+G/r67yJZJJPMDIQXI=";
}; };
}) }
).override )).override
{ {
withNerdIcons = true; withNerdIcons = true;
extraMakeFlags = [ "O_COLEMAK=1" "O_GITSTATUS=1" ]; extraMakeFlags = [
}; "O_COLEMAK=1"
"O_GITSTATUS=1"
];
};
plugins = { plugins = {
src = (pkgs.fetchFromGitHub { src =
owner = "jarun"; (pkgs.fetchFromGitHub {
repo = "nnn"; owner = "jarun";
rev = "7f63bef4d6c9f70b99a4c98435c9c0a68e05be44"; repo = "nnn";
sha256 = "B9WRQW4wbs3+lJ9ACFheTaO+0+G/r67yJZJJPMDIQXI="; rev = "7f63bef4d6c9f70b99a4c98435c9c0a68e05be44";
}) + "/plugins"; sha256 = "B9WRQW4wbs3+lJ9ACFheTaO+0+G/r67yJZJJPMDIQXI=";
})
+ "/plugins";
mappings = { mappings = {
c = "fzcd"; c = "fzcd";

View file

@ -1,13 +1,19 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.programs.nushell; cfg = config.eboskma.programs.nushell;
zoxideOptions = concatStringsSep " " config.programs.zoxide.options; zoxideOptions = concatStringsSep " " config.programs.zoxide.options;
in in
{ {
options.eboskma.programs.nushell = { enable = mkEnableOption "nu shell"; }; options.eboskma.programs.nushell = {
enable = mkEnableOption "nu shell";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.nushell = { programs.nushell = {

View file

@ -1,15 +1,20 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.programs.nyxt; cfg = config.eboskma.programs.nyxt;
in in
{ {
options.eboskma.programs.nyxt = { enable = mkEnableOption "nyxt web browser"; }; options.eboskma.programs.nyxt = {
enable = mkEnableOption "nyxt web browser";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ home.packages = [ pkgs.nyxt ];
pkgs.nyxt
];
xdg.configFile.nyxt-config = { xdg.configFile.nyxt-config = {
target = "nyxt/config.lisp"; target = "nyxt/config.lisp";

View file

@ -1,27 +1,30 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.obs-studio; cfg = config.eboskma.programs.obs-studio;
in in
{ {
options.eboskma.programs.obs-studio = { enable = mkEnableOption "activate obs-studio"; }; options.eboskma.programs.obs-studio = {
enable = mkEnableOption "activate obs-studio";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.obs-studio = { programs.obs-studio = {
enable = true; enable = true;
plugins = [ plugins =
pkgs.obs-backgroundremoval [ pkgs.obs-backgroundremoval ]
] ++ (with pkgs.obs-studio-plugins; [
++ (with pkgs.obs-studio-plugins; [ wlrobs
wlrobs obs-vaapi
obs-vaapi obs-gstreamer
obs-gstreamer obs-pipewire-audio-capture
obs-pipewire-audio-capture obs-vkcapture
obs-vkcapture ]);
]);
}; };
}; };
} }

View file

@ -1,12 +1,12 @@
{ config { config, lib, ... }:
, lib with lib;
, ... let
}:
with lib; let
cfg = config.eboskma.programs.picom; cfg = config.eboskma.programs.picom;
in in
{ {
options.eboskma.programs.picom = { enable = mkEnableOption "activate picom"; }; options.eboskma.programs.picom = {
enable = mkEnableOption "activate picom";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
# home.packages = [pkgs.nixgl.auto.nixGLDefault]; # home.packages = [pkgs.nixgl.auto.nixGLDefault];
@ -18,7 +18,10 @@ in
vSync = true; vSync = true;
fade = false; fade = false;
fadeSteps = [ 0.08 0.08 ]; fadeSteps = [
8.0e-2
8.0e-2
];
shadow = true; shadow = true;
@ -54,10 +57,20 @@ in
inactive-dim = 0.1; inactive-dim = 0.1;
wintypes = { wintypes = {
dock = { shadow = false; }; dock = {
dnd = { shadow = false; }; shadow = false;
popup_menu = { shadow = false; opacity = 1.0; }; };
dropdown_menu = { shadow = false; opacity = 1.0; }; dnd = {
shadow = false;
};
popup_menu = {
shadow = false;
opacity = 1.0;
};
dropdown_menu = {
shadow = false;
opacity = 1.0;
};
}; };
}; };
}; };

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.polybar; cfg = config.eboskma.programs.polybar;
colors = { colors = {
@ -14,9 +16,7 @@ with lib; let
polybar-playerctl = polybar-playerctl =
let let
pythonWithPackages = pkgs.python3.withPackages (pythonPackages: [ pythonWithPackages = pkgs.python3.withPackages (pythonPackages: [ pythonPackages.pygobject3 ]);
pythonPackages.pygobject3
]);
in in
pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {
name = "polybar-playerctl"; name = "polybar-playerctl";
@ -68,7 +68,9 @@ with lib; let
''; '';
in in
{ {
options.eboskma.programs.polybar = { enable = mkEnableOption "activate polybar"; }; options.eboskma.programs.polybar = {
enable = mkEnableOption "activate polybar";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
# systemd.user.services.polybar = { # systemd.user.services.polybar = {
@ -107,7 +109,7 @@ in
}; };
"bar/main" = { "bar/main" = {
monitor = ''''${env:MONITOR:DP-0}''; monitor = "\${env:MONITOR:DP-0}";
fixed.center = true; fixed.center = true;
width = "100%"; width = "100%";
height = 48; height = 48;
@ -307,7 +309,11 @@ in
muted.text = " Muted"; muted.text = " Muted";
}; };
ramp.volume = [ "󰕿" "󰖀" "󰕾" ]; # Icons: volume_low volume_medium volume_high ramp.volume = [
"󰕿"
"󰖀"
"󰕾"
]; # Icons: volume_low volume_medium volume_high
click.right = "${pkgs.pavucontrol}/bin/pavucontrol"; click.right = "${pkgs.pavucontrol}/bin/pavucontrol";
}; };

View file

@ -1,9 +1,15 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.programs.rclone; cfg = config.eboskma.programs.rclone;
rcloneConnectionString = mount: rcloneConnectionString =
mount:
let let
type = mount.remoteConfig.type; type = mount.remoteConfig.type;
config = builtins.removeAttrs mount.remoteConfig [ "type" ]; config = builtins.removeAttrs mount.remoteConfig [ "type" ];
@ -11,24 +17,34 @@ let
in in
":${type},${builtins.concatStringsSep "," connectionStringOptions}:${mount.remote}"; ":${type},${builtins.concatStringsSep "," connectionStringOptions}:${mount.remote}";
rcloneRemote = with types; attrsOf (oneOf [ str int bool ]); rcloneRemote =
with types;
attrsOf (
oneOf [
str
int
bool
]
);
rcloneMount = with types; submodule { rcloneMount =
options = { with types;
remoteConfig = mkOption { submodule {
description = "Configuration for the remote to use"; options = {
type = rcloneRemote; remoteConfig = mkOption {
}; description = "Configuration for the remote to use";
remote = mkOption { type = rcloneRemote;
description = "Remote path"; };
type = str; remote = mkOption {
}; description = "Remote path";
local = mkOption { type = str;
description = "Local mountpoint"; };
type = path; local = mkOption {
description = "Local mountpoint";
type = path;
};
}; };
}; };
};
in in
{ {
options.eboskma.programs.rclone = { options.eboskma.programs.rclone = {
@ -44,36 +60,40 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ pkgs.rclone ]; home.packages = [ pkgs.rclone ];
systemd.user.services = builtins.listToAttrs (builtins.map systemd.user.services = builtins.listToAttrs (
(mount: builtins.map
let (
localPath = toString mount.local; mount:
unitName = builtins.replaceStrings [ "/" ] [ "-" ] (builtins.substring 1 (builtins.stringLength localPath) localPath); let
in localPath = toString mount.local;
{ unitName = builtins.replaceStrings [ "/" ] [ "-" ] (
name = "rclone-${unitName}"; builtins.substring 1 (builtins.stringLength localPath) localPath
value = { );
Unit = { in
Description = "rclone mount ${unitName}"; {
After = [ "network.target" ]; name = "rclone-${unitName}";
AssertPathIsDirectory = toString mount.local; value = {
}; Unit = {
Description = "rclone mount ${unitName}";
After = [ "network.target" ];
AssertPathIsDirectory = toString mount.local;
};
Service = { Service = {
Environment = [ Environment = [ "PATH=/run/wrappers/bin:$PATH" ];
"PATH=/run/wrappers/bin:$PATH" ExecStart = "${pkgs.rclone}/bin/rclone mount --vfs-cache-mode full --vfs-cache-poll-interval 5s --poll-interval 5s --dir-cache-time 10s --umask 022 --allow-other ${rcloneConnectionString mount} ${mount.local}";
]; ExecStop = "/run/wrappers/bin/fusermount -zu ${mount.local}";
ExecStart = "${pkgs.rclone}/bin/rclone mount --vfs-cache-mode full --vfs-cache-poll-interval 5s --poll-interval 5s --dir-cache-time 10s --umask 022 --allow-other ${rcloneConnectionString mount} ${mount.local}"; Restart = "on-failure";
ExecStop = "/run/wrappers/bin/fusermount -zu ${mount.local}"; RestartSec = 10;
Restart = "on-failure"; };
RestartSec = 10;
};
Install = { Install = {
WantedBy = [ "default.target" ]; WantedBy = [ "default.target" ];
};
}; };
}; }
}) )
cfg.mounts); cfg.mounts
);
}; };
} }

View file

@ -1,9 +1,11 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.rofi; cfg = config.eboskma.programs.rofi;
in in
{ {

View file

@ -1,17 +1,17 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.solvespace; cfg = config.eboskma.programs.solvespace;
in in
{ {
options.eboskma.programs.solvespace = { enable = mkEnableOption "activate solvespace"; }; options.eboskma.programs.solvespace = {
enable = mkEnableOption "activate solvespace";
config = mkIf cfg.enable {
home.packages = with pkgs; [
solvespace
];
}; };
config = mkIf cfg.enable { home.packages = with pkgs; [ solvespace ]; };
} }

View file

@ -4,7 +4,9 @@ let
cfg = config.eboskma.programs.starship; cfg = config.eboskma.programs.starship;
in in
{ {
options.eboskma.programs.starship = { enable = mkEnableOption "starship"; }; options.eboskma.programs.starship = {
enable = mkEnableOption "starship";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.starship = { programs.starship = {

View file

@ -1,14 +1,19 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.sway; cfg = config.eboskma.programs.sway;
mod = "Mod4"; mod = "Mod4";
swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --image ${cfg.lock-wallpaper} --scaling fill"; swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --image ${cfg.lock-wallpaper} --scaling fill";
rofiPower = pkgs.writeShellScriptBin "rofi-power" rofiPower = pkgs.writeShellScriptBin "rofi-power" (
(builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString cfg.lock-wallpaper) ] (builtins.readFile ./powermenu.sh)); builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString cfg.lock-wallpaper) ] (
builtins.readFile ./powermenu.sh
)
);
in in
{ {
options.eboskma.programs.sway = { options.eboskma.programs.sway = {
@ -31,38 +36,42 @@ in
}; };
startup = mkOption { startup = mkOption {
description = "Commands that should be executed at startup."; description = "Commands that should be executed at startup.";
type = types.listOf (types.submodule { type = types.listOf (
options = { types.submodule {
command = mkOption { options = {
type = types.str; command = mkOption {
description = "Command that will be executed on startup."; type = types.str;
}; description = "Command that will be executed on startup.";
};
always = mkOption { always = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = "Whether to run command on each ${moduleName} restart."; description = "Whether to run command on each ${moduleName} restart.";
};
}; };
}; }
}); );
}; };
workspaceOutputs = mkOption { workspaceOutputs = mkOption {
description = "Assign workspaces to outputs"; description = "Assign workspaces to outputs";
type = types.listOf (types.submodule { type = types.listOf (
options = { types.submodule {
output = mkOption { options = {
description = "Name(s) of the output to assign"; output = mkOption {
type = with types; either str (listOf str); description = "Name(s) of the output to assign";
apply = lists.toList; type = with types; either str (listOf str);
default = ""; apply = lists.toList;
default = "";
};
workspace = mkOption {
description = "Name of the workspace to assign";
type = types.str;
default = "";
};
}; };
workspace = mkOption { }
description = "Name of the workspace to assign"; );
type = types.str;
default = "";
};
};
});
default = [ ]; default = [ ];
}; };
@ -80,9 +89,12 @@ in
modifier = mod; modifier = mod;
assigns = { assigns = {
"1" = [{ app_id = "firefox"; }]; "1" = [ { app_id = "firefox"; } ];
"2" = [{ app_id = "foot"; }]; "2" = [ { app_id = "foot"; } ];
"3" = [{ class = "Code"; } { app_id = "emacs"; }]; "3" = [
{ class = "Code"; }
{ app_id = "emacs"; }
];
}; };
bars = [ ]; bars = [ ];
@ -136,7 +148,7 @@ in
right = "o"; right = "o";
floating = { floating = {
criteria = [{ app_id = "gnome-calculator"; }]; criteria = [ { app_id = "gnome-calculator"; } ];
modifier = mod; modifier = mod;
}; };
@ -233,9 +245,9 @@ in
"${mod}+c" = mkIf config.eboskma.programs.emacs.enable "exec ${config.programs.emacs.package}/bin/emacsclient -c"; "${mod}+c" = mkIf config.eboskma.programs.emacs.enable "exec ${config.programs.emacs.package}/bin/emacsclient -c";
"${mod}+Print" = "exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.focused) | .name')"; "${mod}+Print" = "exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.focused) | .name')";
"${mod}+Shift+Print" = "exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy -t \"image/png\" -f"; "${mod}+Shift+Print" = ''exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy -t "image/png" -f'';
"${mod}+Shift+Ctrl+Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy -t \"image/png\" -f"; "${mod}+Shift+Ctrl+Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.wl-clipboard}/bin/wl-copy -t "image/png" -f'';
"${mod}+Shift+Alt+Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\""; "${mod}+Shift+Alt+Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"'';
"XF86AudioRaiseVolume" = "exec ${pkgs.pamedia}/bin/pamedia up"; "XF86AudioRaiseVolume" = "exec ${pkgs.pamedia}/bin/pamedia up";
"XF86AudioLowerVolume" = "exec ${pkgs.pamedia}/bin/pamedia down"; "XF86AudioLowerVolume" = "exec ${pkgs.pamedia}/bin/pamedia down";
@ -244,7 +256,6 @@ in
"${mod}+d" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel --skip-wait"; "${mod}+d" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel --skip-wait";
"${mod}+Shift+d" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait"; "${mod}+Shift+d" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait";
} // cfg.extraKeybindings; } // cfg.extraKeybindings;
modes = { modes = {

View file

@ -1,11 +1,18 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.programs.swaynotificationcenter; cfg = config.eboskma.programs.swaynotificationcenter;
settingsFormat = pkgs.formats.json { }; settingsFormat = pkgs.formats.json { };
in in
{ {
options.eboskma.programs.swaynotificationcenter = { enable = mkEnableOption "SwayNotificationCenter"; }; options.eboskma.programs.swaynotificationcenter = {
enable = mkEnableOption "SwayNotificationCenter";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ swaynotificationcenter ]; home.packages = with pkgs; [ swaynotificationcenter ];

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.programs.tea; cfg = config.eboskma.programs.tea;
@ -83,7 +88,6 @@ let
}; };
}; };
}; };
in in
{ {
options.eboskma.programs.tea = { options.eboskma.programs.tea = {

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.tmux; cfg = config.eboskma.programs.tmux;
in in
{ {

View file

@ -1,9 +1,11 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.vscode; cfg = config.eboskma.programs.vscode;
in in
{ {

View file

@ -1,19 +1,30 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.wallpapers; cfg = config.eboskma.wallpapers;
i3SetWallpaper = pkgs.writeShellScript "i3-set-wallpaper" (if builtins.isPath cfg.images then i3SetWallpaper = pkgs.writeShellScript "i3-set-wallpaper" (
''${pkgs.nitrogen}/bin/nitrogen --set-color=${cfg.backgroundColor} --set-tiled ${cfg.images}'' if builtins.isPath cfg.images then
else "${pkgs.nitrogen}/bin/nitrogen --set-color=${cfg.backgroundColor} --set-tiled ${cfg.images}"
builtins.concatStringsSep "\n" (map else
({ fst, snd }: builtins.concatStringsSep "\n" (
let map
image = fst; (
monitor = toString snd; { fst, snd }:
in let
''${pkgs.nitrogen}/bin/nitrogen --head=${monitor} --set-color=${cfg.backgroundColor} --set-tiled ${image}'') image = fst;
(zipLists cfg.images (builtins.genList (x: x) (builtins.length cfg.images))))); monitor = toString snd;
in
"${pkgs.nitrogen}/bin/nitrogen --head=${monitor} --set-color=${cfg.backgroundColor} --set-tiled ${image}"
)
(zipLists cfg.images (builtins.genList (x: x) (builtins.length cfg.images)))
)
);
wallpaperConfig = { wallpaperConfig = {
options = { options = {
@ -29,7 +40,11 @@ let
extension = mkOption { extension = mkOption {
description = "The extension of the wallpaper"; description = "The extension of the wallpaper";
type = types.enum [ "jpg" "png" "gif" ]; type = types.enum [
"jpg"
"png"
"gif"
];
}; };
}; };
}; };

View file

@ -1,9 +1,11 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.programs.waybar; cfg = config.eboskma.programs.waybar;
in in
{ {
@ -92,7 +94,7 @@ in
}; };
"sway/mode" = { "sway/mode" = {
format = "<span style=\"italic\">󰁌 {}</span>"; # Icon: arrow_expand_all format = ''<span style="italic">󰁌 {}</span>''; # Icon: arrow_expand_all
tooltip = false; tooltip = false;
}; };
@ -149,7 +151,11 @@ in
phone = ""; # Icon: phone phone = ""; # Icon: phone
portable = ""; # Icon: phone portable = ""; # Icon: phone
car = ""; # Icon: car car = ""; # Icon: car
default = [ "󰕿" "󰖀" "󰕾" ]; # Icons: volume_low volume_medium volume_high default = [
"󰕿"
"󰖀"
"󰕾"
]; # Icons: volume_low volume_medium volume_high
}; };
on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
on-click-middle = "${pkgs.helvum}/bin/helvum"; on-click-middle = "${pkgs.helvum}/bin/helvum";
@ -176,7 +182,7 @@ in
spacing = 10; spacing = 10;
}; };
"idle_inhibitor" = { "idle_inhibitor" = {
format = "<span size=\"large\">{icon}</span>"; format = ''<span size="large">{icon}</span>'';
format-icons = { format-icons = {
activated = "󰛐"; activated = "󰛐";
deactivated = "󰛑"; deactivated = "󰛑";

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.services.xbanish; cfg = config.eboskma.services.xbanish;

View file

@ -1,12 +1,12 @@
{ config { config, lib, ... }:
, lib with lib;
, ... let
}:
with lib; let
cfg = config.eboskma.programs.zathura; cfg = config.eboskma.programs.zathura;
in in
{ {
options.eboskma.programs.zathura = { enable = mkEnableOption "activate zathura"; }; options.eboskma.programs.zathura = {
enable = mkEnableOption "activate zathura";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.zathura = { programs.zathura = {

View file

@ -3,7 +3,10 @@ with lib;
let let
cfg = config.eboskma.programs.zellij; cfg = config.eboskma.programs.zellij;
placeholders = [ "@COPY_COMMAND@" "@SCROLLBACK_EDITOR@" ]; placeholders = [
"@COPY_COMMAND@"
"@SCROLLBACK_EDITOR@"
];
replacements = [ replacements = [
cfg.copyCommand cfg.copyCommand
"${config.eboskma.programs.emacs.package}/bin/emacsclient" "${config.eboskma.programs.emacs.package}/bin/emacsclient"

View file

@ -1,16 +1,9 @@
let let
krops = builtins.fetchGit { krops = builtins.fetchGit { url = "https://cgit.krebsco.de/krops/"; };
url = "https://cgit.krebsco.de/krops/";
};
lib = import "${krops}/lib"; lib = import "${krops}/lib";
pkgs = import "${krops}/pkgs" { }; pkgs = import "${krops}/pkgs" { };
source = _name: source = _name: lib.evalSource [ { machine-config.file = toString ./.; } ];
lib.evalSource [
{
machine-config.file = toString ./.;
}
];
command = targetPath: '' command = targetPath: ''
nix-shell -p git --run ' nix-shell -p git --run '
@ -19,7 +12,8 @@ let
' '
''; '';
createHost = name: target: createHost =
name: target:
pkgs.krops.writeCommand "deploy-${name}" { pkgs.krops.writeCommand "deploy-${name}" {
inherit command; inherit command;
source = source name; source = source name;

View file

@ -1,21 +1,26 @@
{ self, nixpkgs, ... }@inputs: { self, nixpkgs, ... }@inputs:
rec { rec {
defSystem = system: systemConfig: deployConfig: defSystem =
system: systemConfig: deployConfig:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
system = "${system}"; system = "${system}";
modules = (systemModules system systemConfig) ++ (nixpkgs.lib.optional (deployConfig != null) { _module.args.nixinate = deployConfig; }); modules =
(systemModules system systemConfig)
++ (nixpkgs.lib.optional (deployConfig != null) { _module.args.nixinate = deployConfig; });
}; };
systemModules = system: systemConfig: systemModules =
builtins.attrValues self.nixosModules ++ [ system: systemConfig:
builtins.attrValues self.nixosModules
++ [
{ _module.args.inputs = inputs; } { _module.args.inputs = inputs; }
{ _module.args.self-overlay = self.overlays.default; } { _module.args.self-overlay = self.overlays.default; }
{ {
nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nixpkgs = nixpkgs = {
{ overlays =
overlays = [ [
self.overlays.default self.overlays.default
inputs.attic.overlays.default inputs.attic.overlays.default
inputs.emacs-overlay.overlay inputs.emacs-overlay.overlay
@ -24,17 +29,16 @@ rec {
inputs.nil.overlays.default inputs.nil.overlays.default
inputs.pamedia.overlays.${system} inputs.pamedia.overlays.${system}
inputs.rust-overlay.overlays.default inputs.rust-overlay.overlays.default
] ++ nixpkgs.lib.optional (system == "aarch64-linux") ]
(_final: super: { ++ nixpkgs.lib.optional (system == "aarch64-linux") (
makeModulesClosure = x: _final: super: { makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; }); }
super.makeModulesClosure (x // { allowMissing = true; }); );
});
config = { config = {
allowUnfree = true; allowUnfree = true;
firefox.speechSynthesisSupport = true; firefox.speechSynthesisSupport = true;
};
}; };
};
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
@ -48,6 +52,5 @@ rec {
inputs.sops.nixosModules.sops inputs.sops.nixosModules.sops
inputs.sunshine.nixosModules.sunshine inputs.sunshine.nixosModules.sunshine
]; ];
} }

View file

@ -1,5 +1,6 @@
{ self, ... }: { self, ... }:
{ modulesPath, ... }: { { modulesPath, ... }:
{
imports = [ imports = [
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")
../../users/root ../../users/root

View file

@ -1,5 +1,6 @@
{ self, nixos-hardware, ... }: { self, nixos-hardware, ... }:
{ modulesPath, ... }: { { modulesPath, ... }:
{
imports = [ imports = [
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
{ {
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
@ -32,9 +37,7 @@ with lib;
environment = { environment = {
LIBVA_DRIVER_NAME = "iHD"; LIBVA_DRIVER_NAME = "iHD";
}; };
environmentFiles = [ environmentFiles = [ config.sops.secrets.frigate.path ];
config.sops.secrets.frigate.path
];
}; };
}; };

View file

@ -1,5 +1,6 @@
{ self, ... }: { self, ... }:
{ modulesPath, ... }: { { modulesPath, ... }:
{
imports = [ imports = [
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")

View file

@ -1,4 +1,5 @@
{ pkgs, config, ... }: { { pkgs, config, ... }:
{
services.gitea-actions-runner = { services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner; package = pkgs.forgejo-actions-runner;
@ -8,9 +9,7 @@
enable = true; enable = true;
url = "https://git.datarift.nl"; url = "https://git.datarift.nl";
tokenFile = config.sops.secrets.runner-nix-token.path; tokenFile = config.sops.secrets.runner-nix-token.path;
labels = [ labels = [ "nix:docker://ghcr.io/eboskma/forgejo-nix-runner:latest" ];
"nix:docker://ghcr.io/eboskma/forgejo-nix-runner:latest"
];
settings = { settings = {
log = { log = {
level = "info"; level = "info";

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
borgJob = name: { borgJob = name: {
@ -35,6 +40,5 @@ in
}; };
}; };
environment.systemPackages = [ pkgs.borgbackup ]; environment.systemPackages = [ pkgs.borgbackup ];
} }

View file

@ -1,5 +1,6 @@
{ self, ... }: { self, ... }:
{ modulesPath, ... }: { { modulesPath, ... }:
{
imports = [ imports = [
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
forgejoCfg = config.services.forgejo; forgejoCfg = config.services.forgejo;
in in
{ {

View file

@ -1,4 +1,4 @@
{ self, ... } @ inputs: { self, ... }@inputs:
{ modulesPath, lib, ... }: { modulesPath, lib, ... }:
# let # let
# pkgs = self.inputs.nixpkgs.legacyPackages.x86_64-linux; # pkgs = self.inputs.nixpkgs.legacyPackages.x86_64-linux;
@ -42,16 +42,34 @@
interfaces = { interfaces = {
eth0 = { eth0 = {
ipv4.addresses = [ ipv4.addresses = [
{ address = "159.69.211.175"; prefixLength = 32; } {
address = "159.69.211.175";
prefixLength = 32;
}
]; ];
ipv6.addresses = [ ipv6.addresses = [
{ address = "2a01:4f8:1c1e:5fb2::1"; prefixLength = 64; } {
{ address = "fe80::9400:2ff:fe12:a2eb"; prefixLength = 64; } address = "2a01:4f8:1c1e:5fb2::1";
prefixLength = 64;
}
{
address = "fe80::9400:2ff:fe12:a2eb";
prefixLength = 64;
}
];
ipv4.routes = [
{
address = "172.31.1.1";
prefixLength = 32;
}
];
ipv6.routes = [
{
address = "fe80::1";
prefixLength = 128;
}
]; ];
ipv4.routes = [{ address = "172.31.1.1"; prefixLength = 32; }];
ipv6.routes = [{ address = "fe80::1"; prefixLength = 128; }];
}; };
}; };
}; };
@ -60,12 +78,20 @@
tmp.cleanOnBoot = true; tmp.cleanOnBoot = true;
loader.grub.device = "/dev/sda"; loader.grub.device = "/dev/sda";
initrd = { initrd = {
availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; availableKernelModules = [
"ata_piix"
"uhci_hcd"
"xen_blkfront"
"vmw_pvscsi"
];
kernelModules = [ "nvme" ]; kernelModules = [ "nvme" ];
}; };
}; };
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; }; fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
zramSwap.enable = true; zramSwap.enable = true;
### END Hetzner stuff ### END Hetzner stuff
@ -79,7 +105,6 @@
ATTR{address}=="96:00:02:12:a2:eb", NAME="eth0" ATTR{address}=="96:00:02:12:a2:eb", NAME="eth0"
''; '';
openssh = { openssh = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,5 +1,6 @@
{ self, ... }: { self, ... }:
{ modulesPath, lib, ... }: { { modulesPath, lib, ... }:
{
imports = [ imports = [
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")
../../users/root ../../users/root
@ -63,9 +64,7 @@
}; };
}; };
tmpfiles.rules = [ tmpfiles.rules = [ "L /dev/kmsg - - - - /dev/console" ];
"L /dev/kmsg - - - - /dev/console"
];
}; };
security = { security = {
@ -77,7 +76,6 @@
sudo.enable = false; sudo.enable = false;
}; };
sops.defaultSopsFile = ./secrets.yaml; sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = { }; sops.secrets = { };

View file

@ -1,4 +1,9 @@
{ nixos-hardware, nix-ld-rs, attic, ... }: {
nixos-hardware,
nix-ld-rs,
attic,
...
}:
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
imports = [ imports = [
@ -72,7 +77,6 @@
systemd.enable = true; systemd.enable = true;
}; };
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-uuid/42065c7e-d0aa-4de8-a913-014cf59d48ac"; device = "/dev/disk/by-uuid/42065c7e-d0aa-4de8-a913-014cf59d48ac";
@ -90,7 +94,7 @@
}; };
}; };
swapDevices = [{ device = "/dev/disk/by-uuid/d93788f7-1b94-4687-8313-055d17f42b7e"; }]; swapDevices = [ { device = "/dev/disk/by-uuid/d93788f7-1b94-4687-8313-055d17f42b7e"; } ];
# high-resolution display # high-resolution display
# hardware.video.hidpi.enable = lib.mkDefault true; # hardware.video.hidpi.enable = lib.mkDefault true;
@ -102,11 +106,23 @@
hardware.i2c.enable = true; hardware.i2c.enable = true;
boot = { boot = {
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
initrd.kernelModules = [ ]; initrd.kernelModules = [ ];
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" "zenpower" "nf_nat_ftp" ]; kernelModules = [
"kvm-amd"
"apple-mfi-fastcharge"
"zenpower"
"nf_nat_ftp"
];
kernelParams = [ "amd_pstate.shared_mem=1" ]; kernelParams = [ "amd_pstate.shared_mem=1" ];
extraModulePackages = with config.boot.kernelPackages; [ extraModulePackages = with config.boot.kernelPackages; [
cpupower cpupower
@ -136,7 +152,10 @@
}; };
firewall = { firewall = {
trustedInterfaces = [ "lo" "tailscale0" ]; trustedInterfaces = [
"lo"
"tailscale0"
];
allowedTCPPorts = [ allowedTCPPorts = [
# NFS # NFS
111 111
@ -181,21 +200,32 @@
allowedTCPPortRanges = [ allowedTCPPortRanges = [
# Sunshine # Sunshine
{ from = 47984; to = 47990; } {
from = 47984;
to = 47990;
}
# Sonos / noson # Sonos / noson
{ from = 1400; to = 1410; } {
from = 1400;
to = 1410;
}
]; ];
allowedUDPPortRanges = [ allowedUDPPortRanges = [
# Sunshine # Sunshine
{ from = 47998; to = 48000; } {
from = 47998;
to = 48000;
}
# Sonos / noson / pulseaudio # Sonos / noson / pulseaudio
{ from = 1400; to = 1410; } {
from = 1400;
to = 1410;
}
]; ];
}; };
}; };
security = { security = {
sudo-rs = { sudo-rs = {
enable = true; enable = true;
@ -229,7 +259,12 @@
{ {
wireguardPeerConfig = { wireguardPeerConfig = {
PublicKey = "6faxlUG8+F7uVrKk/OJqqy5k2+OzrhXc/cV6Zsfbl0c="; PublicKey = "6faxlUG8+F7uVrKk/OJqqy5k2+OzrhXc/cV6Zsfbl0c=";
AllowedIPs = [ "192.168.4.0/23" "192.168.6.0/24" "192.168.7.0/24" "192.168.8.0/24" ]; AllowedIPs = [
"192.168.4.0/23"
"192.168.6.0/24"
"192.168.7.0/24"
"192.168.8.0/24"
];
Endpoint = "212.45.34.195:51820"; Endpoint = "212.45.34.195:51820";
PersistentKeepalive = 25; PersistentKeepalive = 25;
}; };
@ -260,20 +295,20 @@
networkConfig = { networkConfig = {
DHCP = "no"; DHCP = "no";
DNS = "192.168.4.1"; DNS = "192.168.4.1";
Domains = [ "bedum.horus.nu" "internal.horus.nu" ]; Domains = [
"bedum.horus.nu"
"internal.horus.nu"
];
}; };
address = [ address = [ "10.10.4.2/24" ];
"10.10.4.2/24"
];
routes = [ routes = [
{ {
routeConfig = routeConfig = {
{ Destination = "192.168.4.0/23";
Destination = "192.168.4.0/23"; Scope = "link";
Scope = "link"; };
};
} }
{ {
routeConfig = { routeConfig = {
@ -282,18 +317,16 @@
}; };
} }
{ {
routeConfig = routeConfig = {
{ Destination = "192.168.7.0/24";
Destination = "192.168.7.0/24"; Scope = "link";
Scope = "link"; };
};
} }
{ {
routeConfig = routeConfig = {
{ Destination = "192.168.8.0/24";
Destination = "192.168.8.0/24"; Scope = "link";
Scope = "link"; };
};
} }
]; ];
}; };

View file

@ -1,4 +1,9 @@
{ pkgs, config, inputs, ... }: {
pkgs,
config,
inputs,
...
}:
let let
mkK3sNode = name: isServer: ipv4Address: ipv6Address: macAddress: { mkK3sNode = name: isServer: ipv4Address: ipv6Address: macAddress: {
config = { config = {
@ -36,11 +41,13 @@ let
} }
]; ];
interfaces = [{ interfaces = [
type = "tap"; {
id = "vm-${name}"; type = "tap";
mac = macAddress; id = "vm-${name}";
}]; mac = macAddress;
}
];
hypervisor = "cloud-hypervisor"; hypervisor = "cloud-hypervisor";
}; };
@ -56,10 +63,12 @@ let
openssh = { openssh = {
enable = true; enable = true;
hostKeys = [{ hostKeys = [
type = "ed25519"; {
path = "/etc/ssh/ssh_host_ed25519_key"; type = "ed25519";
}]; path = "/etc/ssh/ssh_host_ed25519_key";
}
];
}; };
}; };
@ -115,9 +124,7 @@ in
{ addressConfig.Address = "10.128.0.1/24"; } { addressConfig.Address = "10.128.0.1/24"; }
{ addressConfig.Address = "fd12:3456:789a::1/64"; } { addressConfig.Address = "fd12:3456:789a::1/64"; }
]; ];
ipv6Prefixes = [ ipv6Prefixes = [ { ipv6PrefixConfig.Prefix = "fd12:3456:789a::/64"; } ];
{ ipv6PrefixConfig.Prefix = "fd12:3456:789a::/64"; }
];
}; };
networks."11-microvm" = { networks."11-microvm" = {
@ -133,14 +140,41 @@ in
internalInterfaces = [ "microvm" ]; internalInterfaces = [ "microvm" ];
forwardPorts = [ forwardPorts = [
{ proto = "tcp"; sourcePort = 6443; destination = "10.128.0.2:6443"; } {
{ proto = "tcp"; sourcePort = 6443; destination = "10.128.0.3:6443"; } proto = "tcp";
{ proto = "tcp"; sourcePort = 6443; destination = "10.128.0.4:6443"; } sourcePort = 6443;
{ proto = "tcp"; sourcePort = 6443; destination = "fd12:3456:789a::2:6443"; } destination = "10.128.0.2:6443";
{ proto = "tcp"; sourcePort = 6443; destination = "fd12:3456:789a::3:6443"; } }
{ proto = "tcp"; sourcePort = 6443; destination = "fd12:3456:789a::4:6443"; } {
proto = "tcp";
sourcePort = 6443;
destination = "10.128.0.3:6443";
}
{
proto = "tcp";
sourcePort = 6443;
destination = "10.128.0.4:6443";
}
{
proto = "tcp";
sourcePort = 6443;
destination = "fd12:3456:789a::2:6443";
}
{
proto = "tcp";
sourcePort = 6443;
destination = "fd12:3456:789a::3:6443";
}
{
proto = "tcp";
sourcePort = 6443;
destination = "fd12:3456:789a::4:6443";
}
]; ];
}; };
environment.systemPackages = with pkgs; [ kubectl kubernetes-helm ]; environment.systemPackages = with pkgs; [
kubectl
kubernetes-helm
];
} }

View file

@ -1,19 +1,24 @@
{ nixos-hardware, microvm, nix-ld-rs, attic, ... }: {
nixos-hardware,
microvm,
nix-ld-rs,
attic,
...
}:
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
imports = imports = [
[ # Include the results of the hardware scan.
# Include the results of the hardware scan. nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-cpu-amd-pstate
nixos-hardware.nixosModules.common-cpu-amd-pstate nixos-hardware.nixosModules.common-pc-ssd
nixos-hardware.nixosModules.common-pc-ssd
microvm.nixosModules.host microvm.nixosModules.host
attic.nixosModules.atticd attic.nixosModules.atticd
../../users/erwin ../../users/erwin
../../users/root ../../users/root
]; ];
# nixpkgs.config.allowUnfree = true; # nixpkgs.config.allowUnfree = true;
@ -75,9 +80,7 @@
}; };
kanata = { kanata = {
enable = true; enable = true;
devices = [ devices = [ "/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd" ];
"/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd"
];
}; };
lightdm.enable = false; lightdm.enable = false;
networking.enable = true; networking.enable = true;
@ -112,9 +115,7 @@
}; };
}; };
swapDevices = swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
[{ device = "/dev/disk/by-label/swap"; }];
hardware = { hardware = {
enableAllFirmware = true; enableAllFirmware = true;
@ -126,23 +127,34 @@
opengl = { opengl = {
driSupport32Bit = true; driSupport32Bit = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [ vaapiVdpau ];
vaapiVdpau
];
}; };
}; };
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
initrd = { initrd = {
availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
kernelModules = [ "dm-snapshot" ]; kernelModules = [ "dm-snapshot" ];
}; };
kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" "zenpower" ]; kernelModules = [
"kvm-amd"
"apple-mfi-fastcharge"
"zenpower"
];
# boot.kernelParams = [ "amd_pstate.shared_mem=1" ]; # boot.kernelParams = [ "amd_pstate.shared_mem=1" ];
extraModulePackages = with config.boot.kernelPackages; [ zenpower cpupower ]; extraModulePackages = with config.boot.kernelPackages; [
zenpower
cpupower
];
loader = { loader = {
systemd-boot = { systemd-boot = {
enable = true; enable = true;
@ -170,7 +182,10 @@
nftables.enable = true; nftables.enable = true;
firewall = { firewall = {
trustedInterfaces = [ "lo" "tailscale0" ]; trustedInterfaces = [
"lo"
"tailscale0"
];
allowedTCPPorts = [ allowedTCPPorts = [
# Horus System V2 # Horus System V2
@ -193,9 +208,7 @@
}; };
}; };
microvm.autostart = [ microvm.autostart = [ "miniflux" ];
"miniflux"
];
powerManagement = { powerManagement = {
cpuFreqGovernor = "ondemand"; cpuFreqGovernor = "ondemand";
@ -266,9 +279,7 @@
Name = "microvm"; Name = "microvm";
}; };
addresses = [ addresses = [ { addressConfig.Address = "172.16.0.1/24"; } ];
{ addressConfig.Address = "172.16.0.1/24"; }
];
}; };
"11-microvm" = { "11-microvm" = {
@ -395,9 +406,7 @@
}; };
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [ appimage-run ];
appimage-run
];
sessionVariables = { sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1"; WLR_NO_HARDWARE_CURSORS = "1";
@ -421,5 +430,4 @@
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.11"; # Did you read the comment? system.stateVersion = "22.11"; # Did you read the comment?
} }

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
minioCfg = config.services.minio; minioCfg = config.services.minio;

View file

@ -1,5 +1,6 @@
{ self, ... }: { self, ... }:
{ modulesPath, ... }: { { modulesPath, ... }:
{
imports = [ imports = [
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")

View file

@ -1,5 +1,17 @@
{ self, attic, caddy-with-plugins, ... }: {
{ pkgs, modulesPath, lib, config, ... }: { self,
attic,
caddy-with-plugins,
...
}:
{
pkgs,
modulesPath,
lib,
config,
...
}:
{
imports = [ imports = [
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")
attic.nixosModules.atticd attic.nixosModules.atticd
@ -33,7 +45,10 @@
trustedInterfaces = [ "tailscale0" ]; trustedInterfaces = [ "tailscale0" ];
allowPing = true; allowPing = true;
allowedTCPPorts = [ 80 443 ]; allowedTCPPorts = [
80
443
];
}; };
}; };
@ -155,5 +170,4 @@
}; };
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View file

@ -1,4 +1,9 @@
{ nixos-hardware, disko, nix-ld-rs, ... }: {
nixos-hardware,
disko,
nix-ld-rs,
...
}:
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
imports = [ imports = [
@ -41,7 +46,6 @@
sudo.enable = false; sudo.enable = false;
}; };
boot = { boot = {
loader = { loader = {
systemd-boot = { systemd-boot = {
@ -52,12 +56,26 @@
}; };
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "ahci" "usb_storage" "usbhid" "sd_mod" "virtio_blk" "virtio_pci" ]; availableKernelModules = [
"xhci_pci"
"thunderbolt"
"nvme"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
"virtio_blk"
"virtio_pci"
];
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
}; };
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
kernelModules = [ "kvm-intel" "dm-thin-pool" "dm-snapshot" ]; kernelModules = [
"kvm-intel"
"dm-thin-pool"
"dm-snapshot"
];
# From PVE: ro quiet intel_iommu=on i915.enable_gvt=1 cpufreq.default_governor=ondemand # From PVE: ro quiet intel_iommu=on i915.enable_gvt=1 cpufreq.default_governor=ondemand
# kernelParams = [ "intel_iommu=on" "i915.enable_gvt=1" "cpufreq.default_governor=ondemand" ]; # kernelParams = [ "intel_iommu=on" "i915.enable_gvt=1" "cpufreq.default_governor=ondemand" ];

View file

@ -66,6 +66,5 @@
}; };
}; };
}; };
}; };
} }

View file

@ -83,9 +83,7 @@
lvs = { lvs = {
data = { data = {
size = "100%FREE"; size = "100%FREE";
extraArgs = [ extraArgs = [ "--type=thin-pool" ];
"--type=thin-pool"
];
}; };
}; };
}; };

View file

@ -128,8 +128,5 @@
}; };
}; };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [ 8443 ];
8443
];
} }

View file

@ -1,5 +1,6 @@
{ self, caddy-with-plugins, ... }: { self, caddy-with-plugins, ... }:
{ modulesPath, pkgs, ... }: { { modulesPath, pkgs, ... }:
{
imports = [ imports = [
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")
../../users/root ../../users/root

View file

@ -63,9 +63,7 @@
security = { security = {
polkit.enable = true; polkit.enable = true;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ libraspberrypi ];
libraspberrypi
];
system.stateVersion = "23.05"; system.stateVersion = "23.05";
} }

View file

@ -1,4 +1,10 @@
{ pkgs, config, lib, inputs, ... }: {
pkgs,
config,
lib,
inputs,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.users.erwin; cfg = config.eboskma.users.erwin;
@ -49,12 +55,12 @@ in
enable = true; enable = true;
}; };
imports = [ imports =
../../modules/options [ ../../modules/options ]
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules))); ++ (map (mod: (../../home-manager/modules + "/${mod}")) (
builtins.attrNames (builtins.readDir ../../home-manager/modules)
));
}; };
programs.bandwhich.enable = true; programs.bandwhich.enable = true;
}; };
} }

View file

@ -79,9 +79,7 @@
keyboards = { keyboards = {
code = { code = {
devices = [ devices = [ "/dev/input/by-id/usb-04d9_USB_Keyboard-event-kbd" ];
"/dev/input/by-id/usb-04d9_USB_Keyboard-event-kbd"
];
config = '' config = ''
(defsrc (defsrc

View file

@ -1,5 +1,12 @@
{ pkgs, config, lib, inputs, ... }: {
with lib; let pkgs,
config,
lib,
inputs,
...
}:
with lib;
let
cfg = config.eboskma.users.erwin; cfg = config.eboskma.users.erwin;
in in
{ {
@ -46,28 +53,27 @@ in
stateVersion = "23.05"; stateVersion = "23.05";
packages = with pkgs; packages = with pkgs; [
[ atool
atool bottom
bottom falkon
falkon fd
fd gnome.nautilus
gnome.nautilus imagemagick
imagemagick imv
imv iotop
iotop libnotify
libnotify mpv
mpv nordzy-cursor-theme
nordzy-cursor-theme quintom-cursor-theme
quintom-cursor-theme procs
procs ripgrep
ripgrep units
units unzip
unzip xdg-utils
xdg-utils wl-clipboard
wl-clipboard zeal
zeal ];
];
}; };
xdg = { xdg = {
@ -106,7 +112,11 @@ in
i18n.inputMethod = { i18n.inputMethod = {
enabled = "fcitx5"; enabled = "fcitx5";
fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-gtk fcitx5-configtool ]; fcitx5.addons = with pkgs; [
fcitx5-m17n
fcitx5-gtk
fcitx5-configtool
];
}; };
gtk = { gtk = {
@ -122,9 +132,7 @@ in
}; };
gtk3 = { gtk3 = {
bookmarks = [ bookmarks = [ "file:///home/erwin/workspace" ];
"file:///home/erwin/workspace"
];
extraConfig = { extraConfig = {
gtk-application-prefer-dark-theme = 1; gtk-application-prefer-dark-theme = 1;
gtk-cursor-theme-name = "Nordzy-cursors"; gtk-cursor-theme-name = "Nordzy-cursors";
@ -142,10 +150,14 @@ in
command-not-found.enable = true; command-not-found.enable = true;
}; };
imports = [ imports =
../../modules/options [
inputs.anyrun.nixosModules.home-manager ../../modules/options
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules))); inputs.anyrun.nixosModules.home-manager
]
++ (map (mod: (../../home-manager/modules + "/${mod}")) (
builtins.attrNames (builtins.readDir ../../home-manager/modules)
));
}; };
programs.bandwhich.enable = true; programs.bandwhich.enable = true;

View file

@ -1,5 +1,11 @@
{ self, ... }: { self, ... }:
{ modulesPath, pkgs, lib, ... }: { {
modulesPath,
pkgs,
lib,
...
}:
{
imports = [ imports = [
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")
../../users/root ../../users/root
@ -80,7 +86,6 @@
sudo.enable = false; sudo.enable = false;
}; };
sops.defaultSopsFile = ./secrets.yaml; sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = { }; sops.secrets = { };

View file

@ -1,8 +1,6 @@
{ config { config, lib, ... }:
, lib with lib;
, ... let
}:
with lib; let
cfg = config.eboskma.adguard; cfg = config.eboskma.adguard;
in in
{ {
@ -34,7 +32,10 @@ in
systemd.services.adguardhome.serviceConfig.AmbientCapabilities = [ "CAP_NET_RAW" ]; systemd.services.adguardhome.serviceConfig.AmbientCapabilities = [ "CAP_NET_RAW" ];
networking.firewall = { networking.firewall = {
allowedUDPPorts = [ 53 67 ]; allowedUDPPorts = [
53
67
];
}; };
}; };
} }

View file

@ -1,5 +1,6 @@
{ self, ... }: { self, ... }:
{ modulesPath, ... }: { { modulesPath, ... }:
{
imports = [ imports = [
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")
@ -16,9 +17,7 @@
server = true; server = true;
}; };
adguard = { adguard = {
upstreams = [ upstreams = [ "127.0.0.1:5335" ];
"127.0.0.1:5335"
];
}; };
nix-common = { nix-common = {
enable = true; enable = true;

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.backscrub; cfg = config.eboskma.backscrub;
in in
{ {
@ -15,9 +17,7 @@ in
boot = { boot = {
extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
# Register a v4l2loopback device at boot # Register a v4l2loopback device at boot
kernelModules = [ kernelModules = [ "v4l2loopback" ];
"v4l2loopback"
];
extraModprobeConfig = '' extraModprobeConfig = ''
options v4l2loopback max_buffers=2 options v4l2loopback max_buffers=2

View file

@ -1,6 +1,5 @@
{ mkDerivation, lib }: { mkDerivation, lib }:
mkDerivation mkDerivation {
{
pname = "blink1-udev-rules"; pname = "blink1-udev-rules";
version = "20220531093409"; version = "20220531093409";

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.base; cfg = config.eboskma.base;
qmkUdevRules = pkgs.callPackage ./qmk { qmkUdevRules = pkgs.callPackage ./qmk {
inherit (pkgs.stdenv) mkDerivation; inherit (pkgs.stdenv) mkDerivation;
@ -61,28 +63,34 @@ in
hardware.opengl.enable = true; hardware.opengl.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages =
btop with pkgs;
clinfo [
config.boot.kernelPackages.cpupower btop
dig clinfo
du-dust config.boot.kernelPackages.cpupower
file dig
hexyl du-dust
jaq file
lm_sensors hexyl
man-pages jaq
man-pages-posix lm_sensors
moreutils man-pages
nix-template man-pages-posix
nvd moreutils
pigz nix-template
s-tui nvd
stress pigz
usbutils s-tui
xh stress
zip usbutils
] ++ (lib.optionals (pkgs.system == "x86_64-linux") [ rar unrar ]); xh
zip
]
++ (lib.optionals (pkgs.system == "x86_64-linux") [
rar
unrar
]);
documentation.dev.enable = true; documentation.dev.enable = true;
@ -93,7 +101,8 @@ in
}; };
services.udev = { services.udev = {
packages = (optional cfg.udev-rules.qmk qmkUdevRules) packages =
(optional cfg.udev-rules.qmk qmkUdevRules)
++ (optional cfg.udev-rules.probe-rs probersRules) ++ (optional cfg.udev-rules.probe-rs probersRules)
++ (optional cfg.udev-rules.blink1 blink1Rules) ++ (optional cfg.udev-rules.blink1 blink1Rules)
++ (optional cfg.udev-rules.picotool picotoolRules) ++ (optional cfg.udev-rules.picotool picotoolRules)

View file

@ -16,11 +16,13 @@ mkDerivation {
meta = with lib; { meta = with lib; {
description = "udev rules for Raspberry Pi picotool"; description = "udev rules for Raspberry Pi picotool";
license = licenses.mit; license = licenses.mit;
maintainers = [{ maintainers = [
email = "erwin@datarift.nl"; {
github = "eboskma"; email = "erwin@datarift.nl";
name = "Erwin Boskma"; github = "eboskma";
}]; name = "Erwin Boskma";
}
];
platforms = platforms.linux; platforms = platforms.linux;
homepage = "https://github.com/raspberrypi/picotool"; homepage = "https://github.com/raspberrypi/picotool";
}; };

View file

@ -22,10 +22,12 @@ stdenv.mkDerivation {
homepage = "https://git.gurkan.in/gurkan/nixos-blur-plymouth"; homepage = "https://git.gurkan.in/gurkan/nixos-blur-plymouth";
license = licenses.gpl2; license = licenses.gpl2;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = [{ maintainers = [
email = "erwin@datarift.nl"; {
github = "eboskma"; email = "erwin@datarift.nl";
name = "Erwin Boskma"; github = "eboskma";
}]; name = "Erwin Boskma";
}
];
}; };
} }

View file

@ -1,7 +1,4 @@
{ mkDerivation { mkDerivation, lib }:
, lib
,
}:
mkDerivation { mkDerivation {
pname = "probe-rs-udev-rules"; pname = "probe-rs-udev-rules";
version = "20220312131009"; version = "20220312131009";

View file

@ -19,10 +19,12 @@ stdenv.mkDerivation {
homepage = "https://qmk.fm"; homepage = "https://qmk.fm";
license = licenses.gpl2; license = licenses.gpl2;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = [{ maintainers = [
email = "erwin@datarift.nl"; {
github = "eboskma"; email = "erwin@datarift.nl";
name = "Erwin Boskma"; github = "eboskma";
}]; name = "Erwin Boskma";
}
];
}; };
} }

View file

@ -20,10 +20,12 @@ mkDerivation {
homepage = "https://solokeys.com"; homepage = "https://solokeys.com";
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = [{ maintainers = [
email = "erwin@datarift.nl"; {
github = "eboskma"; email = "erwin@datarift.nl";
name = "Erwin Boskma"; github = "eboskma";
}]; name = "Erwin Boskma";
}
];
}; };
} }

View file

@ -1,8 +1,6 @@
{ config { config, lib, ... }:
, lib with lib;
, ... let
}:
with lib; let
cfg = config.eboskma.bluetooth; cfg = config.eboskma.bluetooth;
in in
{ {

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.caddy-proxy; cfg = config.eboskma.caddy-proxy;
@ -59,6 +64,9 @@ in
systemd.services.caddy.serviceConfig.EnvironmentFile = [ config.sops.secrets.caddy-env.path ]; systemd.services.caddy.serviceConfig.EnvironmentFile = [ config.sops.secrets.caddy-env.path ];
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [
80
443
];
}; };
} }

View file

@ -1,9 +1,11 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.desktop; cfg = config.eboskma.desktop;
in in
{ {
@ -75,22 +77,19 @@ in
environment = { environment = {
sessionVariables = mkMerge [ sessionVariables = mkMerge [
{ { SSH_AUTH_SOCK = "\${XDG_RUNTIME_DIR}/keyring/ssh"; }
SSH_AUTH_SOCK = ''''${XDG_RUNTIME_DIR}/keyring/ssh''; (mkIf cfg.wayland {
} _JAVA_AWT_WM_NONREPARENTING = "1";
(mkIf cfg.wayland MOZ_ENABLE_WAYLAND = "1";
{ MOZ_DBUS_REMOTE = "1";
_JAVA_AWT_WM_NONREPARENTING = "1"; QT_QPA_PLATFORM = "wayland";
MOZ_ENABLE_WAYLAND = "1"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
MOZ_DBUS_REMOTE = "1"; QT_QPA_PLATFORMTHEME = "qt5ct";
QT_QPA_PLATFORM = "wayland"; GDK_BACKEND = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORMTHEME = "qt5ct"; AMD_VULKAN_ICD = "RADV";
GDK_BACKEND = "wayland"; NIXOS_OZONE_WL = "1";
SDL_VIDEODRIVER = "wayland"; })
AMD_VULKAN_ICD = "RADV";
NIXOS_OZONE_WL = "1";
})
]; ];
etc = { etc = {

View file

@ -1,5 +1,6 @@
{ config, lib, ... }: { config, lib, ... }:
with lib; let with lib;
let
cfg = config.eboskma.drone; cfg = config.eboskma.drone;
in in
{ {
@ -22,21 +23,15 @@ in
image = "drone/drone:2"; image = "drone/drone:2";
ports = [ "8100:80" ]; ports = [ "8100:80" ];
volumes = [ "drone_data:/data" ]; volumes = [ "drone_data:/data" ];
environmentFiles = [ environmentFiles = [ config.sops.secrets.drone.path ];
config.sops.secrets.drone.path
];
}; };
drone-runner-docker = { drone-runner-docker = {
autoStart = true; autoStart = true;
image = "drone/drone-runner-docker:1"; image = "drone/drone-runner-docker:1";
ports = [ "3000:3000" ]; ports = [ "3000:3000" ];
volumes = [ volumes = [ "/var/run/docker.sock:/var/run/docker.sock" ];
"/var/run/docker.sock:/var/run/docker.sock" environmentFiles = [ config.sops.secrets.drone-runner.path ];
];
environmentFiles = [
config.sops.secrets.drone-runner.path
];
}; };
}; };

View file

@ -1,14 +1,18 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.element-web; cfg = config.eboskma.element-web;
matrixClientConfig = pkgs.writeText "element-web.json" (builtins.readFile ./element-web.json); matrixClientConfig = pkgs.writeText "element-web.json" (builtins.readFile ./element-web.json);
in in
{ {
options.eboskma.element-web = { enable = mkEnableOption "activate element-web"; }; options.eboskma.element-web = {
enable = mkEnableOption "activate element-web";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
eboskma.podman.enable = true; eboskma.podman.enable = true;
@ -17,12 +21,8 @@ in
element-web = { element-web = {
autoStart = true; autoStart = true;
image = "vectorim/element-web"; image = "vectorim/element-web";
ports = [ ports = [ "8888:80" ];
"8888:80" volumes = [ "${matrixClientConfig}:/app/config.json" ];
];
volumes = [
"${matrixClientConfig}:/app/config.json"
];
}; };
}; };
}; };

View file

@ -1,9 +1,11 @@
{ lib {
, pkgs lib,
, config pkgs,
, ... config,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.fonts; cfg = config.eboskma.fonts;
iosevka-buildplans = builtins.fromTOML (builtins.readFile "${pkgs.iosevka.src}/build-plans.toml"); iosevka-buildplans = builtins.fromTOML (builtins.readFile "${pkgs.iosevka.src}/build-plans.toml");
@ -26,18 +28,27 @@ in
fonts = { fonts = {
fontDir.enable = true; fontDir.enable = true;
packages = with pkgs; [ packages =
(nerdfonts.override { fonts = [ "Iosevka" "Meslo" "Noto" ]; }) with pkgs;
corefonts [
dejavu_fonts (nerdfonts.override {
google-fonts fonts = [
kochi-substitute "Iosevka"
material-icons "Meslo"
monaspace "Noto"
noto-fonts-emoji ];
ttf_bitstream_vera })
twitter-color-emoji corefonts
] ++ lib.optional cfg.iosevka-aile iosevka-aile; dejavu_fonts
google-fonts
kochi-substitute
material-icons
monaspace
noto-fonts-emoji
ttf_bitstream_vera
twitter-color-emoji
]
++ lib.optional cfg.iosevka-aile iosevka-aile;
fontconfig = { fontconfig = {
defaultFonts = { defaultFonts = {

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.gnome; cfg = config.eboskma.gnome;
in in
{ {
@ -14,9 +16,7 @@ in
gnomeExtensions.appindicator gnomeExtensions.appindicator
papirus-icon-theme papirus-icon-theme
]; ];
services.udev.packages = with pkgs; [ services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
gnome.gnome-settings-daemon
];
services.gnome = { services.gnome = {
gnome-keyring.enable = true; gnome-keyring.enable = true;
at-spi2-core.enable = true; at-spi2-core.enable = true;

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.greetd; cfg = config.eboskma.greetd;
steamCfg = config.programs.steam; steamCfg = config.programs.steam;
@ -15,7 +17,9 @@ with lib; let
steam-gamescope = steam-gamescope =
let let
exports = builtins.attrValues (builtins.mapAttrs (n: v: "export ${n}=${v}") steamCfg.gamescopeSession.env); exports = builtins.attrValues (
builtins.mapAttrs (n: v: "export ${n}=${v}") steamCfg.gamescopeSession.env
);
in in
pkgs.writeShellScriptBin "steam-gamescope" '' pkgs.writeShellScriptBin "steam-gamescope" ''
${builtins.concatStringsSep "\n" exports} ${builtins.concatStringsSep "\n" exports}
@ -55,107 +59,116 @@ in
}; };
}; };
config = config = mkIf cfg.enable {
mkIf cfg.enable services.greetd = {
{ enable = true;
services.greetd = { restart = true;
enable = true; settings = {
restart = true; default_session = {
settings = { command = "${pkgs.sway}/bin/sway --unsupported-gpu --config /etc/greetd/sway-config";
default_session = { };
command = "${pkgs.sway}/bin/sway --unsupported-gpu --config /etc/greetd/sway-config"; };
};
programs.regreet = {
enable = false;
settings = {
background = {
path = cfg.wallpaper;
fit = "Cover";
};
GTK = {
application_prefer_dark_theme = true;
theme_name = "elementary";
cursor_theme = "elementary";
icon_theme_name = "elementary";
font_name = "Iosevka Aile 16";
};
commands = {
reboot = [
"systemctl"
"reboot"
];
poweroff = [
"systemctl"
"poweroff"
];
};
};
};
security.pam.services.greetd.u2fAuth = false;
# exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
networking.firewall.allowedTCPPorts = lib.mkIf (cfg.wayvnc && !config.services.tailscale.enable) [
5900
];
environment = {
systemPackages = with pkgs; [
pantheon.elementary-gtk-theme
pantheon.elementary-icon-theme
];
etc = {
"greetd/sway-config" = {
text = lib.concatStringsSep "\n" (
(lib.optional cfg.wayvnc "exec ${pkgs.wayvnc}/bin/wayvnc 0.0.0.0")
++ [
''
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css -b ${cfg.wallpaper}; swaymsg exit"
include /etc/sway/config.d/*
''
]
++ (mapAttrsToList inputStr cfg.input)
++ (mapAttrsToList outputStr cfg.output)
);
user = "greeter";
group = "greeter";
};
"greetd/environments" = {
text = concatStringsSep "\n" (
(optional cfg.sway "${swaySession}")
++ (optional cfg.steam "${steam-gamescope}")
++ [ "${pkgs.bash}/bin/bash" ]
);
user = "greeter";
group = "greeter";
};
"greetd/gtkgreet.css" = {
text = style;
user = "greeter";
group = "greeter";
};
"sway/config.d/systemd-env.conf" = {
text = ''
exec_always --no-startup-id systemctl --user import-environment ${envVars}
exec_always --no-startup-id dbus-update-activation-environment --systemd ${envVars}
'';
};
"xdg/gtk-3.0/settings.ini" = {
text = generators.toINI { } {
Settings = {
gtk-theme-name = "elementary";
gtk-icon-theme-name = "elementary";
gtk-cursor-theme-name = "elementary";
gtk-application-prefer-dark-theme = "true";
}; };
}; };
}; };
"xdg/gtk-4.0/settings.ini" = {
programs.regreet = { text = generators.toINI { } {
enable = false; Settings = {
settings = { gtk-theme-name = "elementary";
background = { gtk-icon-theme-name = "elementary";
path = cfg.wallpaper; gtk-cursor-theme-name = "elementary";
fit = "Cover"; gtk-application-prefer-dark-theme = "true";
};
GTK = {
application_prefer_dark_theme = true;
theme_name = "elementary";
cursor_theme = "elementary";
icon_theme_name = "elementary";
font_name = "Iosevka Aile 16";
};
commands = {
reboot = [ "systemctl" "reboot" ];
poweroff = [ "systemctl" "poweroff" ];
};
};
};
security.pam.services.greetd.u2fAuth = false;
# exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
networking.firewall.allowedTCPPorts = lib.mkIf (cfg.wayvnc && !config.services.tailscale.enable) [ 5900 ];
environment = {
systemPackages = with pkgs; [ pantheon.elementary-gtk-theme pantheon.elementary-icon-theme ];
etc = {
"greetd/sway-config" = {
text = lib.concatStringsSep "\n"
((lib.optional cfg.wayvnc "exec ${pkgs.wayvnc}/bin/wayvnc 0.0.0.0") ++
[
''
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css -b ${cfg.wallpaper}; swaymsg exit"
include /etc/sway/config.d/*
''
]
++ (mapAttrsToList inputStr cfg.input)
++ (mapAttrsToList outputStr cfg.output));
user = "greeter";
group = "greeter";
};
"greetd/environments" = {
text = concatStringsSep "\n" ((optional cfg.sway "${swaySession}")
++ (optional cfg.steam "${steam-gamescope}")
++ [
"${pkgs.bash}/bin/bash"
]);
user = "greeter";
group = "greeter";
};
"greetd/gtkgreet.css" = {
text = style;
user = "greeter";
group = "greeter";
};
"sway/config.d/systemd-env.conf" = {
text = ''
exec_always --no-startup-id systemctl --user import-environment ${envVars}
exec_always --no-startup-id dbus-update-activation-environment --systemd ${envVars}
'';
};
"xdg/gtk-3.0/settings.ini" = {
text = generators.toINI { } {
Settings = {
gtk-theme-name = "elementary";
gtk-icon-theme-name = "elementary";
gtk-cursor-theme-name = "elementary";
gtk-application-prefer-dark-theme = "true";
};
};
};
"xdg/gtk-4.0/settings.ini" = {
text = generators.toINI { } {
Settings = {
gtk-theme-name = "elementary";
gtk-icon-theme-name = "elementary";
gtk-cursor-theme-name = "elementary";
gtk-application-prefer-dark-theme = "true";
};
};
}; };
}; };
}; };
}; };
};
};
} }

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.headscale; cfg = config.eboskma.headscale;
@ -69,7 +74,10 @@ in
security.acme.acceptTerms = true; security.acme.acceptTerms = true;
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [
80
443
];
environment.systemPackages = [ pkgs.headscale ]; environment.systemPackages = [ pkgs.headscale ];

View file

@ -1,10 +1,17 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.k3s; cfg = config.eboskma.k3s;
in in
{ {
options.eboskma.k3s = { enable = mkEnableOption "k3s"; }; options.eboskma.k3s = {
enable = mkEnableOption "k3s";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.k3s = { services.k3s = {
@ -12,6 +19,9 @@ in
extraFlags = "--tls-san=10.0.0.4 --tls-san=100.106.117.132"; extraFlags = "--tls-san=10.0.0.4 --tls-san=100.106.117.132";
}; };
environment.systemPackages = with pkgs; [ kubectl kubernetes-helm ]; environment.systemPackages = with pkgs; [
kubectl
kubernetes-helm
];
}; };
} }

View file

@ -54,6 +54,5 @@ in
}; };
}; };
}; };
}; };
} }

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.keycloak; cfg = config.eboskma.keycloak;
@ -22,11 +27,12 @@ let
mkdir $out mkdir $out
cp -r $src/theme/keywind/* $out/ cp -r $src/theme/keywind/* $out/
''; '';
}; };
in in
{ {
options.eboskma.keycloak = { enable = mkEnableOption "keycloak"; }; options.eboskma.keycloak = {
enable = mkEnableOption "keycloak";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.keycloak = { services.keycloak = {
@ -55,13 +61,11 @@ in
inherit (pkgs.maven) buildMavenPackage; inherit (pkgs.maven) buildMavenPackage;
keycloak = config.services.keycloak.package; keycloak = config.services.keycloak.package;
}) })
(pkgs.callPackage ./phasetwo-admin-ui.nix { (pkgs.callPackage ./phasetwo-admin-ui.nix { inherit (pkgs) stdenv fetchFromGitHub; })
inherit (pkgs) stdenv fetchFromGitHub;
})
]; ];
}; };
services. caddy = { services.caddy = {
enable = true; enable = true;
email = "erwin@datarift.nl"; email = "erwin@datarift.nl";
@ -85,6 +89,9 @@ in
security.acme.acceptTerms = true; security.acme.acceptTerms = true;
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [
80
443
];
}; };
} }

View file

@ -1,6 +1,7 @@
{ buildMavenPackage {
, fetchFromGitHub buildMavenPackage,
, keycloak fetchFromGitHub,
keycloak,
}: }:
let let
inherit (keycloak) version; inherit (keycloak) version;

View file

@ -1,6 +1,4 @@
{ buildMavenPackage { buildMavenPackage, fetchFromGitHub }:
, fetchFromGitHub
}:
let let
version = "0.49"; version = "0.49";
in in
@ -26,5 +24,4 @@ buildMavenPackage {
installPhase = '' installPhase = ''
install -D target/keycloak-orgs-${version}.jar $out/keycloak-orgs-${version}.jar install -D target/keycloak-orgs-${version}.jar $out/keycloak-orgs-${version}.jar
''; '';
} }

View file

@ -1,6 +1,4 @@
{ stdenv { stdenv, fetchFromGitHub }:
, fetchFromGitHub
}:
let let
version = "23.0.3.1703879005"; version = "23.0.3.1703879005";
jarVersion = "23.0.1"; jarVersion = "23.0.1";

View file

@ -4,7 +4,9 @@ let
cfg = config.eboskma.klipper; cfg = config.eboskma.klipper;
in in
{ {
options.eboskma.klipper = { enable = mkEnableOption "klipper"; }; options.eboskma.klipper = {
enable = mkEnableOption "klipper";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
services = { services = {
@ -65,7 +67,7 @@ in
enable_pin = "!PG0"; enable_pin = "!PG0";
rotation_distance = 34.043; rotation_distance = 34.043;
microsteps = 16; microsteps = 16;
nozzle_diameter = 0.400; nozzle_diameter = 0.4;
filament_diameter = 1.75; filament_diameter = 1.75;
max_extrude_only_distance = 150; max_extrude_only_distance = 150;
heater_pin = "PE4"; heater_pin = "PE4";
@ -74,7 +76,7 @@ in
control = "pid"; control = "pid";
pid_Kp = 12.33; pid_Kp = 12.33;
pid_Ki = 0.51; pid_Ki = 0.51;
pid_Kd = 74.50; pid_Kd = 74.5;
min_temp = 0; min_temp = 0;
max_temp = 250; max_temp = 250;
max_extrude_cross_section = 5; max_extrude_cross_section = 5;
@ -169,6 +171,5 @@ in
hostName = config.networking.hostName; hostName = config.networking.hostName;
}; };
}; };
}; };
} }

View file

@ -1,10 +1,17 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.eboskma.libvirtd; cfg = config.eboskma.libvirtd;
in in
{ {
options.eboskma.libvirtd = { enable = mkEnableOption "libvirtd"; }; options.eboskma.libvirtd = {
enable = mkEnableOption "libvirtd";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
virtualisation.libvirtd = { virtualisation.libvirtd = {

View file

@ -1,8 +1,6 @@
{ config { config, lib, ... }:
, lib with lib;
, ... let
}:
with lib; let
cfg = config.eboskma.livebook; cfg = config.eboskma.livebook;
in in
{ {
@ -25,9 +23,7 @@ in
livebook = { livebook = {
autoStart = true; autoStart = true;
image = "livebook/livebook"; image = "livebook/livebook";
environmentFiles = [ environmentFiles = [ config.sops.secrets.livebook-password.path ];
config.sops.secrets.livebook-password.path
];
ports = [ ports = [
"8080:8080" "8080:8080"
"8081:8081" "8081:8081"

View file

@ -5,7 +5,9 @@ let
vars = config.eboskma.var; vars = config.eboskma.var;
in in
{ {
options.eboskma.lxd = { enable = mkEnableOption "lxd"; }; options.eboskma.lxd = {
enable = mkEnableOption "lxd";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
virtualisation.lxd = { virtualisation.lxd = {

View file

@ -4,7 +4,9 @@ let
cfg = config.eboskma.services.minio; cfg = config.eboskma.services.minio;
in in
{ {
options.eboskma.services.minio = { enable = mkEnableOption "minio"; }; options.eboskma.services.minio = {
enable = mkEnableOption "minio";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.minio = { services.minio = {
@ -15,6 +17,9 @@ in
rootCredentialsFile = config.sops.secrets.minio-root-credentials.path; rootCredentialsFile = config.sops.secrets.minio-root-credentials.path;
}; };
networking.firewall.allowedTCPPorts = [ 9000 9001 ]; networking.firewall.allowedTCPPorts = [
9000
9001
];
}; };
} }

View file

@ -1,9 +1,11 @@
{ pkgs {
, config pkgs,
, lib config,
, ... lib,
...
}: }:
with lib; let with lib;
let
cfg = config.eboskma.networking; cfg = config.eboskma.networking;
in in
{ {

View file

@ -1,12 +1,12 @@
{ config { config, lib, ... }:
, lib with lib;
, ... let
}:
with lib; let
cfg = config.eboskma.nginx-proxy-manager; cfg = config.eboskma.nginx-proxy-manager;
in in
{ {
options.eboskma.nginx-proxy-manager = { enable = mkEnableOption "Nginx Proxy Manager"; }; options.eboskma.nginx-proxy-manager = {
enable = mkEnableOption "Nginx Proxy Manager";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
virtualisation.docker = { virtualisation.docker = {

Some files were not shown because too many files have changed in this diff Show more