42 Commits

Author SHA1 Message Date
mjallen18
1ed989e713 pull rest of mac stuff 2025-07-23 12:02:31 -05:00
mjallen18
fa2d95e12f fix some hyprland stuff 2025-07-23 11:57:44 -05:00
mjallen18
1bc7856d93 teml 2025-07-23 09:50:11 -05:00
mjallen18
f8e80bd44c network 2025-07-22 18:03:18 -05:00
mjallen18
1d1f145b37 move nas apps sorta 2025-07-22 16:23:58 -05:00
mjallen18
c8ed7d74f8 fix nas home sops 2025-07-22 12:38:37 -05:00
mjallen18
f11a40370b nas builds 2025-07-22 12:35:00 -05:00
mjallen18
1e5f1db195 basic building for deck 2025-07-21 19:12:46 -05:00
mjallen18
e3bfbae131 pis 2025-07-21 18:59:53 -05:00
mjallen18
b43816579f move stuff 2025-07-21 14:25:34 -05:00
mjallen18
ac9ee8e67b basic pi stuff, ugly but functional 2025-07-21 14:09:41 -05:00
mjallen18
4abbd0ef33 darwin 2025-07-21 09:18:37 -05:00
mjallen18
608a6ce9b8 desktop building? 2025-07-20 18:35:14 -05:00
mjallen18
91be65bc39 functional home assistant 2025-07-18 14:50:13 -05:00
mjallen18
407f8ede87 temp 2025-07-18 13:21:50 -05:00
mjallen18
996e34d075 move all hacs modules to packages 2025-07-18 10:07:22 -05:00
mjallen18
442c24997d desktop is building I guess, idk, need to start commiting stuff eventually lmao 2025-07-17 20:57:18 -05:00
mjallen18
6c7c76887b temp commit 2025-07-16 19:57:33 -05:00
mjallen18
1a254d12c7 patch mail 2025-07-16 12:58:54 -05:00
mjallen18
cdcd102d8c config upd 2025-07-16 12:46:52 -05:00
mjallen18
6c3de9beb4 nuc 2025-07-15 21:18:21 -05:00
mjallen18
17d4e87056 t 2025-07-15 17:08:36 -05:00
mjallen18
0fcb6e07f7 update hass components 2025-07-15 15:28:05 -05:00
mjallen18
9587efe719 weather stuff 2025-07-14 21:43:03 -05:00
mjallen18
58ba094456 finally set up some of nix-darwin 2025-07-14 08:42:31 -05:00
mjallen18
059e72584f make mac kbs make more sense 2025-07-09 16:29:31 -05:00
mjallen18
f42c9ceef8 blovk 2025-07-09 16:05:19 -05:00
mjallen18
769084239f mesa stable cause gamescope broken 2025-07-09 09:11:11 -05:00
mjallen18
c0020a6726 update deck 2025-07-09 09:03:25 -05:00
mjallen18
0bcf196587 upgrade battery icons to swap when charging/discharging 2025-07-08 10:16:14 -05:00
mjallen18
f98c31671d fix mac scaling 2025-07-08 09:49:19 -05:00
mjallen18
a2cdab41b2 asd 2025-07-07 21:45:43 -05:00
mjallen18
5b3e561ad4 disk 2025-07-07 21:42:53 -05:00
mjallen18
f770342649 hypland theme fixes 2025-07-07 21:22:25 -05:00
mjallen18
bc183bc8dd more laptop->desktop hyprland coexistence 2025-07-07 18:23:21 -05:00
mjallen18
1ae1cc6f45 secrets 2025-07-07 11:32:51 -05:00
mjallen18
ebf848a465 update mac 2025-07-07 11:32:01 -05:00
mjallen18
6b28f57207 add nas settings file 2025-07-07 11:27:09 -05:00
mjallen18
803f229a4a Desktop Updates Mon Jun 30 11:58:01 PM CDT 2025 2025-07-07 11:21:08 -05:00
mjallen18
a062a78d13 Steamdeck Updates Mon Jun 30 02:24:43 PM CDT 2025 2025-07-07 11:21:08 -05:00
mjallen18
46adb33771 Merge branch 'macbook-hyprland' 2025-07-07 11:19:38 -05:00
mjallen18
42db510b8f add idle inhibitor to waybar 2025-07-01 08:28:54 -05:00
321 changed files with 8918 additions and 9117 deletions

7
.gitignore vendored
View File

