better consistency, add dotfiles for takamaki and new features

This commit is contained in:
greyweather committed 2026-08-31 01:10:23 +01:00
1 parent 023fc0c424
commit 5c2a328858
35 files changed
+2455 -190

No files matched your search

+69 -35
View File
@@ -1,16 +1,17 @@
{ inputs, self, ... }: {
flake.homeConfigurations.takamaki = inputs.home-manager.lib.homeManagerConfiguration {
flake.homeConfigurations."grey@takamaki" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
modules = with self.homeModules; [
takamaki
modules = [
self.homeModules."grey@takamaki"
inputs.stylix.homeModules.stylix
];
extraSpecialArgs = { inherit inputs; };
};
flake.homeModules.takamaki = { pkgs, config, lib, ... }: {
flake.homeModules."grey@takamaki" = { pkgs, config, lib, ... }: {
imports = with self.homeModules; [
global
audio
graphics
];
@@ -27,22 +28,63 @@
'';
};
components = {
windowManagers = "niri";
shells = "noctalia";
};
features = {
shells.zsh = {
enable = true;
antidote.enable = true;
};
services = {
easyeffects.enable = true;
};
applications = {
cli = {
fastfetch.enable = true;
color-converter.enable = true;
nh.enable = true;
};
gui = {
vscode.enable = true;
equibop.enable = true;
kitty.enable = true;
spotify = {
enable = true;
spicetify = {
enable = true;
theme = "comfy";
};
};
};
shellScripts = {
extraPackages = with pkgs; [
nix-init
github-desktop
];
shellScripts = let
mkBrightnessScript = direction: ''
LOOP_COUNTER=0
DEVICE=$1
PRETTY_NAME=$(sudo ddccontrol dev:$DEVICE 2>&1 >/dev/null | grep -oP "/usr/share/ddccontrol-db/monitor/\K.+\.xml" | sed 's/.xml//')
WRITTEN="foo"
CONTROL="bar"
while [[ "$WRITTEN" != "$CONTROL" ]] && [ $LOOP_COUNTER -lt 3 ]; do
RESULT=$(sudo ddccontrol -r 0x10 -W ${direction}5 dev:$DEVICE 2> /dev/null)
WRITTEN=$(echo $RESULT | grep -oP "Writing.+\(\K\d{1,3}\)" | sed 's/)//')
CONTROL=$(echo $RESULT | grep -oP "Control.+\+/\K\d{1,3}/100" | sed 's/\/100//')
LOOP_COUNTER=$(($LOOP_COUNTER + 1))
done
noctalia msg notification-show "Set brightness to $WRITTEN for display $PRETTY_NAME"
'';
in {
switch-os = ''
sudo efibootmgr --bootnext 0000
sudo reboot
@@ -55,38 +97,30 @@
universal-shutdown = ''
sudo systemctl poweroff
'';
toggle-easyeffects = lib.mkIf (config.features.services.easyeffects.enable) ''
bypass_value=$(easyeffects -b 3)
if [ "$bypass_value" = "1" ]; then
easyeffects -b 2
else
easyeffects -b 1
fi
'';
increase-brightness = mkBrightnessScript "+";
decrease-brightness = mkBrightnessScript "-";
};
};
};
extraPackages = with pkgs; [
(writeShellScriptBin "increase-brightness" ''
LOOP_COUNTER=0
DEVICE=$1
PRETTY_NAME=$(sudo ddccontrol dev:$DEVICE 2>&1 >/dev/null | grep -oP "/usr/share/ddccontrol-db/monitor/\K.+\.xml" | sed 's/.xml//')
while
RESULT=$(sudo ddccontrol -r 0x10 -W +5 dev:$DEVICE 2> /dev/null)
WRITTEN=$(echo $RESULT | grep -oP "Writing.+\(\K\d{1,3}\)" | sed 's/)//')
CONTROL=$(echo $RESULT | grep -oP "Control.+\+/\K\d{1,3}/100" | sed 's/\/100//')
LOOP_COUNTER=$(($LOOP_COUNTER + 1))
[[ "$WRITTEN" != "$CONTROL" ]] && [ $LOOP_COUNTER -lt 5 ]
do true; done
noctalia msg notification-show "Set brightness to $WRITTEN for display $PRETTY_NAME"
'')
(writeShellScriptBin "decrease-brightness" ''
LOOP_COUNTER=0
DEVICE=$1
PRETTY_NAME=$(sudo ddccontrol dev:$DEVICE 2>&1 >/dev/null | grep -oP "/usr/share/ddccontrol-db/monitor/\K.+\.xml" | sed 's/.xml//')
while
RESULT=$(sudo ddccontrol -r 0x10 -W -5 dev:$DEVICE 2> /dev/null)
WRITTEN=$(echo $RESULT | grep -oP "Writing.+\(\K\d{1,3}\)" | sed 's/)//')
CONTROL=$(echo $RESULT | grep -oP "Control.+\+/\K\d{1,3}/100" | sed 's/\/100//')
LOOP_COUNTER=$(($LOOP_COUNTER + 1))
[[ "$WRITTEN" != "$CONTROL" ]] && [ $LOOP_COUNTER -lt 5 ]
do true; done
noctalia msg notification-show "Set brightness to $WRITTEN for display $PRETTY_NAME"
'')
];
programs.ssh.settings = {
"sakamoto" = {
HostName = "192.168.0.40";
Port = "22";
User = "grey";
IdentityFile = "~/.ssh/id_sakamoto";
};
};
};