functional home assistant
This commit is contained in:
20
flake.nix
20
flake.nix
@@ -159,6 +159,26 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
overlays = with inputs; [ nix-vscode-extensions.overlays.default ];
|
||||||
|
|
||||||
|
homes = {
|
||||||
|
modules = with inputs; [
|
||||||
|
sops-nix.homeManagerModules.sops
|
||||||
|
];
|
||||||
|
|
||||||
|
overlays = with inputs; [
|
||||||
|
nix-vscode-extensions.overlays.default
|
||||||
|
];
|
||||||
|
|
||||||
|
users = {
|
||||||
|
"deck@deck" = {
|
||||||
|
modules = with inputs; [
|
||||||
|
steam-rom-manager.homeManagerModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure Snowfall Lib, all of these settings are optional.
|
# Configure Snowfall Lib, all of these settings are optional.
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, namespace, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.extra.btop;
|
cfg = config.mjallen.desktop.extra.btop;
|
||||||
nord = import ../../theme/nord.nix;
|
nord = import ../../theme/nord.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.extra.btop = {
|
options.mjallen.desktop.extra.btop = {
|
||||||
enable = mkEnableOption "enable btop";
|
enable = mkEnableOption "enable btop";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, config, namespace, ... }:
|
{ lib, config, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.extra.kitty;
|
cfg = config.mjallen.desktop.extra.kitty;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./options.nix ];
|
imports = [ ./options.nix ];
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.extra.kitty = {
|
options.mjallen.desktop.extra.kitty = {
|
||||||
enable = mkEnableOption "enable kitty terminal";
|
enable = mkEnableOption "enable kitty terminal";
|
||||||
|
|
||||||
font = {
|
font = {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, namespace, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.extra.mako;
|
cfg = config.mjallen.desktop.extra.mako;
|
||||||
nord = import ../../theme/nord.nix;
|
nord = import ../../theme/nord.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.extra.mako = {
|
options.mjallen.desktop.extra.mako = {
|
||||||
enable = mkEnableOption "enable mako";
|
enable = mkEnableOption "enable mako";
|
||||||
|
|
||||||
fontName = mkOption {
|
fontName = mkOption {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, namespace, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.extra.nwg-dock;
|
cfg = config.mjallen.desktop.extra.nwg-dock;
|
||||||
nord = import ../../theme/nord.nix;
|
nord = import ../../theme/nord.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.extra.nwg-dock = {
|
options.mjallen.desktop.extra.nwg-dock = {
|
||||||
enable = mkEnableOption "enable nwg-dock";
|
enable = mkEnableOption "enable nwg-dock";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, namespace, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.extra.nwg-drawer;
|
cfg = config.mjallen.desktop.extra.nwg-drawer;
|
||||||
nord = import ../../theme/nord.nix;
|
nord = import ../../theme/nord.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.extra.nwg-drawer = {
|
options.mjallen.desktop.extra.nwg-drawer = {
|
||||||
enable = mkEnableOption "enable nwg-drawer";
|
enable = mkEnableOption "enable nwg-drawer";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, namespace, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.extra.nwg-dock;
|
cfg = config.mjallen.desktop.extra.nwg-dock;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./options.nix ];
|
imports = [ ./options.nix ];
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.extra.nwg-panel = {
|
options.mjallen.desktop.extra.nwg-panel = {
|
||||||
enable = mkEnableOption "enable nwg-panel";
|
enable = mkEnableOption "enable nwg-panel";
|
||||||
|
|
||||||
defaultApps = mkOption {
|
defaultApps = mkOption {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, namespace, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.extra.waybar;
|
cfg = config.mjallen.desktop.extra.waybar;
|
||||||
nord = import ../../theme/nord.nix;
|
nord = import ../../theme/nord.nix;
|
||||||
|
|
||||||
defaultOpacity = "opacity: 0.85;";
|
defaultOpacity = "opacity: 0.85;";
|
||||||
@@ -33,13 +33,13 @@ let
|
|||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./options.nix ];
|
imports = [
|
||||||
|
./options.nix
|
||||||
|
./scripts/hass.nix
|
||||||
|
./scripts/weather.nix
|
||||||
|
];
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
imports = [
|
|
||||||
./scripts/hass.nix
|
|
||||||
./scripts/weather.nix
|
|
||||||
];
|
|
||||||
# https://github.com/Alexays/Waybar/wiki/Module:-Hyprland
|
# https://github.com/Alexays/Waybar/wiki/Module:-Hyprland
|
||||||
# https://www.nerdfonts.com/cheat-sheet
|
# https://www.nerdfonts.com/cheat-sheet
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.extra.waybar = {
|
options.mjallen.desktop.extra.waybar = {
|
||||||
enable = mkEnableOption "enable waybar";
|
enable = mkEnableOption "enable waybar";
|
||||||
|
|
||||||
layer = mkOption {
|
layer = mkOption {
|
||||||
|
|||||||
@@ -1,43 +1,10 @@
|
|||||||
{ pkgs, ... }:
|
{ config, lib, namespace, ... }:
|
||||||
|
with lib;
|
||||||
let
|
let
|
||||||
homeassistant-api = pkgs.python3.pkgs.buildPythonPackage rec {
|
cfg = config.mjallen.desktop.extra.waybar;
|
||||||
pname = "homeassistant_api";
|
|
||||||
version = "5.0.0";
|
|
||||||
format = "pyproject";
|
|
||||||
src = pkgs.fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-UNKTtgInrVJtjHb1WVlUbcbhjBOtTX00eHmm54ww0rY=";
|
|
||||||
};
|
|
||||||
|
|
||||||
# do not run tests
|
|
||||||
doCheck = false;
|
|
||||||
nativeBuildInputs = with pkgs.python3.pkgs; [ poetry-core requests-cache ];
|
|
||||||
dependencies = with pkgs.python3.pkgs; [
|
|
||||||
requests-cache
|
|
||||||
pydantic
|
|
||||||
websockets
|
|
||||||
];
|
|
||||||
propagatedBuildInputs = with pkgs.python3.pkgs; [
|
|
||||||
aiohttp
|
|
||||||
aiohttp-client-cache
|
|
||||||
pydantic
|
|
||||||
requests
|
|
||||||
requests-cache
|
|
||||||
simplejson
|
|
||||||
websockets
|
|
||||||
];
|
|
||||||
pythonRelaxDeps = [
|
|
||||||
"requests-cache"
|
|
||||||
"pydantic"
|
|
||||||
"websockets"
|
|
||||||
];
|
|
||||||
pythonImportsCheck = [
|
|
||||||
"homeassistant_api"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
pythonEnv = pkgs.python3.withPackages (ps: [
|
pythonEnv = pkgs.python3.withPackages (ps: [
|
||||||
homeassistant-api
|
pkgs.${namespace}.homeassistant-api
|
||||||
]);
|
]);
|
||||||
|
|
||||||
waybar-hass = pkgs.writeScriptBin "waybar-hass" ''
|
waybar-hass = pkgs.writeScriptBin "waybar-hass" ''
|
||||||
@@ -102,5 +69,9 @@ let
|
|||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = [ waybar-hass ];
|
imports = [ ../options.nix ];
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home.packages = [ waybar-hass ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
{ config, lib, namespace, ... }:
|
||||||
|
with lib;
|
||||||
let
|
let
|
||||||
|
cfg = config.mjallen.desktop.extra.waybar;
|
||||||
|
|
||||||
waybar-weather = pkgs.writeScriptBin "waybar-weather" ''
|
waybar-weather = pkgs.writeScriptBin "waybar-weather" ''
|
||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#! nix-shell -i python3 --pure
|
#! nix-shell -i python3 --pure
|
||||||
@@ -429,5 +432,9 @@ let
|
|||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = [ waybar-weather ];
|
imports = [ ../options.nix ];
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home.packages = [ waybar-weather ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, namespace, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.extra.wlogout;
|
cfg = config.mjallen.desktop.extra.wlogout;
|
||||||
nord = import ../../theme/nord.nix;
|
nord = import ../../theme/nord.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.extra.wofi = {
|
options.mjallen.desktop.extra.wlogout = {
|
||||||
enable = mkEnableOption "enable wofi";
|
enable = mkEnableOption "enable wlogout";
|
||||||
|
|
||||||
fontName = mkOption {
|
fontName = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
{ config, lib, namespace, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.extra.wofi;
|
cfg = config.mjallen.desktop.extra.wofi;
|
||||||
nord = import ../../theme/nord.nix;
|
nord = import ../../theme/nord.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./options.nix ];
|
imports = [ ./options.nix ];
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.wofi = {
|
programs.wofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.extra.wofi = {
|
options.mjallen.desktop.extra.wofi = {
|
||||||
enable = mkEnableOption "enable wofi";
|
enable = mkEnableOption "enable wofi";
|
||||||
|
|
||||||
fontName = mkOption {
|
fontName = mkOption {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, lib, pkgs, namespace, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.gnome;
|
cfg = config.mjallen.desktop.gnome;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./options.nix ];
|
imports = [ ./options.nix ];
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.gnome = {
|
options.mjallen.desktop.gnome = {
|
||||||
enable = mkEnableOption "enable gnome settings";
|
enable = mkEnableOption "enable gnome settings";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,21 +1,18 @@
|
|||||||
{ config, lib, namespace, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.${namespace}.desktop.hyprland;
|
cfg = config.mjallen.desktop.hyprland;
|
||||||
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${config.home-manager.users.matt.gtk.iconTheme.name}";
|
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${config.home-manager.users.matt.gtk.iconTheme.name}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./options.nix ];
|
imports = [
|
||||||
|
./options.nix
|
||||||
|
./packages.nix
|
||||||
|
./theme.nix
|
||||||
|
./variables.nix
|
||||||
|
];
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
imports = [
|
|
||||||
./services/hypridle
|
|
||||||
./services/hyprlock
|
|
||||||
./services/hyprpaper
|
|
||||||
./packages.nix
|
|
||||||
./theme.nix
|
|
||||||
./variables.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
hyprpolkitagent.enable = true;
|
hyprpolkitagent.enable = true;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, namespace, ... }:
|
{ lib, pkgs, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.${namespace}.desktop.hyprland = {
|
options.mjallen.desktop.hyprland = {
|
||||||
enable = mkEnableOption "enable hyprland desktop";
|
enable = mkEnableOption "enable hyprland desktop";
|
||||||
|
|
||||||
primaryDisplay = mkOption {
|
primaryDisplay = mkOption {
|
||||||
@@ -45,8 +45,19 @@ with lib;
|
|||||||
};
|
};
|
||||||
|
|
||||||
defaultApps = mkOption {
|
defaultApps = mkOption {
|
||||||
type = attrs;
|
type = types.submodule {
|
||||||
default = { };
|
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.gnome-photos; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
description = "Default applications used across the system.";
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprIdle = {
|
hyprIdle = {
|
||||||
|
|||||||
@@ -1,60 +1,66 @@
|
|||||||
{ pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.mjallen.desktop.hyprland;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
config = mkIf cfg.enable {
|
||||||
box64
|
home.packages = with pkgs; [
|
||||||
brightnessctl
|
box64
|
||||||
ddcutil
|
brightnessctl
|
||||||
dunst
|
ddcutil
|
||||||
egl-wayland
|
dunst
|
||||||
file-roller
|
egl-wayland
|
||||||
glib
|
file-roller
|
||||||
gnome-calculator
|
glib
|
||||||
gnome-calendar
|
gnome-calculator
|
||||||
gnome-disk-utility
|
gnome-calendar
|
||||||
gnome-firmware
|
gnome-disk-utility
|
||||||
gnome-firmware-updater
|
gnome-firmware
|
||||||
gnome-font-viewer
|
gnome-firmware-updater
|
||||||
gnome-logs
|
gnome-font-viewer
|
||||||
gnome-photos
|
gnome-logs
|
||||||
gnome-tweaks
|
gnome-photos
|
||||||
gnome-weather
|
gnome-tweaks
|
||||||
gsettings-desktop-schemas
|
gnome-weather
|
||||||
hyprcursor
|
gsettings-desktop-schemas
|
||||||
hyprland
|
hyprcursor
|
||||||
hyprpaper
|
hyprland
|
||||||
hyprshot
|
hyprpaper
|
||||||
hyprsysteminfo
|
hyprshot
|
||||||
kdePackages.qtmultimedia
|
hyprsysteminfo
|
||||||
libnotify
|
kdePackages.qtmultimedia
|
||||||
libz
|
libnotify
|
||||||
mako
|
libz
|
||||||
meson
|
mako
|
||||||
nautilus
|
meson
|
||||||
networkmanagerapplet
|
nautilus
|
||||||
nm-tray
|
networkmanagerapplet
|
||||||
nwg-look
|
nm-tray
|
||||||
overskride
|
nwg-look
|
||||||
pamixer
|
overskride
|
||||||
pavucontrol
|
pamixer
|
||||||
playerctl
|
pavucontrol
|
||||||
polkit
|
playerctl
|
||||||
polkit_gnome
|
polkit
|
||||||
qt5.qtwayland
|
polkit_gnome
|
||||||
qt6.qtwayland
|
qt5.qtwayland
|
||||||
rofi-wayland
|
qt6.qtwayland
|
||||||
waybar
|
rofi-wayland
|
||||||
wayland-protocols
|
waybar
|
||||||
wayland-utils
|
wayland-protocols
|
||||||
waypaper
|
wayland-utils
|
||||||
wev
|
waypaper
|
||||||
wl-clipboard
|
wev
|
||||||
wlogout
|
wl-clipboard
|
||||||
wlroots
|
wlogout
|
||||||
xdg-desktop-portal-hyprland
|
wlroots
|
||||||
xdg-desktop-portal-gtk
|
xdg-desktop-portal-hyprland
|
||||||
xdg-desktop-portal-wlr
|
xdg-desktop-portal-gtk
|
||||||
xorg.xhost
|
xdg-desktop-portal-wlr
|
||||||
xsettingsd
|
xorg.xhost
|
||||||
xwayland
|
xsettingsd
|
||||||
];
|
xwayland
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
let
|
let
|
||||||
|
cfg = config.mjallen.desktop.hyprland;
|
||||||
|
|
||||||
themeSize = "compact"; # [ "standard" "compact" ]
|
themeSize = "compact"; # [ "standard" "compact" ]
|
||||||
themeAccent = "all"; # [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ]
|
themeAccent = "all"; # [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ]
|
||||||
themeVariant = "nord"; # [ "nord" "dracula" "gruvbox" "everforest" "catppuccin" "all" "black" "rimless" "normal" "float" ]
|
themeVariant = "nord"; # [ "nord" "dracula" "gruvbox" "everforest" "catppuccin" "all" "black" "rimless" "normal" "float" ]
|
||||||
@@ -39,55 +42,57 @@ let
|
|||||||
fontSize = 12;
|
fontSize = 12;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home = {
|
config = mkIf cfg.enable {
|
||||||
pointerCursor = {
|
home = {
|
||||||
gtk.enable = true;
|
pointerCursor = {
|
||||||
package = cursorThemePkg;
|
gtk.enable = true;
|
||||||
name = cursorTheme;
|
package = cursorThemePkg;
|
||||||
size = cursorSize;
|
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 = {
|
dconf = {
|
||||||
name = gtkTheme;
|
enable = true;
|
||||||
package = gtkThemePkg;
|
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;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme = {
|
gtk = {
|
||||||
name = iconTheme;
|
enable = true;
|
||||||
package = iconThemePkg;
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk3.extraConfig = {
|
cursorTheme = {
|
||||||
gtk-application-prefer-dark-theme = true;
|
name = cursorTheme;
|
||||||
};
|
package = cursorThemePkg;
|
||||||
|
};
|
||||||
|
|
||||||
gtk4.extraConfig = {
|
theme = {
|
||||||
gtk-application-prefer-dark-theme = true;
|
name = gtkTheme;
|
||||||
};
|
package = gtkThemePkg;
|
||||||
|
};
|
||||||
|
|
||||||
font = {
|
iconTheme = {
|
||||||
name = fontName;
|
name = iconTheme;
|
||||||
package = fontPackage;
|
package = iconThemePkg;
|
||||||
size = fontSize;
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
font = {
|
||||||
|
name = fontName;
|
||||||
|
package = fontPackage;
|
||||||
|
size = fontSize;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,37 +1,39 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.desktop.hyprland;
|
cfg = config.mjallen.desktop.hyprland;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sessionVariables = {
|
config = mkIf cfg.enable {
|
||||||
BROWSER = "${cfg.defaultApps.browser.pname}";
|
home.sessionVariables = {
|
||||||
CLUTTER_BACKEND = "wayland";
|
BROWSER = "${cfg.defaultApps.browser.pname}";
|
||||||
EDITOR = "${cfg.defaultApps.editor.pname}";
|
CLUTTER_BACKEND = "wayland";
|
||||||
VISUAL = "${cfg.defaultApps.visual.pname}";
|
EDITOR = "${cfg.defaultApps.editor.pname}";
|
||||||
ICON_THEME = settings.iconTheme;
|
VISUAL = "${cfg.defaultApps.visual.pname}";
|
||||||
GTK_CSD = "0";
|
ICON_THEME = settings.iconTheme;
|
||||||
GTK_THEME = settings.gtkTheme;
|
GTK_CSD = "0";
|
||||||
GTK_USE_PORTAL = "1";
|
GTK_THEME = settings.gtkTheme;
|
||||||
HYPRCURSOR_THEME = config.home-manager.users.matt.pointerCursor.name;
|
GTK_USE_PORTAL = "1";
|
||||||
HYPRCURSOR_SIZE = config.home-manager.users.matt.pointerCursor.size;
|
HYPRCURSOR_THEME = config.home-manager.users.matt.pointerCursor.name;
|
||||||
MOZ_ENABLE_WAYLAND = "1";
|
HYPRCURSOR_SIZE = config.home-manager.users.matt.pointerCursor.size;
|
||||||
NIXOS_OZONE_WL = "1";
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
NIXOS_XDG_OPEN_USE_PORTAL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
NIXOS_XDG_OPEN_USE_PORTAL = "1";
|
||||||
QT_QPA_PLATFORM = "wayland-egl";
|
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||||
QT_QPA_PLATFORMTHEME = "gtk3";
|
QT_QPA_PLATFORM = "wayland-egl";
|
||||||
QT_SCALE_FACTOR = "1";
|
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
QT_SCALE_FACTOR = "1";
|
||||||
SDL_VIDEODRIVER = "wayland";
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
TERMINAL = "${cfg.defaultApps.terminal.pname}";
|
SDL_VIDEODRIVER = "wayland";
|
||||||
XCURSOR_THEME = config.home-manager.users.matt.pointerCursor.name;
|
TERMINAL = "${cfg.defaultApps.terminal.pname}";
|
||||||
XCURSOR_SIZE = config.home-manager.users.matt.pointerCursor.size;
|
XCURSOR_THEME = config.home-manager.users.matt.pointerCursor.name;
|
||||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
XCURSOR_SIZE = config.home-manager.users.matt.pointerCursor.size;
|
||||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
XDG_SESSION_DESKTOP = "Hyprland";
|
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||||
XDG_SESSION_TYPE = "wayland";
|
XDG_SESSION_DESKTOP = "Hyprland";
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,8 @@ in
|
|||||||
vscode-extensions.yy0931.vscode-sqlite3-editor
|
vscode-extensions.yy0931.vscode-sqlite3-editor
|
||||||
|
|
||||||
# open-remote-ssh
|
# open-remote-ssh
|
||||||
nix-vscode-extensions.open-vsx.jeanp413.open-remote-ssh
|
# nix-vscode-extensions.open-vsx.jeanp413.open-remote-ssh
|
||||||
|
# open-vsx.jeanp413.open-remote-ssh
|
||||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||||
{
|
{
|
||||||
name = "copilot-mcp";
|
name = "copilot-mcp";
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ in
|
|||||||
"adguard"
|
"adguard"
|
||||||
"apple_tv"
|
"apple_tv"
|
||||||
"analytics"
|
"analytics"
|
||||||
|
"backup"
|
||||||
"bluetooth"
|
"bluetooth"
|
||||||
"bluetooth_adapters"
|
"bluetooth_adapters"
|
||||||
"bluetooth_le_tracker"
|
"bluetooth_le_tracker"
|
||||||
|
|||||||
@@ -13,6 +13,12 @@
|
|||||||
"/var/lib/waydroid"
|
"/var/lib/waydroid"
|
||||||
"/var/lib/systemd/coredump"
|
"/var/lib/systemd/coredump"
|
||||||
"/etc/NetworkManager/system-connections"
|
"/etc/NetworkManager/system-connections"
|
||||||
|
"/var/lib/tailscale"
|
||||||
|
"/var/lib/homeassistant"
|
||||||
|
"/var/lib/mosquitto"
|
||||||
|
"/var/lib/music-assistant"
|
||||||
|
"/var/lib/postgresql"
|
||||||
|
"/var/lib/zigbee2mqtt"
|
||||||
{
|
{
|
||||||
directory = "/var/lib/colord";
|
directory = "/var/lib/colord";
|
||||||
user = "colord";
|
user = "colord";
|
||||||
|
|||||||
36
packages/homeassistant-api/default.nix
Normal file
36
packages/homeassistant-api/default.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{ python3Packages, fetchPypi, ... }:
|
||||||
|
python3Packages.buildPythonPackage rec {
|
||||||
|
pname = "homeassistant_api";
|
||||||
|
version = "5.0.0";
|
||||||
|
format = "pyproject";
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "sha256-UNKTtgInrVJtjHb1WVlUbcbhjBOtTX00eHmm54ww0rY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
# do not run tests
|
||||||
|
doCheck = false;
|
||||||
|
nativeBuildInputs = with python3Packages; [ poetry-core requests-cache ];
|
||||||
|
dependencies = with python3Packages; [
|
||||||
|
requests-cache
|
||||||
|
pydantic
|
||||||
|
websockets
|
||||||
|
];
|
||||||
|
propagatedBuildInputs = with python3Packages; [
|
||||||
|
aiohttp
|
||||||
|
aiohttp-client-cache
|
||||||
|
pydantic
|
||||||
|
requests
|
||||||
|
requests-cache
|
||||||
|
simplejson
|
||||||
|
websockets
|
||||||
|
];
|
||||||
|
pythonRelaxDeps = [
|
||||||
|
"requests-cache"
|
||||||
|
"pydantic"
|
||||||
|
"websockets"
|
||||||
|
];
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"homeassistant_api"
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -20,7 +20,10 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
${namespace}.services.home-assistant.enable = true;
|
${namespace} = {
|
||||||
|
services.home-assistant.enable = true;
|
||||||
|
hardware.disko.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Enable nix flakes and nix-command tools
|
# Enable nix flakes and nix-command tools
|
||||||
nix = {
|
nix = {
|
||||||
|
|||||||
@@ -1,37 +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/tailscale"
|
|
||||||
"/var/lib/homeassistant"
|
|
||||||
"/var/lib/mosquitto"
|
|
||||||
"/var/lib/music-assistant"
|
|
||||||
"/var/lib/postgresql"
|
|
||||||
"/var/lib/zigbee2mqtt"
|
|
||||||
"/var/lib/systemd/coredump"
|
|
||||||
"/etc/NetworkManager/system-connections"
|
|
||||||
"/etc/secureboot"
|
|
||||||
{
|
|
||||||
directory = "/var/lib/private";
|
|
||||||
mode = "u=rwx,g=rx,o=";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
directory = "/var/lib/colord";
|
|
||||||
user = "colord";
|
|
||||||
group = "colord";
|
|
||||||
mode = "u=rwx,g=rx,o=";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
security.sudo.extraConfig = ''
|
|
||||||
# rollback results in sudo lectures after each reboot
|
|
||||||
Defaults lecture = never
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -10,31 +10,37 @@ in
|
|||||||
mutableUsers = false;
|
mutableUsers = false;
|
||||||
|
|
||||||
# Admin account
|
# Admin account
|
||||||
users."${user}" = {
|
users = {
|
||||||
isNormalUser = true;
|
"${user}" = {
|
||||||
linger = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
linger = true;
|
||||||
"wheel"
|
extraGroups = [
|
||||||
"networkmanager"
|
"wheel"
|
||||||
"docker"
|
"networkmanager"
|
||||||
"podman"
|
"docker"
|
||||||
"libvirtd"
|
"podman"
|
||||||
];
|
"libvirtd"
|
||||||
# hashedPasswordFile = passwordFile;
|
];
|
||||||
password = "BogieDudie1";
|
# hashedPasswordFile = passwordFile;
|
||||||
shell = pkgs.zsh;
|
password = "BogieDudie1";
|
||||||
packages = with pkgs; [
|
shell = pkgs.zsh;
|
||||||
];
|
packages = with pkgs; [
|
||||||
openssh.authorizedKeys.keys = [
|
];
|
||||||
# macBook
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCw9zq8DLGByI5v2gAn95hKNyOsm3g61a2buxu2BBMFysQJgmZPCCLUqRJKhSM5Vm/JOgsAmdpRBRZQoHD+6S844CJHb4v4VIbjkyQgYCuM7Rst2IOZ5QybvsA2/D0nwytZ+HXQqDj2AagUYDbz0gyyIHkDQ5YGBMkvkWz/h1Vci6aoBM7VihEDM4KlWoTVuPeASGM8r5IZ2FS83Djbqo4ov6AYvLMrKB9Z7hmFgH6R3LE0gxOkzbGVXtSuvJyrjvgytoT22UhATjjxSQ9D+YJXXkQoB3lUdg8OoIquUPjMZpl4mR8ffvseWPfcvD1XlD5t+TOHFqKpESO547tlOBYhdpew+NSgAXpamCU6oyV8tDCywLQu2ucxHRn78u6WXzWHkDtffdhzmk6TZaPhWqVHuTGjR4higBgGqUfSaKOMszt+FDRZAr3HtuQ2+zJ8bowK9fW5OqilTtK2HtQqroD9ApegDNbqOz6kGy5IycSXvqPURy/M4lxZxbtBPuemcJs= mattjallen@MacBook-Pro.local"
|
# macBook
|
||||||
# desktop windows
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCw9zq8DLGByI5v2gAn95hKNyOsm3g61a2buxu2BBMFysQJgmZPCCLUqRJKhSM5Vm/JOgsAmdpRBRZQoHD+6S844CJHb4v4VIbjkyQgYCuM7Rst2IOZ5QybvsA2/D0nwytZ+HXQqDj2AagUYDbz0gyyIHkDQ5YGBMkvkWz/h1Vci6aoBM7VihEDM4KlWoTVuPeASGM8r5IZ2FS83Djbqo4ov6AYvLMrKB9Z7hmFgH6R3LE0gxOkzbGVXtSuvJyrjvgytoT22UhATjjxSQ9D+YJXXkQoB3lUdg8OoIquUPjMZpl4mR8ffvseWPfcvD1XlD5t+TOHFqKpESO547tlOBYhdpew+NSgAXpamCU6oyV8tDCywLQu2ucxHRn78u6WXzWHkDtffdhzmk6TZaPhWqVHuTGjR4higBgGqUfSaKOMszt+FDRZAr3HtuQ2+zJ8bowK9fW5OqilTtK2HtQqroD9ApegDNbqOz6kGy5IycSXvqPURy/M4lxZxbtBPuemcJs= mattjallen@MacBook-Pro.local"
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ2PYPjZddOzR8OJj16G88KcUhCDLkvrEmpUQP0wKHDUuA27HQQ2ORo66asadwGHY3k1VDZ1ei9l9H++SIIeKOaaUr5yZdktvj4POUNtbd9ZhcS7sZU7BSF+NMDM+h3tImh6z0S7mWvRQOUv3ZM+ZER+5xTWJVG1OOJEpb1drxJk6Qz0wbZKSR7TPNFBLLXlVy7hkNYf07RtDyhCCxNB3hJfa8c+oztnWumwDhDQWLqiUXWIU2QH6iRLGl/WYnujtNvVVaV/Hn3JJkS6MM9dnV3cpoIO0+J7+WfsN9rZ0wXt5yY3GhiGXwmcO5eYVli8lHlLWtK7aYSETyry6CBsLbojzOQO5rSqhpwfF2njAAFAQU0UjLc8PahisIuFKCwHH4iyXXOagiv5K1Mc/0Ak+WhhMPee6vV2p7NTyNpXRvouDbWy5cSRH31WgQ9fK5mIGe5v8nGGqtEhUubUkiOgP+H3UbT2V/nTv/TFKdJcKw+WmizvTrxBmaMjWALlkYl+s= mattl@Jallen-PC"
|
# desktop windows
|
||||||
# desktop nixos
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ2PYPjZddOzR8OJj16G88KcUhCDLkvrEmpUQP0wKHDUuA27HQQ2ORo66asadwGHY3k1VDZ1ei9l9H++SIIeKOaaUr5yZdktvj4POUNtbd9ZhcS7sZU7BSF+NMDM+h3tImh6z0S7mWvRQOUv3ZM+ZER+5xTWJVG1OOJEpb1drxJk6Qz0wbZKSR7TPNFBLLXlVy7hkNYf07RtDyhCCxNB3hJfa8c+oztnWumwDhDQWLqiUXWIU2QH6iRLGl/WYnujtNvVVaV/Hn3JJkS6MM9dnV3cpoIO0+J7+WfsN9rZ0wXt5yY3GhiGXwmcO5eYVli8lHlLWtK7aYSETyry6CBsLbojzOQO5rSqhpwfF2njAAFAQU0UjLc8PahisIuFKCwHH4iyXXOagiv5K1Mc/0Ak+WhhMPee6vV2p7NTyNpXRvouDbWy5cSRH31WgQ9fK5mIGe5v8nGGqtEhUubUkiOgP+H3UbT2V/nTv/TFKdJcKw+WmizvTrxBmaMjWALlkYl+s= mattl@Jallen-PC"
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPTBMydhOc6SnOdB5WrEd7X07DrboAtagCUgXiOJjLov matt@matt-nixos"
|
# desktop nixos
|
||||||
];
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPTBMydhOc6SnOdB5WrEd7X07DrboAtagCUgXiOJjLov matt@matt-nixos"
|
||||||
};
|
];
|
||||||
|
};
|
||||||
|
|
||||||
users.root.shell = pkgs.zsh;
|
root = {
|
||||||
|
isSystemUser = true;
|
||||||
|
isNormalUser = false;
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user