mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
Compare commits
5 Commits
e24fdaedf3
...
e99103226d
| Author | SHA1 | Date | |
|---|---|---|---|
| e99103226d | |||
| 8a0bf14e4e | |||
| 91a650953a | |||
| eae1a7a71b | |||
| 16f8cfbf4c |
@@ -71,7 +71,9 @@ echo "Enough space available. Starting conversion..."
|
|||||||
sanitize_filename() {
|
sanitize_filename() {
|
||||||
local name="$1"
|
local name="$1"
|
||||||
# Remove path, keep only base name
|
# Remove path, keep only base name
|
||||||
name=$(basename "$name" .m4a)
|
name=$(basename "$name")
|
||||||
|
# Remove any extension
|
||||||
|
name=${name%.*}
|
||||||
# Replace spaces and special chars with underscore
|
# Replace spaces and special chars with underscore
|
||||||
name=$(echo "$name" | tr ' ' '_' | tr -cd '[:alnum:]_-')
|
name=$(echo "$name" | tr ' ' '_' | tr -cd '[:alnum:]_-')
|
||||||
# Truncate to max 50 chars
|
# Truncate to max 50 chars
|
||||||
@@ -100,8 +102,9 @@ for f in "${FILES[@]}"; do
|
|||||||
|
|
||||||
echo "Converting '$f' to '$OUT_PATTERN' at speed $SPEED..."
|
echo "Converting '$f' to '$OUT_PATTERN' at speed $SPEED..."
|
||||||
|
|
||||||
ffmpeg -i "$f" \
|
ffmpeg -nostdin -i "$f" \
|
||||||
-filter:a "atempo=$SPEED" -ar 44100 -ac 2 -c:a libmp3lame -b:a 128k \
|
-filter:a "atempo=$SPEED" \
|
||||||
|
-ar 22050 -ac 1 -c:a libmp3lame -b:a 32k \
|
||||||
-f segment -segment_time 300 \
|
-f segment -segment_time 300 \
|
||||||
"$OUT_PATTERN"
|
"$OUT_PATTERN"
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,11 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
users.users.applicative = {
|
users.users.applicative = {
|
||||||
name = "applicative";
|
name = "asg";
|
||||||
description = "<*>";
|
description = "Applicative Systems";
|
||||||
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
||||||
|
home = "/home/applicative";
|
||||||
|
uid = 1001;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"pipewire"
|
"pipewire"
|
||||||
@@ -16,6 +18,45 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.displayManager.autoLogin.enable = false;
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
{
|
||||||
|
buildInputs = [ pkgs.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 \
|
||||||
|
$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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# to run nspawn in nix sandbox
|
# to run nspawn in nix sandbox
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
auto-allocate-uids = true;
|
auto-allocate-uids = true;
|
||||||
@@ -25,6 +66,8 @@
|
|||||||
"cgroups"
|
"cgroups"
|
||||||
];
|
];
|
||||||
extra-sandbox-paths = [ "/dev/net" ]; # needed for tests of VPNs
|
extra-sandbox-paths = [ "/dev/net" ]; # needed for tests of VPNs
|
||||||
|
|
||||||
|
trusted-users = [ config.users.users.applicative.name ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.restic.backups.niveum = {
|
services.restic.backups.niveum = {
|
||||||
|
|||||||
@@ -240,7 +240,6 @@ in
|
|||||||
./vscode.nix
|
./vscode.nix
|
||||||
./wallpaper.nix
|
./wallpaper.nix
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
./applicative.nix
|
|
||||||
{
|
{
|
||||||
home-manager.users.me.home.file.".zshrc".text = ''
|
home-manager.users.me.home.file.".zshrc".text = ''
|
||||||
# nothing to see here
|
# nothing to see here
|
||||||
|
|||||||
@@ -38,40 +38,10 @@ in
|
|||||||
pkgs.xdg-desktop-portal-hyprland
|
pkgs.xdg-desktop-portal-hyprland
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.regreet =
|
services.displayManager.autoLogin = {
|
||||||
let
|
enable = true;
|
||||||
wallpaper =
|
user = config.users.users.me.name;
|
||||||
pkgs.runCommand "textured-monochrome-wallpaper.png"
|
};
|
||||||
{
|
|
||||||
buildInputs = [ pkgs.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 \
|
|
||||||
$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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.me = import ./home-manager.nix {
|
home-manager.users.me = import ./home-manager.nix {
|
||||||
inherit lib pkgs config;
|
inherit lib pkgs config;
|
||||||
|
|||||||
@@ -189,6 +189,7 @@ in
|
|||||||
qrencode
|
qrencode
|
||||||
|
|
||||||
pkgs.agenix
|
pkgs.agenix
|
||||||
|
pkgs.wetter
|
||||||
pkgs.alarm
|
pkgs.alarm
|
||||||
|
|
||||||
(pkgs.writers.writeDashBin "worldradio" ''
|
(pkgs.writers.writeDashBin "worldradio" ''
|
||||||
|
|||||||
23
flake.lock
generated
23
flake.lock
generated
@@ -666,7 +666,8 @@
|
|||||||
"tinc-graph": "tinc-graph",
|
"tinc-graph": "tinc-graph",
|
||||||
"treefmt-nix": "treefmt-nix_2",
|
"treefmt-nix": "treefmt-nix_2",
|
||||||
"voidrice": "voidrice",
|
"voidrice": "voidrice",
|
||||||
"wallpapers": "wallpapers"
|
"wallpapers": "wallpapers",
|
||||||
|
"wetter": "wetter"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-analyzer-src": {
|
"rust-analyzer-src": {
|
||||||
@@ -999,6 +1000,26 @@
|
|||||||
"repo": "wallpapers",
|
"repo": "wallpapers",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"wetter": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1768340583,
|
||||||
|
"narHash": "sha256-k/XWWgjWHURh2w20ScXJgALnDB3ipT/JG6HoWG1eIgI=",
|
||||||
|
"owner": "4z3",
|
||||||
|
"repo": "wetter",
|
||||||
|
"rev": "076b6a1bd9f7e96a96c2488ee823d5e75a60a597",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "4z3",
|
||||||
|
"repo": "wetter",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
voidrice.url = "github:Lukesmithxyz/voidrice";
|
voidrice.url = "github:Lukesmithxyz/voidrice";
|
||||||
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";
|
||||||
|
|
||||||
voidrice.flake = false;
|
voidrice.flake = false;
|
||||||
wallpapers.flake = false;
|
wallpapers.flake = false;
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
scripts.inputs.nixpkgs.follows = "nixpkgs";
|
scripts.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
|
tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
wetter.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
@@ -81,6 +83,7 @@
|
|||||||
nix-index-database,
|
nix-index-database,
|
||||||
stylix,
|
stylix,
|
||||||
voidrice,
|
voidrice,
|
||||||
|
wetter,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@@ -159,6 +162,7 @@
|
|||||||
--max-jobs 2 \
|
--max-jobs 2 \
|
||||||
--log-format internal-json \
|
--log-format internal-json \
|
||||||
--flake .#${hostname} \
|
--flake .#${hostname} \
|
||||||
|
--use-substitutes \
|
||||||
--target-host "$target" \
|
--target-host "$target" \
|
||||||
${lib.optionalString (localSystem != machines.${hostname}.system) "--build-host $target"} \
|
${lib.optionalString (localSystem != machines.${hostname}.system) "--build-host $target"} \
|
||||||
|& ${pkgs.nix-output-monitor}/bin/nom --json
|
|& ${pkgs.nix-output-monitor}/bin/nom --json
|
||||||
@@ -262,6 +266,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# packaged from inputs
|
# packaged from inputs
|
||||||
|
wetter = wetter.packages.${prev.stdenv.hostPlatform.system}.wetter;
|
||||||
agenix = agenix.packages.${prev.stdenv.hostPlatform.system}.default;
|
agenix = agenix.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||||
pun-sort-api = scripts.packages.${prev.stdenv.hostPlatform.system}.pun-sort-api;
|
pun-sort-api = scripts.packages.${prev.stdenv.hostPlatform.system}.pun-sort-api;
|
||||||
alarm = scripts.packages.${prev.stdenv.hostPlatform.system}.alarm;
|
alarm = scripts.packages.${prev.stdenv.hostPlatform.system}.alarm;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./cuda.nix
|
./cuda.nix
|
||||||
|
./applicative.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../configs/networkmanager.nix
|
../../configs/networkmanager.nix
|
||||||
../../configs/default.nix
|
../../configs/default.nix
|
||||||
|
|||||||
Reference in New Issue
Block a user