@@ -2,4 +2,9 @@ hosts/nas/*.conf
hosts/nas/*.users hosts/nas/*.users
result result
*.raw *.raw
.codegpt .codegpt
.direnv
shell.nix
.vscode
**/*/*.py
.envrc

View File

@@ -12,6 +12,8 @@ keys:
- &steamdeck age1er5qucsc2mugrzrr7n3xhzv7kemkrqrw4m84r544fkk7nkg5g5eswxkqj0 - &steamdeck age1er5qucsc2mugrzrr7n3xhzv7kemkrqrw4m84r544fkk7nkg5g5eswxkqj0
- &matt_macbook-pro age1xg6mvj3x6s3t8058c6rsk3q4kskvm6nsffwckxkkjzhyn7r6tczqgkj23p - &matt_macbook-pro age1xg6mvj3x6s3t8058c6rsk3q4kskvm6nsffwckxkkjzhyn7r6tczqgkj23p
- &macbook-pro age1rdn39ywgzmc8wlsl5lrfe77e652wzjmjx58gx4k2ydghd35kdqvqscrf3h - &macbook-pro age1rdn39ywgzmc8wlsl5lrfe77e652wzjmjx58gx4k2ydghd35kdqvqscrf3h
- &nuc age1wurzgc20e6ye79wsg85vvqk4aj3mmc0llxshcy9532ex8f4c6dqql76c78
- &admin_nuc age1luyejgmqjj0esydlr2jxqkg48vexmx57gdz7cy5gq7rz8kf5cups2rnfa9
creation_rules: creation_rules:
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$ - path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
key_groups: key_groups:
@@ -28,6 +30,8 @@ creation_rules:
- *steamdeck - *steamdeck
- *matt_macbook-pro - *matt_macbook-pro
- *macbook-pro - *macbook-pro
- *admin_nuc
- *nuc
- path_regex: nas-secrets/[^/]+\.(yaml|json|env|ini)$ - path_regex: nas-secrets/[^/]+\.(yaml|json|env|ini)$
key_groups: key_groups:
- age: - age:
@@ -73,3 +77,14 @@ creation_rules:
- *pi5 - *pi5
- *admin - *admin
- *jallen-nas - *jallen-nas
- path_regex: mac-secrets/[^/]+\.(yaml|json|env|ini)$
key_groups:
- age:
- *matt
- *matt_pi5
- *desktop
- *pi5
- *admin
- *jallen-nas
- *matt_macbook-pro
- *macbook-pro

View File

@@ -0,0 +1,19 @@
{
inputs,
pkgs,
...
}:
let
inherit (inputs) git-hooks-nix;
in
git-hooks-nix.lib.${pkgs.system}.run {
src = ../..;
hooks = {
pre-commit-hook-ensure-sops.enable = true;
treefmt = {
enable = true;
settings.fail-on-change = false;
packageOverrides.treefmt = inputs.treefmt-nix.lib.mkWrapper pkgs ../../treefmt.nix;
};
};
}

2174
flake.lock generated Executable file → Normal file

File diff suppressed because it is too large Load Diff

1013
flake.nix Executable file → Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,59 @@
{ lib, pkgs, home, ... }:
let
shellAliases = {
update-switch = "darwin-rebuild switch --flake ~/nix-config";
update-flake = "nix flake update ~/nix-config";
ducks = "du -cksh * | sort -hr | head -n 15";
};
packages = with pkgs; [
age
cpufetch
deadnix
direnv
nixfmt-rfc-style
sops
tree
wget
];
in
{
# imports = [
# ../../modules/home/defaults.nix
# ../../modules/home/git.nix
# ../../modules/home/shell.nix
# ../../modules/home/vscode.nix
# ];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home = {
username = "mattjallen";
homeDirectory = "/Users/mattjallen";
packages = lib.mkForce packages;
sessionVariables = {
NH_DARWIN_FLAKE = "${home.homeDirectory}/nix-config#mac";
};
};
programs = {
zsh = {
shellAliases = shellAliases;
};
};
# Manage bug in compilations - who uses manpages in 2024 anyways? :P
manual.manpages.enable = false;
# Override defaults that arent supported
programs = {
mangohud.enable = lib.mkForce false;
nh = {
flake = "${home.homeDirectory}/nix-config";
};
};
services = {
pass-secret-service.enable = lib.mkForce false;
nextcloud-client.enable = lib.mkForce false;
};
}

View File

@@ -0,0 +1,134 @@
{ pkgs, lib, ... }:
let
theme = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix");
shellAliases = {
update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3";
update-switch = "sudo nixos-rebuild switch --max-jobs 10 --build-host admin@10.0.1.3";
update-flake = "nix flake update mac-nixpkgs mac-nixos-apple-silicon mac-home-manager mac-impermanence mac-sops-nix --flake /etc/nixos";
update-nas = "nixos-rebuild switch --use-remote-sudo --target-host admin@10.0.1.3 --build-host admin@10.0.1.3 --flake ~/nix-config#jallen-nas";
};
fontName = "JetBrainsMono NFM";
fontPackage = pkgs.nerd-fonts.jetbrains-mono;
# Displays
display = {
input = "eDP-1";
resolution = "3456x2234";
refreshRate = "60.00000";
};
in
{
home.username = "matt";
home.homeDirectory = "/home/matt";
home.stateVersion = "23.11";
mjallen = {
desktop.hyprland = {
enable = true;
primaryDisplay = "eDP-1";
wallpaper = [
"${display.input}, /run/wallpaper.jpg"
];
monitor = [
"${display.input},${display.resolution}@${display.refreshRate},0x0,1.25,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98"
];
workspace = [
"name:firefox, monitor:${display.input}, default:false, special, class:(.*firefox.*)"
"name:discord, monitor:${display.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)"
"name:steam, monitor:${display.input}, default:false, special, class:(.*[Ss]team.*)"
];
windowRule = [
"size 2160 3356, tag:horizonrdp"
];
defaultApps = {
browser = pkgs.firefox;
};
};
programs = {
btop.enable = true;
kitty = {
enable = true;
font = {
name = fontName;
package = fontPackage;
};
};
mako = {
enable = true;
fontName = fontName;
};
nwg-dock.enable = true;
nwg-drawer.enable = true;
nwg-panel = {
enable = true;
defaultApps = {
browser = pkgs.firefox;
};
};
waybar = {
enable = true;
layer = "bottom";
modules-right = [
"tray"
"temperature"
"temperature#gpu"
"keyboard-state#capslock"
"keyboard-state#numlock"
"wireplumber#sink"
"bluetooth"
"network"
"idle_inhibitor"
"clock"
"battery"
"custom/weather"
];
extraModules = {
"custom/lights" = {
tooltip = false;
exec = "waybar-hass --get_light light.living_room_lights";
interval = "once";
format = "{text}";#"󱉓";
on-click = "waybar-hass --toggle_light light.living_room_lights";
return-type = "json";
};
};
extraModulesStyle = ''
#custom-lights {
color: ${theme.frost.nord8};
background-color: ${theme.polarNight.nord0};
${theme.defaultOpacity}
${theme.borderLeft}
}
#custom-lights:hover {
background: ${theme.polarNight.nord3};
}
'';
};
wlogout.enable = true;
wofi.enable = true;
};
};
home.packages = with pkgs; [
iw
iwd
orca-slicer
vscodium
];
programs = {
password-store.enable = true;
zsh.shellAliases = shellAliases;
};
}

View File

@@ -12,9 +12,9 @@ let
in in
{ {
imports = [ imports = [
../../share/home/defaults.nix ../../../modules/home/home
../../share/home/git.nix ../../../modules/home/programs/git
../../share/home/shell.nix ../../../modules/home/programs/zsh
]; ];
home.username = "matt"; home.username = "matt";
@@ -55,7 +55,6 @@ in
}; };
programs = { programs = {
java.enable = lib.mkForce true;
mangohud.enable = lib.mkForce true; mangohud.enable = lib.mkForce true;
zsh.shellAliases = shellAliases; zsh.shellAliases = shellAliases;
}; };

View File

@@ -1,4 +1,4 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, namespace, ... }:
let let
shellAliases = { shellAliases = {
update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3"; update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3";
@@ -9,14 +9,6 @@ let
}; };
in in
{ {
imports = [
../../share/home/defaults.nix
../../share/home/git.nix
../../share/home/gnome.nix
../../share/home/librewolf.nix
../../share/home/shell.nix
../../share/home/vscode.nix
];
home.username = "matt"; home.username = "matt";

View File

@@ -0,0 +1,18 @@
{ config, lib, ... }:
let
shellAliases = {
update-boot = "nixos-rebuild boot --max-jobs 10";
update-switch = "nixos-rebuild switch --max-jobs 10";
};
in
{
home = {
username = "root";
homeDirectory = lib.mkForce "/${config.home.username}";
enableNixpkgsReleaseCheck = false;
};
programs = {
zsh.shellAliases = shellAliases;
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs,... }: { pkgs, ... }:
let let
shellAliases = { shellAliases = {
update-boot = "sudo nixos-rebuild boot --max-jobs 10"; update-boot = "sudo nixos-rebuild boot --max-jobs 10";
@@ -9,6 +9,8 @@ in
{ {
home.username = "admin"; home.username = "admin";
# mjallen.home.enable = true;
sops = { sops = {
age.keyFile = "/home/admin/.config/sops/age/keys.txt"; age.keyFile = "/home/admin/.config/sops/age/keys.txt";
defaultSopsFile = "/etc/nixos/secrets/secrets.yaml"; defaultSopsFile = "/etc/nixos/secrets/secrets.yaml";

View File

@@ -0,0 +1,15 @@
{ pkgs,... }:
let
shellAliases = {
update-boot = "sudo nixos-rebuild boot --max-jobs 10";
update-switch = "sudo nixos-rebuild switch --max-jobs 10";
update-flake = "nix flake update nas-nixpkgs nas-authentik-nix nas-cosmic nas-crowdsec nas-home-manager nas-impermanence nas-lanzaboote nas-nixos-hardware nas-sops-nix --flake /etc/nixos";
};
in
{
home.username = "admin";
programs = {
zsh.shellAliases = shellAliases;
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, namespace, ... }:
let let
shellAliases = { shellAliases = {
update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3"; update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3";
@@ -10,22 +10,6 @@ in
{ {
home.username = "matt"; home.username = "matt";
sops = {
age.keyFile = "/home/matt/.config/sops/age/keys.txt";
defaultSopsFile = "/etc/nixos/secrets/secrets.yaml";
validateSopsFiles = false;
secrets = {
"ssh-keys-public/desktop-nixos" = {
path = "/home/matt/.ssh/id_ed25519.pub";
mode = "0644";
};
"ssh-keys-private/desktop-nixos" = {
path = "/home/matt/.ssh/id_ed25519";
mode = "0600";
};
};
};
services = { services = {
remmina = { remmina = {
enable = true; enable = true;
@@ -41,8 +25,9 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
bottles bottles
unstable.compose2nix compose2nix
discord discord
distrobox
heroic heroic
stable.vmware-horizon-client stable.vmware-horizon-client
jq jq
@@ -55,7 +40,6 @@ in
protontricks protontricks
protonvpn-gui protonvpn-gui
python3 python3
qmk
smile smile
unigine-heaven unigine-heaven
via via

View File

@@ -1,4 +1,4 @@
{ ... }: { config, lib, ... }:
let let
shellAliases = { shellAliases = {
update-boot = "nixos-rebuild boot --max-jobs 10"; update-boot = "nixos-rebuild boot --max-jobs 10";
@@ -6,13 +6,10 @@ let
}; };
in in
{ {
imports = [ home = {
../home/defaults.nix username = "root";
../home/git.nix homeDirectory = lib.mkForce "/${config.home.username}";
../home/shell.nix };
];
home.username = "root";
programs = { programs = {
zsh.shellAliases = shellAliases; zsh.shellAliases = shellAliases;

View File

@@ -1,8 +0,0 @@
{ ... }:
{
imports = [
./hardware.nix
./programs.nix
./services.nix
];
}

View File

@@ -1,11 +0,0 @@
{ lib, ... }:
{
# Hardware configs
hardware = {
# Enable graphics
graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
};
}

View File

@@ -1,31 +0,0 @@
{ lib, pkgs, ... }:
{
programs = {
nix-ld = {
enable = lib.mkDefault true;
libraries = with pkgs; [
alsa-lib
bash
expat
fontconfig
freetype
icu
glib
gtk3
libgcc
libgdiplus
libGL
libpulseaudio
SDL2
vulkan-loader
xorg.libX11
xorg.libICE
xorg.libSM
xorg.libXcursor
xorg.libXrandr
xorg.libXi
zlib
];
};
seahorse.enable = lib.mkDefault true;
};}

View File

@@ -1,17 +0,0 @@
{ lib, ... }:
{
services = {
kmscon.enable = lib.mkForce false;
# configure pipewire
pipewire = {
enable = lib.mkDefault true;
alsa.enable = lib.mkDefault true;
alsa.support32Bit = lib.mkDefault true;
pulse.enable = lib.mkDefault true;
};
# Enable CUPS to print documents.
printing.enable = lib.mkDefault true;
};
}

View File

@@ -1,36 +0,0 @@
{ lib, pkgs, ... }:
let
timezone = "America/Chicago";
in
{
imports = [
./boot.nix
./environment.nix
./hardware.nix
./nix-settings.nix
./programs.nix
./security.nix
./services.nix
];
# Time config
time = {
# Set your time zone.
timeZone = timezone;
};
fonts.packages = with pkgs; [
font-awesome
noto-fonts
noto-fonts-color-emoji
meslo-lgs-nf
] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
fonts.fontconfig.defaultFonts = {
emoji = [
"Noto Color Emoji"
];
};
system.stateVersion = "23.11";
}

View File

@@ -1,13 +0,0 @@
{ pkgs, ... }:
{
environment = {
systemPackages = with pkgs; [
attic-client
uutils-coreutils
uutils-diffutils
uutils-findutils
coreutils
nixd
];
};
}

View File

@@ -1,12 +0,0 @@
{ lib, ... }:
{
hardware = {
# Bluetooth
bluetooth.enable = lib.mkDefault true;
i2c.enable = lib.mkDefault true;
# Enable all firmware
enableAllFirmware = lib.mkForce true;
};
}

View File

@@ -1,27 +0,0 @@
# { lib, config, ... }:
# let
# cfg = config.base;
# cosmicPath =
# if cfg.desktopEnvironments.cosmic.enableSpecialisation then
# ../../modules/desktop-environments/cosmic/specialisation.nix
# else
# ../../modules/desktop-environments/cosmic/default.nix;
# hyprlandPath =
# if cfg.desktopEnvironments.hyprland.enableSpecialisation then
# ../../modules/desktop-environments/hyprland/specialisation.nix
# else
# ../../modules/desktop-environments/hyprland/default.nix;
# extraImports = lib.optionals cfg.enable (
# [ ./base-nogui ]
# ++ lib.optional cfg.baseGui.enable ./base-gui
# ++ lib.optional cfg.desktopEnvironments.cosmic.enable cosmicPath
# ++ lib.optional cfg.desktopEnvironments.hyprland.enable hyprlandPath
# );
# in
# {
# imports = [ ./options.nix ] ++ extraImports;
# }

View File

@@ -1,35 +0,0 @@
{ lib, ... }:
with lib;
{
options.base = {
enable = mkEnableOption "base config";
baseGui.enable = mkOption {
type = types.bool;
default = false;
};
desktopEnvironments = {
cosmic = {
enable = mkOption {
type = types.bool;
default = false;
};
enableSpecialisation = mkOption {
type = types.bool;
default = false;
};
};
hyprland = {
enable = mkOption {
type = types.bool;
default = false;
};
enableSpecialisation = mkOption {
type = types.bool;
default = false;
};
};
};
};
}

View File

@@ -1,108 +0,0 @@
{ config, lib, pkgs, ... }:
let
pkgsVersion = pkgs; #.unstable;
in
{
services = {
# Enable Flatpak
flatpak.enable = lib.mkDefault false;
# enable auto discovery of printers
avahi = {
enable = lib.mkDefault true;
nssmdns4 = lib.mkDefault true;
openFirewall = lib.mkDefault true;
};
restic.backups = {
jallen-nas = {
initialize = true;
createWrapper = true;
inhibitsSleep = true;
environmentFile = config.sops.templates."restic.env".path;
passwordFile = config.sops.secrets."desktop/restic/password".path;
repositoryFile = config.sops.secrets."desktop/restic/repo".path;
paths = [
"/home/matt"
];
exclude = [
"/home/matt/Steam"
"/home/matt/Heroic"
"/home/matt/1TB"
"/home/matt/Downloads"
"/home/matt/Nextcloud"
"/home/matt/.cache"
"/home/matt/.local/share/Steam"
"/home/matt/.var/app/com.valvesoftware.Steam"
"/home/matt/.tmp"
"/home/matt/.thumbnails"
"/home/matt/.compose-cache"
];
};
proton-drive = {
initialize = true;
createWrapper = true;
inhibitsSleep = true;
passwordFile = config.sops.secrets."desktop/restic/password".path;
rcloneConfigFile = "/home/matt/.config/rclone/rclone.conf";
repository = "rclone:proton-drive:backup-nix";
paths = [
"/home/matt"
];
exclude = [
"/home/matt/Steam"
"/home/matt/Heroic"
"/home/matt/1TB"
"/home/matt/Downloads"
"/home/matt/Nextcloud"
"/home/matt/.cache"
"/home/matt/.local/share/Steam"
"/home/matt/.var/app/com.valvesoftware.Steam"
"/home/matt/.tmp"
"/home/matt/.thumbnails"
"/home/matt/.compose-cache"
];
};
};
btrfs = {
autoScrub.enable = lib.mkDefault true;
autoScrub.fileSystems = lib.mkDefault [
"/nix"
"/root"
"/etc"
"/var/log"
"/home"
];
};
ratbagd.enable = lib.mkDefault true;
};
systemd = {
user.services = {
rclone-home-proton = {
enable = lib.mkDefault false;
path = with pkgsVersion; [
bash
pkgs.rclone
];
script = ''
rclone sync /home/matt proton-drive:backup-nix --exclude '/home/matt/Games/**' --exclude '/home/matt/1TB/**' --exclude '/home/matt/Downloads/**'
'';
};
rsync-home = {
enable = lib.mkDefault false;
path = with pkgsVersion; [
bash
rsync
openssh
];
script = ''
rsync -rtpogvPlHzs --ignore-existing --exclude={'/home/matt/Games', '/home/matt/1TB', '/home/matt/Downloads/*', '/home/matt/.cache'} -e ssh /home/matt admin@10.0.1.3:/media/nas/main/backup/desktop-nix/home
'';
};
};
};
}

View File

@@ -1,26 +0,0 @@
{ config, lib, pkgs, ... }:
let
user = "matt";
passwordFile = config.sops.secrets."desktop/matt_password".path;
pkgsVersion = pkgs; #.unstable;
in
{
users.users."${user}" = {
isNormalUser = lib.mkDefault true;
extraGroups = [
"wheel"
"keys"
"networkmanager"
"ratbagd"
"input"
"scanner"
"lp"
"video"
"i2c"
]; # Enable sudo for the user.
hashedPasswordFile = passwordFile;
shell = pkgsVersion.zsh;
};
users.users.root.shell = pkgsVersion.zsh;
}

View File

@@ -1,236 +0,0 @@
- id: '1740678838632'
alias: Bedroom Light Switch
description: ''
triggers:
- domain: mqtt
device_id: 8b3a5a5b6faaba744c70ee940446a8af
type: action
subtype: on-press
trigger: device
id: on press
- domain: mqtt
device_id: 8b3a5a5b6faaba744c70ee940446a8af
type: action
subtype: off-press
trigger: device
id: off press
- domain: mqtt
device_id: 8b3a5a5b6faaba744c70ee940446a8af
type: action
subtype: up-press
trigger: device
id: up press
- domain: mqtt
device_id: 8b3a5a5b6faaba744c70ee940446a8af
type: action
subtype: down-press
trigger: device
id: down press
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- on press
sequence:
- action: light.turn_on
metadata: {}
data:
transition: 2
brightness_pct: 100
kelvin: 6004
target:
entity_id: light.bedroom_lights
- conditions:
- condition: trigger
id:
- off press
sequence:
- action: light.turn_off
metadata: {}
data:
transition: 2
target:
entity_id: light.bedroom_lights
- conditions:
- condition: trigger
id:
- up press
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_step_pct: 10
target:
entity_id: light.bedroom_lights
- conditions:
- condition: trigger
id:
- down press
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_step_pct: -10
target:
entity_id: light.bedroom_lights
mode: single
- id: '1740697291423'
alias: Living Rooom Lights
description: ''
triggers:
- domain: mqtt
device_id: b4fb325dfe68d4f80391417998f35843
type: action
subtype: on-press
trigger: device
id: on press
- domain: mqtt
device_id: b4fb325dfe68d4f80391417998f35843
type: action
subtype: off-press
trigger: device
id: off press
- domain: mqtt
device_id: b4fb325dfe68d4f80391417998f35843
type: action
subtype: up-press
trigger: device
id: up press
- domain: mqtt
device_id: b4fb325dfe68d4f80391417998f35843
type: action
subtype: down-press
trigger: device
id: down press
- domain: mqtt
device_id: b4fb325dfe68d4f80391417998f35843
type: action
subtype: on-hold
trigger: device
id: on-hold
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- on press
sequence:
- action: light.turn_on
metadata: {}
data:
transition: 2
brightness_pct: 100
kelvin: 6004
target:
entity_id:
- light.living_room_lights
- conditions:
- condition: trigger
id:
- off press
sequence:
- action: light.turn_off
metadata: {}
data:
transition: 2
target:
entity_id:
- light.living_room_lights
- conditions:
- condition: trigger
id:
- up press
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_step_pct: 10
target:
entity_id: light.living_room_lights
- conditions:
- condition: trigger
id:
- down press
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_step_pct: -10
target:
entity_id: light.living_room_light_1
- conditions:
- condition: trigger
id:
- on-hold
sequence:
- action: light.turn_on
metadata: {}
data:
transition: 0
brightness_pct: 100
rgb_color:
- 224
- 27
- 36
target:
entity_id: light.living_room_lights
mode: single
- id: '1741048414771'
alias: Front Closet
description: ''
triggers:
- type: present
device_id: c6519ea1e715f397dbbf7b73452f9e49
entity_id: c3a7b8892b8b372d2c40556e770ddc68
domain: binary_sensor
trigger: device
for:
hours: 0
minutes: 0
seconds: 0
id: present
- type: not_present
device_id: c6519ea1e715f397dbbf7b73452f9e49
entity_id: c3a7b8892b8b372d2c40556e770ddc68
domain: binary_sensor
trigger: device
for:
hours: 0
minutes: 0
seconds: 5
id: not
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- present
sequence:
- action: light.turn_on
metadata: {}
data:
transition: 2
brightness_pct: 100
kelvin: 6010
target:
entity_id:
- light.front_closet_light_1
- light.front_closet_light_2
- conditions:
- condition: trigger
id:
- not
sequence:
- action: light.turn_off
metadata: {}
data:
transition: 2
target:
entity_id:
- light.front_closet_light_1
- light.front_closet_light_2
mode: single

View File

@@ -1,576 +0,0 @@
- id: '1692388103102'
alias: Weekly Backup
description: Create a full backup every Sunday at 3 am and store it on the NAS
trigger:
- platform: time
at: 03:00:00
condition:
- condition: time
weekday:
- sun
action:
- service: hassio.backup_full
data:
compressed: true
mode: single
- id: '1692389901297'
alias: Livingroom Lights
description: ''
trigger:
- platform: device
domain: mqtt
device_id: 37d42431de65199af00220b43dae04c1
type: action
subtype: on_press
id: 'on'
- platform: device
domain: mqtt
device_id: 37d42431de65199af00220b43dae04c1
type: action
subtype: off_press
id: 'off'
- platform: device
domain: mqtt
device_id: 37d42431de65199af00220b43dae04c1
type: action
subtype: up_press
id: up
- platform: device
domain: mqtt
device_id: 37d42431de65199af00220b43dae04c1
type: action
subtype: down_press
id: down
- platform: device
domain: mqtt
device_id: 37d42431de65199af00220b43dae04c1
type: action
subtype: on_hold
id: hold
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- 'on'
sequence:
- data:
brightness_pct: 100
color_temp_kelvin: 5000
transition: 1
target:
entity_id: light.livingroom_lights
action: light.turn_on
- conditions:
- condition: trigger
id:
- 'off'
sequence:
- data:
transition: 1
target:
entity_id: light.livingroom_lights
action: light.turn_off
- conditions:
- condition: trigger
id:
- hold
sequence:
- data:
brightness_pct: 100
rgb_color:
- 255
- 38
- 0
transition: 1
target:
entity_id: light.livingroom_lights
action: light.turn_on
- conditions:
- condition: trigger
id:
- dim up
sequence:
- data:
brightness_step_pct: 20
target:
entity_id: light.livingroom_lights
action: light.turn_on
- conditions:
- condition: trigger
id:
- dim down
sequence:
- data:
brightness_step_pct: -20
target:
entity_id: light.livingroom_lights
action: light.turn_on
mode: single
- id: '1692390365798'
alias: Bedroom Lights
description: ''
triggers:
- domain: mqtt
device_id: a492c0abb8f14e0888df08101f77f484
type: action
subtype: off_press
id: 'off'
trigger: device
- domain: mqtt
device_id: a492c0abb8f14e0888df08101f77f484
type: action
subtype: on_press
id: 'on'
trigger: device
- domain: mqtt
device_id: a492c0abb8f14e0888df08101f77f484
type: action
subtype: up_press
id: up
trigger: device
- domain: mqtt
device_id: a492c0abb8f14e0888df08101f77f484
type: action
subtype: down_press
id: down
trigger: device
- domain: mqtt
device_id: a492c0abb8f14e0888df08101f77f484
type: action
subtype: on_hold
id: hold on
trigger: device
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- 'on'
sequence:
- data:
brightness_pct: 100
color_temp_kelvin: 5000
transition: 1
target:
entity_id: light.bedroom_lights
action: light.turn_on
- conditions:
- condition: trigger
id:
- 'off'
sequence:
- data:
transition: 1
target:
entity_id:
- light.bedroom_lights
action: light.turn_off
- conditions:
- condition: trigger
id:
- up
sequence:
- device_id: 171fa001578683249ff26f2d85817fef
domain: light
entity_id: 55d41329665f60a55a732c5bbececd22
type: brightness_increase
- device_id: c92fea3d569ca668e6617a189f917a28
domain: light
entity_id: 0c8630c2b37ae9615f9cf815aaebf40f
type: brightness_increase
- conditions:
- condition: trigger
id:
- down
sequence:
- device_id: 171fa001578683249ff26f2d85817fef
domain: light
entity_id: 55d41329665f60a55a732c5bbececd22
type: brightness_decrease
- device_id: c92fea3d569ca668e6617a189f917a28
domain: light
entity_id: 0c8630c2b37ae9615f9cf815aaebf40f
type: brightness_decrease
- conditions:
- condition: trigger
id:
- hold on
sequence:
- metadata: {}
data:
rgb_color:
- 255
- 0
- 0
brightness_pct: 100
target:
entity_id: light.bedroom_lights
action: light.turn_on
mode: single
- id: '1694441037420'
alias: Air Purifier Schedule
description: ''
trigger:
- platform: time
at: 07:00:00
id: fan off
- platform: time
at: '23:00:00'
id: fan on
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- fan on
sequence:
- service: fan.set_percentage
data:
percentage: 100
target:
entity_id: fan.bedroom_air_purifier
- conditions:
- condition: trigger
id:
- fan off
sequence:
- service: fan.set_preset_mode
data:
preset_mode: auto
target:
entity_id: fan.bedroom_air_purifier
mode: single
- id: '1705949582146'
alias: Ice Maker Power Schedule
description: ''
trigger:
- platform: time_pattern
hours: '*'
minutes: '0'
seconds: '0'
condition: []
action:
- type: toggle
device_id: 41c66532e23aadc4c6ac95e520e5d345
entity_id: bd17ac75a91e62ed7e6b148cfe33d43d
domain: switch
- alias: Set Ice Maker Light to Dim
device_id: 41c66532e23aadc4c6ac95e520e5d345
domain: select
entity_id: 8f4f90c62b00df9008d14f7ce8967199
type: select_option
option: 'On'
mode: single
- id: '1708978401738'
alias: Soundbar
description: ''
trigger: []
condition: []
action:
- service: media_player.turn_on
metadata: {}
data: {}
target:
entity_id: media_player.soundbar
- service: media_player.select_source
metadata: {}
data:
source: wifi
target:
entity_id: media_player.soundbar
- service: media_player.play_media
metadata: {}
data:
media_content_id: media-source://radio_browser/2eff3a1f-b821-4267-9f37-f8d7e72061e4
media_content_type: audio/mpeg
target:
entity_id: media_player.soundbar
mode: single
- id: '1711147285926'
alias: Grow Light Schedule
description: ''
trigger:
- platform: time
at: 07:00:00
id: day
- platform: time
at: '20:00:00'
id: night
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- day
sequence:
- service: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.grow_lights
- conditions:
- condition: trigger
id:
- night
sequence:
- service: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.grow_lights
mode: single
- id: '1723142554607'
alias: Restart Luci's Box
description: for some reason this box sucks and needs to get reboot periodically
trigger:
- platform: time_pattern
hours: '*'
condition: []
action:
- type: turn_off
device_id: e7f8974c31567dddbbffb036fe8381bc
entity_id: e1e71e4acdfcbb6c4afdc174807ad8be
domain: switch
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- type: turn_on
device_id: e7f8974c31567dddbbffb036fe8381bc
entity_id: e1e71e4acdfcbb6c4afdc174807ad8be
domain: switch
- type: turn_on
device_id: d5eb3c182a1ef2a231b94b09c26aed45
entity_id: 7106df7ebde274ac4bc2b197d5c45bea
domain: fan
- device_id: d5eb3c182a1ef2a231b94b09c26aed45
domain: number
entity_id: 59a7cd3cb2883bf6002f789c2ff4824c
type: set_value
value: 3
mode: single
- id: '1724707092916'
alias: HASS Updates
description: ''
use_blueprint:
path: edwardtfn/auto_update_scheduled.yaml
input:
schedule_entity: schedule.updates
restart_bool: true
- id: '1724707291994'
alias: IOT Battery Checker
description: ''
use_blueprint:
path: sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml
input:
exclude:
entity_id: []
device_id:
- 66e9cee67a740e8925dae5fc9ce940f0
- df76e3a3e48b49e13bd3006350826740
actions:
- action: notify.persistent_notification
metadata: {}
data:
message: Device Battery Low
- id: '1729708621620'
alias: Closet Lights
description: ''
triggers:
- type: present
device_id: 0924cbdcd24416e768caa52301db59f7
entity_id: e9f0acef50550033cd96155bd501b7c3
domain: binary_sensor
trigger: device
for:
hours: 0
minutes: 0
seconds: 0
id: Present
- type: not_present
device_id: 0924cbdcd24416e768caa52301db59f7
entity_id: e9f0acef50550033cd96155bd501b7c3
domain: binary_sensor
trigger: device
for:
hours: 0
minutes: 0
seconds: 0
id: empty
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Present
sequence:
- action: light.turn_on
metadata: {}
data:
transition: 3
brightness_pct: 100
kelvin: 5008
target:
device_id:
- e25128ac8fcf62af66a039cde3104760
- ddcfd5ea4fc5f5a88e18325b01c615db
- conditions:
- condition: trigger
id:
- empty
sequence:
- action: light.turn_off
metadata: {}
data:
transition: 3
target:
device_id:
- e25128ac8fcf62af66a039cde3104760
- ddcfd5ea4fc5f5a88e18325b01c615db
mode: single
- id: '1729881464325'
alias: Bedroom Closet
description: ''
triggers:
- type: present
device_id: 28e7f211c72409fe244183219abf6ffa
entity_id: aa474f323868586cef62070654f36936
domain: binary_sensor
trigger: device
id: Present
- type: not_present
device_id: 28e7f211c72409fe244183219abf6ffa
entity_id: aa474f323868586cef62070654f36936
domain: binary_sensor
trigger: device
id: empty
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Present
sequence:
- type: turn_on
device_id: f5936d6143b7927433e9c0430c79acab
entity_id: f6ec42c9db2c191866a335a346b1ec44
domain: switch
- conditions:
- condition: trigger
id:
- empty
sequence:
- type: turn_off
device_id: f5936d6143b7927433e9c0430c79acab
entity_id: f6ec42c9db2c191866a335a346b1ec44
domain: switch
mode: single
- id: '1740179328446'
alias: Living Room Lights
description: ''
triggers:
- domain: mqtt
device_id: f7482a462dc7cc05b4ceaa0d882dc469
type: action
subtype: off_press
trigger: device
id: 'off'
- domain: mqtt
device_id: f7482a462dc7cc05b4ceaa0d882dc469
type: action
subtype: on_press
trigger: device
id: 'on'
- domain: mqtt
device_id: f7482a462dc7cc05b4ceaa0d882dc469
type: action
subtype: up_press
trigger: device
id: up
- domain: mqtt
device_id: f7482a462dc7cc05b4ceaa0d882dc469
type: action
subtype: down_press
trigger: device
id: down
- domain: mqtt
device_id: f7482a462dc7cc05b4ceaa0d882dc469
type: action
subtype: on_hold
trigger: device
id: hold on
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- 'on'
sequence:
- data:
brightness_pct: 100
color_temp_kelvin: 5000
transition: 1
action: light.turn_on
target:
entity_id: light.livingroom_lights
- conditions:
- condition: trigger
id:
- 'off'
sequence:
- data:
transition: 1
action: light.turn_off
target:
entity_id: light.livingroom_lights
- conditions:
- condition: trigger
id:
- up
sequence:
- device_id: 8bc2033b03d5a474ca3204c5ca53e308
domain: light
entity_id: 4a3cc9043ff985e9271683e1916bd9e1
type: brightness_increase
- device_id: 8f4f51aed9b3b4284f520af25358efd9
domain: light
entity_id: f45e74498c4b6bae65aaf5adf67e29d6
type: brightness_increase
- conditions:
- condition: trigger
id:
- down
sequence:
- device_id: 8bc2033b03d5a474ca3204c5ca53e308
domain: light
entity_id: 4a3cc9043ff985e9271683e1916bd9e1
type: brightness_decrease
- device_id: 8bc2033b03d5a474ca3204c5ca53e308
domain: light
entity_id: 4a3cc9043ff985e9271683e1916bd9e1
type: brightness_decrease
- conditions:
- condition: trigger
id:
- hold on
sequence:
- metadata: {}
data:
rgb_color:
- 255
- 0
- 0
brightness_pct: 100
action: light.turn_on
target:
entity_id: light.livingroom_lights
mode: single

View File

@@ -1,40 +0,0 @@
{ lib, pkgs, ... }:
let
kernel = pkgs.linuxPackages_latest;
in
{
# Configure bootloader with lanzaboot and secureboot
boot = {
kernelModules = [ "nct6775" ];
loader = {
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
initrd = {
verbose = false;
systemd.enable = true;
};
plymouth = {
enable = true;
};
kernelPackages = kernel;
kernelParams = [
"quiet"
"splash"
];
consoleLogLevel = 3;
bootspec.enable = true;
};
environment.systemPackages = with pkgs; [
edk2-uefi-shell
];
}

View File

@@ -1,141 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
let
user = "hass-admin";
password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06";
SSID = "Joey's Jungle 5G";
SSIDpassword = "kR8v&3Qd"; # config.sops.templates."wifi-password".content;
interface = "wlp0s20f3";
timezone = "America/Chicago";
hostname = "jallen-hass";
in
{
imports = [
# Include the results of the hardware scan.
./boot.nix
./hardware-configuration.nix
./impermanence.nix
./homeassistant.nix
../default.nix
];
# Enable nix flakes and nix-command tools
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.trusted-users = [ "@wheel" ];
# Set your time zone.
time.timeZone = timezone;
networking = {
networkmanager = {
enable = true;
# Configure the static connection for eno1
# ensureProfiles = {
# profiles = {
# joeys-jungle = {
# connection = {
# id = "joeys-jungle";
# permissions = "";
# type = "wifi";
# };
# ipv4 = {
# dns-search = "";
# method = "auto";
# };
# ipv6 = {
# addr-gen-mode = "stable-privacy";
# dns-search = "";
# method = "auto";
# };
# wifi = {
# mac-address-blacklist = "";
# mode = "infrastructure";
## ssid = SSID;
# };
# wifi-security = {
# auth-alg = "open";
# key-mgmt = "wpa-psk";
# psk = SSIDpassword;
# };
# };
# "static-eno1" = {
# connection = {
# id = "static-eno1";
# type = "ethernet";
# interface-name = "eno1";
# };
# ipv4 = {
# method = "manual";
# addresses = "10.0.1.19/24";
# gateway = "10.0.1.1";
# dns = "10.0.1.1";
# };
# };
# };
# };
};
hostName = hostname;
wireless = {
enable = false;
networks."${SSID}".psk = SSIDpassword;
interfaces = [ interface ];
};
};
environment.systemPackages = with pkgs; [
vim
htop
git
protonmail-bridge
pass
gnome-keyring
openssl
];
services.xserver.desktopManager.surf-display = {
enable = true;
defaultWwwUri = "http://jallen-hass:8123"; # todo: external maybe for reasons???
};
services.openssh.enable = true;
services.protonmail-bridge = {
enable = true;
path = with pkgs; [ pass gnome-keyring ];
};
# Enable Avahi for .local hostname resolution
services.avahi = {
enable = true;
nssmdns4 = true; # For modern systems, use nssmdns4 instead of nssmdns
publish = {
enable = true;
addresses = true;
domain = true;
workstation = true;
};
};
users = {
mutableUsers = false;
users."${user}" = {
isNormalUser = lib.mkForce true;
initialHashedPassword = password;
extraGroups = [
"wheel"
"docker"
"network-manager"
"hass"
];
shell = pkgs.zsh;
};
};
}

View File

@@ -1,70 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "none";
fsType = "tmpfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/AB0D-A6A2";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/a6ef033d-c305-42d9-88b2-5591008b2a11";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/etc" =
{ device = "/dev/disk/by-uuid/a6ef033d-c305-42d9-88b2-5591008b2a11";
fsType = "btrfs";
options = [ "subvol=etc" ];
};
fileSystems."/var/log" =
{ device = "/dev/disk/by-uuid/a6ef033d-c305-42d9-88b2-5591008b2a11";
fsType = "btrfs";
options = [ "subvol=log" ];
};
fileSystems."/root" =
{ device = "/dev/disk/by-uuid/a6ef033d-c305-42d9-88b2-5591008b2a11";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/a6ef033d-c305-42d9-88b2-5591008b2a11";
fsType = "btrfs";
options = [ "subvol=home" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d631d42b-b70a-4579-bfb4-57412ae7c682"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -1,64 +0,0 @@
{ lib, pkgs, ... }:
let
shellAliases = {
ll = "ls -alh";
update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3";
update-switch = "sudo nixos-rebuild switch --max-jobs 10 --build-host admin@10.0.1.3";
update-flake = "sudo nix flake update ~/nix-config";
update-nas = "nixos-rebuild switch --use-remote-sudo --target-host admin@10.0.1.3 --build-host admin@10.0.1.3 --flake ~/nix-config#jallen-nas";
nas-ssh = "kitten ssh admin@10.0.1.3";
ducks = "du -cksh * | sort -hr | head -n 15";
};
gitAliases = {
co = "checkout";
ci = "commit";
cia = "commit --amend";
s = "status";
st = "status";
b = "branch";
p = "pull --rebase";
pu = "push";
};
in
{
home.username = "hass-admin";
home.homeDirectory = "/home/hass-admin";
home.stateVersion = "23.11";
programs.home-manager.enable = true;
programs = {
fish.enable = false;
mangohud.enable = true;
java.enable = true;
zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = shellAliases;
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "fishy";
};
};
};
programs.git = {
enable = true;
userName = "mjallen18";
userEmail = "matt.l.jallen@gmail.com";
aliases = gitAliases;
};
home.packages = with pkgs; [
age
fastfetch
firefox
];
}

View File

@@ -1,453 +0,0 @@
{ config, pkgs, ... }:
let
mosquittoPort = 1883;
zigbee2mqttPort = 8080;
# "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
ha-bambulab = pkgs.stdenv.mkDerivation {
pname = "ha-bambulab";
version = "v2.1.5"; # Update with correct version
src = pkgs.fetchFromGitHub {
owner = "greghesp"; # Update with correct owner
repo = "ha-bambulab"; # Update with correct repo name
rev = "v2.1.5"; # Or specific tag/commit
sha256 = "sha256-iVcNFdkzdMVjbQuzrTLib8fhirnc+OJdPzM60EnyVe0="; # Replace with actual hash
};
installPhase = ''
mkdir -p $out/custom_components
cp -r custom_components/bambu_lab $out/custom_components/
'';
};
ha-gehome = pkgs.stdenv.mkDerivation {
pname = "ha-gehome";
version = "v2025.2.1"; # Update with correct version
src = pkgs.fetchFromGitHub {
owner = "simbaja"; # Update with correct owner
repo = "ha_gehome"; # Update with correct repo name
rev = "v2025.2.1"; # Or specific tag/commit
sha256 = "sha256-nb+KrJoWqvhqH6E7A22xXwQzTYp7yn+hl9WRDXn95Cc="; # Replace with actual hash
};
installPhase = ''
mkdir -p $out/custom_components
cp -r custom_components/ge_home $out/custom_components/
'';
};
ha-mail-and-packages = pkgs.stdenv.mkDerivation {
pname = "Home-Assistant-Mail-And-Packages";
version = "0.4.2"; # Update with correct version
src = pkgs.fetchFromGitHub {
owner = "moralmunky"; # Update with correct owner
repo = "Home-Assistant-Mail-And-Packages"; # Update with correct repo name
rev = "0.4.2"; # Or specific tag/commit
sha256 = "sha256-5LBTlRlkSUx8DOY+F7UvUs4dzjZKdBdgnDUdK6DBdew="; # Replace with actual hash
};
installPhase = ''
mkdir -p $out/custom_components
cp -r custom_components/mail_and_packages $out/custom_components/
'';
};
ha-overseerr = pkgs.stdenv.mkDerivation {
pname = "ha-overseerr";
version = "0.1.42"; # Update with correct version
src = pkgs.fetchFromGitHub {
owner = "vaparr"; # Update with correct owner
repo = "ha-overseerr"; # Update with correct repo name
rev = "0.1.42"; # Or specific tag/commit
sha256 = "sha256-UvUowCgfay9aRV+iC/AQ9vvJzhGZbH+/1kVjxPFBKcI="; # Replace with actual hash
};
installPhase = ''
mkdir -p $out/custom_components
cp -r custom_components/overseerr $out/custom_components/
'';
};
ha-petlibro = pkgs.stdenv.mkDerivation {
pname = "ha-petlibro";
version = "v1.0.21.1"; # Update with correct version
src = pkgs.fetchzip {
url = "https://github.com/jjjonesjr33/petlibro/archive/refs/tags/v1.0.21.1.zip";
sha256 = "sha256-3EckyAgWxlZeqy9g13yP2nKCcjnyVIp8EdiE/A1pNu4="; # Replace with actual hash
};
installPhase = ''
mkdir -p $out/custom_components
cp -r custom_components/petlibro $out/custom_components/
'';
};
ha-wyzeapi = pkgs.stdenv.mkDerivation {
pname = "ha-wyzeapi";
version = "0.1.32"; # Update with correct version
src = pkgs.fetchzip {
url = "https://github.com/SecKatie/ha-wyzeapi/archive/refs/tags/0.1.32.zip";
sha256 = "sha256-3xUynZBEHuO2hKLYCb2sBpJAe0JF/8uKqR304Y7JQmE="; # Replace with actual hash
};
installPhase = ''
mkdir -p $out/custom_components
cp -r custom_components/wyzeapi $out/custom_components/
'';
};
# In configuration.nix or a separate file
pythonSteam = pkgs.python3.withPackages (ps: [
(ps.buildPythonPackage rec {
pname = "steam";
version = "1.4.4"; # Check for the latest version
src = pkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; # Get the correct hash
};
doCheck = false;
propagatedBuildInputs = [ ps.requests ps.protobuf ];
})
]);
in
{
services.home-assistant = {
enable = true;
openFirewall = true;
configWritable = true; # todo
extraComponents = [
# Components required to complete the onboarding
"analytics"
"google_translate"
"met"
"radio_browser"
"shopping_list"
# Recommended for fast zlib compression
# https://www.home-assistant.io/integrations/isal
"isal"
"subaru"
"vesync"
"mqtt" # Enables MQTT integration in HA
"ffmpeg" # Enables camera streams
"zha" # Enables Zigbee integration
"homekit"
"music_assistant"
];
customComponents = with pkgs.home-assistant-custom-components; [
auth-header
];
customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [
atomic-calendar-revive
bubble-card
button-card
hourly-weather
mini-graph-card
mini-media-player
multiple-entity-row
mushroom
vacuum-card
weather-chart-card
zigbee2mqtt-networkmap
];
# use postgresql instead of sqlite
extraPackages = ps: with ps; [
# Core functionality
aiohttp
aiodns
paho-mqtt
pillow
pytz
pyyaml
sqlalchemy
# Discovery & networking
zeroconf
netdisco
ifaddr
ssdp
# Device protocols
pyserial # Serial communications
bluepy # Bluetooth LE
# Smart home ecosystems
mutagen # Media file metadata
pysonos # Sonos
pywemo # Belkin WeMo
python-miio # Xiaomi devices
python-kasa # TP-Link
# Sensors & monitoring
meteocalc # Weather calculations
speedtest-cli # Internet speed
# Visualization & UI
matplotlib # Graphing
# Security
bcrypt
cryptography
pyjwt
# Media
ha-ffmpeg # Camera streams
# Specialized integrations
python-matter-server # Matter protocol
# System integrations
psutil # System monitoring
psycopg2
numpy
hassil
pyturbojpeg
paho-mqtt
pychromecast
pyatv
python-otbr-api
brother
pyipp
govee-ble
adguardhome
nextcord
aiogithubapi
jellyfin-apiclient-python
pylitterbot
dateparser
aionut
nextcloudmonitor
ollama
pynecil
aiopyarr
pysabnzbd
getmac
zigpy
bellows # For Zigbee EmberZNet-based adapters
zigpy-xbee # For XBee adapters
zigpy-deconz # For ConBee/RaspBee adapters
pyicloud # iCloud
pyatv # Apple TV
opencv-python
face-recognition
ibeacon-ble
gehomesdk
onedrive-personal-sdk
python-roborock
pythonSteam
apple-weatherkit
];
config = {
# Includes dependencies for a basic setup
# https://www.home-assistant.io/integrations/default_config/
default_config = {};
cloud = false;
frontend = {
themes = "!include_dir_merge_named themes";
};
"automation ui" = "!include /etc/nixos/hosts/homeassistant/automations.yaml";
"scene ui" = "!include /etc/nixos/hosts/homeassistant/scenes.yaml";
"script ui" = "!include /etc/nixos/hosts/homeassistant/scripts.yaml";
http = {
use_x_forwarded_for = true;
trusted_proxies = [
"172.30.33.0/24"
"10.0.1.3"
"10.0.1.0/24"
];
};
recorder = {
db_url = "postgresql://@/hass";
purge_keep_days = 180;
};
auth_header = {
debug = false;
username_header = "X-authentik-username";
};
# https://www.home-assistant.io/integrations/ota_updater/
zha.zigpy_config.ota.z2m_remote_index = "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json";
};
};
# https://www.home-assistant.io/integrations/automation/
# systemd.tmpfiles.rules = [
# "f ${config.services.home-assistant.configDir}/automations.yaml 0755 hass hass"
# ];
# This bypasses the component validation and places it directly in HA's data directory
system.activationScripts.installCustomComponents = ''
mkdir -p ${config.services.home-assistant.configDir}/custom_components
cp -r ${ha-bambulab}/custom_components/bambu_lab ${config.services.home-assistant.configDir}/custom_components/
cp -r ${ha-gehome}/custom_components/ge_home ${config.services.home-assistant.configDir}/custom_components/
cp -r ${ha-mail-and-packages}/custom_components/mail_and_packages ${config.services.home-assistant.configDir}/custom_components/
cp -r ${ha-overseerr}/custom_components/overseerr ${config.services.home-assistant.configDir}/custom_components/
cp -r ${ha-petlibro}/custom_components/petlibro ${config.services.home-assistant.configDir}/custom_components/
cp -r ${ha-wyzeapi}/custom_components/wyzeapi ${config.services.home-assistant.configDir}/custom_components/
ln -sf /etc/nixos/hosts/homeassistant/automations.yaml ${config.services.home-assistant.configDir}/automations.yaml
ln -sf /etc/nixos/hosts/homeassistant/scenes.yaml ${config.services.home-assistant.configDir}/scenes.yaml
ln -sf /etc/nixos/hosts/homeassistant/scripts.yaml ${config.services.home-assistant.configDir}/scripts.yaml
chown -R hass:hass ${config.services.home-assistant.configDir}
chmod -R 750 ${config.services.home-assistant.configDir}
'';
services = {
postgresql = {
enable = true;
ensureDatabases = [ "hass" ];
ensureUsers = [{
name = "hass";
ensureDBOwnership = true;
}];
};
# Enable and configure Mosquitto MQTT broker
mosquitto = {
enable = true;
listeners = [
{
acl = [ "pattern readwrite #" ];
omitPasswordAuth = true;
settings.allow_anonymous = true;
}
];
};
zigbee2mqtt = {
enable = true;
settings = {
homeassistant = {
enabled = config.services.home-assistant.enable;
# Optional: Home Assistant discovery topic (default: shown below)
# Note: should be different from [MQTT base topic](../mqtt.md) to prevent errors in HA software
discovery_topic = "homeassistant";
# Optional: Home Assistant status topic (default: shown below)
status_topic = "homeassistant/status";
# Optional: Experimental support for Home Assistant event entities, may break in the future (default: shown below) when enabled:
# - An `event` entity will be discovered for each 'action'.
# - The `event_type` attribute will contain the action itself, additional attributes like `button` will have further information.
experimental_event_entities = false;
# Optional: Home Assistant legacy action sensor (default: `false`), when enabled:
# - Zigbee2MQTT will send an empty 'action' after one has been send
# - A 'sensor_action' will be discovered
legacy_action_sensor = false;
};
permit_join = true;
# Web interface
frontend = {
port = zigbee2mqttPort; # Choose an available port
};
# MQTT configuration
mqtt = {
base_topic = "zigbee2mqtt";
server = "mqtt://localhost:1883";
# If using authentication:
# user = "mqttuser";
# password = "your-password";
};
serial = {
port = "/dev/ttyUSB0";
};
};
};
music-assistant = {
enable = true;
providers = [
# "airplay" # music-assistant: airplay support is missing libraop, a library we will not package because it depends on OpenSSL 1.1.
"apple_music"
"bluesound"
"builtin"
"chromecast"
"deezer"
"dlna"
"fanarttv"
"filesystem_local"
"filesystem_smb"
"fully_kiosk"
"hass"
"hass_players"
"jellyfin"
"musicbrainz"
"opensubsonic"
"player_group"
"plex"
"qobuz"
"radiobrowser"
"siriusxm"
"snapcast"
"sonos"
"sonos_s1"
"soundcloud"
"spotify"
"template_player_provider"
"test"
"theaudiodb"
"tidal"
"tunein"
"ytmusic"
];
};
# Enable AirPlay
pipewire = {
# opens UDP ports 6001-6002
raopOpenFirewall = true;
extraConfig.pipewire = {
"10-airplay" = {
"context.modules" = [
{
name = "libpipewire-module-raop-discover";
# increase the buffer size if you get dropouts/glitches
# args = {
# "raop.latency.ms" = 500;
# };
}
];
};
};
};
};
# Enable required hardware support for the Zigbee adapter
hardware.bluetooth.enable = true; # Some adapters use Bluetooth
# Ensure proper permissions for Zigbee USB devices
# services.udev.extraRules = ''
# # For CC2531, CC2530, CC1352P-2, CC2538 and similar adapters
# SUBSYSTEM=="tty", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="16a8", SYMLINK+="zigbee", MODE="0666"
# SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="zigbee", MODE="0666"
# # For ConBee/RaspBee by Dresden Elektronik
# SUBSYSTEM=="tty", ATTRS{idVendor}=="1cf1", ATTRS{idProduct}=="0030", SYMLINK+="zigbee", MODE="0666"
# # For Electrolama zig-a-zig-ah (zzh!)
# SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="zigbee", MODE="0666"
# '';
environment.systemPackages = with pkgs; [
mosquitto # MQTT command-line tools
usbutils # For lsusb to help identify your adapter
];
networking.firewall.allowedTCPPorts = [
mosquittoPort
zigbee2mqttPort
8095
8097
];
}

View File

@@ -1,14 +0,0 @@
{ pkgs, ... }:
{
home.username = "matt";
home.homeDirectory = "/home/matt";
home.stateVersion = "23.11";
home.packages = with pkgs; [
iw
iwd
orca-slicer
vscodium
];
}

View File

@@ -1,44 +0,0 @@
{
monitor = [
"eDP-1,3456x2234@60.00000,0x0,1.0,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98"
];
workspace = [
"name:firefox, monitor:eDP-1, default:false, special, class:(.*firefox.*)"
"name:discord, monitor:eDP-1, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)"
"name:steam, monitor:eDP-1, default:false, special, class:(.*[Ss]team.*)"
];
windowRule = [
# "tag +fakefull, fullscreen: 0"
# "float, tag:fakefull"
# "size 3356 2160, tag:fakefull"
# "move 100 74, tag:fakefull"
# "noanim, tag:fakefull"
# "noblur, tag:fakefull"
# "norounding, tag:fakefull"
# "noshadow, tag:fakefull"
# "immediate, tag:fakefull"
# "noborder, tag:fakefull"
# "nodim, tag:fakefull"
# "idleinhibit, tag:fakefull"
"size 2160 3356, tag:horizonrdp"
];
waybar = {
modules-right = [
"tray"
"temperature"
"temperature#gpu"
"keyboard-state#capslock"
"keyboard-state#numlock"
"wireplumber#sink"
# "wireplumber#source"
"bluetooth"
"network"
"clock"
"battery"
"custom/weather"
];
};
}

View File

@@ -1,78 +0,0 @@
{ pkgs, ... }:
{
#nix run nix-darwin -- switch --flake ~/nix-config
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
asitop
mas
python3
python3Packages.beautifulsoup4
python3Packages.requests
python3Packages.selenium
vim
];
# Homebrew
homebrew.enable = true;
homebrew.casks = [
"spotify"
"protonvpn"
"omnissa-horizon-client"
"tg-pro"
"steam"
"orcaslicer"
"vscodium"
"epic-games"
"wine-stable"
"scroll-reverser"
];
homebrew.masApps = {
Tailscale = 1475387142;
Infuse = 1136220934;
Amphetamine = 937984704;
};
# homebrew.global.autoUpdate = true;
security.pam.services.sudo_local.touchIdAuth = true;
# Auto upgrade nix package and the daemon service.
# services.nix-daemon.enable = true;
# nix.package = pkgs.nix;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Allow unfree
nixpkgs.config.allowUnfree = true;
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
system = {
defaults = {
trackpad.Clicking = true;
dock.autohide = false;
NSGlobalDomain = {
AppleInterfaceStyle = "Dark";
"com.apple.mouse.tapBehavior" = 1;
"com.apple.keyboard.fnState" = false;
};
};
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
stateVersion = 5;
};
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
users.users.mattjallen = {
name = "mattjallen";
home = "/Users/mattjallen";
};
}

View File

@@ -1,111 +0,0 @@
{ ... }:
let
shellAliases = {
update-switch = "darwin-rebuild switch --flake ~/nix-config";
update-flake = "nix flake update ~/nix-config";
ducks = "du -cksh * | sort -hr | head -n 15";
};
gitAliases = {
co = "checkout";
ci = "commit";
cia = "commit --amend";
s = "status";
st = "status";
b = "branch";
p = "pull --rebase";
pu = "push";
};
in
{
imports = [ ./trampoline-apps ];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "mattjallen";
home.homeDirectory = "/Users/mattjallen";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "23.11";
programs = {
# Let Home Manager install and manage itself.
home-manager = {
enable = true;
};
vscode = {
enable = true;
};
btop.enable = true;
zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = shellAliases;
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "fishy";
};
};
librewolf = {
enable = true;
settings = {
"identity.fxaccounts.enabled" = true; # Enable Firefox Accounts
"privacy.clearOnShutdown.history" = false; # Disable clearing history on shutdown
"privacy.clearOnShutdown.downloads" = false; # Disable clearing downloads on shutdown
"privacy.clearOnShutdown.cache" = false; # Disable clearing cache on shutdown
"privacy.clearOnShutdown.cookiesAndStorage" = false; # Disable clearing cookies and storage on shutdown
"privacy.clearOnShutdown.cookies" = false; # Disable clearing cookies on shutdown
"privacy.clearOnShutdown_v2.cache" = false; # Disable clearing cache on shutdown
"privacy.clearOnShutdown_v2.cookiesAndStorage" = false; # Disable clearing cookies and storage on shutdown
"privacy.clearOnShutdown.formdata" = false; # Disable clearing form data on shutdown
"privacy.clearOnShutdown.offlineApps" = false; # Disable clearing offline apps on shutdown
"privacy.clearHistory.cache" = false; # Disable clearing cache on history clear
"privacy.clearHistory.cookiesAndStorage" = false; # Disable clearing cookies on history clear
"privacy.clearHistory.historyFormDataAndDownloads" = false; # Disable clearing history, form data, and downloads on history clear
"privacy.clearHistory.browsingHistoryAndDownloads" = false; # Disable clearing browsing history and downloads on history clear
"privacy.clearSiteData.cache" = false; # Disable clearing cache on site data clear
"privacy.clearSiteData.cookiesAndStorage" = false; # Disable clearing cookies on site data clear
"services.sync.prefs.sync.privacy.clearOnShutdown.cache" = true; # Enable syncing cache clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.cookies" = true; # Enable syncing cookies clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.downloads" = true; # Enable syncing downloads clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.formdata" = true; # Enable syncing form data clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.history" = true; # Enable syncing history clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.offlineApps" = true; # Enable syncing offline apps clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.sessions" = true; # Enable syncing sessions clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings" = true; # Enable syncing site settings clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.cache" = true; # Enable syncing cache clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.cookiesAndStorage" = true; # Enable syncing cookies clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.downloads" = true; # Enable syncing downloads clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.historyFormDataAndDownloads" = true; # Enable syncing form data clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.siteSettings" = true; # Enable syncing site settings clear on shutdown
"browser.newtabpage.activity-stream.feeds.topsites" = true; # Enable top sites on new tab page
"browser.newtabpage.activity-stream.topSitesRows" = 3; # Set number of rows for top sites on new tab page
};
};
};
programs.git = {
enable = true;
userName = "mjallen18";
userEmail = "matt.l.jallen@gmail.com";
aliases = gitAliases;
};
# Manage bug in compilations - who uses manpages in 2024 anyways? :P
manual.manpages.enable = false;
}

View File

@@ -1,13 +0,0 @@
{ config, ... }:
{
virtualisation.oci-containers.containers.excalidraw = {
autoStart = true;
image = "excalidraw/excalidraw";
ports = [ "8765:80" ];
environment = {
PUID = toString config.users.users.nix-apps.uid;
PGID = toString config.users.groups.jallen-nas.gid;
TZ = "America/Chicago";
};
};
}

View File

@@ -1,27 +0,0 @@
{ config, lib, ... }:
let
settings = import ../settings.nix;
immichPort = 2283;
dataDir = "/media/nas/main/photos";
dbPassword = config.sops.secrets."jallen-nas/immich/db-password".path;
in
{
# Enable immich service
services.immich = {
enable = true;
port = immichPort;
openFirewall = true;
secretsFile = dbPassword;
mediaLocation = dataDir;
environment = {
IMMICH_HOST = lib.mkForce "0.0.0.0";
IMMICH_TRUSTED_PROXIES = settings.hostAddress;
TZ = "America/Chicago";
};
machine-learning = {
enable = true;
};
};
}

View File

@@ -1,11 +0,0 @@
{ ... }:
{
services.jellyfin = {
enable = true;
openFirewall = true;
user = "nix-apps";
group = "jallen-nas";
dataDir = "/media/nas/ssd/nix-app-data/jellyfin";
# cacheDir = "/cache";
};
}

View File

@@ -1,73 +0,0 @@
{ ... }:
let
jellyseerrPort = 5055;
dataDir = "/var/lib/private/jellyseerr";
settings = import ../settings.nix;
in
{
containers.jellyseerr = {
autoStart = true;
privateNetwork = true;
hostAddress = settings.hostAddress;
localAddress = "10.0.1.52";
hostAddress6 = "fc00::1";
localAddress6 = "fc00::4";
bindMounts = {
${dataDir} = {
hostPath = "/media/nas/ssd/nix-app-data/jellyseerr";
isReadOnly = false;
};
};
config =
{
lib,
...
}:
{
# Enable jellyseerr service
services.jellyseerr = {
enable = true;
port = jellyseerrPort;
# package = package;
openFirewall = true;
};
networking = {
firewall = {
enable = true;
allowedTCPPorts = [ jellyseerrPort ];
};
# Use systemd-resolved inside the container
# Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
useHostResolvConf = lib.mkForce false;
};
# Create and set permissions for required directories
system.activationScripts.jellyseerr-dirs = ''
mkdir -p /var/lib/private/jellyseerr
chown -R jellyseerr:jellyseerr /var/lib/private/jellyseerr
chmod -R 775 /var/lib/private/jellyseerr
ln -sf /var/lib/private/jellyseerr /var/lib/jellyfin
'';
services.resolved.enable = true;
system.stateVersion = "23.11";
};
};
networking.nat = {
forwardPorts = [
{
destination = "10.0.1.52:5055";
sourcePort = jellyseerrPort;
}
];
};
}

View File

@@ -1,20 +0,0 @@
{ config, ... }:
{
virtualisation.oci-containers.containers.lubelogger = {
autoStart = true;
image = "ghcr.io/hargata/lubelogger";
ports = [ "6754:8080" ];
volumes = [
"/media/nas/ssd/nix-app-data/lubelogger:/App/data"
"/media/nas/ssd/nix-app-data/lubelogger/keys:/root/.aspnet/DataProtection-Keys"
];
environmentFiles = [
"/media/nas/ssd/nix-app-data/lubelogger/lubelogger.env"
];
environment = {
PUID = toString config.users.users.nix-apps.uid;
PGID = toString config.users.groups.jallen-nas.gid;
TZ = "America/Chicago";
};
};
}

View File

@@ -1,241 +0,0 @@
{ config, pkgs, ... }:
let
settings = import ../settings.nix;
adminpass = config.sops.secrets."jallen-nas/nextcloud/adminpassword".path;
secretsFile = config.sops.secrets."jallen-nas/nextcloud/smtp_settings".path;
jwtSecretFile = config.sops.secrets."jallen-nas/onlyoffice-key".path;
nextcloudUserId = config.users.users.nix-apps.uid;
nextcloudGroupId = config.users.groups.jallen-nas.gid;
nextcloudPackage = pkgs.unstable.nextcloud31;
hostAddress = settings.hostAddress;
localAddress = "10.0.2.18";
nextcloudPortExtHttp = 9988;
nextcloudPortExtHttps = 9943;
onlyofficePortExt = 9943;
in
{
containers.nextcloud = {
autoStart = true;
privateNetwork = true;
hostAddress = hostAddress;
localAddress = localAddress;
bindMounts = {
secrets = {
hostPath = "/run/secrets/jallen-nas/nextcloud";
isReadOnly = true;
mountPoint = "/run/secrets/jallen-nas/nextcloud";
};
secrets2 = {
hostPath = "/run/secrets/jallen-nas/onlyoffice-key";
isReadOnly = true;
mountPoint = "/run/secrets/jallen-nas/onlyoffice-key";
};
data = {
hostPath = "/media/nas/main/nextcloud";
isReadOnly = false;
mountPoint = "/data";
};
"/var/lib/nextcloud" = {
hostPath = "/media/nas/ssd/nix-app-data/nextcloud";
isReadOnly = false;
mountPoint = "/var/lib/nextcloud";
};
"/var/lib/onlyoffice" = {
hostPath = "/media/nas/ssd/nix-app-data/onlyoffice";
isReadOnly = false;
mountPoint = "/var/lib/onlyoffice";
};
};
config =
{ pkgs, lib, ... }:
{
imports = [ ../../../../share/nvidia ];
nixpkgs.config.allowUnfree = true;
networking.extraHosts = ''
${hostAddress} host.containers protonmail-bridge
'';
services = {
nextcloud = {
enable = true;
package = nextcloudPackage;
# datadir = "/data";
database.createLocally = true;
hostName = "cloud.mjallen.dev";
appstoreEnable = true;
caching.redis = true;
configureRedis = true;
enableImagemagick = true;
https = true;
secretFile = secretsFile;
config = {
adminuser = "mjallen";
adminpassFile = adminpass;
dbhost = "localhost";
dbtype = "sqlite";
dbname = "nextcloud";
dbuser = "nextcloud";
};
settings = {
loglevel = 3;
allow_local_remote_servers = true;
upgrade.disable-web = false;
datadirectory = "/data";
trusted_domains = [
"${hostAddress}:${toString nextcloudPortExtHttp}"
"${hostAddress}:${toString nextcloudPortExtHttps}"
"${localAddress}:80"
"${localAddress}:443"
"cloud.mjallen.dev"
];
opcache.interned_strings_buffer = 16;
trusted_proxies = [ hostAddress ];
maintenance_window_start = 6;
default_phone_region = "US";
enable_previews = true;
enabledPreviewProviders = [
"OC\\Preview\\PNG"
"OC\\Preview\\JPEG"
"OC\\Preview\\GIF"
"OC\\Preview\\BMP"
"OC\\Preview\\XBitmap"
"OC\\Preview\\MP3"
"OC\\Preview\\TXT"
"OC\\Preview\\MarkDown"
"OC\\Preview\\OpenDocument"
"OC\\Preview\\Krita"
"OC\\Preview\\HEIC"
"OC\\Preview\\Movie"
"OC\\Preview\\MSOffice2003"
"OC\\Preview\\MSOffice2007"
"OC\\Preview\\MSOfficeDoc"
];
installed = true;
user_oidc = {
auto_provision = false;
soft_auto_provision = false;
allow_multiple_user_backends = false; # auto redirect to authentik for login
};
};
};
};
services.onlyoffice = {
enable = true;
port = onlyofficePortExt;
hostname = "office.mjallen.dev";
jwtSecretFile = jwtSecretFile;
};
# System packages
environment.systemPackages = with pkgs; [
cudaPackages.cudnn
cudatoolkit
ffmpeg
# libtensorflow-bin
nextcloud31
nodejs
onlyoffice-documentserver
sqlite
];
# Create required users and groups
users.users.nextcloud = {
isSystemUser = true;
uid = lib.mkForce nextcloudUserId;
group = "nextcloud";
};
users.users.onlyoffice = {
group = lib.mkForce "nextcloud";
};
users.groups = {
nextcloud = {
gid = lib.mkForce nextcloudGroupId;
};
downloads = { };
};
# Create and set permissions for required directories
system.activationScripts.nextcloud-dirs = ''
mkdir -p /data
chown -R nextcloud:nextcloud /data
chown -R nextcloud:nextcloud /run/secrets/jallen-nas/nextcloud
chmod -R 775 /data
chmod -R 750 /run/secrets/jallen-nas/nextcloud
'';
hardware = {
graphics = {
enable = true;
# setLdLibraryPath = true;
};
};
programs = {
nix-ld.enable = true;
};
share.hardware.nvidia = {
enable = true;
enableBeta = true;
enableOpen = true;
nvidiaSettings = true;
enableNvidiaDocker = true;
};
system.stateVersion = "23.11";
networking = {
firewall = {
enable = true;
allowedTCPPorts = [
80
443
onlyofficePortExt
];
};
# Use systemd-resolved inside the container
# Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
useHostResolvConf = lib.mkForce false;
};
services.resolved.enable = true;
};
};
networking = {
nat = {
forwardPorts = [
{
destination = "${localAddress}:443";
sourcePort = nextcloudPortExtHttps;
}
{
destination = "${localAddress}:80";
sourcePort = nextcloudPortExtHttp;
}
{
destination = "${localAddress}:8000";
sourcePort = 8000;
}
{
destination = "${localAddress}:${toString onlyofficePortExt}";
sourcePort = onlyofficePortExt;
}
];
};
};
}

View File

@@ -1,70 +0,0 @@
{ config, pkgs, ... }:
let
llamaPackage = pkgs.llama-cpp.overrideAttrs (old: {
src = pkgs.fetchFromGitHub {
owner = "ggml-org";
repo = "llama.cpp";
rev = "b4920";
sha256 = "sha256-SnQIeY74JpAPRMxWcpklDH5D4CQvAgi0GYx5+ECk2J4=";
};
# Optionally override other attributes if you need to
# version = "my-fork-version";
# pname = "llama-cpp-custom";
});
in
{
services.ollama = {
enable = true;
port = 11434;
host = "0.0.0.0";
user = "nix-apps";
group = "jallen-nas";
openFirewall = true;
acceleration = "cuda";
home = "/media/nas/ssd/nix-app-data/ollama";
};
environment.systemPackages = [ llamaPackage ];
services.llama-cpp = {
enable = true;
port = 8127;
host = "0.0.0.0";
openFirewall = true;
model = "/media/nas/ssd/nix-app-data/llama-cpp/models/functionary-small-v3.2-GGUF/functionary-small-v3.2.Q4_0.gguf";
package = llamaPackage; # pkgs.unstable.llama-cpp;
extraFlags = [
"--n_gpu-layers"
"500"
"-c"
"0"
"--numa"
"numactl"
"--jinja"
];
};
services.open-webui = {
enable = false;
host = "0.0.0.0";
port = 8888;
openFirewall = true;
# stateDir = "/media/nas/ssd/nix-app-data/open-webui";
environmentFile = config.sops.secrets."jallen-nas/open-webui".path;
environment = {
OPENID_PROVIDER_URL = "https://authentik.mjallen.dev/application/o/chat/.well-known/openid-configuration";
OAUTH_PROVIDER_NAME = "authentik";
OPENID_REDIRECT_URI = "https://chat.mjallen.dev/oauth/oidc/callback";
ENABLE_OAUTH_SIGNUP = "False";
OAUTH_MERGE_ACCOUNTS_BY_EMAIL = "True";
ENABLE_SIGNUP = "False";
ENABLE_LOGIN_FORM = "False";
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
OLLAMA_API_BASE_URL = "http://127.0.0.1:11434";
LOCAL_FILES_ONLY = "False";
WEBUI_AUTH = "False";
};
};
}

View File

@@ -1,104 +0,0 @@
{
config,
pkgs,
...
}:
let
settings = import ../settings.nix;
paperlessPort = 28981;
paperlessUserId = config.users.users.nix-apps.uid;
paperlessGroupId = config.users.groups.jallen-nas.gid;
paperlessEnv = config.sops.templates."paperless.env".path;
paperlessPkg = pkgs.paperless-ngx;
in
{
containers.paperless = {
autoStart = true;
privateNetwork = true;
hostAddress = settings.hostAddress;
localAddress = "10.0.1.20";
hostAddress6 = "fc00::1";
localAddress6 = "fc00::20";
config =
{
lib,
...
}:
{
# Enable paperless service
services.paperless = {
enable = false;
package = paperlessPkg;
port = paperlessPort;
user = "paperless";
address = "0.0.0.0";
passwordFile = "/var/lib/paperless/paperless-password";
# environmentFile = paperlessEnv; # unstable is too unstable, but this doesnt exist in stable.... disabling altogether....
};
# Create required users and groups
users.groups = {
documents = {
gid = lib.mkForce paperlessGroupId;
};
};
users.users.paperless = {
isSystemUser = true;
uid = lib.mkForce paperlessUserId;
group = lib.mkForce "documents";
};
# Create and set permissions for required directories
system.activationScripts.paperless-dirs = ''
mkdir -p /var/lib/paperless
chown -R paperless:documents /var/lib/paperless
chmod -R 775 /var/lib/paperless
'';
networking = {
firewall = {
enable = true;
allowedTCPPorts = [ paperlessPort ];
};
# Use systemd-resolved inside the container
# Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
useHostResolvConf = lib.mkForce false;
};
services.resolved.enable = true;
system.stateVersion = "23.11";
};
# Bind mount directories from host
bindMounts = {
"/var/lib/paperless" = {
hostPath = "/media/nas/ssd/nix-app-data/paperless";
isReadOnly = false;
};
secrets = {
hostPath = "/run/secrets/jallen-nas/paperless";
isReadOnly = true;
mountPoint = "/run/secrets/jallen-nas/paperless";
};
secret-env = {
hostPath = "/run/secrets/rendered/paperless.env";
isReadOnly = true;
mountPoint = "/run/secrets/rendered/paperless.env";
};
};
};
networking.nat = {
forwardPorts = [
{
destination = "10.0.1.20:28981";
sourcePort = paperlessPort;
}
];
};
}

View File

@@ -1,391 +0,0 @@
{ config, ... }:
let
settings = import ../settings.nix;
domain = "mjallen.dev";
serverIp = settings.hostAddress;
# Forward services
authUrl = "http://${serverIp}:9000/outpost.goauthentik.io";
actualUrl = "http://${config.containers.actual.localAddress}:${toString config.containers.actual.config.services.actual.settings.port}";
authentikUrl = "http://${serverIp}:9000";
cacheUrl = "http://${serverIp}:9012";
cloudUrl = "http://${config.containers.nextcloud.localAddress}:80";
giteaUrl = "http://${config.containers.gitea.localAddress}:${toString config.containers.gitea.config.services.gitea.settings.server.HTTP_PORT}";
hassUrl = "http://homeassistant.local:8123";
immichUrl = "http://${serverIp}:${toString config.services.immich.port}";
jellyfinUrl = "http://${serverIp}:8096";
jellyseerrUrl = "http://${config.containers.jellyseerr.localAddress}:${toString config.containers.jellyseerr.config.services.jellyseerr.port}";
lubeloggerUrl = "http://${serverIp}:6754";
onlyofficeUrl = "http://${config.containers.nextcloud.localAddress}:${toString config.containers.nextcloud.config.services.onlyoffice.port}";
openWebUIUrl = "http://${serverIp}:8888";
paperlessUrl = "http://${config.containers.paperless.localAddress}:${toString config.containers.paperless.config.services.paperless.port}";
# Plugins
traefikPlugins = {
bouncer = {
moduleName = "github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin";
version = "v1.4.2";
};
geoblock = {
moduleName = "github.com/PascalMinder/geoblock";
version = "v0.2.5";
};
};
crowdsecAppsecHost = "${serverIp}:7422";
crowdsecLapiKeyFile = config.sops.secrets."jallen-nas/traefik/crowdsec-lapi-key".path;
# Ports
httpPort = 80;
httpsPort = 443;
traefikPort = 8080;
metricsPort = 8082;
forwardPorts = [
httpPort
httpsPort
traefikPort
metricsPort
];
# misc
letsEncryptEmail = "jalle008@proton.me";
dataDir = "/media/nas/ssd/nix-app-data/traefik";
authentikAddress = "http://${serverIp}:9000/outpost.goauthentik.io/auth/traefik";
in
{
sops = {
secrets = {
"jallen-nas/traefik/crowdsec-lapi-key" = {
owner = config.users.users.traefik.name;
group = config.users.users.traefik.group;
restartUnits = [ "traefik.service" ];
};
"jallen-nas/traefik/cloudflare-dns-api-token" = { };
"jallen-nas/traefik/cloudflare-zone-api-token" = { };
"jallen-nas/traefik/cloudflare-api-key" = { };
"jallen-nas/traefik/cloudflare-email" = { };
};
templates = {
"traefik.env" = {
content = ''
CLOUDFLARE_DNS_API_TOKEN = ${config.sops.placeholder."jallen-nas/traefik/cloudflare-dns-api-token"}
CLOUDFLARE_ZONE_API_TOKEN = ${config.sops.placeholder."jallen-nas/traefik/cloudflare-zone-api-token"}
CLOUDFLARE_API_KEY = ${config.sops.placeholder."jallen-nas/traefik/cloudflare-api-key"}
CLOUDFLARE_EMAIL = ${config.sops.placeholder."jallen-nas/traefik/cloudflare-email"}
'';
owner = config.users.users.traefik.name;
group = config.users.users.traefik.group;
restartUnits = [ "traefik.service" ];
};
};
};
networking.firewall = {
allowedTCPPorts = forwardPorts;
allowedUDPPorts = forwardPorts;
};
services.traefik = {
enable = true;
dataDir = dataDir;
group = "jallen-nas";#group;
environmentFiles = [ "${config.services.traefik.dataDir}/traefik.env" ]; # todo: sops
staticConfigOptions = {
entryPoints = {
web = {
address = ":${toString httpPort}";
asDefault = true;
http.redirections.entrypoint = {
to = "websecure";
scheme = "https";
};
};
websecure = {
address = ":${toString httpsPort}";
asDefault = true;
http.tls.certResolver = "letsencrypt";
};
metrics = {
address = ":${toString metricsPort}"; # Port for metrics
};
};
log = {
level = "INFO";
};
metrics = {
prometheus = {
entryPoint = "metrics";
addEntryPointsLabels = true;
addServicesLabels = true;
buckets = [0.1 0.3 1.2 5.0]; # Response time buckets
};
};
certificatesResolvers.letsencrypt.acme = {
email = letsEncryptEmail;
storage = "${config.services.traefik.dataDir}/acme.json";
dnsChallenge = {
provider = "cloudflare";
resolvers = [
"1.1.1.1:53"
"8.8.8.8:53"
];
};
};
api.dashboard = true;
# Access the Traefik dashboard on <Traefik IP>:8080 of your server
api.insecure = true;
experimental = {
plugins = traefikPlugins;
};
};
dynamicConfigOptions = {
http = {
middlewares = {
authentik = {
forwardAuth = {
tls.insecureSkipVerify = true;
address = authentikAddress;
trustForwardHeader = true;
authResponseHeaders = [
"X-authentik-username"
"X-authentik-groups"
"X-authentik-email"
"X-authentik-name"
"X-authentik-uid"
"X-authentik-jwt"
"X-authentik-meta-jwks"
"X-authentik-meta-outpost"
"X-authentik-meta-provider"
"X-authentik-meta-app"
"X-authentik-meta-version"
];
};
};
onlyoffice-websocket = {
headers.customrequestheaders = {
X-Forwarded-Proto = "https";
};
};
crowdsec = {
plugin = {
bouncer = {
crowdsecAppsecEnabled = true;
crowdsecAppsecHost = crowdsecAppsecHost;
crowdsecAppsecFailureBlock = true;
crowdsecAppsecUnreachableBlock = true;
crowdsecLapiKeyFile = crowdsecLapiKeyFile;
};
};
};
whitelist-geoblock = {
plugin = {
geoblock = {
silentStartUp = false;
allowLocalRequests = true;
logLocalRequests = false;
logAllowedRequests = false;
logApiRequests = false;
api = "https://get.geojs.io/v1/ip/country/{ip}";
apiTimeoutMs = 500;
cacheSize = 25;
forceMonthlyUpdate = true;
allowUnknownCountries = false;
unknownCountryApiResponse = "nil";
blackListMode = false;
countries = [
"CA"
"US"
];
};
};
};
internal-ipallowlist =
{
ipAllowList = {
sourceRange = [
"127.0.0.1/32"
"10.0.1.0/24"
];
};
};
};
services = {
auth.loadBalancer.servers = [
{
url = authUrl;
}
];
actual.loadBalancer.servers = [
{
url = actualUrl;
}
];
authentik.loadBalancer.servers = [
{
url = authentikUrl;
}
];
cache.loadBalancer.servers = [
{
url = cacheUrl;
}
];
chat.loadBalancer.servers = [
{
url = openWebUIUrl;
}
];
cloud.loadBalancer.servers = [
{
url = cloudUrl;
}
];
gitea.loadBalancer.servers = [
{
url = giteaUrl;
}
];
hass.loadBalancer.servers = [
{
url = hassUrl;
}
];
immich.loadBalancer.servers = [
{
url = immichUrl;
}
];
jellyfin.loadBalancer.servers = [
{
url = jellyfinUrl;
}
];
jellyseerr.loadBalancer.servers = [
{
url = jellyseerrUrl;
}
];
lubelogger.loadBalancer.servers = [
{
url = lubeloggerUrl;
}
];
onlyoffice.loadBalancer.servers = [
{
url = onlyofficeUrl;
}
];
paperless.loadBalancer.servers = [
{
url = paperlessUrl;
}
];
};
routers = {
auth = {
entryPoints = [ "websecure" ];
rule = "HostRegexp(`{subdomain:[a-z]+}.mjallen.dev`) && PathPrefix(`/outpost.goauthentik.io/`)";
service = "auth";
middlewares = [ "crowdsec" "whitelist-geoblock" ];
priority = 15;
tls.certResolver = "letsencrypt";
};
actual = {
entryPoints = [ "websecure" ];
rule = "Host(`actual.${domain}`)";
service = "actual";
middlewares = [ "crowdsec" "whitelist-geoblock" ];
tls.certResolver = "letsencrypt";
};
authentik = {
entryPoints = [ "websecure" ];
rule = "Host(`authentik.${domain}`)";
service = "authentik";
middlewares = [ "crowdsec" "whitelist-geoblock" ];
tls.certResolver = "letsencrypt";
};
cache = {
entryPoints = [ "websecure" ];
rule = "Host(`cache.${domain}`)";
service = "cache";
middlewares = [ "crowdsec" "whitelist-geoblock" ];
priority = 10;
tls.certResolver = "letsencrypt";
};
cloud = {
entryPoints = [ "websecure" ];
rule = "Host(`cloud.${domain}`)";
service = "cloud";
middlewares = [ "crowdsec" "whitelist-geoblock" ];
tls.certResolver = "letsencrypt";
};
gitea = {
entryPoints = [ "websecure" ];
rule = "Host(`gitea.${domain}`)";
service = "gitea";
middlewares = [ "crowdsec" "whitelist-geoblock" ];
tls.certResolver = "letsencrypt";
};
hass = {
entryPoints = [ "websecure" ];
rule = "Host(`hass.${domain}`)";
service = "hass";
middlewares = [ "crowdsec" "whitelist-geoblock" "authentik" ];
priority = 10;
tls.certResolver = "letsencrypt";
};
immich = {
entryPoints = [ "websecure" ];
rule = "Host(`immich.${domain}`)";
service = "immich";
middlewares = [ "crowdsec" "whitelist-geoblock" ];
tls.certResolver = "letsencrypt";
};
jellyfin = {
entryPoints = [ "websecure" ];
rule = "Host(`jellyfin.${domain}`)";
service = "jellyfin";
middlewares = [ "crowdsec" "whitelist-geoblock" ];
tls.certResolver = "letsencrypt";
};
jellyseerr = {
entryPoints = [ "websecure" ];
rule = "Host(`jellyseerr.${domain}`)";
service = "jellyseerr";
middlewares = [ "crowdsec" "whitelist-geoblock" ];
tls.certResolver = "letsencrypt";
};
lubelogger = {
entryPoints = [ "websecure" ];
rule = "Host(`lubelogger.${domain}`)";
service = "lubelogger";
middlewares = [ "crowdsec" "whitelist-geoblock" ];
tls.certResolver = "letsencrypt";
};
onlyoffice = {
entryPoints = [ "websecure" ];
rule = "Host(`office.${domain}`)";
service = "onlyoffice";
middlewares = [ "crowdsec" "whitelist-geoblock" "onlyoffice-websocket" ];
tls.certResolver = "letsencrypt";
};
};
};
};
};
}

View File

@@ -1,19 +0,0 @@
{ pkgs, ... }:
{
services.wyoming = {
faster-whisper.servers.hass-whisper = {
enable = true;
useTransformers = false;
device = "cuda";
language = "en";
model = "distil-large-v3";
uri = "tcp://0.0.0.0:10300";
};
piper.servers.hass-piper = {
enable = true;
voice = "en-us-ryan-high";
uri = "tcp://0.0.0.0:10200";
};
};
}

View File

@@ -1,92 +0,0 @@
{ config, ... }:
let
settings = import ./settings.nix;
ports = [
8008 # restic
9000 # authentik
2342 # grafana
51820 # wireguard
1025
1143
10200
10300
8127
9980 # onlyoffice
4000 # netbootxyz
4080 # netbootxyz
3000 # gitea
2222 # gitea ssh
3300
9898
6754 # lubelogger
2283 # immich
4444 # code-server
9012
];
in
{
# Networking configs
networking = {
hostName = settings.hostname;
useNetworkd = true;
hostId = "4b501480";
# Disable Network Manager
networkmanager = {
enable = true;
ensureProfiles = {
environmentFiles = [
config.sops.secrets.wifi.path
];
profiles = {
"Joey's Jungle 6G" = {
connection = {
id = "Joey's Jungle 6G";
type = "wifi";
};
ipv4 = {
address1 = "${settings.hostAddress}/24";
dns = "10.0.1.1";
gateway = "10.0.1.1";
method = "manual";
};
ipv6 = {
addr-gen-mode = "stable-privacy";
method = "auto";
};
wifi = {
mode = "infrastructure";
ssid = "Joey's Jungle 6G";
};
wifi-security = {
key-mgmt = "sae";
psk = "$PSK";
};
};
};
};
};
nat = {
enable = true;
internalInterfaces = [ "ve-+" ];
externalInterface = "wlp6s0";
# Lazy IPv6 connectivity for the container
enableIPv6 = true;
};
firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = ports;
allowedUDPPorts = ports;
# always allow traffic from your Tailscale network
trustedInterfaces = [ "tailscale0" ];
};
};
}

View File

@@ -1,69 +0,0 @@
# { ... }:
# {
# programs.argon.one = {
# enable = true;
# settings = {
# # Is 'celsius' by default, can also be set to 'fahrenheit'
# displayUnits = "celsius";
# # This is the same config as the original Argon40 config.
# # This is also the default config for this flake.
# fanspeed = [
# {
# # This the temperature threshold at which this fan speed will activate.
# # The temperature is in the above specified unit.
# temperature = 55;
# # This is speed percentage at which the fan will spin.
# speed = 30;
# }
# {
# temperature = 60;
# speed = 55;
# }
# {
# temperature = 65;
# speed = 100;
# }
# ];
# ir = {
# enable = true;
# gpio.enable = true;
# keymap = {
# "POWER" = "00ff39c6";
# "UP" = "00ff53ac";
# "DOWN" = "00ff4bb4";
# "LEFT" = "00ff9966";
# "RIGHT" = "00ff837c";
# "VOLUMEUP" = "00ff01fe";
# "VOLUMEDOWN" = "00ff817e";
# "OK" = "00ff738c";
# "HOME" = "00ffd32c";
# "MENU" = "00ffb946";
# "BACK" = "00ff09f6";
# };
# };
# };
# };
# }
# { lib, stdenv, pkgs, config, ...}:
# {
# imports = let
# argononed = fetchGit {
# url = "https://github.com/mjallen18/argononed.git";
# ref = "dev"; # Or any other branches deemed suitable
# };
# in
# [ "${argononed}/OS/nixos" ];
# services.argonone = {
# enable = true;
# logLevel = 4;
# settings = {
# fanTemp0 = 36; fanSpeed0 = 10;
# fanTemp1 = 41; fanSpeed1 = 50;
# fanTemp2 = 46; fanSpeed2 = 80;
# hysteresis = 4;
# };
# };
# }

View File

@@ -1,35 +0,0 @@
{ ... }:
{
# Set up impernance configuration for things like bluetooth
# In this configuration with /etc and /var/log being persistent, only directories outside of that need to be done here. See hardware configuration for all mountpoints.
environment.persistence."/nix/persist/system" = {
hideMounts = true;
directories = [
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/libvirt"
"/var/lib/systemd/coredump"
{
directory = "/var/lib/private";
mode = "u=rwx,g=,o=";
}
"/etc/NetworkManager/system-connections"
{
directory = "/etc/nix";
user = "root";
group = "root";
mode = "u=rwx,g=rx,o=rx";
}
];
files = [
"/etc/machine-id"
];
};
security.sudo.extraConfig = ''
# rollback results in sudo lectures after each reboot
Defaults lecture = never
'';
}

View File

@@ -1,22 +0,0 @@
{ ... }:
{
hardware = {
raspberry-pi."4" = {
apply-overlays-dtmerge.enable = true;
audio.enable = true;
backlight.enable = false;
bluetooth.enable = true;
dwc2.enable = true;
i2c0.enable = true;
i2c1.enable = true;
leds = {
eth.disable = false;
act.disable = false;
pwr.disable = false;
};
fkms-3d.enable = true;
xhci.enable = true;
};
deviceTree.filter = "bcm2711-rpi-4*.dtb";
};
}

View File

@@ -1,23 +0,0 @@
{ stdenv, fetchzip }:
stdenv.mkDerivation rec {
pname = "uefi_rpi4";
version = "1.38";
src = fetchzip {
url = "https://github.com/pftf/RPi4/releases/download/v1.38/RPi4_UEFI_Firmware_v1.38.zip";
hash = "sha256-9tOr80jcmguFy2bSz+H3TfmG8BkKyBTFoUZkMy8x+0g=";
stripRoot = false;
};
installPhase = ''
mkdir -p $out/share/uefi_rpi4
cp -r * $out/share/uefi_rpi4
'';
meta = {
description = "UEFI Firmware for Raspberry Pi 4";
homepage = "https://github.com/pftf/RPi4";
platforms = [ "aarch64-linux" ];
};
}

View File

@@ -1,58 +0,0 @@
{ lib, stdenv, fetchFromGitHub, nix-gitignore, dtc, installShellFiles, logLevel ? 5, ... }:
let
rawSrc = fetchFromGitHub {
owner = "mjallen18";
repo = "argononed";
rev = "master"; # replace with actual commit or tag
sha256 = "sha256-PpFR+6Aa4Pz9EmxOayMSsSTKFzUR6sYIAkGZ8+SUK18="; # fill this in with actual hash
};
ignores = ''
/*
!/version
!/makefile
!/configure
!/src
!/OS
/OS/*
!/OS/_common/
!/OS/nixos/
'';
cleanSrc = nix-gitignore.gitignoreSourcePure ignores rawSrc;
in
stdenv.mkDerivation {
pname = "argononed";
version = lib.strings.fileContents "${cleanSrc}/version";
src = cleanSrc;
nativeBuildInputs = [ dtc installShellFiles ];
preConfigure = ''
patchShebangs --build ./configure
export TARGET_DISTRO=nixos
'';
patches = [
"${cleanSrc}/OS/nixos/patches/nixos.patch"
"${cleanSrc}/OS/nixos/patches/shutdown.patch"
];
buildFlags = [ "LOGLEVEL=${toString logLevel}" ];
installFlags = [ "NIX_DRVOUT=$(out)" ];
postInstall = ''
installShellCompletion --bash --name argonone-cli OS/_common/argonone-cli-complete.bash
'';
meta = {
description = "A replacement daemon for the Argon One Raspberry Pi case";
homepage = "https://gitlab.com/DarkElvenAngel/argononed";
license = lib.licenses.mit;
platforms = [ "aarch64-linux" ];
};
}

View File

@@ -1,109 +0,0 @@
{ ... }:
let
rootDisk = "/dev/nvme0n1";
in
{
disko.devices.disk.main.imageSize = "15G";
disko.devices = {
nodev."/" = {
fsType = "tmpfs";
mountOptions = [
"mode=755"
"defaults"
"size=2G"
];
};
# root disk setup
disk.main = {
type = "disk";
device = rootDisk;
content = {
type = "gpt";
# specify partitions
partitions = {
# /boot/firmware
FIRMWARE = {
priority = 1;
name = "FIRMWARE";
start = "1M";
end = "1G";
type = "0700";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot/firmware";
mountOptions = [ "umask=0077" ];
};
};
# /boot
ESP = {
priority = 2;
name = "ESP";
# start = "1G";
# end = "2G";
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
name = "btrfs-root";
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
"home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
"root" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/root";
};
"nix" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/nix";
};
"etc" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/etc";
};
"tmp" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/tmp";
};
"log" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/var/log";
};
};
};
};
};
};
};
};
}

View File

@@ -1,74 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "none";
fsType = "tmpfs";
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/6f7adf66-5662-48cd-9c50-690469e2b615";
fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" "noatime" ];
};
fileSystems."/etc" =
{ device = "/dev/disk/by-uuid/6f7adf66-5662-48cd-9c50-690469e2b615";
fsType = "btrfs";
options = [ "subvol=etc" "compress=zstd" "noatime" ];
};
fileSystems."/root" =
{ device = "/dev/disk/by-uuid/6f7adf66-5662-48cd-9c50-690469e2b615";
fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" "noatime" ];
};
fileSystems."/var/log" =
{ device = "/dev/disk/by-uuid/6f7adf66-5662-48cd-9c50-690469e2b615";
fsType = "btrfs";
options = [ "subvol=log" "compress=zstd" "noatime" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/6f7adf66-5662-48cd-9c50-690469e2b615";
fsType = "btrfs";
options = [ "subvol=home" "compress=zstd" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/7793-909B";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot/firmware" =
{ device = "/dev/disk/by-uuid/15B0-5CAA";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.end0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View File

@@ -1,51 +0,0 @@
{ ... }:
let
hostAddress = "10.0.1.3";
localAddress = "10.0.5.18";
hassPort = 8192;
in
{
containers.homeassistant = {
autoStart = true;
privateNetwork = true;
hostAddress = hostAddress;
localAddress = localAddress;
config = { lib, ... }:
{
imports = [ ../homeassistant/homeassistant.nix ];
networking = {
firewall = {
enable = true;
allowedTCPPorts = [ hassPort ];
};
# Use systemd-resolved inside the container
# Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
useHostResolvConf = lib.mkForce false;
};
# Create and set permissions for required directories
system.activationScripts.gitea-dirs = ''
mkdir -p /var/lib/gitea
chown -R gitea:gitea /var/lib/gitea
chmod -R 775 /var/lib/gitea
mkdir -p /run/secrets/jallen-nas
chown -R gitea:gitea /run/secrets/jallen-nas
chmod -R 775 /run/secrets/jallen-nas
'';
services.resolved.enable = true;
system.stateVersion = "23.11";
};
};
networking.nat = {
forwardPorts = [
{
destination = "${localAddress}:${toString hassPort}";
sourcePort = hassPort;
}
];
};
}

View File

@@ -1,36 +0,0 @@
{ ... }:
{
# Set up impernance configuration for things like bluetooth
# In this configuration with /etc and /var/log being persistent, only directories outside of that need to be done here. See hardware configuration for all mountpoints.
environment.persistence."/nix/persist/system" = {
hideMounts = true;
directories = [
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/libvirt"
"/var/lib/systemd/coredump"
{
directory = "/var/lib/private";
mode = "u=rwx,g=,o=";
}
"/etc/NetworkManager/system-connections"
{
directory = "/etc/nix";
user = "root";
group = "root";
mode = "u=rwx,g=rx,o=rx";
}
];
# files = [
# "/etc/machine-id"
# { file = "/etc/nix/id_rsa"; parentDirectory = { mode = "u=rwx,g=,o="; }; }
# ];
};
security.sudo.extraConfig = ''
# rollback results in sudo lectures after each reboot
Defaults lecture = never
'';
}

View File

@@ -1,11 +0,0 @@
{ ... }:
{
imports = [
./samba
./apps/free-games-claimer
./apps/manyfold
./apps/mongodb
./apps/tdarr
./apps/your-spotify
];
}

View File

@@ -1,7 +0,0 @@
{ ... }:
{
services = {
desktopManager.cosmic.enable = true;
displayManager.cosmic-greeter.enable = true;
};
}

View File

@@ -1,7 +0,0 @@
{ ... }:
{
specialisation.cosmic.configuration = {
imports = [ ./default.nix ];
environment.etc."specialisation".text = "cosmic";
};
}

View File

@@ -1,23 +0,0 @@
{ lib, pkgs, ... }:
{
services = {
# Enable Desktop Environment.
desktopManager.gnome.enable = true;
# Enable Desktop Environment.
displayManager = {
gdm.enable = lib.mkDefault true;
gdm.wayland = lib.mkDefault true;
};
gnome.gnome-remote-desktop.enable = true;
};
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
programs = {
kdeconnect = {
enable = true;
package = pkgs.gnomeExtensions.gsconnect;
};
};
}

View File

@@ -1,14 +0,0 @@
let configDir = ./config;
in
{
imports = [
./config/nwg-dock
./config/nwg-drawer
./config/nwg-panel
];
home.file = {
".config/wallpapers".source = "${configDir}/wallpapers";
".config/wlogout".source = "${configDir}/wlogout";
".config/waybar/scripts".source = "${configDir}/waybar/scripts";
};
}

View File

@@ -1,122 +0,0 @@
{ pkgs, hyprlandSettings, ... }:
let
settings = import ../../settings.nix { inherit pkgs; };
in
{
programs.btop = {
enable = true;
settings = {
color_theme = "nord";
theme_background = true;
truecolor = true;
force_tty = false;
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty";
vim_keys = true;
rounded_corners = true;
graph_symbol = "braille";
graph_symbol_cpu = "default";
graph_symbol_mem = "default";
graph_symbol_net = "default";
graph_symbol_proc = "default";
shown_boxes = "cpu mem net proc";
update_ms = 2000;
proc_sorting = "cpu lazy";
proc_reversed = false;
proc_tree = false;
proc_colors = true;
proc_gradient = true;
proc_per_core = false;
proc_mem_bytes = true;
proc_cpu_graphs = true;
proc_info_smaps = false;
proc_left = false;
proc_filter_kernel = false;
cpu_graph_upper = "total";
cpu_graph_lower = "total";
cpu_invert_lower = true;
cpu_single_graph = false;
cpu_bottom = false;
show_uptime = true;
check_temp = true;
cpu_sensor = "Auto";
show_coretemp = true;
cpu_core_map = "";
temp_scale = "celsius";
base_10_sizes = false;
show_cpu_freq = true;
clock_format = "%X";
background_update = true;
custom_cpu_name = "";
disks_filter = "";
mem_graphs = true;
mem_below_net = false;
zfs_arc_cached = true;
show_swap = true;
swap_disk = true;
show_disks = true;
only_physical = true;
use_fstab = true;
zfs_hide_datasets = false;
disk_free_priv = false;
show_io_stat = true;
io_mode = false;
io_graph_combined = false;
io_graph_speeds = "";
net_download = 100;
net_upload = 100;
net_auto = true;
net_sync = true;
net_iface = "";
show_battery = true;
selected_battery = "Auto";
log_level = "WARNING";
};
themes = {
nord = ''
theme[main_bg]="${settings.nord.polarNight.nord0}"
theme[main_fg]="${settings.nord.snowStorm.nord6}"
theme[title]="${settings.nord.snowStorm.nord6}"
theme[hi_fg]="${settings.nord.frost.nord7}"
theme[selected_bg]="${settings.nord.polarNight.nord1}"
theme[selected_fg]="${settings.nord.frost.nord7}"
theme[inactive_fg]="${settings.nord.polarNight.nord2}"
theme[graph_text]="${settings.nord.snowStorm.nord6}"
theme[meter_bg]="${settings.nord.polarNight.nord1}"
theme[proc_misc]="${settings.nord.snowStorm.nord6}"
theme[cpu_box]="${settings.nord.aurora.nord15}"
theme[mem_box]="${settings.nord.aurora.nord14}"
theme[net_box]="${settings.nord.aurora.nord12}"
theme[proc_box]="${settings.nord.aurora.nord11}"
theme[div_line]="${settings.nord.polarNight.nord1}"
theme[temp_start]="${settings.nord.aurora.nord14}"
theme[temp_mid]="${settings.nord.aurora.nord13}"
theme[temp_end]="${settings.nord.aurora.nord11}"
theme[cpu_start]="${settings.nord.aurora.nord15}"
theme[cpu_mid]="${settings.nord.aurora.nord12}"
theme[cpu_end]="${settings.nord.aurora.nord11}"
theme[free_start]="${settings.nord.aurora.nord14}"
theme[free_mid]="${settings.nord.aurora.nord13}"
theme[free_end]="${settings.nord.aurora.nord12}"
theme[cached_start]="${settings.nord.aurora.nord14}"
theme[cached_mid]="${settings.nord.aurora.nord13}"
theme[cached_end]="${settings.nord.aurora.nord12}"
theme[available_start]="${settings.nord.snowStorm.nord6}"
theme[available_mid]="${settings.nord.aurora.nord11}"
theme[available_end]="${settings.nord.aurora.nord11}"
theme[used_start]="${settings.nord.aurora.nord14}"
theme[used_mid]="${settings.nord.aurora.nord13}"
theme[used_end]="${settings.nord.aurora.nord11}"
theme[download_start]="${settings.nord.frost.nord8}"
theme[download_mid]="${settings.nord.frost.nord8}"
theme[download_end]="${settings.nord.aurora.nord12}"
theme[upload_start]="${settings.nord.frost.nord7}"
theme[upload_mid]="${settings.nord.frost.nord7}"
theme[upload_end]="${settings.nord.aurora.nord12}"
theme[process_start]="${settings.nord.aurora.nord15}"
theme[process_mid]="${settings.nord.aurora.nord12}"
theme[process_end]="${settings.nord.aurora.nord11}"
'';
};
};
}

View File

@@ -1,302 +0,0 @@
{ pkgs, hyprlandSettings, ... }:
let
settings = import ../../settings.nix { inherit pkgs; };
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${settings.iconTheme}";
in
{
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd.enable = true;
settings = {
"$mod" = "SUPER";
# Mouse
# mouse_[up|down] - scroll wheel
# middle_mouse - 274
# thumb_up - 276
# thumb_down - 275
# l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active.
# r -> release, will trigger on release of a key.
# e -> repeat, will repeat when held.
# n -> non-consuming, key/mouse events will be passed to the active window in addition to triggering the dispatcher.
# m -> mouse, see below.
# t -> transparent, cannot be shadowed by other binds.
# i -> ignore mods, will ignore modifiers.
# s -> separate, will arbitrarily combine keys between each mod/key, see [Keysym combos](#keysym-combos) above.
# d -> has description, will allow you to write a description for your bind.
# p -> bypasses the app's requests to inhibit keybinds.
# https://wiki.hyprland.org/Configuring/Binds/
# https://wiki.hyprland.org/Configuring/Binds/#mouse-buttons
bind = [
"$mod, Return, exec, ${settings.defaultApps.terminal.pname}"
"$mod, SPACE, exec, wofi --show drun"
", xf86Search, exec, wofi --show drun"
"$mod, Q, killactive, "
"$mod, M, exec, wlogout --protocol layer-shell"
"$mod, E, exec, ${settings.defaultApps.fileExplorer.pname}"
"$mod, V, togglefloating, "
"$mod, D, exec, ${drawer}"
"$mod, P, pseudo, " # dwindle
"$mod, S, togglesplit, " # dwindle
"$mod SHIFT, Q, exec, hyprlock"
"$mod SHIFT, 4, exec, hyprshot -m region --clipboard-only"
"$mod, F, fullscreen, 1"
"$mod SHIFT, F, fullscreen, 0"
"$mod SHIFT, E, exec, smile"
"$mod, mouse:276, movecurrentworkspacetomonitor, ${settings.displayLeft.input}"
"$mod, mouse:275, movecurrentworkspacetomonitor, ${settings.displayRight.input}"
# alt-tab between workspaces on active monitor
"$mod, Tab, workspace, m+1"
"$mod SHIFT, Tab, workspace, m-1"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod ALT, 1, movetoworkspace, 1"
"$mod ALT, 2, movetoworkspace, 2"
"$mod ALT, 3, movetoworkspace, 3"
"$mod ALT, 4, movetoworkspace, 4"
"$mod ALT, 5, movetoworkspace, 5"
"$mod ALT, 6, movetoworkspace, 6"
"$mod ALT, 7, movetoworkspace, 7"
"$mod ALT, 8, movetoworkspace, 8"
"$mod ALT, 9, movetoworkspace, 9"
"$mod ALT, 0, movetoworkspace, discord"
"$mod CTRL, l, resizeactive, 10 0"
"$mod CTRL, h, resizeactive, -10 0"
"$mod CTRL, k, resizeactive, 0 -10"
"$mod CTRL, j, resizeactive, 0 10"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, j, movewindow, d"
"$mod, b, exec, ${settings.defaultApps.browser.pname}"
];
bindm = [
# Move/resize windows with mod + LMB/RMB and dragging
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
# middle mouse will grab a window, mod + middle mouse will close it
"$mod SHIFT, mouse:274, movewindow"
];
bindel = [
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
];
bindl = [
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPrev, exec, playerctl previous"
", XF86AudioNext, exec, playerctl next"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
"$mod, XF86MonBrightnessUp, exec, brightnessctl -d kbd_backlight set +10%"
"$mod, XF86MonBrightnessDown, exec, brightnessctl -d kbd_backlight set 10%-"
];
# monitor = [
# "${settings.displayLeft.input},${settings.displayLeft.resolution}@${settings.displayLeft.refreshRate},0x0,1.0,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98"
# ];
monitor = hyprlandSettings.monitor;
render = {
cm_fs_passthrough = 1;
};
misc = {
vrr = 1;
};
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 1;
"col.active_border" = "rgb(8aadf4) rgb(24273A) rgb(24273A) rgb(8aadf4) 45deg";
"col.inactive_border" = "rgb(24273A) rgb(24273A) rgb(24273A) rgb(24273A) 45deg";
layout = "dwindle";
allow_tearing = true;
};
decoration = {
rounding = 10;
blur = {
enabled = true;
size = 2;
passes = 2;
new_optimizations = true;
xray = false;
};
# drop_shadow = "yes";
# shadow_range = 4;
# shadow_render_power = "3";
# "col.shadow" = "rgba(1a1a1aee)";
};
animations = {
enabled = "yes";
bezier = [
"overshot, 0.05, 0.9, 0.1, 1.05"
"smoothOut, 0.36, 0, 0.66, -0.56"
"smoothIn, 0.25, 1, 0.5, 1"
];
animation = [
"windows, 1, 5, overshot, slide"
"windowsOut, 1, 4, smoothOut, slide"
"windowsMove, 1, 4, default"
"border, 1, 10, default"
"fade, 1, 10, smoothIn"
"fadeDim, 1, 10, smoothIn"
"workspaces, 1, 6, default"
];
};
dwindle = {
pseudotile = "yes";
preserve_split = "yes";
};
gestures = {
workspace_swipe = "off";
};
misc = {
force_default_wallpaper = 0;
};
workspace = hyprlandSettings.workspace;
windowrule = [
"float, title:(file_progress)"
"float, title:(.*[Cc]onfirm.*)"
"float, title:(.*[Dd]ialog.*)"
"float, title:(.*[Dd]ownload.*)"
"float, title:(.*[Nn]otification.*)"
"float, title:(.*[Ee]rror.*)"
"float, title:(.*[Ss]plash.*)"
"float, title:(.*[Cc]onfirmreset.*)"
"float, title:(.*[Ss]ign [Ii]n - .*)"
"float, title:(.*[Oo]pen [Ff]ile.*)"
"float, title:(.*branchdialog.*)"
"float, class:(.*pavucontrol.*)"
"move onscreen cursor 0% 0%, class:(.*pavucontrol.*)"
"float, class:(.*[Oo]verskride.*)"
"float, class:(.*FileRoller.*)"
"float, class:(.*wlogout.*)"
"idleinhibit stayfocused, title:(.*mpv.*)"
"float, title:(Media viewer)"
"float, class:(it.mijorus.smile),title:(Smile)"
"float, class:(.blueman-manager-wrapped)$,title:(Bluetooth Devices)"
# Picture in picture windows
"float, title:(.*Picture-in-Picture.*)"
"pin, title::(.*Picture-in-Picture.*)"
# discord/vesktop
"workspace: name:discord, class:(.*vesktop)"
"float, class:(.*vesktop),title:(.*Discord Popout.*)"
"pin, class:(.*vesktop),title:(.*Discord Popout.*)"
# Music
"workspace: name:discord, class:(Apple Music.*)"
# Steam
"float, class:(.*[Ss]team), title:(.*[Ss]team.*)$"
"workspace name:steam silent, class:(.*[Ss]team), title:(.*[Ss]team.*)$"
"tile, class:(.*[Ss]team), title:(.*[Ss]team.*)$"
"float, class:(.*steam),title:(.*Friends List.*)"
# Code
"pin, class:(.*codium.*),title:(Save As)"
"float, class:(.*codium.*),title:(Save As)"
"float, class:(xdg-desktop-portal-gtk),title:(Open Workspace from File)"
# Game Tearing??? https://wiki.hyprland.org/Configuring/Tearing/
"immediate, class:(.*gamescope)"
# vmware
# this tag will set the below options to the vdi window
# this will have it auto open as a 2160x7680 window
# and makes multi-monitor work
"tag +horizonrdp, class:(.*[Vv][Mm]ware-view),title:(USPS Next VDI)"
"noanim, tag:horizonrdp"
"noblur, tag:horizonrdp"
"norounding, tag:horizonrdp"
"noshadow, tag:horizonrdp"
"immediate, tag:horizonrdp"
"allowsinput, tag:horizonrdp"
"noborder, tag:horizonrdp"
"nodim, tag:horizonrdp"
"nomaxsize, tag:horizonrdp"
"renderunfocused, tag:horizonrdp"
"idleinhibit, tag:horizonrdp"
"float, tag:horizonrdp"
# float the vmware window cause its annoying to use in fullscreen
"float, class:(.*[Vv][Mm]ware-view),title:([Vv][Mm]ware [Hh]orizon [Cc]lient)"
] ++ hyprlandSettings.windowRule;
input = {
kb_layout = "us";
kb_variant = "";
kb_model = "";
kb_options = "";
kb_rules = "";
numlock_by_default = true;
follow_mouse = 1;
touchpad = {
clickfinger_behavior = 1;
natural_scroll = "yes";
};
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
};
experimental = {
xx_color_management_v4 = true;
};
};
extraConfig = ''
exec-once = dbus-update-activation-environment --systemd --all
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = xhost +SI:localuser:root
exec-once = nwg-look -a
exec-once = nwg-dock-hyprland -d
'';
};
}

View File

@@ -1,100 +0,0 @@
{ pkgs, hyprlandSettings, ... }:
let
settings = import ../../settings.nix { inherit pkgs; };
in
{
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
font = {
name = settings.fontName;
package = settings.fontPackage;
size = settings.fontSize;
};
settings = {
bold_font = "auto";
italic_font = "auto";
bold_italic_font = "auto";
mouse_hide_wait = "2.0";
cursor_shape = "block";
url_style = "dotted";
confirm_os_window_close = "0";
background_opacity = "0.85";
# The basic colors
foreground = settings.nord.snowStorm.nord6;
background = settings.nord.polarNight.nord0;
selection_foreground = settings.nord.polarNight.nord0;
selection_background = settings.nord.aurora.nord15;
# Cursor colors
cursor = settings.nord.aurora.nord15;
cursor_text_color = settings.nord.polarNight.nord0;
# URL underline color when hovering with mouse
url_color = settings.nord.aurora.nord15;
# Kitty window border colors
active_border_color = settings.nord.frost.nord10;
inactive_border_color = settings.nord.polarNight.nord1;
bell_border_color = settings.nord.aurora.nord13;
# OS Window titlebar colors
wayland_titlebar_color = settings.nord.polarNight.nord0;
macos_titlebar_color = settings.nord.polarNight.nord0;
# Tab bar colors
active_tab_foreground = settings.nord.polarNight.nord3;
active_tab_background = settings.nord.aurora.nord15;
inactive_tab_foreground = settings.nord.snowStorm.nord6;
inactive_tab_background = settings.nord.polarNight.nord1;
tab_bar_background = settings.nord.polarNight.nord3;
# Colors for marks (marked text in the terminal)
mark1_foreground = settings.nord.polarNight.nord0;
mark1_background = settings.nord.frost.nord10;
mark2_foreground = settings.nord.polarNight.nord0;
mark2_background = settings.nord.aurora.nord15;
mark3_foreground = settings.nord.polarNight.nord0;
mark3_background = settings.nord.frost.nord8;
# The 16 terminal colors
# black
color0 = settings.nord.polarNight.nord0;
# Autosuggestion
color8 = settings.nord.frost.nord10;
# red
color1 = settings.nord.aurora.nord11;
color9 = settings.nord.aurora.nord11;
# green
color2 = settings.nord.aurora.nord14;
color10 = settings.nord.aurora.nord14;
# yellow
color3 = settings.nord.aurora.nord13;
color11 = settings.nord.aurora.nord13;
# blue
color4 = settings.nord.frost.nord10;
color12 = settings.nord.frost.nord10;
# magenta
color5 = settings.nord.aurora.nord15;
color13 = settings.nord.aurora.nord15;
# cyan
color6 = settings.nord.frost.nord8;
color14 = settings.nord.frost.nord8;
# white
color7 = settings.nord.snowStorm.nord5;
color15 = settings.nord.snowStorm.nord4;
};
};
}

View File

@@ -1,27 +0,0 @@
{ pkgs, hyprlandSettings, ... }:
let
settings = import ../../settings.nix { inherit pkgs; };
in
{
services.mako = {
enable = true;
settings = {
font = settings.fontName;
icons = true;
ignore-timeout = true;
sort = "-time";
width = 500;
height = 110;
layer = "overlay";
border-radius = 15;
border-size = 1;
max-icon-size = 64;
default-timeout = 5000;
background-color = settings.nord.polarNight.nord0;
text-color = settings.nord.snowStorm.nord6;
border-color = settings.nord.frost.nord10;
progress-color = "over ${settings.nord.frost.nord8}";
};
};
}

View File

@@ -1,52 +0,0 @@
{ pkgs, hyprlandSettings, ... }:
let
settings = import ../../settings.nix { inherit pkgs; };
in
{
home.file = {
".config/nwg-dock-hyprland/drawer.css".text = ''
window {
background: ${settings.nord.polarNight.nord0};
border-radius: 10px;
border-style: none;
border-width: 1px;
border-color: ${settings.nord.aurora.nord15}b0
}
#box {
/* Define attributes of the box surrounding icons here */
padding: 10px
}
active {
/* This is to underline the button representing the currently active window */
border-bottom: solid 1px;
border-color: ${settings.nord.aurora.nord14}1a
}
button, image {
background: none;
border-style: none;
box-shadow: none;
color: ${settings.nord.frost.nord10}
}
button {
padding: 4px;
margin-left: 4px;
margin-right: 4px;
color: #eee;
font-size: 12px
}
button:hover {
background-color: ${settings.nord.polarNight.nord0}1a;
border-radius: 2px;
}
button:focus {
box-shadow: none
}
'';
};
}

