1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

6 Commits

Author SHA1 Message Date
ec632a0a77 manakish: fix imports 2026-02-11 16:47:08 +01:00
33c26717e1 format 2026-02-11 16:47:00 +01:00
3a8fb41b8f yt-dlp-master 2026-02-11 16:46:36 +01:00
4f69710614 mpv: configure with wrappers 2026-02-11 16:46:06 +01:00
0a539e4a77 lix: try out 2026-02-11 16:45:50 +01:00
c6a11c1d79 hold overlays correctly 2026-02-10 22:02:34 +01:00
14 changed files with 134 additions and 128 deletions

View File

@@ -20,39 +20,9 @@
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (final: prev: {
niphas-wallpaper = niphas-wallpaper = prev.callPackage ../packages/applicative-wallpaper.nix {
let inherit (config.lib.stylix) colors;
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 = prev.fetchurl {
url = svgUrl;
hash = "sha256-qXDIEZsAPn4eUJ3kb5U6L3PMUCtWGYqhqyIaBt7FntE=";
};
in
prev.runCommand "applicative-wallpaper.png"
{
nativeBuildInputs = [ prev.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
'';
}) })
]; ];

View File

@@ -168,9 +168,9 @@ in
./clipboard.nix ./clipboard.nix
./cloud.nix ./cloud.nix
./fonts.nix ./fonts.nix
./git.nix
./hledger.nix ./hledger.nix
./htop.nix ./htop.nix
./lix.nix
./uni.nix ./uni.nix
# ./i3.nix # ./i3.nix
./graphical ./graphical

View File

