steal from MaxMur

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-04-03 17:57:49 +03:00
parent f31ca59f58
commit 211e509628
11 changed files with 94 additions and 84 deletions

View File

@ -5,6 +5,7 @@
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.desktop.cosmic;
in {
imports = with inputs; [
@ -12,9 +13,9 @@ in {
];
options = {
desktop.cosmic.enable =
lib.mkEnableOption "enable cosmic desktop";
mkEnableOption "enable cosmic desktop";
};
config = lib.mkIf cfg.enable {
config = mkIf cfg.enable {
sound.pipewire.enable = true;
nix.settings = {
substituters = ["https://cosmic.cachix.org/"];

View File

@ -2,27 +2,31 @@
config,
lib,
...
}: {
}: let
inherit (lib) mkIf mkEnableOption;
in {
options = {
locale.ukrainian.enable =
lib.mkEnableOption "enables ukrainian locale";
mkEnableOption "enables ukrainian locale";
};
config = lib.mkIf config.locale.ukrainian.enable {
i18n = {
defaultLocale = "uk_UA.UTF-8";
config = mkIf config.locale.ukrainian.enable {
i18n = let
locale = "uk_UA.UTF-8";
in {
defaultLocale = locale;
extraLocaleSettings = {
LC_CTYPE = "uk_UA.UTF-8";
LC_NUMERIC = "uk_UA.UTF-8";
LC_TIME = "uk_UA.UTF-8";
LC_ADDRESS = locale;
LC_COLLATE = "en_US.UTF-8";
LC_MONETARY = "uk_UA.UTF-8";
LC_MESSAGES = "uk_UA.UTF-8";
LC_PAPER = "uk_UA.UTF-8";
LC_NAME = "uk_UA.UTF-8";
LC_ADDRESS = "uk_UA.UTF-8";
LC_TELEPHONE = "uk_UA.UTF-8";
LC_MEASUREMENT = "uk_UA.UTF-8";
LC_IDENTIFICATION = "uk_UA.UTF-8";
LC_CTYPE = locale;
LC_IDENTIFICATION = locale;
LC_MEASUREMENT = locale;
LC_MESSAGES = locale;
LC_MONETARY = locale;
LC_NAME = locale;
LC_NUMERIC = locale;
LC_PAPER = locale;
LC_TELEPHONE = locale;
LC_TIME = locale;
};
};
};

View File

@ -2,12 +2,14 @@
config,
lib,
...
}: {
}: let
inherit (lib) mkIf mkEnableOption;
in {
options = {
opentabletdriver.enable =
lib.mkEnableOption "enables opentabletdriver";
mkEnableOption "enables opentabletdriver";
};
config = lib.mkIf config.opentabletdriver.enable {
config = mkIf config.opentabletdriver.enable {
hardware.opentabletdriver = {
enable = true;
daemon.enable = true;

View File

@ -1,16 +1,16 @@
{
pkgs,
lib,
config,
lib,
...
}: {
}: let
inherit (lib) mkIf mkEnableOption;
in {
options = {
qmk-vial.enable =
lib.mkEnableOption "adds a udev rule for vial keyboards";
mkEnableOption "adds a udev rule for vial keyboards";
};
config = lib.mkIf config.qmk-vial.enable {
config = mkIf config.qmk-vial.enable {
services.udev.extraRules = ''
#vial rule
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
'';
};

View File

@ -3,15 +3,15 @@
lib,
pkgs,
...
}:
with lib; let
}: let
inherit (lib) mkIf mkEnableOption mkDefault;
cfg = config.security.basic;
in {
options = {
security.basic.enable =
lib.mkEnableOption "enable basic security";
mkEnableOption "enable basic security";
};
config = lib.mkIf cfg.enable {
config = mkIf cfg.enable {
security = {
sudo.enable = false;
# doas.enable = true;
@ -36,7 +36,7 @@ in {
}
});
'';
apparmor.enable = lib.mkDefault true;
apparmor.enable = mkDefault true;
};
environment.systemPackages = with pkgs; [
@ -85,6 +85,6 @@ in {
"ufs"
];
nix.settings.allowed-users = lib.mkDefault ["@users"];
nix.settings.allowed-users = mkDefault ["@users"];
};
}