View File

@@ -1,44 +0,0 @@
{ pkgs, hyprlandSettings, ... }:
let
settings = import ../../settings.nix { inherit pkgs; };
in
{
home.file = {
".config/nwg-drawer/drawer.css".text = ''
window {
background-color: ${settings.nord.polarNight.nord0}bf;
color: ${settings.nord.snowStorm.nord5}00
}
/* search entry */
entry {
background-color: ${settings.nord.polarNight.nord1}0f
}
button, image {
background: none;
border: none
}
button:hover {
background-color: ${settings.nord.frost.nord10}1a
}
/* in case you wanted to give category buttons a different look */
#category-button {
margin: 0 10px 0 10px
}
#pinned-box {
padding-bottom: 5px;
border-bottom: 1px dotted ${settings.nord.polarNight.nord3}
}
#files-box {
padding: 5px;
border: 1px dotted ${settings.nord.polarNight.nord3};
border-radius: 15px
}
'';
};
}

View File

@@ -1,21 +0,0 @@
{ pkgs, hyprlandSettings, ... }:
let
settings = import ../../settings.nix { inherit pkgs; };
in
{
home.file = {
".config/nwg-panel/excluded-dirs".text = ''
'';
".config/nwg-panel/preferred-apps.json".text = ''
{
"\\.pdf$": "${settings.defaultApps.browser.pname}",
"\\.svg$": "inkscape",
"\\.(jpg|png|tiff|gif)$": "${settings.defaultApps.imageViewer.pname}",
"\\.(mp3|ogg|flac|wav|wma)$": "audacious",
"\\.(avi|mp4|mkv|mov|wav)$": "${settings.defaultApps.video.pname}",
"\\.(doc|docx|xls|xlsx)$": "${settings.defaultApps.office.pname}"
}
'';
};
}

