mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-02-22 21:05:14 +08:00
chore: merge remote-tracking branch 'refs/remotes/origin/master'
This commit is contained in:
commit
281f567843
20 changed files with 368 additions and 112 deletions
|
|
@ -1,13 +1,14 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports =
|
||||
[ (import ./bootloader.nix) ]
|
||||
[ (import ./bootloader.nix) ]
|
||||
++ [ (import ./hardware.nix) ]
|
||||
++ [ (import ./network.nix) ]
|
||||
++ [ (import ./nvim.nix) ]
|
||||
++ [ (import ./program.nix) ]
|
||||
++ [ (import ./security.nix) ]
|
||||
++ [ (import ./services.nix) ]
|
||||
++ [ (import ./system.nix) ]
|
||||
++ [ (import ./user.nix) ];
|
||||
# ++ [ (import ./virtualization.nix) ];
|
||||
# ++ [ (import ./virtualization.nix) ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -261,7 +261,8 @@
|
|||
"$mainMod, Q, killactive,"
|
||||
"$mainMod, F, fullscreen, 0" # set 1 to 0 to set full screen without waybar
|
||||
"$mainMod, Space, togglefloating,"
|
||||
"$mainMod, D, exec, bemenu-run -l 5 --ignorecase"
|
||||
# "$mainMod, D, exec, bemenu-run -l 5 --ignorecase"
|
||||
"$mainMod, D, exec, vicinae toggle"
|
||||
"SUPER SHIFT, L, exec, swaylock --image /home/${username}/.local/share/bg.png"
|
||||
"SUPER, L, exec, swaylock --image /home/${username}/.local/share/bg.png"
|
||||
"$mainMod, E, exec, nautilus"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
nwg-dock-hyprland
|
||||
hyprland-monitor-attached
|
||||
hypridle
|
||||
vicinae
|
||||
];
|
||||
# systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
|
||||
wayland.windowManager.hyprland = {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,15 @@
|
|||
position = "0,0";
|
||||
}
|
||||
]
|
||||
else if (host == "april") then
|
||||
[
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
scale = 1.0;
|
||||
status = "enable";
|
||||
position = "0,0";
|
||||
}
|
||||
]
|
||||
else if (host == "imilia") then
|
||||
[
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,28 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Nixvim is being used for this
|
||||
programs.neovim = {
|
||||
enable = false;
|
||||
vimAlias = false;
|
||||
};
|
||||
xdg.mimeApps.defaultApplications = lib.mkIf config.xdg.mimeApps.enable {
|
||||
"text/markdown" = "nvim.desktop";
|
||||
"text/html" = "nvim.desktop";
|
||||
"text/xml" = "nvim.desktop";
|
||||
"text/plain" = "nvim.desktop";
|
||||
"text/x-shellscript" = "nvim.desktop";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
inputs.alejandra.defaultPackage.${pkgs.stdenv.hostPlatform.system}
|
||||
inputs.nixvim.packages.${pkgs.stdenv.hostPlatform.system}.default # import config from github:ahwxorg/nixvim-config
|
||||
mermaid-cli
|
||||
gnuplot
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,4 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# Environment shit
|
||||
|
|
@ -36,7 +30,7 @@
|
|||
bitwarden-cli
|
||||
imagemagick
|
||||
foot
|
||||
termpdfpy
|
||||
# termpdfpy # shit broke again smfh
|
||||
vimv
|
||||
pass
|
||||
lm_sensors
|
||||
|
|
@ -80,11 +74,6 @@
|
|||
# pip install --user --break-system-packages <package>
|
||||
# '')
|
||||
|
||||
inputs.alejandra.defaultPackage.${pkgs.stdenv.hostPlatform.system}
|
||||
inputs.nixvim.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
mermaid-cli
|
||||
gnuplot
|
||||
|
||||
# Email/calendar/etc
|
||||
neomutt
|
||||
w3m
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
vimv
|
||||
|
|
@ -27,7 +27,5 @@
|
|||
wget
|
||||
xxd
|
||||
borgbackup
|
||||
inputs.alejandra.defaultPackage.${pkgs.stdenv.hostPlatform.system}
|
||||
inputs.nixvim.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
|
|
@ -50,6 +48,7 @@
|
|||
// "wireplumber",
|
||||
"group/audio",
|
||||
"group/battery",
|
||||
"custom/pomodoro",
|
||||
"group/clock"
|
||||
],
|
||||
|
||||
|
|
@ -109,7 +108,7 @@
|
|||
},
|
||||
|
||||
"custom/music": {
|
||||
"interval": "once",
|
||||
"interval": 60,
|
||||
"return-type": "json",
|
||||
"exec": "~/.local/bin/waybar-music",
|
||||
"on-click": "playerctl play-pause",
|
||||
|
|
@ -367,6 +366,15 @@
|
|||
"interval": 60,
|
||||
"format": "CEST: <span color='#aaaaaa'>{}</span> ",
|
||||
"exec": "~/.local/bin/waybar-minutes"
|
||||
},
|
||||
|
||||
"custom/pomodoro": {
|
||||
"interval": 1,
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "waybar-module-pomodoro --no-work-icons",
|
||||
"on-click": "waybar-module-pomodoro toggle",
|
||||
"on-click-right": "waybar-module-pomodoro reset"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
username,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# homeExternalIPv4 = "${pkgs.coreutils}/bin/cat ${config.sops.secrets.homeExternalIPv4.path}";
|
||||
homeExternalIPv4 = "92.118.0.69";
|
||||
waybar-module-pomodoro = pkgs.callPackage ./waybar-module-pomodoro.nix { };
|
||||
in
|
||||
{
|
||||
home.file = {
|
||||
|
|
@ -242,7 +241,7 @@ in
|
|||
NODE="$(mullvad status | grep -Ei 'relay' | awk '{print $2}' | tr '[:upper:]' '[:lower:]')"
|
||||
LOCATION="$(mullvad status | grep -Ei 'location' | cut -d':' -f2 | cut -d'.' -f1 | sed 's/ //g')"
|
||||
IPV4="$(mullvad status | grep 'IPv4' | cut -d':' -f3 | sed 's/ //g')"
|
||||
echo "$IPV4" | grep -q "${homeExternalIPv4}" && LOCATION="home"
|
||||
echo "$IPV4" | grep -q "92.118.0.69" && LOCATION="home"
|
||||
|
||||
echo "$STATUS" | grep -Eioq 'connected|connecting' && TEXT="{\"text\":\"$STATUS ($LOCATION)\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}" # || ip address show tailscale0 | grep "global tailscale0" && TEXT="{\"text\":\"tailscale ($LOCATION)\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}"
|
||||
echo "$STATUS" | grep -Eioq 'disconnected' && TEXT="{\"text\":\"$STATUS\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}"
|
||||
|
|
@ -255,5 +254,6 @@ in
|
|||
wf-recorder
|
||||
bemenu
|
||||
ncspot
|
||||
waybar-module-pomodoro
|
||||
];
|
||||
}
|
||||
|
|
|
|||
31
modules/home/waybar/waybar-module-pomodoro.nix
Normal file
31
modules/home/waybar/waybar-module-pomodoro.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
writableTmpDirAsHomeHook,
|
||||
...
|
||||
}:
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "waybar-module-pomodoro";
|
||||
version = "0.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Andeskjerf";
|
||||
repo = "waybar-module-pomodoro";
|
||||
hash = "sha256-vB5WROn/GmaJyLNHnyfhTZItjQlJ+LMXMw8gOT1GM0s=";
|
||||
rev = "3867b25ab691c4a697ee2ffca76d7cc9408675cc";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-FTzqNkGn1dk+pdee8U07NI/uqUR6/gs51ZWOpYro3j8=";
|
||||
|
||||
nativeCheckInputs = [
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "waybar module that provides a pomodoro timer";
|
||||
homepage = "https://github.com/Andeskjerf/waybar-module-pomodoro";
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
|
@ -128,6 +128,38 @@
|
|||
printf "%s\n" "''${url}"
|
||||
}
|
||||
|
||||
function cd() {
|
||||
if [ -f "$1" ]; then
|
||||
${pkgs.zoxide}/bin/zoxide "$(dirname "$1")"
|
||||
return
|
||||
fi
|
||||
|
||||
${pkgs.zoxide}/bin/zoxide $@
|
||||
}
|
||||
|
||||
get-git-root() {
|
||||
echo "$(${pkgs.git}/bin/git rev-parse --show-toplevel 2>/dev/null)"
|
||||
}
|
||||
|
||||
cd-git-root() {
|
||||
pushd "$(get-git-root)"
|
||||
}
|
||||
|
||||
pushd-git-root-widget() {
|
||||
setopt localoptions pipefail no_aliases 2> /dev/null
|
||||
local dir="$(eval "get-git-root")"
|
||||
if [[ -z "$dir" ]]; then
|
||||
zle redisplay
|
||||
return 0
|
||||
fi
|
||||
zle push-line
|
||||
BUFFER="builtin pushd -- ''${(q)dir}"
|
||||
zle accept-line
|
||||
local ret=$?
|
||||
zle reset-prompt
|
||||
return $ret
|
||||
}
|
||||
|
||||
function nixcd () {
|
||||
PACKAGE_NAME="$1"
|
||||
if [[ "$PACKAGE_NAME" = "" ]]; then
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ in
|
|||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
||||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||
];
|
||||
minisign_key = "sha256-fgfgm5GHDqq/RIRF8M1j6H3OZ/r1DVPgwMvwikdauNI="; # See https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
||||
minisign_key = "sha256-BEGZgyaI3g9WwpnTyW2cYT0rh3248eL0sC0z76filNM="; # See https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
||||
cache_file = "/var/lib/dnscrypt/public-resolvers.md";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,17 +14,19 @@
|
|||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "/home/${username}/Music";
|
||||
playlistDirectory = "/home/${username}/Music/.playlists";
|
||||
extraConfig = ''
|
||||
restore_paused "yes"
|
||||
auto_update "yes"
|
||||
settings = {
|
||||
playlist_directory = "/home/${username}/Music/.playlists";
|
||||
music_directory = "/home/${username}/Music";
|
||||
restore_paused = "yes";
|
||||
auto_update = "yes";
|
||||
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "pipewire"
|
||||
}
|
||||
'';
|
||||
audio_output = [
|
||||
{
|
||||
type = "pipewire";
|
||||
name = "pipewire";
|
||||
}
|
||||
];
|
||||
};
|
||||
user = "${username}"; # PipeWire requires this as it runs as the normal user and mpd normally runs as a system user.
|
||||
|
||||
# Optional:
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
# Optional: preload models, see https://ollama.com/library
|
||||
# loadModels = [ "llama3.2:3b" "deepseek-r1:1.5b"];
|
||||
acceleration = "rocm"; # nope, 5700XT is too old for this
|
||||
package = pkgs.ollama-rocm; # nope, 5700XT is too old for this
|
||||
};
|
||||
services.open-webui.enable = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue