Compare commits

...

7 Commits

16 changed files with 137 additions and 27 deletions

View File

@ -1 +0,0 @@
trailingComma = "none"

12
biome.jsonc Normal file
View File

@ -0,0 +1,12 @@
{
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": false
}
}

View File

@ -29,10 +29,9 @@
}
.search-wrapper .logo-and-wordmark .logo {
background:
url("zen-logo-mocha.svg"),
background: url("zen-logo-mocha.svg"),
url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Blue/zen-logo-mocha.svg")
no-repeat center !important;
no-repeat center !important;
display: inline-block !important;
height: 82px !important;
width: 82px !important;

View File

@ -5,7 +5,7 @@ let
in
{
networking.nat = {
enable = true;
enable = false;
internalInterfaces = [ "ve-*" ];
externalInterface = "wlan0";
# Lazy IPv6 connectivity for the container
@ -13,7 +13,7 @@ in
};
containers.actual = {
autoStart = true;
autoStart = false;
privateNetwork = true;
hostAddress = "192.168.10.188";
localAddress = "192.168.10.11";
@ -23,7 +23,7 @@ in
networking.firewall.allowedTCPPorts = [ port ];
services = {
actual = {
enable = true;
enable = false;
settings = {
inherit port;
loginMethod = "password";

View File

@ -9,6 +9,7 @@
./forgejo.nix
./hardware.nix
./headscale.nix
./home-assitant.nix
./mailserver.nix
./nextcloud.nix
./nginx.nix

View File

@ -0,0 +1,73 @@
{ pkgs, common, ... }:
let
dbName = "hass";
domain = "beta.home.${common.domain}";
port = 8085;
in
{
services = {
home-assistant = {
enable = true;
package =
(pkgs.home-assistant.override {
extraPackages =
py: with py; [
# Postgres
psycopg2
# Roomba
roombapy
];
}).overrideAttrs
(oldAttrs: {
# Avoid long install checks
doInstallCheck = false;
});
extraComponents = [
# Components required to complete the onboarding
"esphome"
"met"
"radio_browser"
];
config = {
# Includes dependencies for a basic setup
# https://www.home-assistant.io/integrations/default_config/
default_config = { };
homeassistant = {
name = "Hjem";
unit_system = "metric";
temperature_unit = "C";
};
http = {
server_host = "::1";
trusted_proxies = [ "::1" ];
use_x_forwarded_for = true;
server_port = port;
};
recorder.db_url = "postgresql://@/${dbName}";
};
};
nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
extraConfig = ''
proxy_buffering off;
'';
locations."/" = {
proxyPass = "http://[::1]:${toString port}";
proxyWebsockets = true;
};
};
postgresql = {
enable = true;
ensureDatabases = [ dbName ];
ensureUsers = [
{
name = dbName;
ensureDBOwnership = true;
}
];
};
};
}

View File

@ -1,7 +1,22 @@
{ systemConfig, ... }:
{
imports = [
./firewall.nix
];
security.sudo.extraRules = [
{
users = [ systemConfig.username ];
runAs = "ALL:ALL";
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
services.pcscd.enable = true;
}

View File

@ -4,7 +4,7 @@
}:
{
programs.hyprpanel.settings.layout."bar.layouts"."*".right = lib.mkForce [
programs.hyprpanel.settings.bar.layouts."*".right = lib.mkForce [
"kbinput"
"volume"
"network"

View File

@ -29,10 +29,9 @@
}
.search-wrapper .logo-and-wordmark .logo {
background:
url("zen-logo-mocha.svg"),
background: url("zen-logo-mocha.svg"),
url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Blue/zen-logo-mocha.svg")
no-repeat center !important;
no-repeat center !important;
display: inline-block !important;
height: 82px !important;
width: 82px !important;

View File

@ -6,6 +6,14 @@ default:
fmt:
treefmt --on-unmatched info
# Clean user files
clean-user:
nh clean user
# Clean all files
clean-all:
nh clean all
# Build a specific host but don't activate it. Host must use same system as target system
build HOST:
git add .

View File

@ -16,12 +16,20 @@
helix =
let
prettier = format: {
command = "prettier";
command = lib.getExe pkgs.nodePackages.prettier;
args = [
"--stdin-filepath"
"file.${format}"
];
};
biome = format: {
command = lib.getExe pkgs.biome;
args = [
"check"
"--stdin-file-path=file.${format}"
"--write"
];
};
in
{
enable = true;
@ -60,7 +68,7 @@
languages.language = [
{
name = "css";
formatter = prettier "css";
formatter = biome "css";
auto-format = true;
}
{
@ -68,14 +76,14 @@
language-servers = [
"vscode-json-language-server"
];
formatter = prettier "json";
formatter = biome "json";
auto-format = true;
}
{
name = "jsonc";
language-servers = [
];
formatter = prettier "jsonc";
formatter = biome "jsonc";
file-types = [
"jsonc"
];

View File

@ -2,7 +2,7 @@
{
environment.systemPackages = with pkgs; [
nodePackages.prettier
biome # Linter + formatter
nixfmt-rfc-style
treefmt
shfmt

View File

@ -12,6 +12,7 @@
"nix"
"git-firefly"
"just"
"biome"
];
userSettings =
let

View File

@ -5,6 +5,5 @@
jetbrains.webstorm
nodejs_22
pnpm
nodePackages.prettier
];
}

View File

@ -13,7 +13,7 @@
# Formatters needed for 'just fmt'
format = pkgs.mkShell {
packages = with pkgs; [
nodePackages.prettier
biome
nixfmt-rfc-style
treefmt
shfmt

View File

@ -2,17 +2,13 @@
command = "nixfmt"
includes = ["*.nix"]
[formatter.prettier]
command = "prettier"
includes = ["*.css", "*.json", "*.jsonc", "*.yaml"]
options = ["--write"]
[formatter.biome]
command = "biome"
includes = ["*.css", "*.json", "*.jsonc"]
options = ["check", "--write"]
[formatter.shell]
command = "shfmt"
includes = ["fmt", "test", "switch"]
excludes = []
options = [
"--indent", "2",
"--simplify",
"--write",
]
options = ["--indent", "2", "--simplify", "--write"]