View File

@@ -1,426 +0,0 @@
{ pkgs, hyprlandSettings, ... }:
let
settings = import ../../settings.nix { inherit pkgs; };
defaultOpacity = "opacity: 0.85;";
defaultBorderRadius = "border-radius: 1rem;";
defaultCenterOptions = ''
padding-top: 0.5rem;
padding-bottom: 0.5rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
'';
borderRight = ''
padding-top: 0.5rem;
padding-bottom: 0.5rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 0rem 1rem 1rem 0rem;
margin-right: 0.5rem;
'';
borderLeft = ''
padding-top: 0.5rem;
padding-bottom: 0.5rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 1rem 0rem 0rem 1rem;
margin-left: 0.5rem;
'';
in
{
imports = [
./scripts/hass.nix
./scripts/weather.nix
];
# https://github.com/Alexays/Waybar/wiki/Module:-Hyprland
# https://www.nerdfonts.com/cheat-sheet
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
mod = "dock";
exclusive = true;
passthrough = false;
gtk-layer-shell = true;
height = 0;
# Module Layout
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "hyprland/window" ];
modules-right = hyprlandSettings.waybar.modules-right;
# Module Definitions
# Left
"hyprland/workspaces" = {
disable-scroll = true;
all-outputs = true;
on-click = "activate";
persistent_workspaces = {
"*" = 1;
};
};
# Center
"hyprland/window" = {
separate-outputs = true;
format = { };
};
# Left
tray = {
icon-size = 16;
spacing = 10;
};
"custom/lights" = {
tooltip = false;
exec = "waybar-hass --get_light light.living_room_lights";
interval = "once";
format = "{text}";#"󱉓";
on-click = "waybar-hass --toggle_light light.living_room_lights";
return-type = "json";
};
temperature = {
hwmon-path = "/sys/class/hwmon/hwmon4/temp1_input";
critical-threshold = 100;
format-critical = "{temperatureC}°C {icon}";
format = "{temperatureC}°C {icon}";
format-icons = [
"" # fa-temperature-empty
"" # fa-temperature-quarter
"" # fa-temperature-half
"" # fa-temperature-three-quarters
"" # fa-temperature-full
"" # fa-temperature-high
];
tooltip-format = "CPU: {temperatureC}°C";
};
"temperature#gpu" = {
hwmon-path = "/sys/class/hwmon/hwmon0/temp1_input";
critical-threshold = 100;
format-critical = "{temperatureC}°C {icon}";
format = "{temperatureC}°C {icon}";
format-icons = [
"" # fa-temperature-empty
"" # fa-temperature-quarter
"" # fa-temperature-half
"" # fa-temperature-three-quarters
"" # fa-temperature-full
"" # fa-temperature-high
];
on-click = "lact";
tooltip-format = "GPU: {temperatureC}°C";
};
"keyboard-state#capslock" = {
capslock = true;
icon-size = 20;
format = "{icon}";
tooltip-format = "Caps Lock {state}";
format-icons = {
locked = "󰬶";
unlocked = "󰬵";
};
};
"keyboard-state#numlock" = {
numlock = true;
icon-size = 60;
format = "{icon}";
tooltip-format = "Num Lock {state}";
format-icons = {
locked = "󰎠";
unlocked = "󱧓";
};
};
"wireplumber#sink" = {
format = "{icon} {volume}%";
tooltip = false;
format-muted = "{icon} Muted";
on-click = "wpctl set-mute @DEFAULT_SINK@ toggle";
on-click-right = "pavucontrol -t 1";
on-scroll-up = "wpctl set-volume @DEFAULT_SINK@ 5%+";
on-scroll-down = "wpctl set-volume @DEFAULT_SINK@ 5%-";
scroll-step = 5;
format-icons = {
headphone = "󰋋";
headphone-muted = "󰟎";
hands-free = "󰋋";
headset = "󰋋";
phone = "";
portable = "󰋋";
car = "";
default = [
""
""
""
""
];
};
};
"wireplumber#source" = {
node-type = "Audio/Source";
format = "";
format-muted = "";
tooltip = false;
# tooltip-format = "{source_desc} | {source_volume}%";
on-click = "wpctl set-mute @DEFAULT_SOURCE@ toggle";
on-click-right = "pavucontrol -t 2";
on-scroll-up = "wpctl set-volume @DEFAULT_SOURCE@ 5%+";
on-scroll-down = "wpctl set-volume @DEFAULT_SOURCE@ 5%-";
scroll-step = 5;
};
"bluetooth" = {
on-click = "overskride";
tooltip = true;
format = "{format-off}";
format-disabled = "󰂲";
format-off = "󰂲";
format-on = "󰂯";
format-connected = "󰂱";
tooltip-format = "{status}";
tooltip-format-disabled = "{status}";
tooltip-format-off = "{status}";
tooltip-format-on = "{status}";
tooltip-format-connected = "{status}";
tooltip-format-enumerate-connected = { };
};
network = {
interface = "wlan0";
format = "{ifname}";
format-wifi = ""; # "{essid} ({signalStrength}%) ";
format-ethernet = "󰊗"; # "{ipaddr}/{cidr} 󰊗";
format-disconnected = "" ; # An empty format will hide the module.
tooltip-format = "{ifname} via {gwaddr} 󰊗";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
};
clock = {
format = "{:%I:%M %p}";
tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "month";
format = {
months = "<span color='${settings.nord.frost.nord9}'><b>{}</b></span>";
days = "<span color='${settings.nord.frost.nord10}'><b>{}</b></span>";
weekdays = "<span color='${settings.nord.frost.nord8}'><b>{}</b></span>";
today = "<span color='${settings.nord.aurora.nord14}'><b><u>{}</u></b></span>";
};
};
};
battery = {
# bat = "macsmc-ac";
interval = 60;
states = {
warning = 30;
critical = 15;
};
format = "{capacity}% {icon}";
format-icons = ["" "" "" "" ""];
max-length = 25;
};
"custom/weather" = {
tooltip = true;
format = { };
interval = 30;
exec = "waybar-weather";
return-type = "json";
};
};
};
style = ''
* {
font-family:
Jetbrains Mono Nerd Font,
monospace;
font-size: 14px;
min-height: 0;
}
#waybar {
background: transparent;
color: ${settings.nord.snowStorm.nord6};
margin: 5px 5px;
}
#workspaces {
background-color: ${settings.nord.polarNight.nord0};
${defaultBorderRadius}
${defaultOpacity}
${defaultCenterOptions}
margin-left: 1rem;
}
#workspaces button {
color: ${settings.nord.frost.nord10};
${defaultBorderRadius}
padding: 0.4rem;
}
#workspaces button.active {
color: ${settings.nord.frost.nord8};
${defaultBorderRadius}
}
#workspaces button:hover {
color: ${settings.nord.frost.nord7};
${defaultBorderRadius}
}
#workspaces button.focused {
color: ${settings.nord.snowStorm.nord6};
background: ${settings.nord.aurora.nord13};
${defaultBorderRadius}
}
#workspaces button.urgent {
color: ${settings.nord.polarNight.nord0};
background: ${settings.nord.snowStorm.nord6};
${defaultBorderRadius}
}
#tooltip {
background: ${settings.nord.polarNight.nord0};
border-color: ${settings.nord.polarNight.nord0};
${defaultBorderRadius}
border-width: 1rem;
border-style: solid;
}
#window {
color: ${settings.nord.aurora.nord15};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultBorderRadius}
${defaultCenterOptions}
margin-left: 4rem;
margin-right: 100rem;
}
#custom-weather {
color: ${settings.nord.frost.nord10};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${borderRight}
}
#battery {
color: ${settings.nord.aurora.nord15};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#clock {
color: ${settings.nord.frost.nord9};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${borderLeft}
}
/* ------------- */
#network {
color: ${settings.nord.aurora.nord15};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${borderRight}
padding-right: 15px;
}
#bluetooth {
color: ${settings.nord.frost.nord9};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#wireplumber.source {
color: ${settings.nord.frost.nord8};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#wireplumber.sink {
color: ${settings.nord.frost.nord7};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#keyboard-state.numlock {
color: ${settings.nord.frost.nord8};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#keyboard-state.capslock {
color: ${settings.nord.frost.nord9};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#temperature.gpu {
color: ${settings.nord.frost.nord10};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#temperature {
color: ${settings.nord.frost.nord9};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${borderLeft}
}
#custom-lights {
color: ${settings.nord.frost.nord8};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${borderLeft}
}
/* ------------- */
#tray {
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
${defaultBorderRadius}
margin-right: 1rem;
}
'';
};
}

View File

@@ -1,387 +0,0 @@
{ pkgs, ... }:
let
waybar-weather = pkgs.writeScriptBin "waybar-weather" ''
#!/usr/bin/env nix-shell
#! nix-shell -i python3 --pure
#! nix-shell -p python3 python3Packages.requests
import json
from datetime import datetime
import requests
WWO_CODE = {
"113": "Sunny",
"116": "PartlyCloudy",
"119": "Cloudy",
"122": "VeryCloudy",
"143": "Fog",
"176": "LightShowers",
"179": "LightSleetShowers",
"182": "LightSleet",
"185": "LightSleet",
"200": "ThunderyShowers",
"227": "LightSnow",
"230": "HeavySnow",
"248": "Fog",
"260": "Fog",
"263": "LightShowers",
"266": "LightRain",
"281": "LightSleet",
"284": "LightSleet",
"293": "LightRain",
"296": "LightRain",
"299": "HeavyShowers",
"302": "HeavyRain",
"305": "HeavyShowers",
"308": "HeavyRain",
"311": "LightSleet",
"314": "LightSleet",
"317": "LightSleet",
"320": "LightSnow",
"323": "LightSnowShowers",
"326": "LightSnowShowers",
"329": "HeavySnow",
"332": "HeavySnow",
"335": "HeavySnowShowers",
"338": "HeavySnow",
"350": "LightSleet",
"353": "LightShowers",
"356": "HeavyShowers",
"359": "HeavyRain",
"362": "LightSleetShowers",
"365": "LightSleetShowers",
"368": "LightSnowShowers",
"371": "HeavySnowShowers",
"374": "LightSleetShowers",
"377": "LightSleet",
"386": "ThunderyShowers",
"389": "ThunderyHeavyRain",
"392": "ThunderySnowShowers",
"395": "HeavySnowShowers",
}
WEATHER_SYMBOL_EMOJI = {
"Unknown": "",
"Cloudy": "",
"Fog": "🌫",
"HeavyRain": "🌧",
"HeavyShowers": "🌧",
"HeavySnow": "",
"HeavySnowShowers": "",
"LightRain": "🌦",
"LightShowers": "🌦",
"LightSleet": "🌧",
"LightSleetShowers": "🌧",
"LightSnow": "🌨",
"LightSnowShowers": "🌨",
"PartlyCloudy": "",
"Sunny": "",
"ThunderyHeavyRain": "🌩",
"ThunderyShowers": "",
"ThunderySnowShowers": "",
"VeryCloudy": "",
}
WEATHER_SYMBOL = {
"Unknown": "",
"Cloudy": "",
"Fog": "🌫",
"HeavyRain": "🌧",
"HeavyShowers": "🌧",
"HeavySnow": "",
"HeavySnowShowers": "",
"LightRain": "🌦",
"LightShowers": "🌦",
"LightSleet": "🌧",
"LightSleetShowers": "🌧",
"LightSnow": "🌨",
"LightSnowShowers": "🌨",
"PartlyCloudy": "",
"Sunny": "",
"ThunderyHeavyRain": "🌩",
"ThunderyShowers": "",
"ThunderySnowShowers": "",
"VeryCloudy": "",
}
WEATHER_CODES = {key: WEATHER_SYMBOL[value] for key, value in WWO_CODE.items()}
WIND_DIRECTION = [
"", "", "", "", "", "", "", "",
]
MOON_PHASES = (
"🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘"
)
WEATHER_SYMBOL_WI_DAY = {
"Unknown": "",
"Cloudy": "",
"Fog": "",
"HeavyRain": "",
"HeavyShowers": "",
"HeavySnow": "",
"HeavySnowShowers": "",
"LightRain": "",
"LightShowers": "",
"LightSleet": "",
"LightSleetShowers": "",
"LightSnow": "",
"LightSnowShowers": "",
"PartlyCloudy": "",
"Sunny": "",
"ThunderyHeavyRain": "",
"ThunderyShowers": "",
"ThunderySnowShowers": "",
"VeryCloudy": "",
}
WEATHER_CODES_WI_DAY = {key: WEATHER_SYMBOL_WI_DAY[value] for key, value in WWO_CODE.items()}
WEATHER_SYMBOL_WI_NIGHT = {
"Unknown": "",
"Cloudy": "",
"Fog": "",
"HeavyRain": "",
"HeavyShowers": "",
"HeavySnow": "",
"HeavySnowShowers": "",
"LightRain": "",
"LightShowers": "",
"LightSleet": "",
"LightSleetShowers": "",
"LightSnow": "",
"LightSnowShowers": "",
"PartlyCloudy": "",
"Sunny": "",
"ThunderyHeavyRain": "",
"ThunderyShowers": "",
"ThunderySnowShowers": "",
"VeryCloudy": "",
}
WEATHER_CODES_WI_NIGHT = {key: WEATHER_SYMBOL_WI_NIGHT[value] for key, value in WWO_CODE.items()}
WIND_DIRECTION_WI = [
"", "", "", "", "", "", "", "",
]
WIND_SCALE_WI = [
"", "", "", "", "", "", "", "", "", "", "", "", "",
]
MOON_PHASES_WI = (
"", "", "", "", "", "", "",
"", "", "", "", "", "", "",
"", "", "", "", "", "", "",
"", "", "", "", "", "", "",
)
WEATHER_SYMBOL_WEGO = {
"Unknown": [
" .-. ",
" __) ",
" ( ",
" `- ",
" "],
"Sunny": [
"\033[38;5;226m \\ / \033[0m",
"\033[38;5;226m .-. \033[0m",
"\033[38;5;226m ( ) \033[0m",
"\033[38;5;226m `- \033[0m",
"\033[38;5;226m / \\ \033[0m"],
"PartlyCloudy": [
"\033[38;5;226m \\ /\033[0m ",
"\033[38;5;226m _ /\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m \\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
" "],
"Cloudy": [
" ",
"\033[38;5;250m .--. \033[0m",
"\033[38;5;250m .-( ). \033[0m",
"\033[38;5;250m (___.__)__) \033[0m",
" "],
"VeryCloudy": [
" ",
"\033[38;5;240;1m .--. \033[0m",
"\033[38;5;240;1m .-( ). \033[0m",
"\033[38;5;240;1m (___.__)__) \033[0m",
" "],
"LightShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
"\033[38;5;111m \033[0m",
"\033[38;5;111m \033[0m"],
"HeavyShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;240;1m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;240;1m( ). \033[0m",
"\033[38;5;226m /\033[38;5;240;1m(___(__) \033[0m",
"\033[38;5;21;1m \033[0m",
"\033[38;5;21;1m \033[0m"],
"LightSnowShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
"\033[38;5;255m * * * \033[0m",
"\033[38;5;255m * * * \033[0m"],
"HeavySnowShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;240;1m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;240;1m( ). \033[0m",
"\033[38;5;226m /\033[38;5;240;1m(___(__) \033[0m",
"\033[38;5;255;1m * * * * \033[0m",
"\033[38;5;255;1m * * * * \033[0m"],
"LightSleetShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
"\033[38;5;111m \033[38;5;255m*\033[38;5;111m \033[38;5;255m* \033[0m",
"\033[38;5;255m *\033[38;5;111m \033[38;5;255m*\033[38;5;111m \033[0m"],
"ThunderyShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
"\033[38;5;228;5m \033[38;5;111;25m \033[38;5;228;5m\033[38;5;111;25m \033[0m",
"\033[38;5;111m \033[0m"],
"ThunderyHeavyRain": [
"\033[38;5;240;1m .-. \033[0m",
"\033[38;5;240;1m ( ). \033[0m",
"\033[38;5;240;1m (___(__) \033[0m",
"\033[38;5;21;1m \033[38;5;228;5m\033[38;5;21;25m\033[38;5;228;5m\033[38;5;21;25m \033[0m",
"\033[38;5;21;1m \033[38;5;228;5m\033[38;5;21;25m \033[0m"],
"ThunderySnowShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
"\033[38;5;255m *\033[38;5;228;5m\033[38;5;255;25m*\033[38;5;228;5m\033[38;5;255;25m* \033[0m",
"\033[38;5;255m * * * \033[0m"],
"LightRain": [
"\033[38;5;250m .-. \033[0m",
"\033[38;5;250m ( ). \033[0m",
"\033[38;5;250m (___(__) \033[0m",
"\033[38;5;111m \033[0m",
"\033[38;5;111m \033[0m"],
"HeavyRain": [
"\033[38;5;240;1m .-. \033[0m",
"\033[38;5;240;1m ( ). \033[0m",
"\033[38;5;240;1m (___(__) \033[0m",
"\033[38;5;21;1m \033[0m",
"\033[38;5;21;1m \033[0m"],
"LightSnow": [
"\033[38;5;250m .-. \033[0m",
"\033[38;5;250m ( ). \033[0m",
"\033[38;5;250m (___(__) \033[0m",
"\033[38;5;255m * * * \033[0m",
"\033[38;5;255m * * * \033[0m"],
"HeavySnow": [
"\033[38;5;240;1m .-. \033[0m",
"\033[38;5;240;1m ( ). \033[0m",
"\033[38;5;240;1m (___(__) \033[0m",
"\033[38;5;255;1m * * * * \033[0m",
"\033[38;5;255;1m * * * * \033[0m"],
"LightSleet": [
"\033[38;5;250m .-. \033[0m",
"\033[38;5;250m ( ). \033[0m",
"\033[38;5;250m (___(__) \033[0m",
"\033[38;5;111m \033[38;5;255m*\033[38;5;111m \033[38;5;255m* \033[0m",
"\033[38;5;255m *\033[38;5;111m \033[38;5;255m*\033[38;5;111m \033[0m"],
"Fog": [
" ",
"\033[38;5;251m _ - _ - _ - \033[0m",
"\033[38;5;251m _ - _ - _ \033[0m",
"\033[38;5;251m _ - _ - _ - \033[0m",
" "],
}
data = {}
weather = requests.get("https://wttr.in/?u&format=j1").json()
moon = requests.get("https://wttr.in/?format=%m").text
def format_time(time):
return datetime.strptime(format_24_time(time), "%H").strftime("%I %p")
def format_24_time(time):
return time.replace("00", "").zfill(2)
def format_temp(temp):
return (hour["FeelsLikeF"] + "°").ljust(3)
def format_chances(hour):
chances = {
"chanceoffog": "Fog",
"chanceoffrost": "Frost",
"chanceofovercast": "Overcast",
"chanceofrain": "Rain",
"chanceofsnow": "Snow",
"chanceofsunshine": "Sunshine",
"chanceofthunder": "Thunder",
"chanceofwindy": "Wind",
}
conditions = []
for event in chances.keys():
if int(hour[event]) > 0:
conditions.append(chances[event] + " " + hour[event] + "%")
return ", ".join(conditions)
tempint = int(weather["current_condition"][0]["FeelsLikeF"])
extrachar = ""
if tempint > 0 and tempint < 10:
extrachar = "+"
data["text"] = (
""
+ WEATHER_CODES[weather["current_condition"][0]["weatherCode"]]
+ " "
+ extrachar
+ weather["current_condition"][0]["FeelsLikeF"]
+ "°F"
)
data["tooltip"] = (
f"<b>{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_F']}°</b>\n"
)
data["tooltip"] += f"Feels like: {weather['current_condition'][0]['FeelsLikeF']}°\n"
data["tooltip"] += f"Wind: {weather['current_condition'][0]['windspeedMiles']}mph\n"
data["tooltip"] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n"
data["tooltip"] += f"Moon phase: {weather["weather"][0]['astronomy'][0]['moon_phase']} " + moon + "\n"
for i, day in enumerate(weather["weather"]):
data["tooltip"] += f"\n<b>"
if i == 0:
data["tooltip"] += "Today, "
if i == 1:
data["tooltip"] += "Tomorrow, "
date = datetime.strptime(day['date'], "%Y-%m-%d").strftime("%a %b %d %Y")
data["tooltip"] += f"{date}</b>\n"
data["tooltip"] += f" {day['maxtempF']}°F {day['mintempF']}°F"
data[
"tooltip"
] += f" {day['astronomy'][0]['sunrise']} {day['astronomy'][0]['sunset']}\n"
for hour in day["hourly"]:
if i == 0:
if int(format_24_time(hour["time"])) < datetime.now().hour - 2:
continue
if int(format_24_time(hour["time"])) > datetime.strptime(day['astronomy'][0]['sunset'], "%I:%M %p").hour or int(format_24_time(hour["time"])) < datetime.strptime(day['astronomy'][0]['sunrise'], "%I:%M %p").hour:
codes = WEATHER_CODES_WI_NIGHT
else:
codes = WEATHER_CODES_WI_DAY
data[
"tooltip"
] += f"{format_time(hour['time'])} {codes[hour['weatherCode']]} {format_temp(hour['FeelsLikeF'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n"
print(json.dumps(data))
'';
in
{
home.packages = [ waybar-weather ];
}

