1
0
mirror of https://github.com/kmein/niveum synced 2026-03-21 20:31:07 +01:00

use shared config from niphas

This commit is contained in:
2026-02-04 16:49:28 +01:00
parent e264f13885
commit b038278af3
15 changed files with 140 additions and 629 deletions

View File

@@ -18,44 +18,45 @@
];
};
services.displayManager.autoLogin.enable = lib.mkForce false;
nixpkgs.overlays = [
(final: prev: {
niphas-wallpaper =
let
backgroundColor = config.lib.stylix.colors.withHashtag.base06;
foregroundColor = config.lib.stylix.colors.withHashtag.base01;
width = 1920;
height = 1080;
# if we have multiple users, they should be able to log in through a greeter
programs.regreet =
let
wallpaper =
pkgs.runCommand "textured-monochrome-wallpaper.png"
svgUrl = "https://applicative.systems/_astro/logo-full.D8zRvqBZ.svg";
logoSvg = prev.fetchurl {
url = svgUrl;
hash = "sha256-qXDIEZsAPn4eUJ3kb5U6L3PMUCtWGYqhqyIaBt7FntE=";
};
in
prev.runCommand "applicative-wallpaper.png"
{
buildInputs = [ pkgs.imagemagick ];
nativeBuildInputs = [ prev.imagemagick ];
}
''
magick -size 2560x1440 plasma:fractal \
-colorspace Gray \
-normalize \
-fill ${lib.escapeShellArg config.lib.stylix.colors.withHashtag.base00} -colorize 100% \
-attenuate 0.15 +noise Gaussian \
# 1. We use -background to set the canvas color
# 2. We use -fuzz and -opaque to replace the logo's internal colors
# 3. We use -gravity and -extent to center it on a wallpaper-sized canvas
convert \
-background none \
-density 300 \
"${logoSvg}" \
-fuzz 100% -fill "${foregroundColor}" -opaque black \
-resize 800x800 \
-gravity center \
-background "${backgroundColor}" \
-extent ${toString width}x${toString height} \
$out
'';
in
{
enable = true;
settings = {
background = {
path = wallpaper;
fit = "Fill";
};
appearance.greeting_msg = "";
widget.clock.format = "%F %H:%M";
};
font = {
inherit (config.stylix.fonts.sansSerif) name;
size = config.stylix.fonts.sizes.applications;
};
iconTheme = {
inherit (config.home-manager.users.me.gtk.iconTheme) package name;
};
};
})
];
services.getty.autologinOnce = lib.mkForce false;
# to run nspawn in nix sandbox
nix.settings = {
@@ -65,8 +66,6 @@
"auto-allocate-uids"
"cgroups"
];
extra-sandbox-paths = [ "/dev/net" ]; # needed for tests of VPNs
trusted-users = [ config.users.users.applicative.name ];
};
@@ -86,82 +85,4 @@
commands = [ "ALL" ];
}
];
home-manager.users.applicative =
let
mainGitConfig = (import ./git.nix {
inherit pkgs lib config;
}).home-manager.users.me.programs.git;
mainAlacrittyConfig = (import ./alacritty.nix {
inherit pkgs lib config;
}).home-manager.users.me.programs.alacritty;
in
lib.recursiveUpdate
(import ./graphical/home-manager.nix {
inherit lib pkgs config;
})
{
xdg.enable = true;
home.stateVersion = "25.11";
programs.git = {
enable = true;
settings = {
inherit (mainGitConfig.settings) alias;
};
};
programs.alacritty = mainAlacrittyConfig;
services.hyprpaper =
let
# asgWallpaper = pkgs.fetchurl {
# url = "http://c.krebsco.de/asg-wallpaper.png";
# hash = "sha256-XLp8XcUgFgDKW5Qae0//0Xw9lhribcevQTVSQvClEB4=";
# };
backgroundColor = config.lib.stylix.colors.withHashtag.base06;
foregroundColor = config.lib.stylix.colors.withHashtag.base01;
width = 1920;
height = 1080;
svgUrl = "https://applicative.systems/_astro/logo-full.D8zRvqBZ.svg";
logoSvg = pkgs.fetchurl {
url = svgUrl;
hash = "sha256-qXDIEZsAPn4eUJ3kb5U6L3PMUCtWGYqhqyIaBt7FntE=";
};
asgWallpaper =
pkgs.runCommand "applicative-wallpaper.png"
{
nativeBuildInputs = [ pkgs.imagemagick ];
}
''
# 1. We use -background to set the canvas color
# 2. We use -fuzz and -opaque to replace the logo's internal colors
# 3. We use -gravity and -extent to center it on a wallpaper-sized canvas
convert \
-background none \
-density 300 \
"${logoSvg}" \
-fuzz 100% -fill "${foregroundColor}" -opaque black \
-resize 800x800 \
-gravity center \
-background "${backgroundColor}" \
-extent ${toString width}x${toString height} \
$out
'';
in
{
enable = true;
settings = {
ipc = false;
splash = true;
preload = [ "${asgWallpaper}" ];
wallpaper = [ ",${asgWallpaper}" ];
};
};
};
}