@@ -30,15 +30,6 @@
}; };
}; };
nixpkgs.overlays = [
(final: prev: {
niphas-editor = prev.niphas-editor.override {
withCopilot = true;
colorscheme = "gruvbox-dark-medium";
};
})
];
environment.systemPackages = [ environment.systemPackages = [
pkgs.vim-typewriter pkgs.vim-typewriter
pkgs.dawn-editor pkgs.dawn-editor

View File

@@ -1,15 +0,0 @@
{
pkgs,
lib,
...
}:
{
home-manager.users.me = {
programs.git = {
enable = true;
ignores = pkgs.lib.niveum.ignorePaths;
settings.user.name = pkgs.lib.niveum.kieran.name;
settings.user.email = pkgs.lib.niveum.kieran.email;
};
};
}

View File

@@ -4,9 +4,6 @@
config, config,
... ...
}: }:
let
stylixColors = config.lib.stylix.colors;
in
{ {
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;

View File

@@ -134,8 +134,6 @@ in
settings.default-timeout = 10 * 1000; settings.default-timeout = 10 * 1000;
}; };
services.hyprsunset.enable = true;
programs.ashell = { programs.ashell = {
enable = true; enable = true;
settings = { settings = {
@@ -197,15 +195,6 @@ in
}; };
}; };
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
splash = false;
preload = [ "${config.users.users.me.home}/.cache/wallpaper/wallpaper" ];
};
};
services.hypridle = { services.hypridle = {
enable = true; enable = true;
settings = { settings = {
@@ -263,10 +252,8 @@ in
"QT_QPA_PLATFORM=wayland" "QT_QPA_PLATFORM=wayland"
"GDK_BACKEND=wayland" "GDK_BACKEND=wayland"
"NIXOS_OZONE_WL=1" "NIXOS_OZONE_WL=1"
"HYPRSHOT_DIR=${config.home-manager.users.me.xdg.userDirs.download}/screenshots"
]; ];
permission = [ permission = [
"${lib.getExe pkgs.hyprshot}, screencopy, allow"
"${pkgs.xdg-desktop-portal-hyprland}/libexec/.xdg-desktop-portal-hyprland-wrapped, screencopy, allow" "${pkgs.xdg-desktop-portal-hyprland}/libexec/.xdg-desktop-portal-hyprland-wrapped, screencopy, allow"
]; ];
monitor = [ monitor = [
@@ -279,8 +266,8 @@ in
(lib.getExe pkgs.ashell) (lib.getExe pkgs.ashell)
"hyprctl dispatch exec \"[workspace special:${language.obsidian} silent] obsidian\"" "hyprctl dispatch exec \"[workspace special:${language.obsidian} silent] obsidian\""
"${lib.getExe' pkgs.wl-clipboard "wl-paste"} -t text --watch ${lib.getExe pkgs.clipman} store" "${lib.getExe' pkgs.wl-clipboard "wl-paste"} -t text --watch ${lib.getExe pkgs.clipman} store"
# (lib.getExe pkgs.hyprsunset) (lib.getExe pkgs.hyprsunset)
# (lib.getExe pkgs.hyprpaper) (lib.getExe pkgs.hyprpaper)
]; ];
device = [ device = [
@@ -354,8 +341,7 @@ in
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+" ",XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+"
",XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-" ",XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-"
", Print, exec, ${lib.getExe pkgs.hyprshot} -m region --clipboard-only" ", Print, exec, ${lib.getExe pkgs.niphas-screenshot} -m region --clipboard-only"
"${mod}, Print, exec, ${lib.getExe pkgs.hyprshot} -m region"
]; ];
bindl = [ bindl = [
", XF86AudioNext, exec, playerctl next" ", XF86AudioNext, exec, playerctl next"
@@ -382,8 +368,6 @@ in
"${mod}, l, movefocus, r" "${mod}, l, movefocus, r"
"${mod}, k, movefocus, u" "${mod}, k, movefocus, u"
"${mod}, j, movefocus, d" "${mod}, j, movefocus, d"
"${mod}, F9, exec, hyprctl hyprsunset temperature -1000"
"${mod}, F10, exec, hyprctl hyprsunset temperature +1000" # reset color temperature
"${mod}, F12, exec, ${klem}/bin/klem" "${mod}, F12, exec, ${klem}/bin/klem"
"${mod} SHIFT, W, exec, hyprlock" "${mod} SHIFT, W, exec, hyprlock"

View File

@@ -1,13 +1,11 @@
{ {
pkgs, pkgs,
lib,
... ...
}: }:
{ {
nixpkgs = {
config.allowUnfree = true;
};
nix = { nix = {
package = pkgs.nixVersions.stable; package = lib.mkForce pkgs.lix;
settings.experimental-features = [ "nix-command" "flakes" ]; settings.experimental-features = [ "nix-command" "flakes" ];
}; };
} }

View File

@@ -1,49 +1,42 @@
{ {
pkgs, pkgs,
lib, lib,
self,
config, config,
... ...
}: }:
let let
swallow = command: "${pkgs.swallow}/bin/swallow ${command}"; swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
myMpv =
pkgs:
self.inputs.wrappers.wrapperModules.mpv.apply {
inherit pkgs;
scripts = [
pkgs.mpvScripts.visualizer
];
"mpv.conf".content = "";
"mpv.input".content = ''
Alt+- add video-zoom -0.25
Alt+= add video-zoom 0.25
Alt+LEFT add video-rotate -90
Alt+RIGHT add video-rotate 90
Alt+h add video-pan-x 0.05
Alt+j add video-pan-y -0.05
Alt+k add video-pan-y 0.05
Alt+l add video-pan-x -0.05
'';
};
in in
{ {
environment.shellAliases.smpv = swallow "mpv"; environment.shellAliases.smpv = swallow "mpv";
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (final: prev: {
mpv = config.home-manager.users.me.programs.mpv.finalPackage; mpv = (myMpv prev).wrapper;
}) })
]; ];
home-manager.users.me = { environment.systemPackages = [
programs.mpv = { ((myMpv pkgs).wrapper)
enable = true; ];
config = {
ytdl-format = "bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best";
ytdl-raw-options = lib.concatStringsSep "," [
''sub-lang="de,en"''
"write-sub="
"write-auto-sub="
];
screenshot-template = "%F-%wH%wM%wS-%#04n";
script-opts = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp";
ao = "pulse"; # no pipewire for me :(
};
bindings = {
"Alt+RIGHT" = "add video-rotate 90";
"Alt+LEFT" = "add video-rotate -90";
"Alt+-" = "add video-zoom -0.25";
"Alt+=" = "add video-zoom 0.25";
"Alt+l" = "add video-pan-x -0.05";
"Alt+h" = "add video-pan-x 0.05";
"Alt+k" = "add video-pan-y 0.05";
"Alt+j" = "add video-pan-y -0.05";
};
scripts = [
# pkgs.mpvScripts.quality-menu
# pkgs.mpvScripts.visualizer
];
};
};
} }

View File