View File

@@ -1,99 +0,0 @@
{ pkgs, hyprlandSettings, ... }:
let
settings = import ../../settings.nix { inherit pkgs; };
in
{
programs.wlogout = {
enable = true;
layout = {
lock = {
label = "lock";
action = "hyprlock --immediate";
text = "Lock";
keybind = "l";
};
hibernate = {
label = "hibernate";
action = "systemctl hibernate";
text = "Hibernate";
keybind = "h";
};
logout = {
label = "logout";
action = "sleep 1; hyprctl dispatch exit";
text = "Logout";
keybind = "e";
};
shutdown = {
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
};
suspend = {
label = "suspend";
action = "systemctl suspend";
text = "Suspend";
keybind = "u";
};
reboot = {
label = "reboot";
action = "reboot";
text = "Reboot";
keybind = "r";
};
};
style = ''
* {
background-image: none;
}
window {
background-color: ${settings.nord.polarNight.nord0}f0
}
button {
margin: 8px;
color: ${settings.nord.frost.nord7};
background-color: ${settings.nord.polarNight.nord1};
border-style: solid;
border-width: 2px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:active,
button:focus,
button:hover {
color: ${settings.nord.frost.nord8};
background-color: ${settings.nord.polarNight.nord2};
outline-style: none;
}
#lock {
background-image: image(url("icons/lock.png"));
}
#logout {
background-image: image(url("icons/logout.png"));
}
#suspend {
background-image: image(url("icons/suspend.png"));
}
#hibernate {
background-image: image(url("icons/hibernate.png"));
}
#shutdown {
background-image: image(url("icons/shutdown.png"));
}
#reboot {
background-image: image(url("icons/reboot.png"));
}
'';
};
}

View File

@@ -1,96 +0,0 @@
{ pkgs, hyprlandSettings, ... }:
let
settings = import ../../settings.nix { inherit pkgs; };
in
{
programs.wofi = {
enable = true;
style = ''
* {
font-family: "${settings.fontName}", monospace;
font-size: 14px;
}
/* Window */
window {
margin: 0px;
padding: 10px;
border: 0.16em solid ${settings.nord.aurora.nord15};
border-radius: 0.1em;
background-color: ${settings.nord.polarNight.nord0};
}
/* Inner Box */
#inner-box {
margin: 5px;
padding: 10px;
border: none;
background-color: ${settings.nord.polarNight.nord0};
}
/* Outer Box */
#outer-box {
margin: 5px;
padding: 10px;
border: none;
background-color: ${settings.nord.polarNight.nord0};
}
/* Scroll */
#scroll {
margin: 0px;
padding: 10px;
border: none;
background-color: ${settings.nord.polarNight.nord0};
}
/* Input */
#input {
margin: 5px 20px;
padding: 10px;
border: none;
border-radius: 0.1em;
color: ${settings.nord.snowStorm.nord6};
background-color: ${settings.nord.polarNight.nord0};
}
#input image {
border: none;
color: ${settings.nord.aurora.nord11};
}
#input * {
outline: 4px solid ${settings.nord.aurora.nord11}!important;
}
/* Text */
#text {
margin: 5px;
border: none;
color: ${settings.nord.snowStorm.nord6};
}
#entry {
background-color: ${settings.nord.polarNight.nord0};
}
#entry arrow {
border: none;
color: ${settings.nord.aurora.nord15};
}
/* Selected Entry */
#entry:selected {
border: 0.11em solid ${settings.nord.aurora.nord15};
}
#entry:selected #text {
color: ${settings.nord.frost.nord7};
}
#entry:drop(active) {
background-color: ${settings.nord.aurora.nord15}!important;
}
'';
};
}

View File

@@ -1,173 +0,0 @@
{ config, pkgs, lib, hyprlandSettings, ... }:
let
settings = import ./settings.nix { inherit pkgs; };
bing-wallpaper = pkgs.writeScriptBin "bing-wallpaper" ''
# Directory to store wallpapers
IMG_PATH="/run/wallpaper.jpg"
# Download if not already downloaded
URL=$(curl -s "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1" | \
jq -r '.images[0].url')
FULL_URL="https://www.bing.com$URL"
curl -s -o "$IMG_PATH" "$FULL_URL"
echo "Downloaded $FULL_URL to $IMG_PATH successfully"
'';
in
{
imports = [
./environment.nix
];
environment.systemPackages = [ bing-wallpaper pkgs.jq ];
home-manager.users."${settings.user}" = (import ./home.nix {inherit lib pkgs hyprlandSettings;});
services = {
displayManager = {
sddm = {
enable = true;
package = pkgs.kdePackages.sddm;
extraPackages = [ settings.sddm.package ];
theme = settings.sddm.themeName;
wayland.enable = true;
settings = {
Theme = {
ThemeDir = "${settings.sddm.package}/share/sddm/themes";
};
};
};
# Disable gdm
gdm.enable = lib.mkForce false;
defaultSession = "hyprland";
};
# disable other desktops
desktopManager = {
plasma6.enable = lib.mkForce false;
gnome.enable = lib.mkForce false;
};
dbus.enable = true;
ddccontrol.enable = true;
blueman.enable = true;
};
programs = {
hyprland = {
enable = true;
xwayland.enable = true;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
};
nm-applet.enable = true;
};
systemd = {
services = {
preload-bing-wallpaper = {
enable = true;
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
before = [ "display-manager.service" ];
requiredBy = [
"plymouth-quit-wait.service"
"display-manager.service"
];
wantedBy = [ "display-manager.service" ];
path = [
pkgs.bash
pkgs.jq
pkgs.curl
bing-wallpaper
];
script = ''
bing-wallpaper
'';
serviceConfig = {
Type = "oneshot";
};
};
};
user = {
services = {
reload-bing-wallpaper = {
enable = true;
path = [
pkgs.bash
pkgs.jq
pkgs.curl
pkgs.hyprland
bing-wallpaper
];
script = ''
bing-wallpaper
${pkgs.hyprland}/bin/hyprctl hyprpaper reload ,/run/wallpaper
'';
serviceConfig = {
Type = "oneshot";
};
};
};
# Create a timer to run the service periodically
timers = {
reload-bing-wallpaper = {
description = "Timer for reload-bing-wallpaper";
wantedBy = [ "timers.target" ];
# Timer configuration
timerConfig = {
OnCalendar = "daily"; # Check every day
Persistent = true; # Run immediately if last run was missed
Unit = "reload-bing-wallpaper.service";
};
};
};
};
extraConfig = ''
DefaultTimeoutStopSec=10s
'';
};
security = {
polkit.enable = true;
# configure sudo
sudo.extraRules = [
{
commands = [
{
command = "/run/current-system/sw/bin/waybar-weather";
options = [ "NOPASSWD" ];
}
{
command = "/run/current-system/sw/bin/waybar-updates";
options = [ "NOPASSWD" ];
}
];
groups = [ "wheel" ];
}
];
};
xdg.portal = {
enable = true;
wlr.enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gnome
pkgs.xdg-desktop-portal-gtk
];
};
nixpkgs.overlays = [
(self: super: {
waybar = super.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
})
];
}

