refactor(wrappers): remove wrapping
As much as I prefer wrappers, I feel like it is too much work to set them up because no one likes standards...
This commit is contained in:
parent
6d555ec898
commit
be97ef1692
25 changed files with 180 additions and 118 deletions
|
@ -12,22 +12,19 @@
|
|||
statix
|
||||
deadnix
|
||||
alejandra
|
||||
neovide
|
||||
;
|
||||
neovim = inputs.painless-neovim.packages.${pkgs.system}.default;
|
||||
};
|
||||
sessionVariables = {EDITOR = "neovide --no-fork";};
|
||||
};
|
||||
|
||||
alqueva = {
|
||||
programs = {
|
||||
swaybg = {
|
||||
enable = true;
|
||||
wallpaper = inputs.wallpkgs.wallpapers.everforest-mojave_minimal.path;
|
||||
wallpaper = inputs.wallpkgs.wallpapers.everforest-foggy_valley_1.path;
|
||||
};
|
||||
waybar = {
|
||||
enable = true;
|
||||
package = pkgs.amadaluzian-waybar;
|
||||
package = pkgs.waybar;
|
||||
};
|
||||
sleep-or-die = {
|
||||
enable = true;
|
||||
|
@ -79,6 +76,13 @@
|
|||
web.enable = false;
|
||||
};
|
||||
rsyncd.enable = true;
|
||||
emacs = {
|
||||
enable = true;
|
||||
package = inputs.pankomacs.packages.${pkgs.system}.pgtk;
|
||||
startWithGraphical = true;
|
||||
install = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.git.config = {
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
...
|
||||
}: {
|
||||
imports = [
|
||||
./users
|
||||
./users/amadaluzia
|
||||
./hardware.nix
|
||||
./disks.nix
|
||||
./theme.nix
|
||||
./apps.nix
|
||||
./fonts.nix
|
||||
./forgejo.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
|
@ -23,14 +24,6 @@
|
|||
|
||||
nixpkgs.overlays = [
|
||||
inputs.alqages.overlays.default
|
||||
(
|
||||
final: _prev: (
|
||||
builtins.mapAttrs (_: v: final.callPackage v {}) {
|
||||
amadaluzian-waybar = ./wrappers/waybar;
|
||||
amadaluzian-foot = ./wrappers/foot;
|
||||
}
|
||||
)
|
||||
)
|
||||
];
|
||||
|
||||
console = {
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
{pkgs, ...}: {
|
||||
{pkgs, ...}: let
|
||||
comfy = pkgs.iosevka-comfy;
|
||||
in {
|
||||
alqueva.system.fonts = {
|
||||
names = {
|
||||
sansSerif = ["IBM Plex Sans"];
|
||||
monospace = ["IBM Plex Mono"];
|
||||
sansSerif = ["Iosevka Comfy"];
|
||||
monospace = ["Iosevka Comfy Fixed"];
|
||||
serif = ["IBM Plex Serif"];
|
||||
emoji = ["Twitter Color Emoji"];
|
||||
};
|
||||
packages = {
|
||||
sansSerif = [pkgs.ibm-plex];
|
||||
monospace = [pkgs.ibm-plex];
|
||||
sansSerif = [comfy.comfy];
|
||||
monospace = [comfy.comfy-fixed];
|
||||
serif = [pkgs.ibm-plex];
|
||||
emoji = [pkgs.twemoji-color-font];
|
||||
extra = [
|
||||
|
|
51
hosts/python/forgejo.nix
Normal file
51
hosts/python/forgejo.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{config, ...}: let
|
||||
cfg = config.services.forgejo;
|
||||
srv = cfg.settings.server;
|
||||
in {
|
||||
services.nginx = {
|
||||
virtualHosts.${cfg.settings.server.DOMAIN} = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = ''
|
||||
client_max_body_size 512M;
|
||||
'';
|
||||
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
|
||||
};
|
||||
};
|
||||
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
database.type = "postgres";
|
||||
# Enable support for Git Large File Storage
|
||||
lfs.enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "192.168.1.252";
|
||||
# You need to specify this to remove the port from URLs in the web UI.
|
||||
ROOT_URL = "http://${srv.DOMAIN}:${toString srv.HTTP_PORT}/";
|
||||
HTTP_PORT = 3000;
|
||||
};
|
||||
# You can temporarily allow registration to create an admin user.
|
||||
service.DISABLE_REGISTRATION = false;
|
||||
# Add support for actions, based on act: https://github.com/nektos/act
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
DEFAULT_ACTIONS_URL = "github";
|
||||
};
|
||||
# Sending emails is completely optional
|
||||
# You can send a test email from the web UI at:
|
||||
# Profile Picture > Site Administration > Configuration > Mailer Configuration
|
||||
mailer = {
|
||||
ENABLED = true;
|
||||
SMTP_ADDR = "mail.example.com";
|
||||
FROM = "noreply@${srv.DOMAIN}";
|
||||
USER = "noreply@${srv.DOMAIN}";
|
||||
PASSWD = "password"; # Locally hosted instance a.k.a. NO ONE CARES.
|
||||
};
|
||||
default = {
|
||||
APP_NAME = "Amadajo";
|
||||
APP_SLOGAN = "Fun little instance I just have on my config...";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -147,7 +147,7 @@ layout {
|
|||
// off
|
||||
|
||||
// How many logical pixels the ring extends out from the windows.
|
||||
width 1
|
||||
width 2
|
||||
|
||||
// Colors can be set in a variety of ways:
|
||||
// - CSS named colors: "red"
|
||||
|
@ -232,13 +232,34 @@ animations {
|
|||
// off
|
||||
|
||||
// Slow down all animations by this factor. Values below 1 speed them up instead.
|
||||
slowdown 0.9
|
||||
slowdown 0.8
|
||||
}
|
||||
|
||||
// Window rules let you adjust behavior for individual windows.
|
||||
// Find more information on the wiki:
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
||||
|
||||
layer-rule {
|
||||
shadow {
|
||||
on
|
||||
softness 10
|
||||
spread 1
|
||||
draw-behind-window true
|
||||
color "#00000030"
|
||||
}
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match is-floating=true
|
||||
shadow {
|
||||
on
|
||||
softness 20
|
||||
spread 10
|
||||
draw-behind-window true
|
||||
color "#00000040"
|
||||
}
|
||||
}
|
||||
|
||||
// Work around WezTerm's initial configure bug
|
||||
// by setting an empty default-column-width.
|
||||
window-rule {
|
||||
|
@ -293,7 +314,7 @@ binds {
|
|||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||
Mod+T { spawn "neovide"; }
|
||||
Mod+T { spawn "emacs"; }
|
||||
Mod+D { spawn "rofi" "-show" "drun"; }
|
||||
// Super+Alt+L { spawn "swaylock"; }
|
||||
|
||||
|
@ -464,6 +485,7 @@ binds {
|
|||
Mod+Shift+R { switch-preset-window-height; }
|
||||
Mod+Ctrl+R { reset-window-height; }
|
||||
Mod+F { maximize-column; }
|
||||
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||
Mod+Shift+F { fullscreen-window; }
|
||||
Mod+C { center-column; }
|
||||
|
||||
|
@ -485,6 +507,7 @@ binds {
|
|||
// Move the focused window between the floating and the tiling layout.
|
||||
Mod+V { toggle-window-floating; }
|
||||
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
|
||||
Mod+W { toggle-column-tabbed-display; }
|
||||
|
||||
// Actions to switch layouts.
|
||||
// Note: if you uncomment these, make sure you do NOT have
|
42
hosts/python/users/amadaluzia/configs/waybar/waybar.nix
Normal file
42
hosts/python/users/amadaluzia/configs/waybar/waybar.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
pkgs: let
|
||||
json = pkgs.formats.json {};
|
||||
in {
|
||||
config = json.generate "waybar.jsonc" {
|
||||
position = "top";
|
||||
height = 0;
|
||||
spacing = 16;
|
||||
modules-left = ["mpris"];
|
||||
modules-center = ["niri/workspaces"];
|
||||
modules-right = ["wireplumber" "clock"];
|
||||
mpris = {
|
||||
format = "{player_icon} {dynamic}";
|
||||
format-paused = "{status_icon} <i>{dynamic}</i>";
|
||||
interval = 1;
|
||||
dynamic-len = 64;
|
||||
player-icons = {
|
||||
default = "▶";
|
||||
mpv = "🎵";
|
||||
};
|
||||
status_icons = {
|
||||
paused = "⏸";
|
||||
};
|
||||
};
|
||||
clock = {
|
||||
format = " {:%H:%M}";
|
||||
tooltip-format = "{:%A, %B %d, %Y}";
|
||||
};
|
||||
wireplumber = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = "";
|
||||
on-click = "helvum";
|
||||
format-icons = ["" "" ""];
|
||||
};
|
||||
};
|
||||
|
||||
style =
|
||||
pkgs.runCommand "waybar.css" {
|
||||
nativeBuildInputs = [pkgs.sass];
|
||||
} ''
|
||||
sass ${./style.scss} > $out
|
||||
'';
|
||||
}
|
|
@ -3,7 +3,9 @@
|
|||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
waybar = import ./configs/waybar/waybar.nix pkgs;
|
||||
in {
|
||||
alqueva.users.artur = {
|
||||
shell = config.alqueva.shells.nushell.package;
|
||||
tmpfiles = {
|
||||
|
@ -18,6 +20,9 @@
|
|||
".config/dunst/" = ./configs/dunst;
|
||||
".config/niri/" = ./configs/niri;
|
||||
".config/rofi/" = ./configs/rofi;
|
||||
".config/foot" = ./configs/foot;
|
||||
".config/waybar/config.jsonc" = waybar.config;
|
||||
".config/waybar/style.css" = waybar.style;
|
||||
};
|
||||
packages = builtins.attrValues {
|
||||
inherit
|
||||
|
@ -38,7 +43,7 @@
|
|||
dunst
|
||||
gh
|
||||
rofi-wayland
|
||||
amadaluzian-foot
|
||||
foot
|
||||
signal-desktop
|
||||
dino
|
||||
;
|
|
@ -1,2 +0,0 @@
|
|||
{...}: {
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
foot,
|
||||
symlinkJoin,
|
||||
makeWrapper,
|
||||
}:
|
||||
symlinkJoin {
|
||||
name = "foot";
|
||||
paths = [
|
||||
foot
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/foot \
|
||||
--add-flags "--config" \
|
||||
--add-flags ${./foot.ini}
|
||||
'';
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
symlinkJoin,
|
||||
waybar,
|
||||
makeWrapper,
|
||||
runCommand,
|
||||
sass,
|
||||
}: let
|
||||
styleCss =
|
||||
runCommand "style.css" {
|
||||
nativeBuildInputs = [sass];
|
||||
} ''
|
||||
sass ${./style.scss} > $out
|
||||
'';
|
||||
in
|
||||
symlinkJoin {
|
||||
name = "waybar";
|
||||
paths = [
|
||||
waybar
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/waybar \
|
||||
--add-flags "--config" \
|
||||
--add-flags "${./config.jsonc}" \
|
||||
--add-flags "--style" \
|
||||
--add-flags "${styleCss}"
|
||||
|
||||
rm $out/lib/systemd/user/waybar.service
|
||||
substitute ${waybar}/lib/systemd/user/waybar.service $out/lib/systemd/user/waybar.service \
|
||||
--replace-fail ${waybar}/bin/waybar $out/bin/waybar \
|
||||
'';
|
||||
meta = {
|
||||
inherit (waybar.meta) mainProgram;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue