diff --git a/home-manager/modules/alacritty/default.nix b/home-manager/modules/alacritty/default.nix
index 47f2eab..e298c32 100644
--- a/home-manager/modules/alacritty/default.nix
+++ b/home-manager/modules/alacritty/default.nix
@@ -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";
diff --git a/home-manager/modules/anyrun/default.nix b/home-manager/modules/anyrun/default.nix
index fe07892..4b05af9 100644
--- a/home-manager/modules/anyrun/default.nix
+++ b/home-manager/modules/anyrun/default.nix
@@ -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";
};
diff --git a/home-manager/modules/atuin/default.nix b/home-manager/modules/atuin/default.nix
index 3936237..077dc4d 100644
--- a/home-manager/modules/atuin/default.nix
+++ b/home-manager/modules/atuin/default.nix
@@ -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";
diff --git a/home-manager/modules/bat/default.nix b/home-manager/modules/bat/default.nix
index f4c43a2..76c9503 100644
--- a/home-manager/modules/bat/default.nix
+++ b/home-manager/modules/bat/default.nix
@@ -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)" ];
};
};
};
diff --git a/home-manager/modules/cargo/default.nix b/home-manager/modules/cargo/default.nix
index 396b84e..bee82b5 100644
--- a/home-manager/modules/cargo/default.nix
+++ b/home-manager/modules/cargo/default.nix
@@ -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 = {
diff --git a/home-manager/modules/dropbox/default.nix b/home-manager/modules/dropbox/default.nix
index 2d2ec1e..4b72491 100644
--- a/home-manager/modules/dropbox/default.nix
+++ b/home-manager/modules/dropbox/default.nix
@@ -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
+ ];
};
}
diff --git a/home-manager/modules/dunst/default.nix b/home-manager/modules/dunst/default.nix
index 3fba4ee..b9fb2f0 100644
--- a/home-manager/modules/dunst/default.nix
+++ b/home-manager/modules/dunst/default.nix
@@ -1,9 +1,11 @@
-{ pkgs
-, config
-, lib
-, ...
+{
+ pkgs,
+ config,
+ lib,
+ ...
}:
-with lib; let
+with lib;
+let
cfg = config.eboskma.programs.dunst;
in
{
diff --git a/home-manager/modules/electron/default.nix b/home-manager/modules/electron/default.nix
index d2c4c73..9662b7d 100644
--- a/home-manager/modules/electron/default.nix
+++ b/home-manager/modules/electron/default.nix
@@ -1,8 +1,6 @@
-{ config
-, lib
-, ...
-}:
-with lib; let
+{ config, lib, ... }:
+with lib;
+let
cfg = config.eboskma.programs.electron;
in
{
diff --git a/home-manager/modules/emacs/default.nix b/home-manager/modules/emacs/default.nix
index 9227906..14c04e7 100644
--- a/home-manager/modules/emacs/default.nix
+++ b/home-manager/modules/emacs/default.nix
@@ -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
+ ]);
};
}
diff --git a/home-manager/modules/eww/default.nix b/home-manager/modules/eww/default.nix
index 0d9c2b7..2f32506 100644
--- a/home-manager/modules/eww/default.nix
+++ b/home-manager/modules/eww/default.nix
@@ -1,4 +1,9 @@
-{ pkgs, config, lib, ... }:
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}:
with lib;
let
cfg = config.eboskma.programs.eww;
diff --git a/home-manager/modules/firefox/default.nix b/home-manager/modules/firefox/default.nix
index f323032..a7b41c0 100644
--- a/home-manager/modules/firefox/default.nix
+++ b/home-manager/modules/firefox/default.nix
@@ -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"
diff --git a/home-manager/modules/fish/default.nix b/home-manager/modules/fish/default.nix
index f70da30..e4dacab 100644
--- a/home-manager/modules/fish/default.nix
+++ b/home-manager/modules/fish/default.nix
@@ -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 = {
diff --git a/home-manager/modules/fish/functions.nix b/home-manager/modules/fish/functions.nix
index 19ae5ff..24b1812 100644
--- a/home-manager/modules/fish/functions.nix
+++ b/home-manager/modules/fish/functions.nix
@@ -1,4 +1,5 @@
-{ git, coreutils }: {
+{ git, coreutils }:
+{
mark_prompt_start = {
onEvent = "fish_prompt";
body = ''
diff --git a/home-manager/modules/foot/default.nix b/home-manager/modules/foot/default.nix
index 4df0b4e..c27f614 100644
--- a/home-manager/modules/foot/default.nix
+++ b/home-manager/modules/foot/default.nix
@@ -1,5 +1,11 @@
-{ pkgs, lib, config, ... }:
-with lib; let
+{
+ pkgs,
+ lib,
+ config,
+ ...
+}:
+with lib;
+let
cfg = config.eboskma.programs.foot;
in
{
diff --git a/home-manager/modules/git/default.nix b/home-manager/modules/git/default.nix
index f505a19..4d91978 100644
--- a/home-manager/modules/git/default.nix
+++ b/home-manager/modules/git/default.nix
@@ -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";
};
};
diff --git a/home-manager/modules/gpg/default.nix b/home-manager/modules/gpg/default.nix
index 0aa2d86..47826a1 100644
--- a/home-manager/modules/gpg/default.nix
+++ b/home-manager/modules/gpg/default.nix
@@ -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;
diff --git a/home-manager/modules/hyprland/default.nix b/home-manager/modules/hyprland/default.nix
index 2a08949..8712c5b 100644
--- a/home-manager/modules/hyprland/default.nix
+++ b/home-manager/modules/hyprland/default.nix
@@ -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 = {
diff --git a/home-manager/modules/i3/default.nix b/home-manager/modules/i3/default.nix
index 2530b47..a6df14e 100644
--- a/home-manager/modules/i3/default.nix
+++ b/home-manager/modules/i3/default.nix
@@ -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 ];
};
};
}
diff --git a/home-manager/modules/mpd/default.nix b/home-manager/modules/mpd/default.nix
index 34e6925..f2990a7 100644
--- a/home-manager/modules/mpd/default.nix
+++ b/home-manager/modules/mpd/default.nix
@@ -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; })
+ ];
};
}
diff --git a/home-manager/modules/neovim/default.nix b/home-manager/modules/neovim/default.nix
index b7be793..6b16930 100644
--- a/home-manager/modules/neovim/default.nix
+++ b/home-manager/modules/neovim/default.nix
@@ -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;
diff --git a/home-manager/modules/nnn/default.nix b/home-manager/modules/nnn/default.nix
index 0f0d3ab..d1d28c1 100644
--- a/home-manager/modules/nnn/default.nix
+++ b/home-manager/modules/nnn/default.nix
@@ -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";
diff --git a/home-manager/modules/nushell/default.nix b/home-manager/modules/nushell/default.nix
index fc68e8c..d281955 100644
--- a/home-manager/modules/nushell/default.nix
+++ b/home-manager/modules/nushell/default.nix
@@ -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 = {
diff --git a/home-manager/modules/nyxt/default.nix b/home-manager/modules/nyxt/default.nix
index 4636931..8a705bc 100644
--- a/home-manager/modules/nyxt/default.nix
+++ b/home-manager/modules/nyxt/default.nix
@@ -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";
diff --git a/home-manager/modules/obs-studio/default.nix b/home-manager/modules/obs-studio/default.nix
index 43565bf..3e7d138 100644
--- a/home-manager/modules/obs-studio/default.nix
+++ b/home-manager/modules/obs-studio/default.nix
@@ -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
+ ]);
};
};
}
diff --git a/home-manager/modules/picom/default.nix b/home-manager/modules/picom/default.nix
index 660b5ed..76b3a7d 100644
--- a/home-manager/modules/picom/default.nix
+++ b/home-manager/modules/picom/default.nix
@@ -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;
+ };
};
};
};
diff --git a/home-manager/modules/polybar/default.nix b/home-manager/modules/polybar/default.nix
index 1705cf8..e5b50e3 100644
--- a/home-manager/modules/polybar/default.nix
+++ b/home-manager/modules/polybar/default.nix
@@ -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";
};
diff --git a/home-manager/modules/rclone/default.nix b/home-manager/modules/rclone/default.nix
index 1b4ba93..ceb6087 100644
--- a/home-manager/modules/rclone/default.nix
+++ b/home-manager/modules/rclone/default.nix
@@ -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
+ );
};
}
diff --git a/home-manager/modules/rofi/default.nix b/home-manager/modules/rofi/default.nix
index 47ad26a..cd9fe5c 100644
--- a/home-manager/modules/rofi/default.nix
+++ b/home-manager/modules/rofi/default.nix
@@ -1,9 +1,11 @@
-{ lib
-, pkgs
-, config
-, ...
+{
+ lib,
+ pkgs,
+ config,
+ ...
}:
-with lib; let
+with lib;
+let
cfg = config.eboskma.programs.rofi;
in
{
diff --git a/home-manager/modules/solvespace/default.nix b/home-manager/modules/solvespace/default.nix
index b3c81f0..0364b76 100644
--- a/home-manager/modules/solvespace/default.nix
+++ b/home-manager/modules/solvespace/default.nix
@@ -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 ]; };
}
diff --git a/home-manager/modules/starship/default.nix b/home-manager/modules/starship/default.nix
index 70fcf29..2e59f36 100644
--- a/home-manager/modules/starship/default.nix
+++ b/home-manager/modules/starship/default.nix
@@ -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 = {
diff --git a/home-manager/modules/sway/default.nix b/home-manager/modules/sway/default.nix
index ad14d50..9d49225 100644
--- a/home-manager/modules/sway/default.nix
+++ b/home-manager/modules/sway/default.nix
@@ -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 = {
diff --git a/home-manager/modules/swaynotificationcenter/default.nix b/home-manager/modules/swaynotificationcenter/default.nix
index ebc279c..7099015 100644
--- a/home-manager/modules/swaynotificationcenter/default.nix
+++ b/home-manager/modules/swaynotificationcenter/default.nix
@@ -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 ];
diff --git a/home-manager/modules/tea/default.nix b/home-manager/modules/tea/default.nix
index ff67d01..3abc965 100644
--- a/home-manager/modules/tea/default.nix
+++ b/home-manager/modules/tea/default.nix
@@ -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 = {
diff --git a/home-manager/modules/tmux/default.nix b/home-manager/modules/tmux/default.nix
index 31e55e3..7bbed20 100644
--- a/home-manager/modules/tmux/default.nix
+++ b/home-manager/modules/tmux/default.nix
@@ -1,9 +1,11 @@
-{ pkgs
-, config
-, lib
-, ...
+{
+ pkgs,
+ config,
+ lib,
+ ...
}:
-with lib; let
+with lib;
+let
cfg = config.eboskma.programs.tmux;
in
{
diff --git a/home-manager/modules/vscode/default.nix b/home-manager/modules/vscode/default.nix
index 9cf74c2..2d85622 100644
--- a/home-manager/modules/vscode/default.nix
+++ b/home-manager/modules/vscode/default.nix
@@ -1,9 +1,11 @@
-{ lib
-, pkgs
-, config
-, ...
+{
+ lib,
+ pkgs,
+ config,
+ ...
}:
-with lib; let
+with lib;
+let
cfg = config.eboskma.programs.vscode;
in
{
diff --git a/home-manager/modules/wallpapers/default.nix b/home-manager/modules/wallpapers/default.nix
index 846e0b6..cc2a823 100644
--- a/home-manager/modules/wallpapers/default.nix
+++ b/home-manager/modules/wallpapers/default.nix
@@ -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"
+ ];
};
};
};
diff --git a/home-manager/modules/waybar/default.nix b/home-manager/modules/waybar/default.nix
index d206fa6..03d6cfc 100644
--- a/home-manager/modules/waybar/default.nix
+++ b/home-manager/modules/waybar/default.nix
@@ -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 = " {}"; # Icon: arrow_expand_all
+ format = '' {}''; # 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 = "{icon}";
+ format = ''{icon}'';
format-icons = {
activated = "";
deactivated = "";
diff --git a/home-manager/modules/xbanish/default.nix b/home-manager/modules/xbanish/default.nix
index 4600ef8..fc560fb 100644
--- a/home-manager/modules/xbanish/default.nix
+++ b/home-manager/modules/xbanish/default.nix
@@ -1,4 +1,9 @@
-{ pkgs, config, lib, ... }:
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}:
with lib;
let
cfg = config.eboskma.services.xbanish;
diff --git a/home-manager/modules/zathura/default.nix b/home-manager/modules/zathura/default.nix
index 7363efe..cdb4f01 100644
--- a/home-manager/modules/zathura/default.nix
+++ b/home-manager/modules/zathura/default.nix
@@ -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 = {
diff --git a/home-manager/modules/zellij/default.nix b/home-manager/modules/zellij/default.nix
index f1dd357..d7e161d 100644
--- a/home-manager/modules/zellij/default.nix
+++ b/home-manager/modules/zellij/default.nix
@@ -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"
diff --git a/krops.nix b/krops.nix
index 5b02dfc..01e7639 100644
--- a/krops.nix
+++ b/krops.nix
@@ -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;
diff --git a/lib/default.nix b/lib/default.nix
index 0b93103..a3982c6 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -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
-
];
}
diff --git a/machines/ci/configuration.nix b/machines/ci/configuration.nix
index 067282a..18524fe 100644
--- a/machines/ci/configuration.nix
+++ b/machines/ci/configuration.nix
@@ -1,5 +1,6 @@
{ self, ... }:
-{ modulesPath, ... }: {
+{ modulesPath, ... }:
+{
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
../../users/root
diff --git a/machines/frigate/configuration.nix b/machines/frigate/configuration.nix
index e0f51e6..f1b9103 100644
--- a/machines/frigate/configuration.nix
+++ b/machines/frigate/configuration.nix
@@ -1,5 +1,6 @@
{ self, nixos-hardware, ... }:
-{ modulesPath, ... }: {
+{ modulesPath, ... }:
+{
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
diff --git a/machines/frigate/frigate/default.nix b/machines/frigate/frigate/default.nix
index 8af1dfd..cf919cc 100644
--- a/machines/frigate/frigate/default.nix
+++ b/machines/frigate/frigate/default.nix
@@ -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 ];
};
};
diff --git a/machines/gitea-runner/configuration.nix b/machines/gitea-runner/configuration.nix
index 98cae98..78af806 100644
--- a/machines/gitea-runner/configuration.nix
+++ b/machines/gitea-runner/configuration.nix
@@ -1,5 +1,6 @@
{ self, ... }:
-{ modulesPath, ... }: {
+{ modulesPath, ... }:
+{
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
diff --git a/machines/gitea-runner/gitea-runner/default.nix b/machines/gitea-runner/gitea-runner/default.nix
index 0d907c2..fa20097 100644
--- a/machines/gitea-runner/gitea-runner/default.nix
+++ b/machines/gitea-runner/gitea-runner/default.nix
@@ -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";
diff --git a/machines/gitea/backup.nix b/machines/gitea/backup.nix
index 171c07d..d3caf24 100644
--- a/machines/gitea/backup.nix
+++ b/machines/gitea/backup.nix
@@ -1,4 +1,9 @@
-{ pkgs, config, lib, ... }:
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}:
with lib;
let
borgJob = name: {
@@ -35,6 +40,5 @@ in
};
};
-
environment.systemPackages = [ pkgs.borgbackup ];
}
diff --git a/machines/gitea/configuration.nix b/machines/gitea/configuration.nix
index 2127be4..fed74e9 100644
--- a/machines/gitea/configuration.nix
+++ b/machines/gitea/configuration.nix
@@ -1,5 +1,6 @@
{ self, ... }:
-{ modulesPath, ... }: {
+{ modulesPath, ... }:
+{
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
diff --git a/machines/gitea/forgejo/default.nix b/machines/gitea/forgejo/default.nix
index bbbc85b..10af3ca 100644
--- a/machines/gitea/forgejo/default.nix
+++ b/machines/gitea/forgejo/default.nix
@@ -1,9 +1,11 @@
-{ pkgs
-, config
-, lib
-, ...
+{
+ pkgs,
+ config,
+ lib,
+ ...
}:
-with lib; let
+with lib;
+let
forgejoCfg = config.services.forgejo;
in
{
diff --git a/machines/heimdall/configuration.nix b/machines/heimdall/configuration.nix
index 2b373c8..5604ff1 100644
--- a/machines/heimdall/configuration.nix
+++ b/machines/heimdall/configuration.nix
@@ -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 = {
diff --git a/machines/k3s-test/configuration.nix b/machines/k3s-test/configuration.nix
index be66cab..995b9df 100644
--- a/machines/k3s-test/configuration.nix
+++ b/machines/k3s-test/configuration.nix
@@ -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 = { };
diff --git a/machines/loki/configuration.nix b/machines/loki/configuration.nix
index 3698520..ce9568c 100644
--- a/machines/loki/configuration.nix
+++ b/machines/loki/configuration.nix
@@ -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";
+ };
}
];
};
diff --git a/machines/loki/vm.nix b/machines/loki/vm.nix
index 3725e3c..2c96b00 100644
--- a/machines/loki/vm.nix
+++ b/machines/loki/vm.nix
@@ -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
+ ];
}
diff --git a/machines/mimir/configuration.nix b/machines/mimir/configuration.nix
index deea240..b50eac4 100644
--- a/machines/mimir/configuration.nix
+++ b/machines/mimir/configuration.nix
@@ -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?
-
}
diff --git a/machines/minio/backup.nix b/machines/minio/backup.nix
index e07c9b0..f8dddfd 100644
--- a/machines/minio/backup.nix
+++ b/machines/minio/backup.nix
@@ -1,4 +1,9 @@
-{ pkgs, config, lib, ... }:
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}:
with lib;
let
minioCfg = config.services.minio;
diff --git a/machines/minio/configuration.nix b/machines/minio/configuration.nix
index 1300d0b..b68b94f 100644
--- a/machines/minio/configuration.nix
+++ b/machines/minio/configuration.nix
@@ -1,5 +1,6 @@
{ self, ... }:
-{ modulesPath, ... }: {
+{ modulesPath, ... }:
+{
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
diff --git a/machines/nix-cache/configuration.nix b/machines/nix-cache/configuration.nix
index 074f7f4..880c963 100644
--- a/machines/nix-cache/configuration.nix
+++ b/machines/nix-cache/configuration.nix
@@ -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";
-
}
diff --git a/machines/odin/configuration.nix b/machines/odin/configuration.nix
index e325a50..6bb5585 100644
--- a/machines/odin/configuration.nix
+++ b/machines/odin/configuration.nix
@@ -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" ];
diff --git a/machines/odin/network.nix b/machines/odin/network.nix
index b718094..b3c7012 100644
--- a/machines/odin/network.nix
+++ b/machines/odin/network.nix
@@ -66,6 +66,5 @@
};
};
};
-
};
}
diff --git a/machines/odin/storage.nix b/machines/odin/storage.nix
index 123d740..d2c21ea 100644
--- a/machines/odin/storage.nix
+++ b/machines/odin/storage.nix
@@ -83,9 +83,7 @@
lvs = {
data = {
size = "100%FREE";
- extraArgs = [
- "--type=thin-pool"
- ];
+ extraArgs = [ "--type=thin-pool" ];
};
};
};
diff --git a/machines/odin/virtualisation.nix b/machines/odin/virtualisation.nix
index 56e7f5f..c253e1b 100644
--- a/machines/odin/virtualisation.nix
+++ b/machines/odin/virtualisation.nix
@@ -128,8 +128,5 @@
};
};
- networking.firewall.allowedTCPPorts = [
- 8443
-
- ];
+ networking.firewall.allowedTCPPorts = [ 8443 ];
}
diff --git a/machines/proxy/configuration.nix b/machines/proxy/configuration.nix
index 199970d..d146ca4 100644
--- a/machines/proxy/configuration.nix
+++ b/machines/proxy/configuration.nix
@@ -1,5 +1,6 @@
{ self, caddy-with-plugins, ... }:
-{ modulesPath, pkgs, ... }: {
+{ modulesPath, pkgs, ... }:
+{
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
../../users/root
diff --git a/machines/regin/configuration.nix b/machines/regin/configuration.nix
index 553bafa..0d299f8 100644
--- a/machines/regin/configuration.nix
+++ b/machines/regin/configuration.nix
@@ -63,9 +63,7 @@
security = {
polkit.enable = true;
};
- environment.systemPackages = with pkgs; [
- libraspberrypi
- ];
+ environment.systemPackages = with pkgs; [ libraspberrypi ];
system.stateVersion = "23.05";
}
diff --git a/machines/regin/home.nix b/machines/regin/home.nix
index efc80d7..1c88eca 100644
--- a/machines/regin/home.nix
+++ b/machines/regin/home.nix
@@ -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;
-
};
}
diff --git a/machines/thor/configuration.nix b/machines/thor/configuration.nix
index 42bd61c..337276b 100644
--- a/machines/thor/configuration.nix
+++ b/machines/thor/configuration.nix
@@ -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
diff --git a/machines/thor/home.nix b/machines/thor/home.nix
index 3ba957a..224fa2b 100644
--- a/machines/thor/home.nix
+++ b/machines/thor/home.nix
@@ -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;
diff --git a/machines/unifi/configuration.nix b/machines/unifi/configuration.nix
index 9385a53..2135ab7 100644
--- a/machines/unifi/configuration.nix
+++ b/machines/unifi/configuration.nix
@@ -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 = { };
diff --git a/machines/valkyrie/adguard/default.nix b/machines/valkyrie/adguard/default.nix
index 5942d1c..ddd7e1f 100644
--- a/machines/valkyrie/adguard/default.nix
+++ b/machines/valkyrie/adguard/default.nix
@@ -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
+ ];
};
};
}
diff --git a/machines/valkyrie/configuration.nix b/machines/valkyrie/configuration.nix
index 7239717..58c188f 100644
--- a/machines/valkyrie/configuration.nix
+++ b/machines/valkyrie/configuration.nix
@@ -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;
diff --git a/modules/backscrub/default.nix b/modules/backscrub/default.nix
index 72f2d92..75c312d 100644
--- a/modules/backscrub/default.nix
+++ b/modules/backscrub/default.nix
@@ -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
diff --git a/modules/base/blink1-udev/default.nix b/modules/base/blink1-udev/default.nix
index 6377094..56308b2 100644
--- a/modules/base/blink1-udev/default.nix
+++ b/modules/base/blink1-udev/default.nix
@@ -1,6 +1,5 @@
{ mkDerivation, lib }:
-mkDerivation
-{
+mkDerivation {
pname = "blink1-udev-rules";
version = "20220531093409";
diff --git a/modules/base/default.nix b/modules/base/default.nix
index 61c44b4..3ea0000 100644
--- a/modules/base/default.nix
+++ b/modules/base/default.nix
@@ -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)
diff --git a/modules/base/picotool/default.nix b/modules/base/picotool/default.nix
index 0ae46a4..8e71c7b 100644
--- a/modules/base/picotool/default.nix
+++ b/modules/base/picotool/default.nix
@@ -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";
};
diff --git a/modules/base/plymouth-nixos-blur/default.nix b/modules/base/plymouth-nixos-blur/default.nix
index 7d9d6b7..66586a9 100644
--- a/modules/base/plymouth-nixos-blur/default.nix
+++ b/modules/base/plymouth-nixos-blur/default.nix
@@ -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";
+ }
+ ];
};
}
diff --git a/modules/base/probe-rs/default.nix b/modules/base/probe-rs/default.nix
index fce31b5..c9a245f 100644
--- a/modules/base/probe-rs/default.nix
+++ b/modules/base/probe-rs/default.nix
@@ -1,7 +1,4 @@
-{ mkDerivation
-, lib
-,
-}:
+{ mkDerivation, lib }:
mkDerivation {
pname = "probe-rs-udev-rules";
version = "20220312131009";
diff --git a/modules/base/qmk/default.nix b/modules/base/qmk/default.nix
index 0e52f46..c1b770e 100644
--- a/modules/base/qmk/default.nix
+++ b/modules/base/qmk/default.nix
@@ -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";
+ }
+ ];
};
}
diff --git a/modules/base/solo2/default.nix b/modules/base/solo2/default.nix
index 2132959..dfccb76 100644
--- a/modules/base/solo2/default.nix
+++ b/modules/base/solo2/default.nix
@@ -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";
+ }
+ ];
};
}
diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix
index dddab43..9713810 100644
--- a/modules/bluetooth/default.nix
+++ b/modules/bluetooth/default.nix
@@ -1,8 +1,6 @@
-{ config
-, lib
-, ...
-}:
-with lib; let
+{ config, lib, ... }:
+with lib;
+let
cfg = config.eboskma.bluetooth;
in
{
diff --git a/modules/caddy-proxy/default.nix b/modules/caddy-proxy/default.nix
index 2ce8bd7..bced65a 100644
--- a/modules/caddy-proxy/default.nix
+++ b/modules/caddy-proxy/default.nix
@@ -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
+ ];
};
}
diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix
index 17adcf9..8e11c2f 100644
--- a/modules/desktop/default.nix
+++ b/modules/desktop/default.nix
@@ -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 = {
diff --git a/modules/drone/default.nix b/modules/drone/default.nix
index babda60..d24a348 100644
--- a/modules/drone/default.nix
+++ b/modules/drone/default.nix
@@ -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 ];
};
};
diff --git a/modules/element-web/default.nix b/modules/element-web/default.nix
index 056262c..ad5d901 100644
--- a/modules/element-web/default.nix
+++ b/modules/element-web/default.nix
@@ -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" ];
};
};
};
diff --git a/modules/fonts/default.nix b/modules/fonts/default.nix
index 0fe854d..6e2870a 100644
--- a/modules/fonts/default.nix
+++ b/modules/fonts/default.nix
@@ -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 = {
diff --git a/modules/gnome/default.nix b/modules/gnome/default.nix
index d22422e..95c3b6c 100644
--- a/modules/gnome/default.nix
+++ b/modules/gnome/default.nix
@@ -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;
diff --git a/modules/greetd/default.nix b/modules/greetd/default.nix
index 58c41a1..06e4ec9 100644
--- a/modules/greetd/default.nix
+++ b/modules/greetd/default.nix
@@ -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";
};
};
};
};
+ };
+ };
}
diff --git a/modules/headscale/default.nix b/modules/headscale/default.nix
index 6fde4bb..08b27ab 100644
--- a/modules/headscale/default.nix
+++ b/modules/headscale/default.nix
@@ -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 ];
diff --git a/modules/k3s/default.nix b/modules/k3s/default.nix
index ab3058d..2565ff7 100644
--- a/modules/k3s/default.nix
+++ b/modules/k3s/default.nix
@@ -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
+ ];
};
}
diff --git a/modules/kanata/default.nix b/modules/kanata/default.nix
index ca0a137..021ad7a 100644
--- a/modules/kanata/default.nix
+++ b/modules/kanata/default.nix
@@ -54,6 +54,5 @@ in
};
};
};
-
};
}
diff --git a/modules/keycloak/default.nix b/modules/keycloak/default.nix
index 13a5340..525c479 100644
--- a/modules/keycloak/default.nix
+++ b/modules/keycloak/default.nix
@@ -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
+ ];
};
}
diff --git a/modules/keycloak/keycloak-admin-ui.nix b/modules/keycloak/keycloak-admin-ui.nix
index 3a5d3da..55bd603 100644
--- a/modules/keycloak/keycloak-admin-ui.nix
+++ b/modules/keycloak/keycloak-admin-ui.nix
@@ -1,6 +1,7 @@
-{ buildMavenPackage
-, fetchFromGitHub
-, keycloak
+{
+ buildMavenPackage,
+ fetchFromGitHub,
+ keycloak,
}:
let
inherit (keycloak) version;
diff --git a/modules/keycloak/keycloak-orgs.nix b/modules/keycloak/keycloak-orgs.nix
index 2daa934..abbbf61 100644
--- a/modules/keycloak/keycloak-orgs.nix
+++ b/modules/keycloak/keycloak-orgs.nix
@@ -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
'';
-
}
diff --git a/modules/keycloak/phasetwo-admin-ui.nix b/modules/keycloak/phasetwo-admin-ui.nix
index c335de7..35e6679 100644
--- a/modules/keycloak/phasetwo-admin-ui.nix
+++ b/modules/keycloak/phasetwo-admin-ui.nix
@@ -1,6 +1,4 @@
-{ stdenv
-, fetchFromGitHub
-}:
+{ stdenv, fetchFromGitHub }:
let
version = "23.0.3.1703879005";
jarVersion = "23.0.1";
diff --git a/modules/klipper/default.nix b/modules/klipper/default.nix
index 2ffe9df..74997da 100644
--- a/modules/klipper/default.nix
+++ b/modules/klipper/default.nix
@@ -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;
};
};
-
};
}
diff --git a/modules/libvirtd/default.nix b/modules/libvirtd/default.nix
index de2710b..dd69982 100644
--- a/modules/libvirtd/default.nix
+++ b/modules/libvirtd/default.nix
@@ -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 = {
diff --git a/modules/livebook/default.nix b/modules/livebook/default.nix
index 5270222..d1fee0b 100644
--- a/modules/livebook/default.nix
+++ b/modules/livebook/default.nix
@@ -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"
diff --git a/modules/lxd/default.nix b/modules/lxd/default.nix
index 8ee900c..b162d3c 100644
--- a/modules/lxd/default.nix
+++ b/modules/lxd/default.nix
@@ -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 = {
diff --git a/modules/minio/default.nix b/modules/minio/default.nix
index 6958b71..3979644 100644
--- a/modules/minio/default.nix
+++ b/modules/minio/default.nix
@@ -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
+ ];
};
}
diff --git a/modules/networking/default.nix b/modules/networking/default.nix
index 36c0d49..d18bd65 100644
--- a/modules/networking/default.nix
+++ b/modules/networking/default.nix
@@ -1,9 +1,11 @@
-{ pkgs
-, config
-, lib
-, ...
+{
+ pkgs,
+ config,
+ lib,
+ ...
}:
-with lib; let
+with lib;
+let
cfg = config.eboskma.networking;
in
{
diff --git a/modules/nginx-proxy-manager/default.nix b/modules/nginx-proxy-manager/default.nix
index a3d0e22..9ff108d 100644
--- a/modules/nginx-proxy-manager/default.nix
+++ b/modules/nginx-proxy-manager/default.nix
@@ -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 = {
diff --git a/modules/nix-common/default.nix b/modules/nix-common/default.nix
index 7efe506..9fbab45 100644
--- a/modules/nix-common/default.nix
+++ b/modules/nix-common/default.nix
@@ -1,9 +1,11 @@
-{ lib
-, pkgs
-, config
-, ...
+{
+ lib,
+ pkgs,
+ config,
+ ...
}:
-with lib; let
+with lib;
+let
cfg = config.eboskma.nix-common;
in
{
@@ -18,8 +20,14 @@ in
};
imports = [
- (mkRemovedOptionModule [ "eboskma" "nix-common" "disable-cache" ]
- "The option `disable-cache` is no longer used")
+ (mkRemovedOptionModule
+ [
+ "eboskma"
+ "nix-common"
+ "disable-cache"
+ ]
+ "The option `disable-cache` is no longer used"
+ )
];
config = mkIf cfg.enable {
@@ -36,7 +44,12 @@ in
systems = [ "x86_64-linux" ] ++ cfg.cross-systems;
maxJobs = 8;
speedFactor = 2;
- supportedFeatures = [ "kvm" "big-parallel" "nixos-test" "benchmark" ];
+ supportedFeatures = [
+ "kvm"
+ "big-parallel"
+ "nixos-test"
+ "benchmark"
+ ];
}
];
distributedBuilds = cfg.remote-builders;
@@ -44,7 +57,10 @@ in
settings = {
auto-optimise-store = true;
allowed-users = [ "root" ];
- trusted-users = [ "root" "@wheel" ];
+ trusted-users = [
+ "root"
+ "@wheel"
+ ];
substituters = [
"https://nix-community.cachix.org"
"https://marcus7070.cachix.org"
diff --git a/modules/nix-serve/default.nix b/modules/nix-serve/default.nix
index aacfbf7..0b6e35a 100644
--- a/modules/nix-serve/default.nix
+++ b/modules/nix-serve/default.nix
@@ -4,7 +4,9 @@ let
cfg = config.eboskma.nix-serve;
in
{
- options.eboskma.nix-serve = { enable = mkEnableOption "nix-serve"; };
+ options.eboskma.nix-serve = {
+ enable = mkEnableOption "nix-serve";
+ };
config = mkIf cfg.enable {
services.nix-serve = {
@@ -13,7 +15,9 @@ in
bindAddress = "127.0.0.1";
};
- systemd.tmpfiles.rules = [ "C /run/cache-priv-key.pem 400 nix-serve root - ${config.services.nix-serve.secretKeyFile}" ];
+ systemd.tmpfiles.rules = [
+ "C /run/cache-priv-key.pem 400 nix-serve root - ${config.services.nix-serve.secretKeyFile}"
+ ];
services.nginx = {
enable = true;
diff --git a/modules/options/default.nix b/modules/options/default.nix
index f816eda..6047abf 100644
--- a/modules/options/default.nix
+++ b/modules/options/default.nix
@@ -1,5 +1,6 @@
{ lib, ... }:
-with lib; {
+with lib;
+{
options.eboskma.var = {
mainUser = lib.mkOption {
type = lib.types.str;
diff --git a/modules/pixiecore/default.nix b/modules/pixiecore/default.nix
index 2c79cfe..62f74c1 100644
--- a/modules/pixiecore/default.nix
+++ b/modules/pixiecore/default.nix
@@ -1,14 +1,20 @@
-{ config, lib, inputs, ... }:
+{
+ config,
+ lib,
+ inputs,
+ ...
+}:
with lib;
let
cfg = config.eboskma.pixiecore;
installerSystem = import ./installer.nix { inherit (inputs.nixpkgs.lib) nixosSystem; };
build = installerSystem.config.system.build;
-
in
{
- options.eboskma.pixiecore = { enable = mkEnableOption "pixiecore with NixOS Installer"; };
+ options.eboskma.pixiecore = {
+ enable = mkEnableOption "pixiecore with NixOS Installer";
+ };
config = mkIf cfg.enable {
services.pixiecore = {
diff --git a/modules/pixiecore/installer.nix b/modules/pixiecore/installer.nix
index d704faa..3010d5e 100644
--- a/modules/pixiecore/installer.nix
+++ b/modules/pixiecore/installer.nix
@@ -2,26 +2,28 @@
nixosSystem {
system = "x86_64-linux";
modules = [
- ({ config, modulesPath, ... }: {
- imports = [
- "${modulesPath}/installer/netboot/netboot-minimal.nix"
+ (
+ { config, modulesPath, ... }:
+ {
+ imports = [
+ "${modulesPath}/installer/netboot/netboot-minimal.nix"
- ../../users/root
- ];
+ ../../users/root
+ ];
- config = {
- services.openssh = {
- enable = true;
- openFirewall = true;
+ config = {
+ services.openssh = {
+ enable = true;
+ openFirewall = true;
- settings = {
- PasswordAuthentication = false;
- KbdInteractiveAuthentication = false;
+ settings = {
+ PasswordAuthentication = false;
+ KbdInteractiveAuthentication = false;
+ };
};
+ system.stateVersion = "24.05";
};
- system.stateVersion = "24.05";
- };
-
- })
+ }
+ )
];
}
diff --git a/modules/podman/default.nix b/modules/podman/default.nix
index 3f72194..8478d83 100644
--- a/modules/podman/default.nix
+++ b/modules/podman/default.nix
@@ -1,9 +1,11 @@
-{ lib
-, pkgs
-, config
-, ...
+{
+ lib,
+ pkgs,
+ config,
+ ...
}:
-with lib; let
+with lib;
+let
cfg = config.eboskma.podman;
podmanInterfaces = if config.networking.nftables.enable then "podman*" else "podman+";
@@ -21,7 +23,10 @@ in
};
config = mkIf cfg.enable {
- environment.systemPackages = [ pkgs.podman-compose pkgs.netavark ];
+ environment.systemPackages = [
+ pkgs.podman-compose
+ pkgs.netavark
+ ];
virtualisation.podman = {
enable = true;
@@ -34,7 +39,6 @@ in
};
defaultNetwork.settings.dns_enabled = true;
-
};
virtualisation.containers = {
diff --git a/modules/sound/default.nix b/modules/sound/default.nix
index f833432..3e0918d 100644
--- a/modules/sound/default.nix
+++ b/modules/sound/default.nix
@@ -1,9 +1,11 @@
-{ pkgs
-, config
-, lib
-, ...
+{
+ pkgs,
+ config,
+ lib,
+ ...
}:
-with lib; let
+with lib;
+let
cfg = config.eboskma.sound;
in
{
@@ -43,7 +45,10 @@ in
security.rtkit.enable = true;
- environment.systemPackages = with pkgs; [ pavucontrol pipewire ];
+ environment.systemPackages = with pkgs; [
+ pavucontrol
+ pipewire
+ ];
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "audio" ];
};
diff --git a/modules/systemd/default.nix b/modules/systemd/default.nix
index 09de947..549b5d4 100644
--- a/modules/systemd/default.nix
+++ b/modules/systemd/default.nix
@@ -1,8 +1,6 @@
-{ config
-, lib
-, ...
-}:
-with lib; let
+{ config, lib, ... }:
+with lib;
+let
cfg = config.eboskma.systemd;
in
{
diff --git a/modules/tablet/default.nix b/modules/tablet/default.nix
index b7f7ac1..7c577c4 100644
--- a/modules/tablet/default.nix
+++ b/modules/tablet/default.nix
@@ -4,7 +4,9 @@ let
cfg = config.eboskma.tablet;
in
{
- options.eboskma.tablet = { enable = mkEnableOption "tablet"; };
+ options.eboskma.tablet = {
+ enable = mkEnableOption "tablet";
+ };
config = mkIf cfg.enable {
hardware.opentabletdriver = {
diff --git a/modules/wireguard/default.nix b/modules/wireguard/default.nix
index 969b20a..7b74502 100644
--- a/modules/wireguard/default.nix
+++ b/modules/wireguard/default.nix
@@ -1,4 +1,9 @@
-{ pkgs, config, lib, ... }:
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}:
with lib;
let
cfg = config.eboskma.services.wireguard.server;
@@ -82,17 +87,19 @@ in
listenPort = cfg.port;
privateKeyFile = cfg.privateKeyFile;
- postSetup = concatMapStringsSep "\n"
- (range: ''
- ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s ${range} -o ${cfg.externalInterface} -j MASQUERADE
- '')
- cfg.internalIPs;
+ postSetup =
+ concatMapStringsSep "\n"
+ (range: ''
+ ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s ${range} -o ${cfg.externalInterface} -j MASQUERADE
+ '')
+ cfg.internalIPs;
- postShutdown = concatMapStringsSep "\n"
- (range: ''
- ${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s ${range} -o ${cfg.externalInterface} -j MASQUERADE
- '')
- cfg.internalIPs;
+ postShutdown =
+ concatMapStringsSep "\n"
+ (range: ''
+ ${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s ${range} -o ${cfg.externalInterface} -j MASQUERADE
+ '')
+ cfg.internalIPs;
peers = cfg.peers;
};
diff --git a/modules/woodpecker/default.nix b/modules/woodpecker/default.nix
index 11728ca..d58f231 100644
--- a/modules/woodpecker/default.nix
+++ b/modules/woodpecker/default.nix
@@ -1,10 +1,17 @@
-{ pkgs, config, lib, ... }:
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}:
with lib;
let
cfg = config.eboskma.woodpecker;
in
{
- options.eboskma.woodpecker = { enable = mkEnableOption "Woodpecker CI"; };
+ options.eboskma.woodpecker = {
+ enable = mkEnableOption "Woodpecker CI";
+ };
config = mkIf cfg.enable {
services.woodpecker-server = {
@@ -34,6 +41,9 @@ in
environment.systemPackages = [ pkgs.woodpecker-cli ];
- networking.firewall.allowedTCPPorts = [ 8100 9000 ];
+ networking.firewall.allowedTCPPorts = [
+ 8100
+ 9000
+ ];
};
}
diff --git a/overlays/default.nix b/overlays/default.nix
index 8da7b74..b9bba37 100644
--- a/overlays/default.nix
+++ b/overlays/default.nix
@@ -2,13 +2,29 @@ _final: prev: {
rofi-wayland = prev.pkgs.callPackage ../pkgs/rofi-wayland { };
nix-plugins = prev.pkgs.callPackage ../pkgs/nix-plugins { };
lunarvim = prev.pkgs.callPackage ../pkgs/lunarvim { };
- backscrub =
- prev.pkgs.callPackage ../pkgs/backscrub
- {
- inherit (prev.pkgs) gcc cmake opencv curl stdenv git tensorflow-lite flatbuffers;
- };
+ backscrub = prev.pkgs.callPackage ../pkgs/backscrub {
+ inherit (prev.pkgs)
+ gcc
+ cmake
+ opencv
+ curl
+ stdenv
+ git
+ tensorflow-lite
+ flatbuffers
+ ;
+ };
onnx-runtime = prev.pkgs.callPackage ../pkgs/onnx-runtime { inherit (prev.pkgs) stdenv; };
- obs-backgroundremoval = prev.pkgs.callPackage ../pkgs/obs-backgroundremoval { inherit (prev.pkgs) stdenv fetchFromGitHub cmake obs-studio opencv onnx-runtime; };
+ obs-backgroundremoval = prev.pkgs.callPackage ../pkgs/obs-backgroundremoval {
+ inherit (prev.pkgs)
+ stdenv
+ fetchFromGitHub
+ cmake
+ obs-studio
+ opencv
+ onnx-runtime
+ ;
+ };
# swaynotificationcenter = prev.swaynotificationcenter.overrideAttrs (finalAttrs: prevAttrs: {
# postInstall = ''
@@ -16,11 +32,15 @@ _final: prev: {
# '';
# });
- bl3auto = prev.pkgs.callPackage ../pkgs/bl3auto { inherit (prev.pkgs) lib buildGoModule fetchFromGitHub; };
+ bl3auto = prev.pkgs.callPackage ../pkgs/bl3auto {
+ inherit (prev.pkgs) lib buildGoModule fetchFromGitHub;
+ };
- ddccontrol-db = prev.ddccontrol-db.overrideAttrs (_finalAttrs: prevAttrs: {
- patches = (prevAttrs.patches or [ ]) ++ [ ./ddccontrol-db/0001-add-del41d9.patch ];
- });
+ ddccontrol-db = prev.ddccontrol-db.overrideAttrs (
+ _finalAttrs: prevAttrs: {
+ patches = (prevAttrs.patches or [ ]) ++ [ ./ddccontrol-db/0001-add-del41d9.patch ];
+ }
+ );
incus-ui = prev.pkgs.callPackage ../pkgs/incus-ui { };
openfga = prev.pkgs.callPackage ../pkgs/openfga { };
diff --git a/pkgs/backscrub/default.nix b/pkgs/backscrub/default.nix
index 05cc96f..3624d09 100644
--- a/pkgs/backscrub/default.nix
+++ b/pkgs/backscrub/default.nix
@@ -1,13 +1,13 @@
-{ stdenv
-, fetchFromGitHub
-, cmake
-, opencv
-, gcc
-, curl
-, git
-, tensorflow-lite
-, flatbuffers
-,
+{
+ stdenv,
+ fetchFromGitHub,
+ cmake,
+ opencv,
+ gcc,
+ curl,
+ git,
+ tensorflow-lite,
+ flatbuffers,
}:
stdenv.mkDerivation {
name = "backscrub";
@@ -21,7 +21,16 @@ stdenv.mkDerivation {
sha256 = "14gd77m7dy0wg15y0i8zhki8cm7np2spx7yi162b2xqaav04b1cj";
};
- nativeBuildInputs = [ gcc cmake git ];
- buildInputs = [ opencv curl tensorflow-lite flatbuffers ];
+ nativeBuildInputs = [
+ gcc
+ cmake
+ git
+ ];
+ buildInputs = [
+ opencv
+ curl
+ tensorflow-lite
+ flatbuffers
+ ];
patches = [ ./fix-cmake-for-nixos.patch ];
}
diff --git a/pkgs/incus-ui/default.nix b/pkgs/incus-ui/default.nix
index 185c512..7ca5c92 100644
--- a/pkgs/incus-ui/default.nix
+++ b/pkgs/incus-ui/default.nix
@@ -1,12 +1,13 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, fetchYarnDeps
-, nodejs
-, prefetch-yarn-deps
-, yarn
-, gnused
-, rsync
+{
+ lib,
+ stdenv,
+ fetchFromGitHub,
+ fetchYarnDeps,
+ nodejs,
+ prefetch-yarn-deps,
+ yarn,
+ gnused,
+ rsync,
}:
stdenv.mkDerivation rec {
diff --git a/pkgs/lunarvim/default.nix b/pkgs/lunarvim/default.nix
index 2185f82..c7ed472 100644
--- a/pkgs/lunarvim/default.nix
+++ b/pkgs/lunarvim/default.nix
@@ -1,5 +1,6 @@
{ pkgs, ... }:
-with pkgs; let
+with pkgs;
+let
nvim-customized = wrapNeovim neovim-unwrapped { };
in
stdenv.mkDerivation rec {
@@ -13,7 +14,10 @@ stdenv.mkDerivation rec {
sha256 = "0yfr3vh8p1s9wy21s6bgpp6kp6s9pqlb6k66s76sa22vz4sjiyxb";
};
- nativeBuildInputs = [ makeWrapper nvim-customized ];
+ nativeBuildInputs = [
+ makeWrapper
+ nvim-customized
+ ];
buildInputs = [ nvim-customized ];
buildPhase = ''
@@ -30,7 +34,13 @@ stdenv.mkDerivation rec {
chmod +x "$shim"
makeWrapper "$shim" "$out/bin/lvim" \
--set LUNARVIM_RUNTIME_DIR "$out" \
- --prefix PATH : ${lib.makeBinPath [fzf git ripgrep]}
+ --prefix PATH : ${
+ lib.makeBinPath [
+ fzf
+ git
+ ripgrep
+ ]
+ }
runHook postInstall
'';
}
diff --git a/pkgs/nix-plugins/default.nix b/pkgs/nix-plugins/default.nix
index b1dec36..dc7f5b2 100644
--- a/pkgs/nix-plugins/default.nix
+++ b/pkgs/nix-plugins/default.nix
@@ -1,12 +1,12 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, nixUnstable
-, cmake
-, pkg-config
-, boost
-, nlohmann_json
-,
+{
+ lib,
+ stdenv,
+ fetchFromGitHub,
+ nixUnstable,
+ cmake,
+ pkg-config,
+ boost,
+ nlohmann_json,
}:
stdenv.mkDerivation rec {
pname = "nix-plugins";
@@ -19,9 +19,16 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Zbc0iq5ZAr73B+NJvpBHm9GIJhb9qrq0vFmV/ucNT5I=";
};
- nativeBuildInputs = [ cmake pkg-config ];
+ nativeBuildInputs = [
+ cmake
+ pkg-config
+ ];
- buildInputs = [ nixUnstable boost nlohmann_json ];
+ buildInputs = [
+ nixUnstable
+ boost
+ nlohmann_json
+ ];
meta = {
description = "Collection of miscellaneous plugins for the nix expression language";
diff --git a/pkgs/obs-backgroundremoval/default.nix b/pkgs/obs-backgroundremoval/default.nix
index d9027c6..a1a904c 100644
--- a/pkgs/obs-backgroundremoval/default.nix
+++ b/pkgs/obs-backgroundremoval/default.nix
@@ -1,9 +1,10 @@
-{ fetchFromGitHub
-, stdenv
-, cmake
-, obs-studio
-, opencv
-, onnx-runtime
+{
+ fetchFromGitHub,
+ stdenv,
+ cmake,
+ obs-studio,
+ opencv,
+ onnx-runtime,
}:
stdenv.mkDerivation {
pname = "obs-backgroundremoval";
@@ -32,5 +33,9 @@ stdenv.mkDerivation {
'';
nativeBuildInputs = [ cmake ];
- buildInputs = [ opencv onnx-runtime obs-studio ];
+ buildInputs = [
+ opencv
+ onnx-runtime
+ obs-studio
+ ];
}
diff --git a/pkgs/openfga/default.nix b/pkgs/openfga/default.nix
index 768a4b3..24d249b 100644
--- a/pkgs/openfga/default.nix
+++ b/pkgs/openfga/default.nix
@@ -1,6 +1,7 @@
-{ lib
-, buildGoModule
-, fetchFromGitHub
+{
+ lib,
+ buildGoModule,
+ fetchFromGitHub,
}:
buildGoModule rec {
@@ -16,9 +17,7 @@ buildGoModule rec {
vendorHash = "sha256-/110Ocvcj/WRpqth6RFQQ0xj2WAkW/psDQcFZO2parI=";
- subPackages = [
- "cmd/openfga"
- ];
+ subPackages = [ "cmd/openfga" ];
ldflags = [
"-s"
diff --git a/pkgs/rofi-wayland/default.nix b/pkgs/rofi-wayland/default.nix
index bcb447b..ab94fd9 100644
--- a/pkgs/rofi-wayland/default.nix
+++ b/pkgs/rofi-wayland/default.nix
@@ -18,7 +18,11 @@ stdenv.mkDerivation rec {
sed -i 's/~root/~nobody/g' test/helper-expand.c
'';
- nativeBuildInputs = [ meson ninja pkg-config ];
+ nativeBuildInputs = [
+ meson
+ ninja
+ pkg-config
+ ];
buildInputs = with pkgs; [
libxkbcommon
pango
diff --git a/users/builder/default.nix b/users/builder/default.nix
index a5719d5..7f9465c 100644
--- a/users/builder/default.nix
+++ b/users/builder/default.nix
@@ -2,11 +2,14 @@
with lib;
let
cfg = config.eboskma.users.builder;
- authorizedKeys = builtins.map (key: (builtins.readFile (./keys/${key})))
- (builtins.attrNames (builtins.readDir ./keys));
+ authorizedKeys = builtins.map (key: (builtins.readFile (./keys/${key}))) (
+ builtins.attrNames (builtins.readDir ./keys)
+ );
in
{
- options.eboskma.users.builder = { enable = mkEnableOption "builder"; };
+ options.eboskma.users.builder = {
+ enable = mkEnableOption "builder";
+ };
config = mkIf cfg.enable {
users.users.builder = {
diff --git a/users/erwin/default.nix b/users/erwin/default.nix
index 76afa4a..dc2fb10 100644
--- a/users/erwin/default.nix
+++ b/users/erwin/default.nix
@@ -1,4 +1,9 @@
-{ pkgs, config, lib, ... }:
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}:
with lib;
let
cfg = config.eboskma.users.erwin;
@@ -17,15 +22,25 @@ in
};
};
- imports = [ ./home.nix ./server.nix ./work.nix ];
+ imports = [
+ ./home.nix
+ ./server.nix
+ ./work.nix
+ ];
config = mkIf cfg.enable {
users.users.erwin = {
isNormalUser = true;
home = "/home/erwin";
- extraGroups = [ "wheel" "adm" "audio" "video" "dialout" "input" ]
- ++ (optional config.hardware.i2c.enable config.hardware.i2c.group);
+ extraGroups = [
+ "wheel"
+ "adm"
+ "audio"
+ "video"
+ "dialout"
+ "input"
+ ] ++ (optional config.hardware.i2c.enable config.hardware.i2c.group);
shell = config.home-manager.users.erwin.programs.nushell.package;
openssh.authorizedKeys.keyFiles = [
(pkgs.fetchurl {
diff --git a/users/erwin/home.nix b/users/erwin/home.nix
index 5b38b1c..dc7841d 100644
--- a/users/erwin/home.nix
+++ b/users/erwin/home.nix
@@ -1,12 +1,29 @@
-{ pkgs, config, lib, inputs, ... }:
-with lib; let
+{
+ pkgs,
+ config,
+ lib,
+ inputs,
+ ...
+}:
+with lib;
+let
cfg = config.eboskma.users.erwin;
homeCfg = config.home-manager.users.erwin;
bt = config.eboskma.bluetooth;
ewwDaemon =
let
- path = lib.makeBinPath (with pkgs; [ ha-now-playing jaq pamedia bash helvum pavucontrol ]);
+ path = lib.makeBinPath (
+ with pkgs;
+ [
+ ha-now-playing
+ jaq
+ pamedia
+ bash
+ helvum
+ pavucontrol
+ ]
+ );
in
pkgs.writeShellScript "eww-daemon" ''
export PATH=${path}:''${PATH}
@@ -15,401 +32,421 @@ with lib; let
'';
in
{
- config =
- mkIf cfg.home {
- home-manager.users.erwin = {
- _module.args.flake-inputs = inputs;
+ config = mkIf cfg.home {
+ home-manager.users.erwin = {
+ _module.args.flake-inputs = inputs;
- eboskma = {
- programs = {
- alacritty.enable = false;
- anyrun.enable = true;
- atuin.enable = true;
- bat.enable = true;
- cargo = {
- enable = true;
- settings = {
- registries.crates-io = {
- protocol = "sparse";
- };
+ eboskma = {
+ programs = {
+ alacritty.enable = false;
+ anyrun.enable = true;
+ atuin.enable = true;
+ bat.enable = true;
+ cargo = {
+ enable = true;
+ settings = {
+ registries.crates-io = {
+ protocol = "sparse";
};
};
+ };
- dropbox.enable = true;
- dunst.enable = false;
- emacs = {
- enable = true;
- package = pkgs.emacs-unstable-pgtk;
- # .override {
- # treeSitterPlugins = builtins.attrValues (filterAttrs (_: isDerivation) pkgs.tree-sitter-grammars);
- # }
- daemon = true;
+ dropbox.enable = true;
+ dunst.enable = false;
+ emacs = {
+ enable = true;
+ package = pkgs.emacs-unstable-pgtk;
+ # .override {
+ # treeSitterPlugins = builtins.attrValues (filterAttrs (_: isDerivation) pkgs.tree-sitter-grammars);
+ # }
+ daemon = true;
+ };
+ electron = {
+ enable = true;
+ wayland = true;
+ };
+ eww = {
+ enable = true;
+ package = pkgs.eww-wayland;
+ };
+ firefox = {
+ enable = true;
+ work = config.eboskma.base.work;
+ };
+ fish.enable = true;
+ foot = {
+ enable = true;
+ server = false;
+ };
+ git = {
+ enable = true;
+ name = "Erwin Boskma";
+ email = "erwin@datarift.nl";
+ signingKey = "~/.ssh/id_ed25519_sk_personal.pub";
+ signingKeyFormat = "ssh";
+ };
+ gpg.enable = true;
+ mpd.enable = true;
+ neovim.enable = true;
+ nnn.enable = true;
+ nushell.enable = true;
+ obs-studio.enable = true;
+ rclone = {
+ enable = true;
+ mounts = [
+ {
+ remote = "org-roam";
+ local = "/home/erwin/org-roam";
+ remoteConfig = {
+ type = "sftp";
+ host = "zh2088.rsync.net";
+ user = "zh2088";
+ key_file = "~/.ssh/id_ed25519-rsync.net";
+ md5sum_command = "md5 -r";
+ sha2sum_command = "sha1 -r";
+ };
+ }
+ ];
+ };
+ rofi = {
+ enable = true;
+ package = pkgs.rofi-wayland;
+ terminal = homeCfg.wayland.windowManager.sway.config.terminal;
+ };
+ vscode.enable = true;
+ solvespace.enable = true;
+ ssh.enable = true;
+ starship.enable = true;
+ sway = {
+ enable = true;
+ lock-wallpaper = "${homeCfg.home.homeDirectory}/.wallpapers/river-2560.png";
+ output = {
+ "DP-2" = {
+ bg = "${homeCfg.home.homeDirectory}/.wallpapers/river-2560.png fill";
+ mode = "2560x1440@165Hz";
+ adaptive_sync = "on";
+ max_render_time = "2";
+ };
};
- electron = {
- enable = true;
- wayland = true;
+ input = {
+ "36125:40349:splitkb.com_Kyria_rev1" = {
+ xkb_layout = "us";
+ xkb_options = "lv3:ralt_switch_multikey,eurosign:5";
+ };
+ "1133:49291:Logitech_G502_HERO_SE" = {
+ natural_scroll = "enabled";
+ };
};
- eww = {
- enable = true;
- package = pkgs.eww-wayland;
- };
- firefox = {
- enable = true;
- work = config.eboskma.base.work;
- };
- fish.enable = true;
- foot = {
- enable = true;
- server = false;
- };
- git = {
- enable = true;
- name = "Erwin Boskma";
- email = "erwin@datarift.nl";
- signingKey = "~/.ssh/id_ed25519_sk_personal.pub";
- signingKeyFormat = "ssh";
- };
- gpg.enable = true;
- mpd.enable = true;
- neovim.enable = true;
- nnn.enable = true;
- nushell.enable = true;
- obs-studio.enable = true;
- rclone = {
- enable = true;
- mounts = [
+ startup = [
+ {
+ command = "${ewwDaemon} --restart open bar-home";
+ always = true;
+ }
+ ];
+ };
+ swaynotificationcenter.enable = true;
+ tea = {
+ enable = true;
+ settings = {
+ logins = [
{
- remote = "org-roam";
- local = "/home/erwin/org-roam";
- remoteConfig = {
- type = "sftp";
- host = "zh2088.rsync.net";
- user = "zh2088";
- key_file = "~/.ssh/id_ed25519-rsync.net";
- md5sum_command = "md5 -r";
- sha2sum_command = "sha1 -r";
- };
+ name = "datarift";
+ url = "https://git.datarift.nl";
+ token = "abc";
+ default = true;
+ ssh_host = "git.datarift.nl";
+ user = "erwin";
}
];
};
- rofi = {
- enable = true;
- package = pkgs.rofi-wayland;
- terminal = homeCfg.wayland.windowManager.sway.config.terminal;
- };
- vscode.enable = true;
- solvespace.enable = true;
- ssh.enable = true;
- starship.enable = true;
- sway = {
- enable = true;
- lock-wallpaper = "${homeCfg.home.homeDirectory}/.wallpapers/river-2560.png";
- output = {
- "DP-2" = {
- bg = "${homeCfg.home.homeDirectory}/.wallpapers/river-2560.png fill";
- mode = "2560x1440@165Hz";
- adaptive_sync = "on";
- max_render_time = "2";
- };
- };
- input = {
- "36125:40349:splitkb.com_Kyria_rev1" = {
- xkb_layout = "us";
- xkb_options = "lv3:ralt_switch_multikey,eurosign:5";
- };
- "1133:49291:Logitech_G502_HERO_SE" = {
- natural_scroll = "enabled";
- };
- };
- startup = [
- { command = "${ewwDaemon} --restart open bar-home"; always = true; }
- ];
- };
- swaynotificationcenter.enable = true;
- tea = {
- enable = true;
- settings = {
- logins = [
- {
- name = "datarift";
- url = "https://git.datarift.nl";
- token = "abc";
- default = true;
- ssh_host = "git.datarift.nl";
- user = "erwin";
- }
- ];
- };
- };
- tmux.enable = true;
- waybar.enable = false;
- zathura.enable = true;
- zellij = {
- enable = true;
- copyCommand = "${pkgs.wl-clipboard}/bin/wl-copy";
- };
};
- };
-
- home = {
- username = "erwin";
- homeDirectory = "/home/erwin";
- sessionVariables = { };
-
- stateVersion = "21.11";
-
- packages = with pkgs;
- [
- ardour
- atool
- inputs.attic.packages.${pkgs.system}.attic-client
- bitwarden
- blink1-tool
- bottom
- dconf
- dbeaver
- easyeffects
- element-desktop
- fd
- ffmpeg_5-full
- gnome.nautilus
- helvum
- horizon-eda
- imagemagick
- imv
- iotop
- (jetbrains.clion.override { jdk = pkgs.jetbrains.jdk; })
- kicad
- kubectl
- kubernetes-helm
- libnotify
- libreoffice-fresh
- minio-client
- mpv
- nomachine-client
- nordzy-cursor-theme
- (noson.overrideAttrs (_: { qtWrapperArgs = ''--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ pkgs.libpulseaudio ]}''; }))
- pamedia
- pass
- pavucontrol
- povray
- quintom-cursor-theme
- procs
- prusa-slicer
- qgis
- remmina
- ripgrep
- scid-vs-pc
- signal-desktop
- steam
- steamcmd
- steam-tui
- stellarium
- # super-slicer-latest
- units
- unzip
- vial
- xdg-utils
- wl-clipboard
- zeal
- ]
- ++ (with gst_all_1; [ gstreamer gstreamer.dev gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-vaapi ]);
-
- pointerCursor = {
- name = "elementary";
- package = pkgs.pantheon.elementary-gtk-theme;
- gtk.enable = true;
- x11.enable = true;
- };
-
-
- file = {
- wallpapers = {
- source = ../../wallpapers;
- target = ".wallpapers";
- recursive = true;
- };
- };
- };
-
- xdg = {
- enable = true;
- mime.enable = true;
- mimeApps = {
+ tmux.enable = true;
+ waybar.enable = false;
+ zathura.enable = true;
+ zellij = {
enable = true;
- defaultApplications = {
- "x-scheme-handler/http" = "firefox.desktop";
- "x-scheme-handler/https" = "firefox.desktop";
- "x-scheme-handler/chrome" = "firefox.desktop";
- "x-scheme-handler/terminal" = "${cfg.terminal}.desktop";
- "text/html" = "firefox.desktop";
- "application/x-extension-htm" = "firefox.desktop";
- "application/x-extension-html" = "firefox.desktop";
- "application/x-extension-shtml" = "firefox.desktop";
- "application/xhtml+xml" = "firefox.desktop";
- "application/x-extension-xhtml" = "firefox.desktop";
- "application/x-extension-xht" = "firefox.desktop";
- "application/pdf" = "org.pwmt.zathura-pdf-mupdf.desktop";
- };
- associations = {
- added = {
- "image/jpeg" = "imv.desktop";
- "image/png" = "imv.desktop";
- "image/gif" = "imv.desktop";
- "application/zip" = "org.gnome.FileRoller.desktop";
- };
- };
- };
- userDirs = {
- enable = true;
- createDirectories = true;
+ copyCommand = "${pkgs.wl-clipboard}/bin/wl-copy";
};
};
+ };
- i18n.inputMethod = {
- enabled = "fcitx5";
- fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-gtk fcitx5-configtool ];
+ home = {
+ username = "erwin";
+ homeDirectory = "/home/erwin";
+ sessionVariables = { };
+
+ stateVersion = "21.11";
+
+ packages =
+ with pkgs;
+ [
+ ardour
+ atool
+ inputs.attic.packages.${pkgs.system}.attic-client
+ bitwarden
+ blink1-tool
+ bottom
+ dconf
+ dbeaver
+ easyeffects
+ element-desktop
+ fd
+ ffmpeg_5-full
+ gnome.nautilus
+ helvum
+ horizon-eda
+ imagemagick
+ imv
+ iotop
+ (jetbrains.clion.override { jdk = pkgs.jetbrains.jdk; })
+ kicad
+ kubectl
+ kubernetes-helm
+ libnotify
+ libreoffice-fresh
+ minio-client
+ mpv
+ nomachine-client
+ nordzy-cursor-theme
+ (noson.overrideAttrs (
+ _: { qtWrapperArgs = "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ pkgs.libpulseaudio ]}"; }
+ ))
+ pamedia
+ pass
+ pavucontrol
+ povray
+ quintom-cursor-theme
+ procs
+ prusa-slicer
+ qgis
+ remmina
+ ripgrep
+ scid-vs-pc
+ signal-desktop
+ steam
+ steamcmd
+ steam-tui
+ stellarium
+ # super-slicer-latest
+ units
+ unzip
+ vial
+ xdg-utils
+ wl-clipboard
+ zeal
+ ]
+ ++ (with gst_all_1; [
+ gstreamer
+ gstreamer.dev
+ gst-plugins-base
+ gst-plugins-good
+ gst-plugins-bad
+ gst-plugins-ugly
+ gst-libav
+ gst-vaapi
+ ]);
+
+ pointerCursor = {
+ name = "elementary";
+ package = pkgs.pantheon.elementary-gtk-theme;
+ gtk.enable = true;
+ x11.enable = true;
};
- dconf.settings = {
- "org/gnome/desktop/interface" = {
- color-scheme = "prefer-dark";
+ file = {
+ wallpapers = {
+ source = ../../wallpapers;
+ target = ".wallpapers";
+ recursive = true;
};
};
+ };
- gtk = {
+ xdg = {
+ enable = true;
+ mime.enable = true;
+ mimeApps = {
enable = true;
- theme = {
- name = "elementary";
- package = pkgs.pantheon.elementary-gtk-theme;
+ defaultApplications = {
+ "x-scheme-handler/http" = "firefox.desktop";
+ "x-scheme-handler/https" = "firefox.desktop";
+ "x-scheme-handler/chrome" = "firefox.desktop";
+ "x-scheme-handler/terminal" = "${cfg.terminal}.desktop";
+ "text/html" = "firefox.desktop";
+ "application/x-extension-htm" = "firefox.desktop";
+ "application/x-extension-html" = "firefox.desktop";
+ "application/x-extension-shtml" = "firefox.desktop";
+ "application/xhtml+xml" = "firefox.desktop";
+ "application/x-extension-xhtml" = "firefox.desktop";
+ "application/x-extension-xht" = "firefox.desktop";
+ "application/pdf" = "org.pwmt.zathura-pdf-mupdf.desktop";
};
-
- iconTheme = {
- name = "elementary";
- package = pkgs.pantheon.elementary-icon-theme;
- };
-
- gtk3 = {
- bookmarks = [
- "file:///home/erwin/workspace"
- ];
- extraConfig = {
- gtk-application-prefer-dark-theme = 1;
- gtk-cursor-theme-name = "elementary";
+ associations = {
+ added = {
+ "image/jpeg" = "imv.desktop";
+ "image/png" = "imv.desktop";
+ "image/gif" = "imv.desktop";
+ "application/zip" = "org.gnome.FileRoller.desktop";
};
};
+ };
+ userDirs = {
+ enable = true;
+ createDirectories = true;
+ };
+ };
- gtk4.extraConfig = {
+ i18n.inputMethod = {
+ enabled = "fcitx5";
+ fcitx5.addons = with pkgs; [
+ fcitx5-m17n
+ fcitx5-gtk
+ fcitx5-configtool
+ ];
+ };
+
+ dconf.settings = {
+ "org/gnome/desktop/interface" = {
+ color-scheme = "prefer-dark";
+ };
+ };
+
+ gtk = {
+ enable = true;
+ theme = {
+ name = "elementary";
+ package = pkgs.pantheon.elementary-gtk-theme;
+ };
+
+ iconTheme = {
+ name = "elementary";
+ package = pkgs.pantheon.elementary-icon-theme;
+ };
+
+ gtk3 = {
+ bookmarks = [ "file:///home/erwin/workspace" ];
+ extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-cursor-theme-name = "elementary";
};
};
- programs = {
- home-manager.enable = true;
- command-not-found.enable = true;
+ gtk4.extraConfig = {
+ gtk-application-prefer-dark-theme = 1;
+ gtk-cursor-theme-name = "elementary";
};
-
- services = {
- blueman-applet.enable = bt.enable;
-
- gnome-keyring = {
- enable = true;
- components = [ "pkcs11" "ssh" "secrets" ];
- };
-
- udiskie = {
- enable = true;
- tray = "auto";
- notify = true;
- settings = {
- program_options = {
- menu = "nested";
- };
- device_config = [
- {
- device_file = "/dev/loop*";
- ignore = true;
- }
- ];
- };
- };
-
- cliphist = {
- enable = true;
- systemdTarget = "sway-session.target";
- };
- };
-
- imports = [
- ../../modules/options
- inputs.anyrun.nixosModules.home-manager
- ] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
};
-
- # OBS control websocket
- networking.firewall.allowedTCPPorts = [ 4455 ];
-
programs = {
- steam = {
- enable = true;
- package = pkgs.steam.override {
- extraPkgs = sp: with sp; [ gamescope ];
- };
+ home-manager.enable = true;
+ command-not-found.enable = true;
+ };
- gamescopeSession = {
- enable = true;
- args = [
- "--rt"
- "--output-width"
- "2560"
- "--output-height"
- "1440"
- "--adaptive-sync"
- "--filter"
- "fsr"
- "--expose-wayland"
+ services = {
+ blueman-applet.enable = bt.enable;
+
+ gnome-keyring = {
+ enable = true;
+ components = [
+ "pkcs11"
+ "ssh"
+ "secrets"
+ ];
+ };
+
+ udiskie = {
+ enable = true;
+ tray = "auto";
+ notify = true;
+ settings = {
+ program_options = {
+ menu = "nested";
+ };
+ device_config = [
+ {
+ device_file = "/dev/loop*";
+ ignore = true;
+ }
];
- # env = config.environment.sessionVariables;
};
};
- gamescope = {
+
+ cliphist = {
+ enable = true;
+ systemdTarget = "sway-session.target";
+ };
+ };
+
+ imports =
+ [
+ ../../modules/options
+ inputs.anyrun.nixosModules.home-manager
+ ]
+ ++ (map (mod: (../../home-manager/modules + "/${mod}")) (
+ builtins.attrNames (builtins.readDir ../../home-manager/modules)
+ ));
+ };
+
+ # OBS control websocket
+ networking.firewall.allowedTCPPorts = [ 4455 ];
+
+ programs = {
+ steam = {
+ enable = true;
+ package = pkgs.steam.override { extraPkgs = sp: with sp; [ gamescope ]; };
+
+ gamescopeSession = {
enable = true;
- capSysNice = true;
args = [
+ "--rt"
"--output-width"
"2560"
"--output-height"
"1440"
+ "--adaptive-sync"
"--filter"
"fsr"
- "--rt"
- "--fullscreen"
+ "--expose-wayland"
];
- };
- bandwhich.enable = true;
- noisetorch.enable = true;
-
- wireshark = {
- enable = true;
- package = pkgs.wireshark;
+ # env = config.environment.sessionVariables;
};
};
-
- services = {
- ddccontrol.enable = true;
-
- livebook = {
- enableUserService = true;
- environmentFile = pkgs.writeText "livebook-env" ''
- LIVEBOOK_TOKEN_ENABLED=false
- LIVEBOOK_IDENTITY_PROVIDER=tailscale:/run/tailscale/tailscaled.sock
- LIVEBOOK_IP=100.106.117.132
- '';
- };
+ gamescope = {
+ enable = true;
+ capSysNice = true;
+ args = [
+ "--output-width"
+ "2560"
+ "--output-height"
+ "1440"
+ "--filter"
+ "fsr"
+ "--rt"
+ "--fullscreen"
+ ];
};
+ bandwhich.enable = true;
+ noisetorch.enable = true;
- users.groups.wireshark.members = [ "erwin" ];
+ wireshark = {
+ enable = true;
+ package = pkgs.wireshark;
+ };
};
+
+ services = {
+ ddccontrol.enable = true;
+
+ livebook = {
+ enableUserService = true;
+ environmentFile = pkgs.writeText "livebook-env" ''
+ LIVEBOOK_TOKEN_ENABLED=false
+ LIVEBOOK_IDENTITY_PROVIDER=tailscale:/run/tailscale/tailscaled.sock
+ LIVEBOOK_IP=100.106.117.132
+ '';
+ };
+ };
+
+ users.groups.wireshark.members = [ "erwin" ];
+ };
}
diff --git a/users/erwin/server.nix b/users/erwin/server.nix
index 59359b5..ca2cc2d 100644
--- a/users/erwin/server.nix
+++ b/users/erwin/server.nix
@@ -1,4 +1,10 @@
-{ pkgs, config, lib, inputs, ... }:
+{
+ pkgs,
+ config,
+ lib,
+ inputs,
+ ...
+}:
with lib;
let
cfg = config.eboskma.users.erwin;
@@ -27,7 +33,6 @@ in
};
};
-
programs = {
home-manager.enable = true;
command-not-found.enable = true;
@@ -51,18 +56,19 @@ in
];
};
-
xdg = {
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;
-
};
}
diff --git a/users/erwin/work.nix b/users/erwin/work.nix
index bbdc15d..dbd8a58 100644
--- a/users/erwin/work.nix
+++ b/users/erwin/work.nix
@@ -1,4 +1,10 @@
-{ pkgs, config, lib, inputs, ... }:
+{
+ pkgs,
+ config,
+ lib,
+ inputs,
+ ...
+}:
with lib;
let
cfg = config.eboskma.users.erwin;
@@ -20,7 +26,18 @@ let
ewwDaemon =
let
- path = lib.makeBinPath (with pkgs; [ jaq pamedia bash helvum pavucontrol headsetcontrol ha-now-playing ]);
+ path = lib.makeBinPath (
+ with pkgs;
+ [
+ jaq
+ pamedia
+ bash
+ helvum
+ pavucontrol
+ headsetcontrol
+ ha-now-playing
+ ]
+ );
in
pkgs.writeShellScript "eww-daemon" ''
export PATH=${path}:''${PATH}
@@ -28,26 +45,25 @@ let
${config.home-manager.users.erwin.eboskma.programs.eww.package}/bin/eww $@
'';
- workspacePartition = builtins.concatLists (builtins.attrValues (builtins.mapAttrs
- (
- name: workspaces:
- let
- output =
- if name == "right"
- then "DP-1"
- else "DP-3";
- in
- builtins.map
- (ws: {
- inherit output;
- workspace = toString ws;
- })
- workspaces
- )
+ workspacePartition = builtins.concatLists (
+ builtins.attrValues (
+ builtins.mapAttrs
+ (
+ name: workspaces:
+ let
+ output = if name == "right" then "DP-1" else "DP-3";
+ in
+ builtins.map
+ (ws: {
+ inherit output;
+ workspace = toString ws;
+ })
+ workspaces
+ )
- (builtins.partition
- (n: (trivial.mod n 2) != 0)
- (lists.range 1 10))));
+ (builtins.partition (n: (trivial.mod n 2) != 0) (lists.range 1 10))
+ )
+ );
in
{
config = mkIf cfg.work {
@@ -173,7 +189,10 @@ in
};
};
startup = [
- { command = "${ewwDaemon} --restart open bar-work"; always = true; }
+ {
+ command = "${ewwDaemon} --restart open bar-work";
+ always = true;
+ }
# { command = "${pkgs.wayvnc}/bin/wayvnc 0.0.0.0"; always = true; }
];
workspaceOutputs = workspacePartition;
@@ -197,7 +216,11 @@ in
services = {
gnome-keyring = {
enable = true;
- components = [ "pkcs11" "ssh" "secrets" ];
+ components = [
+ "pkcs11"
+ "ssh"
+ "secrets"
+ ];
};
udiskie = {
enable = true;
@@ -215,7 +238,6 @@ in
];
};
};
-
};
home = {
@@ -226,55 +248,65 @@ in
};
stateVersion = "22.11";
-
- packages = with pkgs; [
- atool
- attic-client
- bitwarden
- blink1-tool
- bottom
- chromium
- dbeaver
- dconf
- fd
- ffmpeg_5-full
- gnome.gnome-remote-desktop
- gnome.nautilus
- icemon
- imagemagick
- imv
- incus
- iotop
- (jetbrains.clion.override { jdk = pkgs.jetbrains.jdk; })
- libnotify
- libreoffice-fresh
- minio-client
- mpv
- nordzy-cursor-theme
- pamedia
- pass
- podman-desktop
- quintom-cursor-theme
- procs
- qgis
- recursive
- remmina
- ripgrep
- s-tui
- solo2-cli
- stress
- units
- unzip
- xdg-utils
- xkb-switch
- wayvnc
- winetricks
- wineWowPackages.stable
- wl-clipboard
- zathura
- zeal
- ]
- ++ (with gst_all_1; [ gstreamer gstreamer.dev gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-vaapi ]);
+ packages =
+ with pkgs;
+ [
+ atool
+ attic-client
+ bitwarden
+ blink1-tool
+ bottom
+ chromium
+ dbeaver
+ dconf
+ fd
+ ffmpeg_5-full
+ gnome.gnome-remote-desktop
+ gnome.nautilus
+ icemon
+ imagemagick
+ imv
+ incus
+ iotop
+ (jetbrains.clion.override { jdk = pkgs.jetbrains.jdk; })
+ libnotify
+ libreoffice-fresh
+ minio-client
+ mpv
+ nordzy-cursor-theme
+ pamedia
+ pass
+ podman-desktop
+ quintom-cursor-theme
+ procs
+ qgis
+ recursive
+ remmina
+ ripgrep
+ s-tui
+ solo2-cli
+ stress
+ units
+ unzip
+ xdg-utils
+ xkb-switch
+ wayvnc
+ winetricks
+ wineWowPackages.stable
+ wl-clipboard
+ zathura
+ zeal
+ ]
+ ++ (with gst_all_1; [
+ gstreamer
+ gstreamer.dev
+ gst-plugins-base
+ gst-plugins-good
+ gst-plugins-bad
+ gst-plugins-ugly
+ gst-libav
+ gst-vaapi
+ ]);
pointerCursor = {
name = "elementary";
@@ -286,7 +318,6 @@ in
file.".wallpapers".source = ../../wallpapers;
};
-
xdg = {
enable = true;
mime.enable = true;
@@ -341,9 +372,7 @@ in
};
gtk3 = {
- bookmarks = [
- "file:///home/erwin/workspace"
- ];
+ bookmarks = [ "file:///home/erwin/workspace" ];
extraConfig = {
gtk-application-prefer-dark-theme = 1;
# gtk-cursor-theme-name = "elementary";
@@ -358,14 +387,21 @@ 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
+ ];
};
- 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)
+ ));
};
services = {
@@ -381,9 +417,7 @@ in
teamviewer.enable = true;
- udev.packages = with pkgs; [
- headsetcontrol
- ];
+ udev.packages = with pkgs; [ headsetcontrol ];
xserver = {
# layout = "us,us";
@@ -411,8 +445,6 @@ in
};
users.groups.wireshark.members = [ "erwin" ];
- environment.systemPackages = with pkgs; [
- headsetcontrol
- ];
+ environment.systemPackages = with pkgs; [ headsetcontrol ];
};
}
diff --git a/users/root/default.nix b/users/root/default.nix
index 2f9ea70..9a51080 100644
--- a/users/root/default.nix
+++ b/users/root/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
users.users.root = {
initialHashedPassword = "";
openssh.authorizedKeys.keyFiles = [