View File

@@ -1,62 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
box64
brightnessctl
ddcutil
dunst
egl-wayland
file-roller
glib
gnome-calculator
gnome-calendar
gnome-disk-utility
gnome-firmware
gnome-firmware-updater
gnome-font-viewer
gnome-logs
gnome-photos
gnome-tweaks
gnome-weather
gsettings-desktop-schemas
hyprcursor
hyprland
hyprpaper
hyprshot
hyprsysteminfo
kdePackages.qtmultimedia
libnotify
libz
mako
meson
nautilus
networkmanagerapplet
nm-tray
nwg-dock-hyprland
nwg-drawer
nwg-look
overskride
pamixer
pavucontrol
playerctl
polkit
polkit_gnome
qt5.qtwayland
qt6.qtwayland
rofi-wayland
waybar
wayland-protocols
wayland-utils
waypaper
wev
wl-clipboard
wlogout
wlroots
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
xorg.xhost
xsettingsd
xwayland
];
}

View File

@@ -1,267 +0,0 @@
{ lib, pkgs, hyprlandSettings, ... }:
let
settings = import ./settings.nix { inherit pkgs hyprlandSettings; };
wallpaper = "/run/wallpaper.jpg";
in
{
imports = [
./config.nix
./config/btop
(import ./config/hypr {inherit pkgs hyprlandSettings;})
./config/kitty
./config/mako
(import ./config/waybar {inherit pkgs hyprlandSettings;})
./config/wofi
];
wayland.windowManager.hyprland = {
enable = true;
plugins = with pkgs.hyprlandPlugins; [
hyprgrass
];
settings = {
plugin = {
touch_gestures = {
# The default sensitivity is probably too low on tablet screens,
# I recommend turning it up to 4.0
sensitivity = "4.0";
# must be >= 3
workspace_swipe_fingers = "3";
# switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
# and can be used at the same time
# possible values: l, r, u, or d
# to disable it set it to anything else
workspace_swipe_edge = "d";
# in milliseconds
long_press_delay = "400";
# resize windows by long-pressing on window borders and gaps.
# If general:resize_on_border is enabled, general:extend_border_grab_area is used for floating
# windows
resize_on_border_long_press = true;
# in pixels, the distance from the edge that is considered an edge
edge_margin = "10";
# emulates touchpad swipes when swiping in a direction that does not trigger workspace swipe.
# ONLY triggers when finger count is equal to workspace_swipe_fingers
#
# might be removed in the future in favor of event hooks
emulate_touchpad_swipe = false;
experimental = {
# send proper cancel events to windows instead of hacky touch_up events,
# NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
send_cancel = "0";
};
hyprgrass-bind = [
# swipe left from right edge
", edge:r:l, workspace, +1"
# swipe up from bottom edge
", edge:d:u, exec, ${settings.defaultApps.browser.pname}"
# swipe down from left edge
", edge:l:d, exec, pactl set-sink-volume @DEFAULT_SINK@ -4%"
# swipe down with 4 fingers
", swipe:4:d, killactive"
# swipe diagonally left and down with 3 fingers
# l (or r) must come before d and u
", swipe:3:ld, exec, foot"
# tap with 3 fingers
", tap:3, exec, foot"
# longpress can trigger mouse binds:
", longpress:2, movewindow"
", longpress:3, resizewindow"
];
};
};
gestures = {
workspace_swipe = lib.mkForce true;
workspace_swipe_cancel_ratio = "0.15";
};
};
};
services = {
hyprpolkitagent.enable = true;
hyprpaper = {
enable = true;
settings = {
preload = [ "/run/wallpaper.jpg" wallpaper ];
wallpaper = [
"${settings.displayLeft.input}, /run/wallpaper.jpg"
"${settings.displayRight.input}, /run/wallpaper.jpg"
];
splash = false;
};
};
hypridle = {
enable = true;
settings = {
general = {
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
};
listener = [
# {
# timeout = 300; # 5min
# on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
# on-resume = "brightnessctl -r"; # monitor backlight restore.
# }
{
timeout = settings.lockScreenTimer;
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
{
timeout = settings.screenOffTimer;
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
{
timeout = settings.suspendTimer;
on-timeout = "systemctl suspend"; # suspend pc
}
];
};
};
};
programs = {
hyprlock = {
enable = true;
settings = {
background = [
{
monitor = "";
path = wallpaper; # supports png, jpg, webp (no animations, though)
color = "rgba(25, 20, 20, 1.0)";
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
blur_passes = "3"; # 0 disables blurring
blur_size = "7";
noise = "0.0117";
contrast = "0.8916";
brightness = "0.8172";
vibrancy = "0.1696";
vibrancy_darkness = "0.0";
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = settings.displayLeft.input;
dots_center = true;
fade_on_empty = true;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
bothlock_color = -1;
outline_thickness = 5;
placeholder_text = ''<span foreground="##cad3f5">Password...</span>'';
shadow_passes = 2;
}
];
};
};
vscode.profiles.default.userSettings."window"."titleBarStyle" = "custom";
};
home = {
sessionVariables = {
BROWSER = "${settings.defaultApps.browser.pname}";
CLUTTER_BACKEND = "wayland";
EDITOR = "${settings.defaultApps.editor.pname}";
VISUAL = "${settings.defaultApps.visual.pname}";
ICON_THEME = settings.iconTheme;
GTK_CSD = "0";
GTK_THEME = settings.gtkTheme;
GTK_USE_PORTAL = "1";
HYPRCURSOR_THEME = settings.cursorTheme;
HYPRCURSOR_SIZE = settings.cursorSize;
MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
NIXOS_XDG_OPEN_USE_PORTAL = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland-egl";
QT_QPA_PLATFORMTHEME = "gtk3";
QT_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
TERMINAL = "${settings.defaultApps.terminal.pname}";
XCURSOR_THEME = settings.cursorTheme;
XCURSOR_SIZE = settings.cursorSize;
XDG_CACHE_HOME = "\${HOME}/.cache";
XDG_CONFIG_HOME = "\${HOME}/.config";
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_DATA_HOME = "\${HOME}/.local/share";
XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
};
pointerCursor = {
gtk.enable = true;
package = settings.cursorThemePkg;
name = settings.cursorTheme;
size = settings.cursorSize;
};
packages = settings.requiredPkgs;
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
"org/gnome/desktop/interface".cursor-theme = settings.cursorTheme;
"org/gnome/desktop/interface".gtk-theme = settings.gtkTheme;
"org/gnome/desktop/interface".icon-theme = settings.iconTheme;
};
};
gtk = {
enable = true;
cursorTheme = {
name = settings.cursorTheme;
package = settings.cursorThemePkg;
};
theme = {
name = settings.gtkTheme;
package = settings.gtkThemePkg;
};
iconTheme = {
name = settings.iconTheme;
package = settings.iconThemePkg;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
font = {
name = settings.fontName;
package = settings.fontPackage;
size = settings.fontSize;
};
};
}

View File

@@ -1,7 +0,0 @@
{ ... }:
{
specialisation.hyprland.configuration = {
imports = [ ./default.nix ];
environment.etc."specialisation".text = "hyprland";
};
}

View File

@@ -1,87 +0,0 @@
{ ... }:
let
rootDisk = "/dev/nvme0n1";
in
{
disko.devices.disk.main.imageSize = "32G";
disko.devices = {
nodev."/" = {
fsType = "tmpfs";
mountOptions = [
"mode=755"
"defaults"
"size=25%"
];
};
# root disk setup
disk.main = {
type = "disk";
device = rootDisk;
content = {
type = "gpt";
# specify partitions
partitions = {
# /boot
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
name = "btrfs-root";
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
"home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
"root" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/root";
};
"nix" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/nix";
};
"etc" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/etc";
};
"log" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/var/log";
};
};
};
};
};
};
};
};
}

View File

@@ -1,102 +0,0 @@
{ ... }:
let
rootDisk = "/dev/nvme0n1";
in
{
disko.devices.disk.main.imageSize = "15G";
disko.devices = {
nodev."/" = {
fsType = "tmpfs";
mountOptions = [
"mode=755"
"defaults"
"size=2G"
];
};
# root disk setup
disk.main = {
type = "disk";
device = rootDisk;
content = {
type = "gpt";
# specify partitions
partitions = {
# /boot/firmware
FIRMWARE = {
priority = 1;
name = "FIRMWARE";
start = "1M";
end = "1G";
type = "0700";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot/firmware";
mountOptions = [ "umask=0077" ];
};
};
# /boot
ESP = {
priority = 2;
name = "ESP";
# start = "1G";
# end = "2G";
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
name = "btrfs-root";
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
"home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
"root" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/root";
};
"nix" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/nix";
};
"etc" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/etc";
};
"log" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/var/log";
};
};
};
};
};
};
};
};
}

View File

@@ -0,0 +1,69 @@
{ config, lib, pkgs, ... }:
let
cfg = config.mjallen.desktop.gnome;
in
{
imports = [ ./options.nix ];
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
apple-cursor
colloid-icon-theme
colloid-gtk-theme
gnome-tweaks
gnomeExtensions.allow-locked-remote-desktop
gnomeExtensions.appindicator
gnomeExtensions.arcmenu
gnomeExtensions.bing-wallpaper-changer
gnomeExtensions.dash-to-dock
gnomeExtensions.dash-to-panel
gnomeExtensions.gsconnect
gnomeExtensions.random-wallpaper
gnomeExtensions.tiling-assistant
gnomeExtensions.user-themes
gnomeExtensions.wikiart-wallpaper
papirus-icon-theme
pop-gtk-theme
];
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface".clock-format = "12h";
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
"org/gnome/desktop/interface".cursor-theme = lib.mkDefault "macOS";
"org/gnome/desktop/interface".enable-hot-corners = false;
"org/gnome/desktop/interface".font-antialiasing = "grayscale";
"org/gnome/desktop/interface".font-hinting = "slight";
"org/gnome/desktop/interface".gtk-theme = lib.mkDefault "Colloid-Dark";
"org/gnome/desktop/interface".icon-theme = lib.mkDefault "Colloid-Dark";
"org/gnome/desktop/peripherals/mouse".accel-profile = "flat";
"org/gnome/desktop/peripherals/touchpad".two-finger-scrolling-enabled = true;
"org/gnome/desktop/peripherals/touchpad".tap-to-click = true;
"org/gnome/mutter".experimental-features = [
"scale-monitor-framebuffer"
"variable-refresh-rate"
];
"org/gnome/tweaks".show-extensions-notice = false;
"org/gnome/shell".enabled-extensions = [
"allowlockedremotedesktop@kamens.us"
"appindicatorsupport@rgcjonas.gmail.com"
"user-theme@gnome-shell-extensions.gcampax.github.com"
"tiling-assistant@leleat-on-github"
"dash-to-dock@micxgx.gmail.com"
"BingWallpaper@ineffable-gmail.com"
"gsconnect@andyholmes.github.io"
];
"org/gnome/shell/extensions/bingwallpaper".override-lockscreen-blur = true;
"org/gnome/shell/extensions/bingwallpaper".random-mode-enabled = true;
"org/gnome/shell/extensions/bingwallpaper".revert-to-current-image = false;
"org/gnome/shell/extensions/dash-to-panel".primary-monitor = 1;
"org/gnome/shell/extensions/dash-to-panel".multi-monitors = false;
"org/gnome/shell/extensions/gsconnect".id = "4db35bd2-0dcd-42a3-9f77-ef3e8bb83182";
"org/gnome/shell/extensions/gsconnect".name = "matt-nixos";
"org/gnome/shell/extensions/user-theme".name = lib.mkDefault "Colloid-Dark";
"org/gtk/settings/file-chooser".clock-format = "12h";
};
};
};
}

View File

@@ -0,0 +1,7 @@
{ lib, ... }:
with lib;
{
options.mjallen.desktop.gnome = {
enable = mkEnableOption "enable gnome settings";
};
}

View File

@@ -0,0 +1,403 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.mjallen.desktop.hyprland;
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${cfg.iconThemeName}";
in
{
imports = [
./options.nix
./packages.nix
./theme.nix
./variables.nix
];
config = mkIf cfg.enable {
services = {
hyprpolkitagent.enable = true;
};
programs = {
vscode.profiles.default.userSettings."window"."titleBarStyle" = "custom";
};
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd.enable = true;
plugins = with pkgs.hyprlandPlugins; [
hyprgrass
];
settings = {
"$mod" = "SUPER";
# Mouse
# mouse_[up|down] - scroll wheel
# middle_mouse - 274
# thumb_up - 276
# thumb_down - 275
# l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active.
# r -> release, will trigger on release of a key.
# e -> repeat, will repeat when held.
# n -> non-consuming, key/mouse events will be passed to the active window in addition to triggering the dispatcher.
# m -> mouse, see below.
# t -> transparent, cannot be shadowed by other binds.
# i -> ignore mods, will ignore modifiers.
# s -> separate, will arbitrarily combine keys between each mod/key, see [Keysym combos](#keysym-combos) above.
# d -> has description, will allow you to write a description for your bind.
# p -> bypasses the app's requests to inhibit keybinds.
# https://wiki.hyprland.org/Configuring/Binds/
# https://wiki.hyprland.org/Configuring/Binds/#mouse-buttons
bind = [
"$mod, Return, exec, ${cfg.defaultApps.terminal.pname}"
"$mod, SPACE, exec, wofi --show drun"
", xf86Search, exec, wofi --show drun"
"$mod, Q, killactive, "
"$mod, M, exec, wlogout --protocol layer-shell"
"$mod, E, exec, ${cfg.defaultApps.fileExplorer.pname}"
"$mod, V, togglefloating, "
"$mod, D, exec, ${drawer}"
"$mod, P, pseudo, " # dwindle
"$mod, S, togglesplit, " # dwindle
"$mod SHIFT, Q, exec, hyprlock"
"$mod SHIFT, 4, exec, hyprshot -m region --clipboard-only"
"$mod, F, fullscreen, 1"
"$mod SHIFT, F, fullscreen, 0"
"$mod SHIFT, E, exec, smile"
"$mod, mouse:276, movecurrentworkspacetomonitor, ${cfg.display1.input}"
"$mod, mouse:275, movecurrentworkspacetomonitor, ${cfg.display2.input}"
# alt-tab between workspaces on active monitor
"$mod, Tab, workspace, m+1"
"$mod SHIFT, Tab, workspace, m-1"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod ALT, 1, movetoworkspace, 1"
"$mod ALT, 2, movetoworkspace, 2"
"$mod ALT, 3, movetoworkspace, 3"
"$mod ALT, 4, movetoworkspace, 4"
"$mod ALT, 5, movetoworkspace, 5"
"$mod ALT, 6, movetoworkspace, 6"
"$mod ALT, 7, movetoworkspace, 7"
"$mod ALT, 8, movetoworkspace, 8"
"$mod ALT, 9, movetoworkspace, 9"
"$mod ALT, 0, movetoworkspace, discord"
"$mod CTRL, l, resizeactive, 10 0"
"$mod CTRL, h, resizeactive, -10 0"
"$mod CTRL, k, resizeactive, 0 -10"
"$mod CTRL, j, resizeactive, 0 10"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, j, movewindow, d"
"$mod, b, exec, ${cfg.defaultApps.browser.pname}"
];
bindm = [
# Move/resize windows with mod + LMB/RMB and dragging
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
# middle mouse will grab a window, mod + middle mouse will close it
"$mod SHIFT, mouse:274, movewindow"
];
bindel = [
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
];
bindl = [
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPrev, exec, playerctl previous"
", XF86AudioNext, exec, playerctl next"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
"$mod, XF86MonBrightnessUp, exec, brightnessctl -d kbd_backlight set +10%"
"$mod, XF86MonBrightnessDown, exec, brightnessctl -d kbd_backlight set 10%-"
];
monitor = cfg.monitor;
monitorv2 = cfg.monitorv2 or { };
render = {
cm_fs_passthrough = 1;
};
misc = {
vrr = 1;
};
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 1;
"col.active_border" = "rgb(8aadf4) rgb(24273A) rgb(24273A) rgb(8aadf4) 45deg";
"col.inactive_border" = "rgb(24273A) rgb(24273A) rgb(24273A) rgb(24273A) 45deg";
layout = "dwindle";
allow_tearing = true;
};
decoration = {
rounding = 10;
blur = {
enabled = true;
size = 2;
passes = 2;
new_optimizations = true;
xray = false;
};
# drop_shadow = "yes";
# shadow_range = 4;
# shadow_render_power = "3";
# "col.shadow" = "rgba(1a1a1aee)";
};
animations = {
enabled = "yes";
bezier = [
"overshot, 0.05, 0.9, 0.1, 1.05"
"smoothOut, 0.36, 0, 0.66, -0.56"
"smoothIn, 0.25, 1, 0.5, 1"
];
animation = [
"windows, 1, 5, overshot, slide"
"windowsOut, 1, 4, smoothOut, slide"
"windowsMove, 1, 4, default"
"border, 1, 10, default"
"fade, 1, 10, smoothIn"
"fadeDim, 1, 10, smoothIn"
"workspaces, 1, 6, default"
];
};
dwindle = {
pseudotile = "yes";
preserve_split = "yes";
};
misc = {
force_default_wallpaper = 0;
};
workspace = cfg.workspace;
windowrule = [
"float, title:(file_progress)"
"float, title:(.*[Cc]onfirm.*)"
"float, title:(.*[Dd]ialog.*)"
"float, title:(.*[Dd]ownload.*)"
"float, title:(.*[Nn]otification.*)"
"float, title:(.*[Ee]rror.*)"
"float, title:(.*[Ss]plash.*)"
"float, title:(.*[Cc]onfirmreset.*)"
"float, title:(.*[Ss]ign [Ii]n - .*)"
"float, title:(.*[Oo]pen [Ff]ile.*)"
"float, title:(.*branchdialog.*)"
"float, class:(.*pavucontrol.*)"
"move onscreen cursor 0% 0%, class:(.*pavucontrol.*)"
"float, class:(.*[Oo]verskride.*)"
"float, class:(.*FileRoller.*)"
"float, class:(.*wlogout.*)"
"idleinhibit stayfocused, title:(.*mpv.*)"
"float, class:(.*nm-connection-editor.*)"
"move onscreen cursor 0% 0%, class:(.*nm-connection-editor.*)"
"float, title:(Media viewer)"
"float, class:(it.mijorus.smile),title:(Smile)"
"float, class:(.blueman-manager-wrapped)$,title:(Bluetooth Devices)"
# Picture in picture windows
"float, title:(.*Picture-in-Picture.*)"
"pin, title::(.*Picture-in-Picture.*)"
# discord/vesktop
"workspace: name:discord, class:(.*vesktop)"
"float, class:(.*vesktop),title:(.*Discord Popout.*)"
"pin, class:(.*vesktop),title:(.*Discord Popout.*)"
# Music
"workspace: name:discord, class:(Apple Music.*)"
# Steam
"float, class:(.*[Ss]team), title:(.*[Ss]team.*)$"
"workspace name:steam silent, class:(.*[Ss]team), title:(.*[Ss]team.*)$"
"tile, class:(.*[Ss]team), title:(.*[Ss]team.*)$"
"float, class:(.*steam),title:(.*Friends List.*)"
# Code
"pin, class:(.*codium.*),title:(Save As)"
"float, class:(.*codium.*),title:(Save As)"
"float, class:(xdg-desktop-portal-gtk),title:(Open Workspace from File)"
# Game Tearing??? https://wiki.hyprland.org/Configuring/Tearing/
"immediate, class:(.*gamescope)"
# vmware
# this tag will set the below options to the vdi window
# this will have it auto open as a 2160x7680 window
# and makes multi-monitor work
"tag +horizonrdp, class:(.*[Vv][Mm]ware-view),title:(USPS Next VDI)"
"noanim, tag:horizonrdp"
"noblur, tag:horizonrdp"
"norounding, tag:horizonrdp"
"noshadow, tag:horizonrdp"
"immediate, tag:horizonrdp"
"allowsinput, tag:horizonrdp"
"noborder, tag:horizonrdp"
"nodim, tag:horizonrdp"
"nomaxsize, tag:horizonrdp"
"renderunfocused, tag:horizonrdp"
"idleinhibit, tag:horizonrdp"
"float, tag:horizonrdp"
# "size 2160 7680, tag:horizonrdp"
# "move onscreen 0 0, tag:horizonrdp"
# float the vmware window cause its annoying to use in fullscreen
"float, class:(.*[Vv][Mm]ware-view),title:([Vv][Mm]ware [Hh]orizon [Cc]lient)"
"tag +waydroid, class:([Ww]aydroid.*)"
"float, tag:waydroid"
"pin, tag:waydroid"
] ++ cfg.windowRule;
plugin = {
touch_gestures = {
# The default sensitivity is probably too low on tablet screens,
# I recommend turning it up to 4.0
sensitivity = "4.0";
# must be >= 3
workspace_swipe_fingers = "3";
# switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
# and can be used at the same time
# possible values: l, r, u, or d
# to disable it set it to anything else
workspace_swipe_edge = "d";
# in milliseconds
long_press_delay = "400";
# resize windows by long-pressing on window borders and gaps.
# If general:resize_on_border is enabled, general:extend_border_grab_area is used for floating
# windows
resize_on_border_long_press = true;
# in pixels, the distance from the edge that is considered an edge
edge_margin = "10";
# emulates touchpad swipes when swiping in a direction that does not trigger workspace swipe.
# ONLY triggers when finger count is equal to workspace_swipe_fingers
#
# might be removed in the future in favor of event hooks
emulate_touchpad_swipe = false;
experimental = {
# send proper cancel events to windows instead of hacky touch_up events,
# NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
send_cancel = "0";
};
hyprgrass-bind = [
# swipe left from right edge
", edge:r:l, workspace, +1"
# swipe up from bottom edge
", edge:d:u, exec, ${cfg.defaultApps.browser.pname}"
# swipe down from left edge
", edge:l:d, exec, pactl set-sink-volume @DEFAULT_SINK@ -4%"
# swipe down with 4 fingers
", swipe:4:d, killactive"
# swipe diagonally left and down with 3 fingers
# l (or r) must come before d and u
", swipe:3:ld, exec, foot"
# tap with 3 fingers
", tap:3, exec, foot"
# longpress can trigger mouse binds:
", longpress:2, movewindow"
", longpress:3, resizewindow"
];
};
};
gestures = {
workspace_swipe = true;
workspace_swipe_cancel_ratio = "0.15";
};
input = {
kb_layout = "us";
kb_variant = "";
kb_model = "";
kb_options = "";
kb_rules = "";
numlock_by_default = true;
follow_mouse = 1;
touchpad = {
clickfinger_behavior = 1;
natural_scroll = "yes";
};
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
};
experimental = {
xx_color_management_v4 = true;
};
debug = {
full_cm_proto = true;
disable_logs = true;
disable_scale_checks = true;
};
};
extraConfig = ''
exec-once = dbus-update-activation-environment --systemd --all
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = xhost +SI:localuser:root
exec-once = nwg-look -a
exec-once = nwg-dock-hyprland -d
'' + cfg.extraConfig or '''';
};
};
}

View File

@@ -0,0 +1,123 @@
{ lib, pkgs, ... }:
with lib;
{
options.mjallen.desktop.hyprland = {
enable = mkEnableOption "enable hyprland desktop";
primaryDisplay = mkOption {
type = types.str;
default = "DP-1";
};
display1 = {
input = mkOption {
type = types.str;
default = "DP-1";
};
resolution = mkOption {
type = types.str;
default = "3840x2160";
};
refreshRate = mkOption {
type = types.str;
default = "240.00000";
};
};
display2 = {
input = mkOption {
type = types.str;
default = "DP-1";
};
resolution = mkOption {
type = types.str;
default = "3840x2160";
};
refreshRate = mkOption {
type = types.str;
default = "240.00000";
};
};
wallpaper = mkOption {
type = with types; listOf str;
default = [];
description = "list of hyprland wallpaper configs";
};
monitor = mkOption {
type = with types; listOf str;
default = [];
description = "list of hyprland monitor configs";
};
monitorv2 = mkOption {
type = with types; listOf str;
default = [];
description = "list of hyprland monitorv2 configs";
};
workspace = mkOption {
type = with types; listOf str;
default = [];
description = "list of hyprland workspace definitions";
};
windowRule = mkOption {
type = with types; listOf str;
default = [];
description = "list of hyprland window rules";
};
extraConfig = mkOption {
type = with types; str;
default = '''';
description = "any extra options";
};
iconThemeName = mkOption {
type = types.str;
default = "Colloid-Dark";
};
gtkThemeName = mkOption {
type = types.str;
default = "Colloid-Dark";
};
defaultApps = mkOption {
type = types.submodule {
options = {
browser = mkOption { type = types.package; default = pkgs.firefox; };
editor = mkOption { type = types.package; default = pkgs.micro; };
fileExplorer = mkOption { type = types.package; default = pkgs.nemo; };
visual = mkOption { type = types.package; default = pkgs.vscodium; };
terminal = mkOption { type = types.package; default = pkgs.kitty; };
office = mkOption { type = types.package; default = pkgs.onlyoffice-bin_latest; };
video = mkOption { type = types.package; default = pkgs.vlc; };
imageViewer = mkOption { type = types.package; default = pkgs.nomacs; };
};
};
description = "Default applications used across the system.";
};
hyprIdle = {
lockScreenTimer = mkOption {
type = with types; int;
default = 5;
};
screenOffTimer = mkOption {
type = with types; int;
default = 15;
};
suspendTimer = mkOption {
type = with types; int;
default = 30;
};
};
};
}

