mirror of
https://github.com/kmein/niveum
synced 2026-03-24 05:31:08 +01:00
Compare commits
8 Commits
ec632a0a77
...
fb86f8c7f7
| Author | SHA1 | Date | |
|---|---|---|---|
| fb86f8c7f7 | |||
| 86b5e4da9f | |||
| 15ab8ac8a8 | |||
| f202be220b | |||
| 267124dfd1 | |||
| ca05785b26 | |||
| f1610d08dc | |||
| 9aaaaff724 |
@@ -170,6 +170,7 @@ in
|
||||
./fonts.nix
|
||||
./hledger.nix
|
||||
./htop.nix
|
||||
./lix.nix
|
||||
./uni.nix
|
||||
# ./i3.nix
|
||||
./graphical
|
||||
|
||||
@@ -35,10 +35,8 @@
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
|
||||
services.getty.autologinOnce = {
|
||||
enable = true;
|
||||
user = config.users.users.me.name;
|
||||
};
|
||||
services.getty.autologinOnce = true;
|
||||
services.getty.autologinUser = config.users.users.me.name;
|
||||
|
||||
home-manager.users.me = import ./home-manager.nix {
|
||||
inherit lib pkgs config;
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
nix = {
|
||||
package = pkgs.nixVersions.stable;
|
||||
package = lib.mkForce pkgs.lix;
|
||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
}
|
||||
@@ -1,49 +1,42 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
self,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
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
|
||||
{
|
||||
environment.shellAliases.smpv = swallow "mpv";
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
mpv = config.home-manager.users.me.programs.mpv.finalPackage;
|
||||
(final: prev: {
|
||||
mpv = (myMpv prev).wrapper;
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.me = {
|
||||
programs.mpv = {
|
||||
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
|
||||
];
|
||||
};
|
||||
};
|
||||
environment.systemPackages = [
|
||||
((myMpv pkgs).wrapper)
|
||||
];
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@ in
|
||||
pdfpc # presenter console for pdf slides
|
||||
hc # print files as qr codes
|
||||
yt-dlp
|
||||
yt-dlp-master
|
||||
espeak
|
||||
rink # unit converter
|
||||
auc
|
||||
|
||||
23
flake.lock
generated
23
flake.lock
generated
@@ -695,7 +695,8 @@
|
||||
"treefmt-nix": "treefmt-nix_3",
|
||||
"voidrice": "voidrice",
|
||||
"wallpapers": "wallpapers",
|
||||
"wetter": "wetter"
|
||||
"wetter": "wetter",
|
||||
"wrappers": "wrappers_2"
|
||||
}
|
||||
},
|
||||
"rust-analyzer-src": {
|
||||
@@ -1090,6 +1091,26 @@
|
||||
"repo": "wrappers",
|
||||
"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",
|
||||
|
||||
60
flake.nix
60
flake.nix
@@ -2,8 +2,6 @@
|
||||
description = "niveum: packages, modules, systems";
|
||||
|
||||
inputs = {
|
||||
self.submodules = true;
|
||||
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
autorenkalender.url = "github:kmein/autorenkalender";
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
||||
@@ -27,6 +25,7 @@
|
||||
wallpapers.url = "github:kmein/wallpapers";
|
||||
nix-topology.url = "github:oddlama/nix-topology";
|
||||
wetter.url = "github:4z3/wetter";
|
||||
wrappers.url = "github:lassulus/wrappers";
|
||||
|
||||
voidrice.flake = false;
|
||||
wallpapers.flake = false;
|
||||
@@ -63,6 +62,7 @@
|
||||
tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
|
||||
wetter.inputs.nixpkgs.follows = "nixpkgs";
|
||||
niphas.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
wrappers.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
@@ -166,7 +166,7 @@
|
||||
${pkgs.nixos-rebuild-ng}/bin/nixos-rebuild-ng switch \
|
||||
--max-jobs 2 \
|
||||
--log-format internal-json \
|
||||
--flake .#${hostname} \
|
||||
--flake .?submodules=1#${hostname} \
|
||||
--use-substitutes \
|
||||
--target-host "$target" \
|
||||
${lib.optionalString (localSystem != machines.${hostname}.system) "--build-host $target"} \
|
||||
@@ -246,12 +246,6 @@
|
||||
trans = prev.callPackage packages/trans.nix { }; # TODO upstream
|
||||
go-webring = prev.callPackage packages/go-webring.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 { };
|
||||
cro = prev.callPackage packages/cro.nix { };
|
||||
exodus = prev.callPackage packages/exodus.nix { };
|
||||
@@ -349,6 +343,7 @@
|
||||
vim-kmein = prev.callPackage packages/vim-kmein { };
|
||||
vimv = prev.callPackage packages/vimv.nix { };
|
||||
klem = prev.callPackage packages/klem.nix { };
|
||||
yt-dlp-master = prev.callPackage packages/yt-dlp-master.nix { };
|
||||
|
||||
lib = lib // {
|
||||
niveum = import lib/default.nix {
|
||||
@@ -366,25 +361,25 @@
|
||||
let
|
||||
profiles.default = [
|
||||
{ nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; }
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
self.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";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
self.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";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
{
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
@@ -428,6 +423,7 @@
|
||||
{
|
||||
ful = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = { inherit self; };
|
||||
modules =
|
||||
profiles.default
|
||||
++ profiles.server
|
||||
@@ -442,6 +438,7 @@
|
||||
};
|
||||
zaatar = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit self; };
|
||||
modules =
|
||||
profiles.default
|
||||
++ profiles.server
|
||||
@@ -451,6 +448,7 @@
|
||||
};
|
||||
kibbeh = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit self; };
|
||||
modules =
|
||||
profiles.default
|
||||
++ profiles.desktop
|
||||
@@ -460,6 +458,7 @@
|
||||
};
|
||||
makanek = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit self; };
|
||||
modules =
|
||||
profiles.default
|
||||
++ profiles.server
|
||||
@@ -471,18 +470,21 @@
|
||||
};
|
||||
tahina = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit self; };
|
||||
modules = profiles.default ++ [
|
||||
systems/tahina/configuration.nix
|
||||
];
|
||||
};
|
||||
tabula = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit self; };
|
||||
modules = profiles.default ++ [
|
||||
systems/tabula/configuration.nix
|
||||
];
|
||||
};
|
||||
manakish = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit self; };
|
||||
modules =
|
||||
profiles.default
|
||||
++ profiles.desktop
|
||||
@@ -493,6 +495,7 @@
|
||||
};
|
||||
kabsa = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit self; };
|
||||
modules =
|
||||
profiles.default
|
||||
++ profiles.desktop
|
||||
@@ -613,6 +616,7 @@
|
||||
vimv
|
||||
weechat-declarative
|
||||
wttr
|
||||
yt-dlp-master
|
||||
;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
jq,
|
||||
yq,
|
||||
}:
|
||||
let
|
||||
model = "gemini-2.5-flash-lite";
|
||||
in
|
||||
writers.writeBashBin "radio-news" ''
|
||||
set -efu
|
||||
PATH=$PATH:${
|
||||
@@ -57,5 +60,5 @@ writers.writeBashBin "radio-news" ''
|
||||
EOF
|
||||
)
|
||||
|
||||
echo "$REQUEST" | curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-8b:generateContent?key=$GEMINI_API_KEY" -s -H "Content-Type: application/json" -d @-
|
||||
echo "$REQUEST" | curl "https://generativelanguage.googleapis.com/v1beta/models/${model}:generateContent?key=$GEMINI_API_KEY" -s -H "Content-Type: application/json" -d @-
|
||||
''
|
||||
|
||||
9
packages/yt-dlp-master.nix
Normal file
9
packages/yt-dlp-master.nix
Normal 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"
|
||||
''
|
||||
@@ -1,3 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
@@ -21,7 +22,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda"; # Force it to use the MX150
|
||||
package = pkgs.ollama-cuda;
|
||||
};
|
||||
|
||||
nix.settings.system-features = [ "cuda" ];
|
||||
nixpkgs.config.cudaCapabilities = [ "6.1" ];
|
||||
|
||||
programs.nix-required-mounts = {
|
||||
enable = true;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
./hdmi.nix
|
||||
../../configs/default.nix
|
||||
../../configs/tlp.nix
|
||||
../../configs/admin-essentials.nix
|
||||
../../configs/networkmanager.nix
|
||||
../../configs/power-action.nix
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user