More opt
Some checks failed
Nix Build / build-nixos (push) Failing after 29s

This commit is contained in:
soraefir 2024-04-14 22:45:21 +02:00
parent ad1c8a0026
commit 0920a1381d
Signed by: sora
GPG Key ID: A362EA0491E2EEA0
10 changed files with 132 additions and 130 deletions

View File

@ -1,95 +1,95 @@
{ config, lib,... }: { { config, lib, ... }: {
config = lib.mkIf (config.usercfg.wm == "Wayland") { config = lib.mkIf (config.usercfg.wm == "Wayland") {
services.kanshi = { services.kanshi = {
enable = true; enable = true;
systemdTarget = "graphical-session.target"; systemdTarget = "graphical-session.target";
profiles = { profiles = {
tower_0 = { tower_0 = {
outputs = [{ outputs = [{
criteria = "CEX CX133 0x00000001";
mode = "1920x1200@59.972";
position = "0,0";
scale = 1.0;
status = "enable";
}];
};
tower_1 = {
outputs = [{
criteria = "AOC 16G3 1DDP7HA000348";
mode = "1920x1080@144.000";
position = "0,0";
status = "enable";
scale = 1.0;
adaptiveSync = true;
}];
};
tower_2 = {
outputs = [
{
criteria = "AOC 16G3 1DDP7HA000348";
mode = "1920x1080@144.000";
position = "0,0";
status = "enable";
scale = 1.0;
adaptiveSync = true;
}
{
criteria = "CEX CX133 0x00000001"; criteria = "CEX CX133 0x00000001";
mode = "1920x1200@59.972"; mode = "1920x1200@59.972";
position = "0,1080";
scale = 1.0;
status = "enable";
}
];
};
laptop_0 = {
outputs = [{
criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020";
position = "0,0";
scale = 1.0;
status = "enable";
}];
};
laptop_1 = {
outputs = [
{
criteria = "CEX CX133 0x00000001";
mode = "2560x1600@59.972";
position = "0,0"; position = "0,0";
scale = 1.0; scale = 1.0;
status = "enable"; status = "enable";
} }];
{ };
criteria = "LG Display 0x060A Unknown"; tower_1 = {
mode = "1920x1080@60.020"; outputs = [{
position = "2560,0";
scale = 1.0;
status = "enable";
}
];
};
laptop_2 = {
outputs = [
{
criteria = "AOC 16G3 1DDP7HA000348"; criteria = "AOC 16G3 1DDP7HA000348";
mode = "1920x1080@144.000"; mode = "1920x1080@144.000";
position = "0,0"; position = "0,0";
status = "enable"; status = "enable";
scale = 1.0; scale = 1.0;
adaptiveSync = true; adaptiveSync = true;
} }];
{ };
tower_2 = {
outputs = [
{
criteria = "AOC 16G3 1DDP7HA000348";
mode = "1920x1080@144.000";
position = "0,0";
status = "enable";
scale = 1.0;
adaptiveSync = true;
}
{
criteria = "CEX CX133 0x00000001";
mode = "1920x1200@59.972";
position = "0,1080";
scale = 1.0;
status = "enable";
}
];
};
laptop_0 = {
outputs = [{
criteria = "LG Display 0x060A Unknown"; criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020"; mode = "1920x1080@60.020";
position = "1920,0"; position = "0,0";
scale = 1.0; scale = 1.0;
status = "enable"; status = "enable";
} }];
]; };
laptop_1 = {
outputs = [
{
criteria = "CEX CX133 0x00000001";
mode = "2560x1600@59.972";
position = "0,0";
scale = 1.0;
status = "enable";
}
{
criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020";
position = "2560,0";
scale = 1.0;
status = "enable";
}
];
};
laptop_2 = {
outputs = [
{
criteria = "AOC 16G3 1DDP7HA000348";
mode = "1920x1080@144.000";
position = "0,0";
status = "enable";
scale = 1.0;
adaptiveSync = true;
}
{
criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020";
position = "1920,0";
scale = 1.0;
status = "enable";
}
];
};
}; };
}; };
}; };
};
} }

View File