@@ -132,6 +132,7 @@ in
pdfpc # presenter console for pdf slides pdfpc # presenter console for pdf slides
hc # print files as qr codes hc # print files as qr codes
yt-dlp yt-dlp
yt-dlp-master
espeak espeak
rink # unit converter rink # unit converter
auc auc

31
flake.lock generated
View File

@@ -454,11 +454,11 @@
"wrappers": "wrappers" "wrappers": "wrappers"
}, },
"locked": { "locked": {
"lastModified": 1770416948, "lastModified": 1770756688,
"narHash": "sha256-gPBY6l691Kd0GuKS0Nu23+FmydfwfGYzpeH45S8mchQ=", "narHash": "sha256-raCwOTt5xT7J1ysxdGrmBva6OVrvjf47EgVLi5B5R5o=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "da68e328a3143fa6f7980a22c8c51c81de3fa52e", "rev": "86bf2150a7cabd225149f35c0ff57576af6ded44",
"revCount": 35, "revCount": 38,
"type": "git", "type": "git",
"url": "https://code.kmein.de/kfm/niphas" "url": "https://code.kmein.de/kfm/niphas"
}, },
@@ -695,7 +695,8 @@
"treefmt-nix": "treefmt-nix_3", "treefmt-nix": "treefmt-nix_3",
"voidrice": "voidrice", "voidrice": "voidrice",
"wallpapers": "wallpapers", "wallpapers": "wallpapers",
"wetter": "wetter" "wetter": "wetter",
"wrappers": "wrappers_2"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
@@ -1090,6 +1091,26 @@
"repo": "wrappers", "repo": "wrappers",
"type": "github" "type": "github"
} }
},
"wrappers_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1770311206,
"narHash": "sha256-gzTvuaJZaymgxQC4rOZ9HlMRRWHVF2moEEaTnCG556A=",
"owner": "lassulus",
"repo": "wrappers",
"rev": "241f2f7dfcac0dbb2338105bdba7f03f412c5847",
"type": "github"
},
"original": {
"owner": "lassulus",
"repo": "wrappers",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@@ -27,6 +27,7 @@
wallpapers.url = "github:kmein/wallpapers"; wallpapers.url = "github:kmein/wallpapers";
nix-topology.url = "github:oddlama/nix-topology"; nix-topology.url = "github:oddlama/nix-topology";
wetter.url = "github:4z3/wetter"; wetter.url = "github:4z3/wetter";
wrappers.url = "github:lassulus/wrappers";
voidrice.flake = false; voidrice.flake = false;
wallpapers.flake = false; wallpapers.flake = false;
@@ -63,6 +64,7 @@
tinc-graph.inputs.nixpkgs.follows = "nixpkgs"; tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
wetter.inputs.nixpkgs.follows = "nixpkgs"; wetter.inputs.nixpkgs.follows = "nixpkgs";
niphas.inputs.nixpkgs.follows = "nixpkgs-unstable"; niphas.inputs.nixpkgs.follows = "nixpkgs-unstable";
wrappers.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = outputs =
@@ -246,12 +248,6 @@
trans = prev.callPackage packages/trans.nix { }; # TODO upstream trans = prev.callPackage packages/trans.nix { }; # TODO upstream
go-webring = prev.callPackage packages/go-webring.nix { }; # TODO upstream go-webring = prev.callPackage packages/go-webring.nix { }; # TODO upstream
stag = prev.callPackage packages/stag.nix { }; # TODO upstream stag = prev.callPackage packages/stag.nix { }; # TODO upstream
mpv = prev.mpv.override {
scripts = [
# final.mpvScripts.visualizer
final.mpvScripts.mpris
];
};
morris = prev.callPackage packages/morris.nix { }; morris = prev.callPackage packages/morris.nix { };
cro = prev.callPackage packages/cro.nix { }; cro = prev.callPackage packages/cro.nix { };
exodus = prev.callPackage packages/exodus.nix { }; exodus = prev.callPackage packages/exodus.nix { };
@@ -349,6 +345,7 @@
vim-kmein = prev.callPackage packages/vim-kmein { }; vim-kmein = prev.callPackage packages/vim-kmein { };
vimv = prev.callPackage packages/vimv.nix { }; vimv = prev.callPackage packages/vimv.nix { };
klem = prev.callPackage packages/klem.nix { }; klem = prev.callPackage packages/klem.nix { };
yt-dlp-master = prev.callPackage packages/yt-dlp-master.nix { };
lib = lib // { lib = lib // {
niveum = import lib/default.nix { niveum = import lib/default.nix {
@@ -370,6 +367,19 @@
nixpkgs.overlays = [ nixpkgs.overlays = [
self.overlays.default self.overlays.default
niphas.overlays.default niphas.overlays.default
(final: prev: {
niphas-git =
(prev.niphas-git.passthru.configuration.apply {
settings = {
user.name = prev.lib.niveum.kieran.name;
user.email = prev.lib.niveum.kieran.email;
};
}).wrapper;
niphas-editor = prev.niphas-editor.override {
withCopilot = true;
colorscheme = "base16-gruvbox-dark-medium";
};
})
]; ];
} }
{ {
@@ -415,6 +425,7 @@
{ {
ful = nixpkgs.lib.nixosSystem { ful = nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
specialArgs = { inherit self; };
modules = modules =
profiles.default profiles.default
++ profiles.server ++ profiles.server
@@ -429,6 +440,7 @@
}; };
zaatar = nixpkgs.lib.nixosSystem { zaatar = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit self; };
modules = modules =
profiles.default profiles.default
++ profiles.server ++ profiles.server
@@ -438,6 +450,7 @@
}; };
kibbeh = nixpkgs.lib.nixosSystem { kibbeh = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit self; };
modules = modules =
profiles.default profiles.default
++ profiles.desktop ++ profiles.desktop
@@ -447,6 +460,7 @@
}; };
makanek = nixpkgs.lib.nixosSystem { makanek = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit self; };
modules = modules =
profiles.default profiles.default
++ profiles.server ++ profiles.server
@@ -458,18 +472,21 @@
}; };
tahina = nixpkgs.lib.nixosSystem { tahina = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit self; };
modules = profiles.default ++ [ modules = profiles.default ++ [
systems/tahina/configuration.nix systems/tahina/configuration.nix
]; ];
}; };
tabula = nixpkgs.lib.nixosSystem { tabula = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit self; };
modules = profiles.default ++ [ modules = profiles.default ++ [
systems/tabula/configuration.nix systems/tabula/configuration.nix
]; ];
}; };
manakish = nixpkgs.lib.nixosSystem { manakish = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit self; };
modules = modules =
profiles.default profiles.default
++ profiles.desktop ++ profiles.desktop
@@ -480,6 +497,7 @@
}; };
kabsa = nixpkgs.lib.nixosSystem { kabsa = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit self; };
modules = modules =
profiles.default profiles.default
++ profiles.desktop ++ profiles.desktop
@@ -490,6 +508,7 @@
}; };
fatteh = nixpkgs.lib.nixosSystem { fatteh = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit self; };
modules = modules =
profiles.default profiles.default
++ profiles.desktop ++ profiles.desktop
@@ -599,6 +618,7 @@
vimv vimv
weechat-declarative weechat-declarative
wttr wttr
yt-dlp-master
; ;
} }
); );

