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
, config
, ...
{
lib,
pkgs,
config,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.programs.alacritty;
importYAML = name: yamlFile: (lib.importJSON ((pkgs.runCommandNoCC name { } ''
mkdir -p $out
${pkgs.yaml2json}/bin/yaml2json < ${yamlFile} | ${pkgs.jq}/bin/jq -a '.' > $out/tmp.json
'').outPath
+ "/tmp.json"));
theme = importYAML "theme" (builtins.fetchurl {
url = "https://raw.githubusercontent.com/dracula/alacritty/77aff04b9f2651eac10e5cfa80a3d85ce43e7985/dracula.yml";
sha256 = "NoEBy8cUs6KDfougzAIcuX9oSAltO7y9OOeXJbSQKrY=";
});
importYAML =
name: yamlFile:
(lib.importJSON (
(pkgs.runCommandNoCC name { } ''
mkdir -p $out
${pkgs.yaml2json}/bin/yaml2json < ${yamlFile} | ${pkgs.jq}/bin/jq -a '.' > $out/tmp.json
'').outPath
+ "/tmp.json"
));
theme = importYAML "theme" (
builtins.fetchurl {
url = "https://raw.githubusercontent.com/dracula/alacritty/77aff04b9f2651eac10e5cfa80a3d85ce43e7985/dracula.yml";
sha256 = "NoEBy8cUs6KDfougzAIcuX9oSAltO7y9OOeXJbSQKrY=";
}
);
in
{
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;
let
cfg = config.eboskma.programs.anyrun;
anyrunPkgs = flake-inputs.anyrun.packages."${pkgs.system}";
in
{
options.eboskma.programs.anyrun = { enable = mkEnableOption "anyrun"; };
options.eboskma.programs.anyrun = {
enable = mkEnableOption "anyrun";
};
config = mkIf cfg.enable {
programs.anyrun = {
@ -20,9 +28,15 @@ in
symbols
translate
];
width = { fraction = 0.3; };
x = { fraction = 0.5; };
y = { absolute = 60; };
width = {
fraction = 0.3;
};
x = {
fraction = 0.5;
};
y = {
absolute = 60;
};
layer = "overlay";
};

View file

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

View file

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

View file

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

View file

@ -1,13 +1,17 @@
{ pkgs
, lib
, config
, ...
{
pkgs,
lib,
config,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.programs.dropbox;
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 {
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
, lib
, ...
{
pkgs,
config,
lib,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.programs.dunst;
in
{

View file

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

View file

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

View file

@ -1,9 +1,11 @@
{ pkgs
, config
, lib
, ...
{
pkgs,
config,
lib,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.programs.firefox;
profileSettings = {
@ -24,31 +26,16 @@ with lib; let
};
nonDefaultDesktop = pkgs.makeDesktopItem {
name =
"firefox-"
+ (
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";
name = "firefox-" + (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";
categories = [ "GNOME" "GTK" "Network" "WebBrowser" ];
categories = [
"GNOME"
"GTK"
"Network"
"WebBrowser"
];
mimeTypes = [
"text/html"
"text/xml"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,18 +2,17 @@
with lib;
let
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
# 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 {
# wayland.windowManager.hyprland = {

View file

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

View file

@ -1,13 +1,17 @@
{ pkgs
, config
, lib
, ...
{
pkgs,
config,
lib,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.programs.mpd;
in
{
options.eboskma.programs.mpd = { enable = mkEnableOption "mpd"; };
options.eboskma.programs.mpd = {
enable = mkEnableOption "mpd";
};
config = mkIf cfg.enable {
services.mpd = {
@ -28,6 +32,9 @@ in
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
, config
, ...
{
lib,
pkgs,
config,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.programs.neovim;
in
{
options.eboskma.programs.neovim = { enable = mkEnableOption "neovim"; };
options.eboskma.programs.neovim = {
enable = mkEnableOption "neovim";
};
config = mkIf cfg.enable {
# 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 = {
source = ./config;

View file

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

View file

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

View file

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

View file

@ -1,27 +1,30 @@
{ lib
, pkgs
, config
, ...
{
lib,
pkgs,
config,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.programs.obs-studio;
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 {
programs.obs-studio = {
enable = true;
plugins = [
pkgs.obs-backgroundremoval
]
++ (with pkgs.obs-studio-plugins; [
wlrobs
obs-vaapi
obs-gstreamer
obs-pipewire-audio-capture
obs-vkcapture
]);
plugins =
[ pkgs.obs-backgroundremoval ]
++ (with pkgs.obs-studio-plugins; [
wlrobs
obs-vaapi
obs-gstreamer
obs-pipewire-audio-capture
obs-vkcapture
]);
};
};
}

View file

@ -1,12 +1,12 @@
{ config
, lib
, ...
}:
with lib; let
{ config, lib, ... }:
with lib;
let
cfg = config.eboskma.programs.picom;
in
{
options.eboskma.programs.picom = { enable = mkEnableOption "activate picom"; };
options.eboskma.programs.picom = {
enable = mkEnableOption "activate picom";
};
config = mkIf cfg.enable {
# home.packages = [pkgs.nixgl.auto.nixGLDefault];
@ -18,7 +18,10 @@ in
vSync = true;
fade = false;
fadeSteps = [ 0.08 0.08 ];
fadeSteps = [
8.0e-2
8.0e-2
];
shadow = true;
@ -54,10 +57,20 @@ in
inactive-dim = 0.1;
wintypes = {
dock = { shadow = false; };
dnd = { shadow = false; };
popup_menu = { shadow = false; opacity = 1.0; };
dropdown_menu = { shadow = false; opacity = 1.0; };
dock = {
shadow = false;
};
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
, lib
, ...
{
pkgs,
config,
lib,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.programs.polybar;
colors = {
@ -14,9 +16,7 @@ with lib; let
polybar-playerctl =
let
pythonWithPackages = pkgs.python3.withPackages (pythonPackages: [
pythonPackages.pygobject3
]);
pythonWithPackages = pkgs.python3.withPackages (pythonPackages: [ pythonPackages.pygobject3 ]);
in
pkgs.stdenv.mkDerivation {
name = "polybar-playerctl";
@ -68,7 +68,9 @@ with lib; let
'';
in
{
options.eboskma.programs.polybar = { enable = mkEnableOption "activate polybar"; };
options.eboskma.programs.polybar = {
enable = mkEnableOption "activate polybar";
};
config = mkIf cfg.enable {
# systemd.user.services.polybar = {
@ -107,7 +109,7 @@ in
};
"bar/main" = {
monitor = ''''${env:MONITOR:DP-0}'';
monitor = "\${env:MONITOR:DP-0}";
fixed.center = true;
width = "100%";
height = 48;
@ -307,7 +309,11 @@ in
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";
};

View file

@ -1,9 +1,15 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
with lib;
let
cfg = config.eboskma.programs.rclone;
rcloneConnectionString = mount:
rcloneConnectionString =
mount:
let
type = mount.remoteConfig.type;
config = builtins.removeAttrs mount.remoteConfig [ "type" ];
@ -11,24 +17,34 @@ let
in
":${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 {
options = {
remoteConfig = mkOption {
description = "Configuration for the remote to use";
type = rcloneRemote;
};
remote = mkOption {
description = "Remote path";
type = str;
};
local = mkOption {
description = "Local mountpoint";
type = path;
rcloneMount =
with types;
submodule {
options = {
remoteConfig = mkOption {
description = "Configuration for the remote to use";
type = rcloneRemote;
};
remote = mkOption {
description = "Remote path";
type = str;
};
local = mkOption {
description = "Local mountpoint";
type = path;
};
};
};
};
in
{
options.eboskma.programs.rclone = {
@ -44,36 +60,40 @@ in
config = mkIf cfg.enable {
home.packages = [ pkgs.rclone ];
systemd.user.services = builtins.listToAttrs (builtins.map
(mount:
let
localPath = toString mount.local;
unitName = builtins.replaceStrings [ "/" ] [ "-" ] (builtins.substring 1 (builtins.stringLength localPath) localPath);
in
{
name = "rclone-${unitName}";
value = {
Unit = {
Description = "rclone mount ${unitName}";
After = [ "network.target" ];
AssertPathIsDirectory = toString mount.local;
};
systemd.user.services = builtins.listToAttrs (
builtins.map
(
mount:
let
localPath = toString mount.local;
unitName = builtins.replaceStrings [ "/" ] [ "-" ] (
builtins.substring 1 (builtins.stringLength localPath) localPath
);
in
{
name = "rclone-${unitName}";
value = {
Unit = {
Description = "rclone mount ${unitName}";
After = [ "network.target" ];
AssertPathIsDirectory = toString mount.local;
};
Service = {
Environment = [
"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}";
Restart = "on-failure";
RestartSec = 10;
};
Service = {
Environment = [ "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}";
Restart = "on-failure";
RestartSec = 10;
};
Install = {
WantedBy = [ "default.target" ];
Install = {
WantedBy = [ "default.target" ];
};
};
};
})
cfg.mounts);
}
)
cfg.mounts
);
};
}

View file

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

View file

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

View file

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

View file

@ -1,14 +1,19 @@
{ lib
, pkgs
, config
, ...
{
lib,
pkgs,
config,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.programs.sway;
mod = "Mod4";
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"
(builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString cfg.lock-wallpaper) ] (builtins.readFile ./powermenu.sh));
rofiPower = pkgs.writeShellScriptBin "rofi-power" (
builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString cfg.lock-wallpaper) ] (
builtins.readFile ./powermenu.sh
)
);
in
{
options.eboskma.programs.sway = {
@ -31,38 +36,42 @@ in
};
startup = mkOption {
description = "Commands that should be executed at startup.";
type = types.listOf (types.submodule {
options = {
command = mkOption {
type = types.str;
description = "Command that will be executed on startup.";
};
type = types.listOf (
types.submodule {
options = {
command = mkOption {
type = types.str;
description = "Command that will be executed on startup.";
};
always = mkOption {
type = types.bool;
default = false;
description = "Whether to run command on each ${moduleName} restart.";
always = mkOption {
type = types.bool;
default = false;
description = "Whether to run command on each ${moduleName} restart.";
};
};
};
});
}
);
};
workspaceOutputs = mkOption {
description = "Assign workspaces to outputs";
type = types.listOf (types.submodule {
options = {
output = mkOption {
description = "Name(s) of the output to assign";
type = with types; either str (listOf str);
apply = lists.toList;
default = "";
type = types.listOf (
types.submodule {
options = {
output = mkOption {
description = "Name(s) of the output to assign";
type = with types; either str (listOf str);
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 = [ ];
};
@ -80,9 +89,12 @@ in
modifier = mod;
assigns = {
"1" = [{ app_id = "firefox"; }];
"2" = [{ app_id = "foot"; }];
"3" = [{ class = "Code"; } { app_id = "emacs"; }];
"1" = [ { app_id = "firefox"; } ];
"2" = [ { app_id = "foot"; } ];
"3" = [
{ class = "Code"; }
{ app_id = "emacs"; }
];
};
bars = [ ];
@ -136,7 +148,7 @@ in
right = "o";
floating = {
criteria = [{ app_id = "gnome-calculator"; }];
criteria = [ { app_id = "gnome-calculator"; } ];
modifier = mod;
};
@ -233,9 +245,9 @@ in
"${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}+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+Alt+Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\"";
"${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+Alt+Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"'';
"XF86AudioRaiseVolume" = "exec ${pkgs.pamedia}/bin/pamedia up";
"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}+Shift+d" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait";
} // cfg.extraKeybindings;
modes = {

View file

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

View file

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

View file

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

View file

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

View file

@ -1,19 +1,30 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
with lib;
let
cfg = config.eboskma.wallpapers;
i3SetWallpaper = pkgs.writeShellScript "i3-set-wallpaper" (if builtins.isPath cfg.images then
''${pkgs.nitrogen}/bin/nitrogen --set-color=${cfg.backgroundColor} --set-tiled ${cfg.images}''
else
builtins.concatStringsSep "\n" (map
({ fst, snd }:
let
image = fst;
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)))));
i3SetWallpaper = pkgs.writeShellScript "i3-set-wallpaper" (
if builtins.isPath cfg.images then
"${pkgs.nitrogen}/bin/nitrogen --set-color=${cfg.backgroundColor} --set-tiled ${cfg.images}"
else
builtins.concatStringsSep "\n" (
map
(
{ fst, snd }:
let
image = fst;
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 = {
options = {
@ -29,7 +40,11 @@ let
extension = mkOption {
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
, config
, ...
{
lib,
pkgs,
config,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.programs.waybar;
in
{
@ -92,7 +94,7 @@ in
};
"sway/mode" = {
format = "<span style=\"italic\">󰁌 {}</span>"; # Icon: arrow_expand_all
format = ''<span style="italic">󰁌 {}</span>''; # Icon: arrow_expand_all
tooltip = false;
};
@ -149,7 +151,11 @@ in
phone = ""; # Icon: phone
portable = ""; # Icon: phone
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-middle = "${pkgs.helvum}/bin/helvum";
@ -176,7 +182,7 @@ in
spacing = 10;
};
"idle_inhibitor" = {
format = "<span size=\"large\">{icon}</span>";
format = ''<span size="large">{icon}</span>'';
format-icons = {
activated = "󰛐";
deactivated = "󰛑";

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ self, ... } @ inputs:
{ self, ... }@inputs:
{ modulesPath, lib, ... }:
# let
# pkgs = self.inputs.nixpkgs.legacyPackages.x86_64-linux;
@ -42,16 +42,34 @@
interfaces = {
eth0 = {
ipv4.addresses = [
{ address = "159.69.211.175"; prefixLength = 32; }
{
address = "159.69.211.175";
prefixLength = 32;
}
];
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;
loader.grub.device = "/dev/sda";
initrd = {
availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
availableKernelModules = [
"ata_piix"
"uhci_hcd"
"xen_blkfront"
"vmw_pvscsi"
];
kernelModules = [ "nvme" ];
};
};
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
zramSwap.enable = true;
### END Hetzner stuff
@ -79,7 +105,6 @@
ATTR{address}=="96:00:02:12:a2:eb", NAME="eth0"
'';
openssh = {
enable = true;
settings = {

View file

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

View file

@ -1,4 +1,9 @@
{ nixos-hardware, nix-ld-rs, attic, ... }:
{
nixos-hardware,
nix-ld-rs,
attic,
...
}:
{ pkgs, config, ... }:
{
imports = [
@ -72,7 +77,6 @@
systemd.enable = true;
};
fileSystems = {
"/" = {
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
# hardware.video.hidpi.enable = lib.mkDefault true;
@ -102,11 +106,23 @@
hardware.i2c.enable = true;
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 = [ ];
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" ];
extraModulePackages = with config.boot.kernelPackages; [
cpupower
@ -136,7 +152,10 @@
};
firewall = {
trustedInterfaces = [ "lo" "tailscale0" ];
trustedInterfaces = [
"lo"
"tailscale0"
];
allowedTCPPorts = [
# NFS
111
@ -181,21 +200,32 @@
allowedTCPPortRanges = [
# Sunshine
{ from = 47984; to = 47990; }
{
from = 47984;
to = 47990;
}
# Sonos / noson
{ from = 1400; to = 1410; }
{
from = 1400;
to = 1410;
}
];
allowedUDPPortRanges = [
# Sunshine
{ from = 47998; to = 48000; }
{
from = 47998;
to = 48000;
}
# Sonos / noson / pulseaudio
{ from = 1400; to = 1410; }
{
from = 1400;
to = 1410;
}
];
};
};
security = {
sudo-rs = {
enable = true;
@ -229,7 +259,12 @@
{
wireguardPeerConfig = {
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";
PersistentKeepalive = 25;
};
@ -260,20 +295,20 @@
networkConfig = {
DHCP = "no";
DNS = "192.168.4.1";
Domains = [ "bedum.horus.nu" "internal.horus.nu" ];
Domains = [
"bedum.horus.nu"
"internal.horus.nu"
];
};
address = [
"10.10.4.2/24"
];
address = [ "10.10.4.2/24" ];
routes = [
{
routeConfig =
{
Destination = "192.168.4.0/23";
Scope = "link";
};
routeConfig = {
Destination = "192.168.4.0/23";
Scope = "link";
};
}
{
routeConfig = {
@ -282,18 +317,16 @@
};
}
{
routeConfig =
{
Destination = "192.168.7.0/24";
Scope = "link";
};
routeConfig = {
Destination = "192.168.7.0/24";
Scope = "link";
};
}
{
routeConfig =
{
Destination = "192.168.8.0/24";
Scope = "link";
};
routeConfig = {
Destination = "192.168.8.0/24";
Scope = "link";
};
}
];
};

View file

@ -1,4 +1,9 @@
{ pkgs, config, inputs, ... }:
{
pkgs,
config,
inputs,
...
}:
let
mkK3sNode = name: isServer: ipv4Address: ipv6Address: macAddress: {
config = {
@ -36,11 +41,13 @@ let
}
];
interfaces = [{
type = "tap";
id = "vm-${name}";
mac = macAddress;
}];
interfaces = [
{
type = "tap";
id = "vm-${name}";
mac = macAddress;
}
];
hypervisor = "cloud-hypervisor";
};
@ -56,10 +63,12 @@ let
openssh = {
enable = true;
hostKeys = [{
type = "ed25519";
path = "/etc/ssh/ssh_host_ed25519_key";
}];
hostKeys = [
{
type = "ed25519";
path = "/etc/ssh/ssh_host_ed25519_key";
}
];
};
};
@ -115,9 +124,7 @@ in
{ addressConfig.Address = "10.128.0.1/24"; }
{ addressConfig.Address = "fd12:3456:789a::1/64"; }
];
ipv6Prefixes = [
{ ipv6PrefixConfig.Prefix = "fd12:3456:789a::/64"; }
];
ipv6Prefixes = [ { ipv6PrefixConfig.Prefix = "fd12:3456:789a::/64"; } ];
};
networks."11-microvm" = {
@ -133,14 +140,41 @@ in
internalInterfaces = [ "microvm" ];
forwardPorts = [
{ proto = "tcp"; sourcePort = 6443; destination = "10.128.0.2: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"; }
{
proto = "tcp";
sourcePort = 6443;
destination = "10.128.0.2: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, ... }:
{
imports =
[
# Include the results of the hardware scan.
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-cpu-amd-pstate
nixos-hardware.nixosModules.common-pc-ssd
imports = [
# Include the results of the hardware scan.
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-cpu-amd-pstate
nixos-hardware.nixosModules.common-pc-ssd
microvm.nixosModules.host
attic.nixosModules.atticd
microvm.nixosModules.host
attic.nixosModules.atticd
../../users/erwin
../../users/root
];
../../users/erwin
../../users/root
];
# nixpkgs.config.allowUnfree = true;
@ -75,9 +80,7 @@
};
kanata = {
enable = true;
devices = [
"/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd"
];
devices = [ "/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd" ];
};
lightdm.enable = false;
networking.enable = true;
@ -112,9 +115,7 @@
};
};
swapDevices =
[{ device = "/dev/disk/by-label/swap"; }];
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
hardware = {
enableAllFirmware = true;
@ -126,23 +127,34 @@
opengl = {
driSupport32Bit = true;
extraPackages = with pkgs; [
vaapiVdpau
];
extraPackages = with pkgs; [ vaapiVdpau ];
};
};
# Use the systemd-boot EFI boot loader.
boot = {
kernelPackages = pkgs.linuxPackages_latest;
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 = [ "kvm-amd" "apple-mfi-fastcharge" "zenpower" ];
kernelModules = [
"kvm-amd"
"apple-mfi-fastcharge"
"zenpower"
];
# boot.kernelParams = [ "amd_pstate.shared_mem=1" ];
extraModulePackages = with config.boot.kernelPackages; [ zenpower cpupower ];
extraModulePackages = with config.boot.kernelPackages; [
zenpower
cpupower
];
loader = {
systemd-boot = {
enable = true;
@ -170,7 +182,10 @@
nftables.enable = true;
firewall = {
trustedInterfaces = [ "lo" "tailscale0" ];
trustedInterfaces = [
"lo"
"tailscale0"
];
allowedTCPPorts = [
# Horus System V2
@ -193,9 +208,7 @@
};
};
microvm.autostart = [
"miniflux"
];
microvm.autostart = [ "miniflux" ];
powerManagement = {
cpuFreqGovernor = "ondemand";
@ -266,9 +279,7 @@
Name = "microvm";
};
addresses = [
{ addressConfig.Address = "172.16.0.1/24"; }
];
addresses = [ { addressConfig.Address = "172.16.0.1/24"; } ];
};
"11-microvm" = {
@ -395,9 +406,7 @@
};
environment = {
systemPackages = with pkgs; [
appimage-run
];
systemPackages = with pkgs; [ appimage-run ];
sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
@ -421,5 +430,4 @@
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.11"; # Did you read the comment?
}

View file

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

View file

@ -1,5 +1,6 @@
{ self, ... }:
{ modulesPath, ... }: {
{ modulesPath, ... }:
{
imports = [
(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 = [
(modulesPath + "/virtualisation/lxc-container.nix")
attic.nixosModules.atticd
@ -33,7 +45,10 @@
trustedInterfaces = [ "tailscale0" ];
allowPing = true;
allowedTCPPorts = [ 80 443 ];
allowedTCPPorts = [
80
443
];
};
};
@ -155,5 +170,4 @@
};
system.stateVersion = "24.05";
}

View file

@ -1,4 +1,9 @@
{ nixos-hardware, disko, nix-ld-rs, ... }:
{
nixos-hardware,
disko,
nix-ld-rs,
...
}:
{ pkgs, config, ... }:
{
imports = [
@ -41,7 +46,6 @@
sudo.enable = false;
};
boot = {
loader = {
systemd-boot = {
@ -52,12 +56,26 @@
};
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" ];
};
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
# 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 = {
data = {
size = "100%FREE";
extraArgs = [
"--type=thin-pool"
];
extraArgs = [ "--type=thin-pool" ];
};
};
};

View file

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

View file

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

View file

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

View file

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

View file

@ -79,9 +79,7 @@
keyboards = {
code = {
devices = [
"/dev/input/by-id/usb-04d9_USB_Keyboard-event-kbd"
];
devices = [ "/dev/input/by-id/usb-04d9_USB_Keyboard-event-kbd" ];
config = ''
(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;
in
{
@ -46,28 +53,27 @@ in
stateVersion = "23.05";
packages = with pkgs;
[
atool
bottom
falkon
fd
gnome.nautilus
imagemagick
imv
iotop
libnotify
mpv
nordzy-cursor-theme
quintom-cursor-theme
procs
ripgrep
units
unzip
xdg-utils
wl-clipboard
zeal
];
packages = with pkgs; [
atool
bottom
falkon
fd
gnome.nautilus
imagemagick
imv
iotop
libnotify
mpv
nordzy-cursor-theme
quintom-cursor-theme
procs
ripgrep
units
unzip
xdg-utils
wl-clipboard
zeal
];
};
xdg = {
@ -106,7 +112,11 @@ in
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-gtk fcitx5-configtool ];
fcitx5.addons = with pkgs; [
fcitx5-m17n
fcitx5-gtk
fcitx5-configtool
];
};
gtk = {
@ -122,9 +132,7 @@ in
};
gtk3 = {
bookmarks = [
"file:///home/erwin/workspace"
];
bookmarks = [ "file:///home/erwin/workspace" ];
extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-cursor-theme-name = "Nordzy-cursors";
@ -142,10 +150,14 @@ in
command-not-found.enable = true;
};
imports = [
../../modules/options
inputs.anyrun.nixosModules.home-manager
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
imports =
[
../../modules/options
inputs.anyrun.nixosModules.home-manager
]
++ (map (mod: (../../home-manager/modules + "/${mod}")) (
builtins.attrNames (builtins.readDir ../../home-manager/modules)
));
};
programs.bandwhich.enable = true;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,9 +1,11 @@
{ lib
, pkgs
, config
, ...
{
lib,
pkgs,
config,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.fonts;
iosevka-buildplans = builtins.fromTOML (builtins.readFile "${pkgs.iosevka.src}/build-plans.toml");
@ -26,18 +28,27 @@ in
fonts = {
fontDir.enable = true;
packages = with pkgs; [
(nerdfonts.override { fonts = [ "Iosevka" "Meslo" "Noto" ]; })
corefonts
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;
packages =
with pkgs;
[
(nerdfonts.override {
fonts = [
"Iosevka"
"Meslo"
"Noto"
];
})
corefonts
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 = {
defaultFonts = {

View file

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

View file

@ -1,9 +1,11 @@
{ pkgs
, config
, lib
, ...
{
pkgs,
config,
lib,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.greetd;
steamCfg = config.programs.steam;
@ -15,7 +17,9 @@ with lib; let
steam-gamescope =
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
pkgs.writeShellScriptBin "steam-gamescope" ''
${builtins.concatStringsSep "\n" exports}
@ -55,107 +59,116 @@ in
};
};
config =
mkIf cfg.enable
{
services.greetd = {
enable = true;
restart = true;
settings = {
default_session = {
command = "${pkgs.sway}/bin/sway --unsupported-gpu --config /etc/greetd/sway-config";
config = mkIf cfg.enable {
services.greetd = {
enable = true;
restart = true;
settings = {
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";
};
};
};
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" = {
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;
let
cfg = config.eboskma.headscale;
@ -69,7 +74,10 @@ in
security.acme.acceptTerms = true;
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedTCPPorts = [
80
443
];
environment.systemPackages = [ pkgs.headscale ];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -4,7 +4,9 @@ let
cfg = config.eboskma.services.minio;
in
{
options.eboskma.services.minio = { enable = mkEnableOption "minio"; };
options.eboskma.services.minio = {
enable = mkEnableOption "minio";
};
config = mkIf cfg.enable {
services.minio = {
@ -15,6 +17,9 @@ in
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
, lib
, ...
{
pkgs,
config,
lib,
...
}:
with lib; let
with lib;
let
cfg = config.eboskma.networking;
in
{

View file

@ -1,12 +1,12 @@
{ config
, lib
, ...
}:
with lib; let
{ config, lib, ... }:
with lib;
let
cfg = config.eboskma.nginx-proxy-manager;
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 {
virtualisation.docker = {

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