View File

@@ -0,0 +1,67 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.mjallen.desktop.hyprland;
in
{
config = mkIf cfg.enable {
home.packages = with pkgs; [
box64
brightnessctl
ddcutil
dunst
egl-wayland
file-roller
glib
gnome-calculator
gnome-calendar
gnome-disk-utility
gnome-firmware
gnome-firmware-updater
gnome-font-viewer
gnome-logs
gnome-photos
gnome-tweaks
gnome-weather
gsettings-desktop-schemas
hyprcursor
hyprland
hyprpaper
hyprshot
hyprsysteminfo
kdePackages.qtmultimedia
libnotify
libz
mako
meson
nautilus
networkmanagerapplet
nm-tray
nomacs
nwg-look
overskride
pamixer
pavucontrol
playerctl
polkit
polkit_gnome
qt5.qtwayland
qt6.qtwayland
rofi-wayland
waybar
wayland-protocols
wayland-utils
waypaper
wev
wl-clipboard
wlogout
wlroots
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
xorg.xhost
xsettingsd
xwayland
];
};
}

View File

@@ -0,0 +1,41 @@
{ config, lib, namespace, ... }:
let
cfg = config.${namespace}.desktop.hyprland;
in
{
imports = [ ../../options.nix ];
config = lib.mkIf cfg.enable {
services.hypridle = {
enable = false;
settings = {
general = {
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
};
listener = [
# {
# timeout = 300; # 5min
# on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
# on-resume = "brightnessctl -r"; # monitor backlight restore.
# }
{
timeout = cfg.hyprIdle.lockScreenTimer;
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
{
timeout = cfg.hyprIdle.screenOffTimer;
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
{
timeout = cfg.hyprIdle.suspendTimer;
on-timeout = "systemctl suspend"; # suspend pc
}
];
};
};
};
}

View File

@@ -0,0 +1,47 @@
{ config, lib, namespace, ... }:
let
cfg = config.${namespace}.desktop.hyprland;
in
{
imports = [ ../../options.nix ];
config = lib.mkIf cfg.enable {
programs.hyprlock = {
enable = true;
settings = {
background = [
{
monitor = "";
path = cfg.wallpaper; # supports png, jpg, webp (no animations, though)
color = "rgba(25, 20, 20, 1.0)";
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
blur_passes = "3"; # 0 disables blurring
blur_size = "7";
noise = "0.0117";
contrast = "0.8916";
brightness = "0.8172";
vibrancy = "0.1696";
vibrancy_darkness = "0.0";
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = cfg.primaryDisplay;
dots_center = true;
fade_on_empty = true;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
bothlock_color = -1;
outline_thickness = 5;
placeholder_text = ''<span foreground="##cad3f5">Password...</span>'';
shadow_passes = 2;
}
];
};
};
};
}

View File

@@ -0,0 +1,18 @@
{ config, lib, namespace, ... }:
let
cfg = config.${namespace}.desktop.hyprland;
in
{
imports = [ ../../options.nix ];
config = lib.mkIf cfg.enable {
services.hyprpaper = {
enable = true;
settings = {
preload = [ "/run/wallpaper.jpg" ];
wallpaper = ",/run/wallpaper.jpg";
splash = false;
};
};
};
}

View File

@@ -0,0 +1,98 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.mjallen.desktop.hyprland;
themeSize = "compact"; # [ "standard" "compact" ]
themeAccent = "all"; # [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ]
themeVariant = "nord"; # [ "nord" "dracula" "gruvbox" "everforest" "catppuccin" "all" "black" "rimless" "normal" "float" ]
themeColor = "dark"; # [ "standard" "light" "dark" ]
iconThemeVariant = "all"; # [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ]
iconScheme = "nord"; # [ "default" "nord" "dracula" "gruvbox" "everforest" "catppuccin" "all" ]
# Cursor
cursorTheme = "macOS";
cursorThemePkg = pkgs.apple-cursor;
cursorSize = 24;
# GTK
# gtkThemeSize = themeSize;
# gtkThemeAccent = themeAccent;
# gtkThemeVariant = themeVariant;
# gtkThemeColor = themeColor;
gtkTheme = "Colloid-Dark-Compact-Nord";
gtkThemePkg = pkgs.colloid-gtk-theme.override {
sizeVariants = [ themeSize ];
colorVariants = [ themeColor ];
themeVariants = [ themeAccent ];
tweaks = [ themeVariant ];
};
# Icons
# iconThemeScheme = iconScheme;
iconTheme = "Colloid-Nord-Dark";
iconThemePkg = pkgs.colloid-icon-theme.override {
schemeVariants = [ iconScheme ];
colorVariants = [ iconThemeVariant ];
};
# Fonts
fontName = "JetBrainsMono NFM";
fontPackage = pkgs.nerd-fonts.jetbrains-mono;
fontSize = 12;
in
{
config = mkIf cfg.enable {
home = {
pointerCursor = {
gtk.enable = true;
package = cursorThemePkg;
name = cursorTheme;
size = cursorSize;
};
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
"org/gnome/desktop/interface".cursor-theme = cursorTheme;
"org/gnome/desktop/interface".gtk-theme = gtkTheme;
"org/gnome/desktop/interface".icon-theme = iconTheme;
};
};
gtk = {
enable = true;
cursorTheme = {
name = cursorTheme;
package = cursorThemePkg;
};
theme = {
name = gtkTheme;
package = gtkThemePkg;
};
iconTheme = {
name = iconTheme;
package = iconThemePkg;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
font = {
name = fontName;
package = fontPackage;
size = fontSize;
};
};
};
}

View File

@@ -0,0 +1,39 @@
{ config, lib, ... }:
with lib;
let
cfg = config.mjallen.desktop.hyprland;
in
{
config = mkIf cfg.enable {
home.sessionVariables = {
BROWSER = "${cfg.defaultApps.browser.pname}";
CLUTTER_BACKEND = "wayland";
EDITOR = "${cfg.defaultApps.editor.pname}";
VISUAL = "${cfg.defaultApps.visual.pname}";
ICON_THEME = cfg.iconThemeName;
GTK_CSD = "0";
GTK_THEME = cfg.gtkThemeName;
GTK_USE_PORTAL = "1";
HYPRCURSOR_THEME = config.home.pointerCursor.name;
HYPRCURSOR_SIZE = config.home.pointerCursor.size;
MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
NIXOS_XDG_OPEN_USE_PORTAL = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland-egl";
QT_QPA_PLATFORMTHEME = "gtk3";
QT_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
TERMINAL = "${cfg.defaultApps.terminal.pname}";
XCURSOR_THEME = config.home.pointerCursor.name;
XCURSOR_SIZE = config.home.pointerCursor.size;
XDG_CACHE_HOME = "\${HOME}/.cache";
XDG_CONFIG_HOME = "\${HOME}/.config";
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_DATA_HOME = "\${HOME}/.local/share";
XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
};
};
}

View File

@@ -0,0 +1,62 @@
{
# Nord colors
# Opacity Hex alpha
# 100% FF
# 75% BF
# 50% 80
# 25% 40
# 10% 1A
# 0% 00
polarNight = {
nord0 = "#2e3440";
nord1 = "#3b4252";
nord2 = "#434c5e";
nord3 = "#4c566a";
};
snowStorm = {
nord4 = "#d8dee9";
nord5 = "#e5e9f0";
nord6 = "#eceff4";
};
frost = {
nord7 = "#8fbcbb";
nord8 = "#88c0d0";
nord9 = "#81a1c1";
nord10 = "#5e81ac";
};
aurora = {
nord11 = "#bf616a";
nord12 = "#d08770";
nord13 = "#ebcb8b";
nord14 = "#a3be8c";
nord15 = "#b48ead";
};
defaultOpacity = "opacity: 0.85;";
defaultBorderRadius = "border-radius: 1rem;";
defaultCenterOptions = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
'';
borderRight = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 0rem 1rem 1rem 0rem;
margin-right: 0.5rem;
'';
borderLeft = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 1rem 0rem 0rem 1rem;
margin-left: 0.5rem;
'';
}

View File

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 239 KiB

View File

@@ -1,62 +0,0 @@
{ lib, pkgs, ... }:
{
home.packages = with pkgs; [
apple-cursor
colloid-icon-theme
colloid-gtk-theme
gnome-tweaks
gnomeExtensions.allow-locked-remote-desktop
gnomeExtensions.appindicator
gnomeExtensions.arcmenu
gnomeExtensions.bing-wallpaper-changer
gnomeExtensions.dash-to-dock
gnomeExtensions.dash-to-panel
gnomeExtensions.gsconnect
gnomeExtensions.random-wallpaper
gnomeExtensions.tiling-assistant
gnomeExtensions.user-themes
gnomeExtensions.wikiart-wallpaper
papirus-icon-theme
pop-gtk-theme
];
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface".clock-format = "12h";
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
"org/gnome/desktop/interface".cursor-theme = lib.mkDefault "macOS";
"org/gnome/desktop/interface".enable-hot-corners = false;
"org/gnome/desktop/interface".font-antialiasing = "grayscale";
"org/gnome/desktop/interface".font-hinting = "slight";
"org/gnome/desktop/interface".gtk-theme = lib.mkDefault "Colloid-Dark";
"org/gnome/desktop/interface".icon-theme = lib.mkDefault "Colloid-Dark";
"org/gnome/desktop/peripherals/mouse".accel-profile = "flat";
"org/gnome/desktop/peripherals/touchpad".two-finger-scrolling-enabled = true;
"org/gnome/desktop/peripherals/touchpad".tap-to-click = true;
"org/gnome/mutter".experimental-features = [
"scale-monitor-framebuffer"
"variable-refresh-rate"
];
"org/gnome/tweaks".show-extensions-notice = false;
"org/gnome/shell".enabled-extensions = [
"allowlockedremotedesktop@kamens.us"
"appindicatorsupport@rgcjonas.gmail.com"
"user-theme@gnome-shell-extensions.gcampax.github.com"
"tiling-assistant@leleat-on-github"
"dash-to-dock@micxgx.gmail.com"
"BingWallpaper@ineffable-gmail.com"
"gsconnect@andyholmes.github.io"
];
"org/gnome/shell/extensions/bingwallpaper".override-lockscreen-blur = true;
"org/gnome/shell/extensions/bingwallpaper".random-mode-enabled = true;
"org/gnome/shell/extensions/bingwallpaper".revert-to-current-image = false;
"org/gnome/shell/extensions/dash-to-panel".primary-monitor = 1;
"org/gnome/shell/extensions/dash-to-panel".multi-monitors = false;
"org/gnome/shell/extensions/gsconnect".id = "4db35bd2-0dcd-42a3-9f77-ef3e8bb83182";
"org/gnome/shell/extensions/gsconnect".name = "matt-nixos";
"org/gnome/shell/extensions/user-theme".name = lib.mkDefault "Colloid-Dark";
"org/gtk/settings/file-chooser".clock-format = "12h";
};
};
}

View File

@@ -9,7 +9,6 @@
clinfo clinfo
cpufetch cpufetch
deadnix deadnix
direnv
firefox firefox
gamescope gamescope
gamescope-wsi gamescope-wsi
@@ -40,7 +39,9 @@
btop.enable = lib.mkDefault true; btop.enable = lib.mkDefault true;
fastfetch.enable = lib.mkDefault true; fastfetch.enable = lib.mkDefault true;
home-manager.enable = lib.mkDefault true; home-manager.enable = lib.mkDefault true;
java.enable = lib.mkDefault true; java = {
enable = lib.mkDefault true;
};
mangohud.enable = lib.mkDefault true; mangohud.enable = lib.mkDefault true;
password-store.enable = true; password-store.enable = true;
nh = { nh = {
@@ -102,5 +103,9 @@
services = { services = {
nextcloud-client.enable = lib.mkDefault true; nextcloud-client.enable = lib.mkDefault true;
pass-secret-service.enable = lib.mkDefault true; pass-secret-service.enable = lib.mkDefault true;
kdeconnect = {
enable = true;
indicator = true;
};
}; };
} }

View File

@@ -0,0 +1,126 @@
{ config, lib, ... }:
with lib;
let
cfg = config.mjallen.programs.btop;
nord = import ../../desktop/theme/nord.nix;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
programs.btop = {
enable = true;
settings = {
color_theme = "nord"; # todo
theme_background = true;
truecolor = true;
force_tty = false;
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty";
vim_keys = true;
rounded_corners = true;
graph_symbol = "braille";
graph_symbol_cpu = "default";
graph_symbol_mem = "default";
graph_symbol_net = "default";
graph_symbol_proc = "default";
shown_boxes = "cpu mem net proc";
update_ms = 2000;
proc_sorting = "cpu lazy";
proc_reversed = false;
proc_tree = false;
proc_colors = true;
proc_gradient = true;
proc_per_core = false;
proc_mem_bytes = true;
proc_cpu_graphs = true;
proc_info_smaps = false;
proc_left = false;
proc_filter_kernel = false;
cpu_graph_upper = "total";
cpu_graph_lower = "total";
cpu_invert_lower = true;
cpu_single_graph = false;
cpu_bottom = false;
show_uptime = true;
check_temp = true;
cpu_sensor = "Auto";
show_coretemp = true;
cpu_core_map = "";
temp_scale = "celsius";
base_10_sizes = false;
show_cpu_freq = true;
clock_format = "%X";
background_update = true;
custom_cpu_name = "";
disks_filter = "";
mem_graphs = true;
mem_below_net = false;
zfs_arc_cached = true;
show_swap = true;
swap_disk = true;
show_disks = true;
only_physical = true;
use_fstab = true;
zfs_hide_datasets = false;
disk_free_priv = false;
show_io_stat = true;
io_mode = false;
io_graph_combined = false;
io_graph_speeds = "";
net_download = 100;
net_upload = 100;
net_auto = true;
net_sync = true;
net_iface = "";
show_battery = true;
selected_battery = "Auto";
log_level = "WARNING";
};
themes = {
nord = ''
theme[main_bg]="${nord.polarNight.nord0}"
theme[main_fg]="${nord.snowStorm.nord6}"
theme[title]="${nord.snowStorm.nord6}"
theme[hi_fg]="${nord.frost.nord7}"
theme[selected_bg]="${nord.polarNight.nord1}"
theme[selected_fg]="${nord.frost.nord7}"
theme[inactive_fg]="${nord.polarNight.nord2}"
theme[graph_text]="${nord.snowStorm.nord6}"
theme[meter_bg]="${nord.polarNight.nord1}"
theme[proc_misc]="${nord.snowStorm.nord6}"
theme[cpu_box]="${nord.aurora.nord15}"
theme[mem_box]="${nord.aurora.nord14}"
theme[net_box]="${nord.aurora.nord12}"
theme[proc_box]="${nord.aurora.nord11}"
theme[div_line]="${nord.polarNight.nord1}"
theme[temp_start]="${nord.aurora.nord14}"
theme[temp_mid]="${nord.aurora.nord13}"
theme[temp_end]="${nord.aurora.nord11}"
theme[cpu_start]="${nord.aurora.nord15}"
theme[cpu_mid]="${nord.aurora.nord12}"
theme[cpu_end]="${nord.aurora.nord11}"
theme[free_start]="${nord.aurora.nord14}"
theme[free_mid]="${nord.aurora.nord13}"
theme[free_end]="${nord.aurora.nord12}"
theme[cached_start]="${nord.aurora.nord14}"
theme[cached_mid]="${nord.aurora.nord13}"
theme[cached_end]="${nord.aurora.nord12}"
theme[available_start]="${nord.snowStorm.nord6}"
theme[available_mid]="${nord.aurora.nord11}"
theme[available_end]="${nord.aurora.nord11}"
theme[used_start]="${nord.aurora.nord14}"
theme[used_mid]="${nord.aurora.nord13}"
theme[used_end]="${nord.aurora.nord11}"
theme[download_start]="${nord.frost.nord8}"
theme[download_mid]="${nord.frost.nord8}"
theme[download_end]="${nord.aurora.nord12}"
theme[upload_start]="${nord.frost.nord7}"
theme[upload_mid]="${nord.frost.nord7}"
theme[upload_end]="${nord.aurora.nord12}"
theme[process_start]="${nord.aurora.nord15}"
theme[process_mid]="${nord.aurora.nord12}"
theme[process_end]="${nord.aurora.nord11}"
'';
};
};
};
}

View File

@@ -0,0 +1,7 @@
{ lib, ... }:
with lib;
{
options.mjallen.programs.btop = {
enable = mkEnableOption "enable btop";
};
}

View File

@@ -0,0 +1,152 @@
{ config, lib, pkgs, system, ... }:
let
isArm = "aarch64-linux" == system;
open-remote-ssh = pkgs.vscode-utils.buildVscodeExtension {
pname = "open-remote-ssh";
version = "0.0.49";
vscodeExtPublisher = "jeanp413";
vscodeExtName = "open-remote-ssh";
vscodeExtUniqueId = "jeanp413.open-remote-ssh";
src = pkgs.fetchurl {
url = "https://open-vsx.org/api/jeanp413/open-remote-ssh/0.0.49/file/jeanp413.open-remote-ssh-0.0.49.vsix";
sha256 = "sha256-QfJnAAx+kO2iJ1EzWoO5HLogJKg3RiC3hg1/u2Jm6t4";
name = "open-remote-ssh.zip";
};
};
x86_only = with pkgs; [
vscode-extensions.redhat.vscode-xml
];
in
{
programs = {
vscode = {
enable = true;
package = pkgs.vscodium;
mutableExtensionsDir = false;
profiles = {
default = {
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
extensions = with pkgs; [
vscode-extensions.arrterian.nix-env-selector
vscode-extensions.bbenoist.nix
vscode-extensions.brettm12345.nixfmt-vscode
vscode-extensions.cweijan.vscode-database-client2
vscode-extensions.dendron.dendron-markdown-preview-enhanced
vscode-extensions.jnoortheen.nix-ide
vscode-extensions.mkhl.direnv
vscode-extensions.ms-python.debugpy
vscode-extensions.ms-python.pylint
vscode-extensions.ms-python.python
# vscode-extensions.ms-python.vscode-pylance
vscode-extensions.redhat.vscode-yaml
vscode-extensions.yy0931.vscode-sqlite3-editor
# open-remote-ssh
# nix-vscode-extensions.open-vsx.jeanp413.open-remote-ssh
# open-vsx.jeanp413.open-remote-ssh
] ++ ( if !isArm then x86_only else [ ] ) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "copilot-mcp";
publisher = "automatalabs";
version = "0.0.49";
sha256 = "sha256-+G2OQl5SCN7bh7MzGdYiRclIZefBE7lWnGg1kNpCvnA=";
}
{
name = "mcp-server-runner";
publisher = "zebradev";
version = "0.1.0";
sha256 = "sha256-StydVt3VzQUSS/pYp76jnIwtZlEj8gWAGzOARs93J+E=";
}
{
name = "claude-dev";
publisher = "saoudrizwan";
version = "3.17.9";
sha256 = "sha256-y3bFtMe5vZrO3DFb31KDvkzjD2jM76wK89mKhgJXC70=";
}
];
userSettings = {
"editor" = {
"defaultFormatter" = "brettm12345.nixfmt-vscode";
"fontFamily" = "fira-code-nerd, FiraCode Nerd Font, Consolas, 'Courier New', monospace";
"fontLigatures" = true;
"renderWhitespace" = "all";
};
"explorer" = {
"confirmDelete" = false;
"confirmDragAndDrop" = false;
};
"git" = {
"confirmSync" = false;
"enableSmartCommit" = true;
};
"github" = {
"copilot.nextEditSuggestions.enabled" = true;
"copilot.enable" = {
"nix" = true;
};
};
"[json]" = {
"editor.defaultFormatter" = "vscode.json-language-features";
};
"nix" = {
"enableLanguageServer" = true;
"formatterPath" = "nixpkgs-fmt";
"serverPath" = "nixd";
"serverSettings" = {
"nixd" = {
"formatting" = {
"command" = [ "nixpkgs-fmt" ];
};
"options" = {
# By default, this entriy will be read from `import <nixpkgs> { }`.
# You can write arbitary Nix expressions here, to produce valid "options" declaration result.
# Tip: for flake-based configuration, utilize `builtins.getFlake`
"nixos" = {
"expr" = "(builtins.getFlake \"${config.home.homeDirectory}/nix-config\").nixosConfigurations.<name>.options";
};
"home-manager" = {
"expr" = "(builtins.getFlake \"${config.home.homeDirectory}/nix-config\").homeConfigurations.<name>.options";
};
# # Tip: use ${workspaceFolder} variable to define path
# "nix-darwin" = {
# "expr" = "(builtins.getFlake \"${workspaceFolder}/path/to/flake\").darwinConfigurations.<name>.options"
# }
};
};
};
};
"[nix]" = {
"editor" = {
"defaultFormatter" = "brettm12345.nixfmt-vscode";
"tabSize" = 2;
};
};
"security.workspace.trust.untrustedFiles" = "open";
"workbench" = {
"colorCustomizations" = null;
"editorAssociations" = {
"*.db" = "default";
};
};
};
};
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
enableZshIntegration = true;
};
};
}

View File

@@ -0,0 +1,106 @@
{ lib, config, ... }:
with lib;
let
cfg = config.mjallen.programs.kitty;
nord = import ../../desktop/theme/nord.nix;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
font = {
name = cfg.font.name;
package = cfg.font.package;
size = cfg.font.size;
};
settings = {
bold_font = "auto";
italic_font = "auto";
bold_italic_font = "auto";
mouse_hide_wait = "2.0";
cursor_shape = "block";
url_style = "dotted";
confirm_os_window_close = "0";
background_opacity = "0.85";
# The basic colors
foreground = nord.snowStorm.nord6;
background = nord.polarNight.nord0;
selection_foreground = nord.polarNight.nord0;
selection_background = nord.aurora.nord15;
# Cursor colors
cursor = nord.aurora.nord15;
cursor_text_color = nord.polarNight.nord0;
# URL underline color when hovering with mouse
url_color = nord.aurora.nord15;
# Kitty window border colors
active_border_color = nord.frost.nord10;
inactive_border_color = nord.polarNight.nord1;
bell_border_color = nord.aurora.nord13;
# OS Window titlebar colors
wayland_titlebar_color = nord.polarNight.nord0;
macos_titlebar_color = nord.polarNight.nord0;
# Tab bar colors
active_tab_foreground = nord.polarNight.nord3;
active_tab_background = nord.aurora.nord15;
inactive_tab_foreground = nord.snowStorm.nord6;
inactive_tab_background = nord.polarNight.nord1;
tab_bar_background = nord.polarNight.nord3;
# Colors for marks (marked text in the terminal)
mark1_foreground = nord.polarNight.nord0;
mark1_background = nord.frost.nord10;
mark2_foreground = nord.polarNight.nord0;
mark2_background = nord.aurora.nord15;
mark3_foreground = nord.polarNight.nord0;
mark3_background = nord.frost.nord8;
# The 16 terminal colors
# black
color0 = nord.polarNight.nord0;
# Autosuggestion
color8 = nord.frost.nord10;
# red
color1 = nord.aurora.nord11;
color9 = nord.aurora.nord11;
# green
color2 = nord.aurora.nord14;
color10 = nord.aurora.nord14;
# yellow
color3 = nord.aurora.nord13;
color11 = nord.aurora.nord13;
# blue
color4 = nord.frost.nord10;
color12 = nord.frost.nord10;
# magenta
color5 = nord.aurora.nord15;
color13 = nord.aurora.nord15;
# cyan
color6 = nord.frost.nord8;
color14 = nord.frost.nord8;
# white
color7 = nord.snowStorm.nord5;
color15 = nord.snowStorm.nord4;
};
};
};
}

Some files were not shown because too many files have changed in this diff Show More