@ -1,5 +1,4 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }: {
{
config = lib.mkIf (config.syscfg.make.gui) { config = lib.mkIf (config.syscfg.make.gui) {
services.greetd = { services.greetd = {

View File

@ -1,12 +1,16 @@
{ ... }: { { lib, config, ... }:
boot.loader = { let isCI = builtins.elem config.syscfg.hostname [ "ci" "sandbox" ];
systemd-boot = { in {
enable = true; config = lib.mkIf (!isCI) {
configurationLimit = 8; boot.loader = {
}; systemd-boot = {
efi = { enable = true;
canTouchEfiVariables = true; configurationLimit = 8;
efiSysMountPoint = "/boot/efi"; };
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
}; };
}; };
} }

View File

@ -1,7 +1,5 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }: {
let cfg = config.syscfg.make.power; config = lib.mkIf (config.syscfg.make.power) {
in {
config = lib.mkIf cfg {
services.tlp = { services.tlp = {
enable = true; enable = true;
settings = { settings = {

View File

@ -1,11 +1,9 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }: {
let cfg = config.syscfg.make.virt; config = lib.mkIf (config.syscfg.make.virt) {
in {
config = lib.mkIf cfg {
environment.systemPackages = [ pkgs.qemu ]; #environment.systemPackages = [ pkgs.qemu ];
virtualisation = { virtualisation = {
libvirtd.enable = true; #libvirtd.enable = true;
# waydroid.enable = true; # waydroid.enable = true;
# lxd.enable = true; # lxd.enable = true;
docker = { docker = {

View File

@ -1,9 +1,7 @@
{ lib, config, ... }: { lib, config, ... }: {
let cfg = config.syscfg.net.wlp; config = lib.mkIf (config.syscfg.net.wlp.enable) {
in {
config = lib.mkIf cfg.enable {
networking.supplicant = { networking.supplicant = {
"${cfg.nif}" = { "${config.syscfg.net.wlp.nif}" = {
configFile.path = config.sops.secrets.wifi.path; configFile.path = config.sops.secrets.wifi.path;
extraConf = '' extraConf = ''
network={ network={

View File

@ -1,19 +1,21 @@
{ config, ... }: { { config, lib, ... }: {
networking.wireguard = { config = lib.mkIf (config.syscfg.net.wg.enable) {
enable = true; networking.wireguard = {
interfaces = { enable = true;
wg0 = { interfaces = {
ips = [ config.syscfg.net.wg.ip4 config.syscfg.net.wg.ip6 ]; wg0 = {
privateKeyFile = ips = [ config.syscfg.net.wg.ip4 config.syscfg.net.wg.ip6 ];
config.sops.secrets."${config.syscfg.hostname}_wg_priv".path; privateKeyFile =
listenPort = 1515; config.sops.secrets."${config.syscfg.hostname}_wg_priv".path;
mtu = 1340; listenPort = 1515;
peers = [{ mtu = 1340;
allowedIPs = [ "10.10.1.0/24" "fd10:10:10::0/64" ]; peers = [{
endpoint = "vpn.helcel.net:1515"; allowedIPs = [ "10.10.1.0/24" "fd10:10:10::0/64" ];
publicKey = "NFBJvYXZC+bd62jhrKnM7/pugidWhgR6+C5qIiUiq3Q="; endpoint = "vpn.helcel.net:1515";
persistentKeepalive = 30; publicKey = "NFBJvYXZC+bd62jhrKnM7/pugidWhgR6+C5qIiUiq3Q=";
}]; persistentKeepalive = 30;
}];
};
}; };
}; };
}; };

View File

@ -1,14 +1,14 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
xdg.portal = { xdg.portal = {
enable = true; enable = true;
# wlr.enable = true; # wlr.enable = true;
extraPortals = with pkgs; [ extraPortals = with pkgs; [
xdg-desktop-portal-hyprland xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk xdg-desktop-portal-gtk
]; ];
config.common.default = [ "hyprland" "gtk" ]; config.common.default = [ "hyprland" "gtk" ];
}; };
environment.sessionVariables = rec { environment.sessionVariables = rec {
GBM_BACKEND = "amd-drm"; GBM_BACKEND = "amd-drm";

View File

@ -1,6 +1,9 @@
{ pkgs, config, ... }: { { pkgs, config, lib, ... }: {
programs.adb.enable = true;
programs.wireshark.enable = true;
environment.systemPackages = with pkgs; [ wget dconf wireshark ]; config = lib.mkIf (config.syscfg.make.develop) {
programs.adb.enable = true;
programs.wireshark.enable = true;
environment.systemPackages = with pkgs; [ wget dconf wireshark ];
};
} }

View File

@ -3,7 +3,7 @@ let
userOpt = with lib; { userOpt = with lib; {
username = mkOption { type = types.str; }; username = mkOption { type = types.str; };
wm = mkOption { wm = mkOption {
type = types.enum [ "Wayland" "X11" "-"]; type = types.enum [ "Wayland" "X11" "-" ];
default = "-"; default = "-";
}; };
git = { git = {