From fbbf34c7b6ba70a718abf655c0711b6ac5ff20e8 Mon Sep 17 00:00:00 2001 From: Leonardo Santiago Date: Fri, 25 Oct 2024 20:07:38 -0300 Subject: partial commit --- modules/blog.nix | 2 +- modules/cgit.nix | 38 ++++++++++++++++++++++++++++++++++++++ modules/ddns.nix | 13 ++++++++++++- modules/gnome/default.nix | 3 ++- modules/gnome/gnome-config.nix | 24 ++++++++++++++++++------ 5 files changed, 71 insertions(+), 9 deletions(-) create mode 100644 modules/cgit.nix (limited to 'modules') diff --git a/modules/blog.nix b/modules/blog.nix index 6e7021a..c186513 100644 --- a/modules/blog.nix +++ b/modules/blog.nix @@ -31,7 +31,7 @@ in { }; security.acme = { acceptTerms = true; - certs."santi.net.br".email = "leonardo.ribeiro.santiago@gmail.com"; + certs.${cfg.url}.email = "leonardo.ribeiro.santiago@gmail.com"; }; }; } diff --git a/modules/cgit.nix b/modules/cgit.nix new file mode 100644 index 0000000..fb894b8 --- /dev/null +++ b/modules/cgit.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, ...}: with lib; { + options.santi-modules.services.cgit.enable = mkEnableOption "Enable cgit instance"; + config = mkIf config.santi-modules.services.cgit.enable { + services.cgit.santi = let + org2html = pkgs.writeShellScript "org2md" '' + ${pkgs.pandoc}/bin/pandoc \ + --from org \ + --to html5 \ + --sandbox=true \ + --html-q-tags \ + --ascii \ + --standalone \ + --wrap=auto \ + --embed-resources \ + -M document-css=false + ''; + in { + enable = true; + user = "root"; + group = "root"; + settings = { + readme = ":README.org"; + root-title = "index"; + root-desc = "public repositories for santi.net.br"; + about-filter = toString org2html; + enable-git-config = true; + enable-html-cache = false; + enable-blame = true; + enable-log-linecount = true; + enable-index-links = true; + enable-index-owner = false; + enable-commit-graph = true; + remove-suffix = true; + }; + scanPath = "/home/leonardo"; + }; + }; +} diff --git a/modules/ddns.nix b/modules/ddns.nix index 53dcb0f..3a3196e 100644 --- a/modules/ddns.nix +++ b/modules/ddns.nix @@ -1,6 +1,17 @@ -{ config, lib, pkgs, ...}: with lib; { +{ config, lib, ...}: with lib; { options.santi-modules.services.ddns.enable = mkEnableOption "Enable ddns service"; config = mkIf config.santi-modules.services.ddns.enable { + networking.enableIPv6 = true; + services.cloudflared = { + enable = true; + tunnels.iori = { + default = "http_status:404"; + credentialsFile = "/var/lib/cloudflared/iori.json"; + ingress = { + "santi.net.br" = "http://localhost:80"; + }; + }; + }; services.inadyn = { enable = true; user = "leonardo"; diff --git a/modules/gnome/default.nix b/modules/gnome/default.nix index f0e7939..b0a1976 100644 --- a/modules/gnome/default.nix +++ b/modules/gnome/default.nix @@ -12,6 +12,7 @@ graphite-gtk-theme x11-gestures gsconnect + open-bar ]); environment.gnome.excludePackages = with pkgs; [ @@ -34,7 +35,7 @@ services.xserver = { displayManager.gdm = { enable = true; - wayland = false; + wayland = true; }; desktopManager.gnome.enable = true; }; diff --git a/modules/gnome/gnome-config.nix b/modules/gnome/gnome-config.nix index 1091572..73f779a 100644 --- a/modules/gnome/gnome-config.nix +++ b/modules/gnome/gnome-config.nix @@ -25,6 +25,7 @@ santi-modules: dynamic-workspaces= true; edge-tiling= true; workspaces-only-on-primary= true; + experimental-features = [ "scale-monitor-framebuffer" "variable-refresh-rate"]; }; "org/gnome/settings-daemon/plugins/power" = { power-button-action="hibernate"; @@ -36,6 +37,7 @@ santi-modules: "appindicatorsupport@rgcjonas.gmail.com" "user-theme@gnome-shell-extensions.gcampax.github.com" "x11gestures@joseexposito.github.io" + "openbar@neuromorph" "system-monitor@gnome-shell-extensions.gcampax.github.com" ]; disabled-extensions= [ @@ -44,12 +46,22 @@ santi-modules: ]; }; "org/gnome/shell/extensions/user-theme".name = "Graphite"; - "org/honem/shell/extensions/vitals" = { - hide-zeros = true; - position-in-panel = "0"; - show-battery = false; - show-temperature = true; - }; "org/gnome/shell/app-switcher".current-workspace-only = true; + "org/gnome/shell/extensions/openbar" = { + bartype="Islands"; + apply-accent-shell= true; + apply-all-shell = false; + apply-menu-notif = true; + apply-menu-shell = true; + autotheme-dark="Dark"; + autotheme-font= true; + autotheme-light= "Light"; + autotheme-refresh= true; + color-scheme="prefer-dark"; + cust-margin-wmax=false; + margin = 0.0; + wmaxbar = true; + border-wmax = true; + }; }; } -- cgit v1.2.3