View File

@@ -0,0 +1,38 @@
{
runCommand,
fetchurl,
imagemagick,
colors,
}:
let
backgroundColor = colors.withHashtag.base06;
foregroundColor = colors.withHashtag.base01;
width = 1920;
height = 1080;
svgUrl = "https://applicative.systems/_astro/logo-full.D8zRvqBZ.svg";
logoSvg = fetchurl {
url = svgUrl;
hash = "sha256-qXDIEZsAPn4eUJ3kb5U6L3PMUCtWGYqhqyIaBt7FntE=";
};
in
runCommand "applicative-wallpaper.png"
{
nativeBuildInputs = [ 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
''

View File

@@ -0,0 +1,9 @@
{ nix, writeShellScriptBin }:
writeShellScriptBin "yt-dlp-master" ''
args=$@
${nix}/bin/nix-shell -p '(yt-dlp.overrideAttrs (_: {
src = builtins.fetchTree "github:yt-dlp/yt-dlp";
patches = [];
postPatch = "python devscripts/update-version.py 0.99";
}))' -p deno --run "yt-dlp $args"
''

View File

@@ -11,7 +11,6 @@
./hdmi.nix ./hdmi.nix
../../configs/default.nix ../../configs/default.nix
../../configs/tlp.nix ../../configs/tlp.nix
../../configs/admin-essentials.nix
../../configs/networkmanager.nix ../../configs/networkmanager.nix
../../configs/power-action.nix ../../configs/power-action.nix
]; ];