Move modules in programs/services subfolders

This commit is contained in:
SebastianStork 2025-05-28 11:33:05 +02:00
parent 2ff87c8404
commit 211ca98e92
38 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,13 @@
{
config,
pkgs,
lib,
...
}:
{
options.custom.programs.brightnessctl.enable = lib.mkEnableOption "";
config = lib.mkIf config.custom.programs.brightnessctl.enable {
home.packages = [ pkgs.brightnessctl ];
};
}

View file

@ -0,0 +1,67 @@
{
config,
inputs,
pkgs,
lib,
...
}:
{
options.custom.programs.firefox.enable = lib.mkEnableOption "";
config = lib.mkIf config.custom.programs.firefox.enable {
programs.firefox = {
enable = true;
profiles.default = {
settings =
let
uiState = ''{"placements":{"widget-overflow-fixed-list":[],"unified-extensions-area":["sponsorblocker_ajay_app-browser-action","_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","_74145f27-f039-47ce-a470-a662b129930a_-browser-action","ublock0_raymondhill_net-browser-action"],"nav-bar":["back-button","forward-button","stop-reload-button","customizableui-special-spring1","urlbar-container","customizableui-special-spring2","save-to-pocket-button","downloads-button","fxa-toolbar-menu-button","unified-extensions-button","sidebar-button"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["firefox-view-button","tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["personal-bookmarks"]},"seen":["developer-button","sponsorblocker_ajay_app-browser-action","_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","_74145f27-f039-47ce-a470-a662b129930a_-browser-action","ublock0_raymondhill_net-browser-action"],"dirtyAreaCache":["nav-bar","unified-extensions-area","PersonalToolbar","TabsToolbar","toolbar-menubar"],"currentVersion":20,"newElementCount":5}'';
in
{
"intl.accept_languages" = "en-us,en,de-de,de";
"browser.uiCustomization.state" = uiState;
"sidebar.position_start" = false;
"browser.toolbars.bookmarks.visibility" = "always";
"browser.bookmarks.restore_default_bookmarks" = false;
"browser.bookmarks.file" = "";
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
"general.autoScroll" = true;
"middlemouse.paste" = false;
"signon.rememberSignons" = false;
"extensions.formautofill.creditCards.enabled" = false;
"browser.tabs.loadBookmarksInBackground" = true;
"browser.tabs.groups.enabled" = true;
"browser.uidensity" = 1;
"sidebar.revamp" = false;
};
extraConfig = builtins.readFile "${inputs.betterfox}/user.js";
};
policies.ExtensionSettings =
let
extension = shortId: uuid: {
name = uuid;
value = {
install_url = "file:///${
inputs.firefox-addons.packages.${pkgs.system}.${shortId}
}/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/${uuid}.xpi";
installation_mode = "force_installed";
default_area = "menupanel";
};
};
in
{
"*".installation_mode = "blocked";
}
// lib.listToAttrs [
(extension "dictionary-german" "de-DE@dictionaries.addons.mozilla.org")
(extension "ublock-origin" "uBlock0@raymondhill.net")
(extension "bitwarden" "{446900e4-71c2-419f-a6a7-df9c091e268b}")
(extension "return-youtube-dislikes" "{762f9885-5a13-4abd-9c77-433dcd38b8fd}")
(extension "sponsorblock" "sponsorBlocker@ajay.app")
(extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}")
];
};
};
}

View file

@ -0,0 +1,44 @@
{ config, lib, ... }:
{
options.custom.programs.git.enable = lib.mkEnableOption "";
config = lib.mkIf config.custom.programs.git.enable {
sops.secrets = {
"ssh-key/github" = { };
"ssh-key/hda-gitlab" = { };
};
programs = {
git = {
enable = true;
userName = "SebastianStork";
userEmail = "sebastian.stork@pm.me";
extraConfig.init.defaultBranch = "main";
includes = [
{
condition = "gitdir:~/Projects/h-da/**";
contents = {
user = {
name = "Sebastian Stork";
email = "sebastian.stork@stud.h-da.de";
};
init.defaultBranch = "main";
};
}
];
};
ssh = {
enable = true;
matchBlocks = {
"github.com".identityFile = config.sops.secrets."ssh-key/github".path;
"code.fbi.h-da.de".identityFile = config.sops.secrets."ssh-key/hda-gitlab".path;
};
};
lazygit.enable = true;
};
};
}

View file

@ -0,0 +1,35 @@
{
config,
lib,
...
}@moduleArgs:
let
cfg = config.custom.programs.hyprlock;
in
{
options.custom.programs.hyprlock = {
enable = lib.mkEnableOption "";
fprintAuth = lib.mkEnableOption "" // {
default = moduleArgs.osConfig.services.fprintd.enable or false;
};
};
config = lib.mkIf cfg.enable {
programs.hyprlock = {
enable = true;
settings = {
general.immediate_render = true;
auth."fingerprint:enabled" = cfg.fprintAuth;
animations.enabled = false;
input-field.monitor = "";
background = {
monitor = "";
path = "~/Pictures/.wallpaper";
color = "rgb(0,0,0)";
blur_size = 4;
blur_passes = 1;
};
};
};
};
}

View file

@ -0,0 +1,36 @@
{
config,
pkgs,
lib,
...
}:
{
options.custom.programs.kitty.enable = lib.mkEnableOption "";
config = lib.mkIf config.custom.programs.kitty.enable {
programs.kitty = {
enable = true;
settings =
let
theme-name =
{
dark = "default";
light = "GitHub_Light";
}
.${config.custom.theme};
in
{
include = "${pkgs.kitty-themes}/share/kitty-themes/themes/${theme-name}.conf";
font_family = "JetBrainsMono Nerd Font";
background_opacity = "0.85";
cursor_shape = "beam";
confirm_os_window_close = 0;
enable_audio_bell = "no";
update_check_interval = 0;
};
};
home.shellAliases.ssh = "kitten ssh";
};
}

View file

@ -0,0 +1,301 @@
/*****----- Configuration -----*****/
configuration {
modi: "drun,run,filebrowser,window";
show-icons: true;
display-drun: "󰀻";
display-run: "";
display-filebrowser: "";
display-window: "";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
}
/*****----- Global Properties -----*****/
* {
font: "Open Sans 12, Symbols Nerd Font Mono 12";
}
* {
border-colour: var(selected);
handle-colour: var(selected);
background-colour: var(background);
foreground-colour: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(background);
selected-normal-background: var(selected);
selected-normal-foreground: var(background);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(background);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
}
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
cursor: "default";
/* Backgroud Colors */
background-color: @background-colour;
/* Backgroud Image */
//background-image: url("/path/to/image.png", none);
/* Simple Linear Gradient */
//background-image: linear-gradient(red, orange, pink, purple);
/* Directional Linear Gradient */
//background-image: linear-gradient(to bottom, pink, yellow, magenta);
/* Angle Linear Gradient */
//background-image: linear-gradient(45, cyan, purple, indigo);
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px;
expand: false;
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Search...";
placeholder-color: inherit;
}
num-filtered-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
textbox-num-sep {
enabled: true;
expand: false;
str: "/";
background-color: inherit;
text-color: inherit;
}
num-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
case-indicator {
enabled: true;
background-color: inherit;
text-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 1;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: true;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: "default";
}
scrollbar {
handle-width: 5px ;
handle-color: @handle-colour;
border-radius: 10px;
background-color: @alternate-background;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: pointer;
}
element normal.normal {
background-color: var(normal-background);
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(active-background);
text-color: var(active-foreground);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(selected-urgent-foreground);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(selected-active-foreground);
}
element alternate.normal {
background-color: var(alternate-normal-background);
text-color: var(alternate-normal-foreground);
}
element alternate.urgent {
background-color: var(alternate-urgent-background);
text-color: var(alternate-urgent-foreground);
}
element alternate.active {
background-color: var(alternate-active-background);
text-color: var(alternate-active-foreground);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
button {
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @alternate-background;
text-color: @foreground-colour;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-colour;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @background-colour;
text-color: @foreground-colour;
}

View file

@ -0,0 +1,8 @@
* {
background: #1E2127FF;
background-alt: #282B31FF;
foreground: #FFFFFFFF;
selected: #61AFEFFF;
active: #98C379FF;
urgent: #E06C75FF;
}

View file

@ -0,0 +1,27 @@
{
config,
pkgs,
lib,
...
}:
{
options.custom.programs.rofi.enable = lib.mkEnableOption "";
config = lib.mkIf config.custom.programs.rofi.enable {
home.packages = [ pkgs.rofi-wayland ];
xdg.configFile."rofi/config.rasi".source =
let
theming =
{
dark = ./dark-theme.rasi;
light = ./light-theme.rasi;
}
.${config.custom.theme};
in
pkgs.concatText "rofi-config" [
./config.rasi
theming
];
};
}

View file

@ -0,0 +1,8 @@
* {
background: #F1F1F1FF;
background-alt: #E0E0E0FF;
foreground: #252525FF;
selected: #008EC4FF;
active: #10A778FF;
urgent: #C30771FF;
}

View file

@ -0,0 +1,13 @@
{ config, lib, ... }@moduleArgs:
{
options.custom.programs.virt-manager.enable = lib.mkEnableOption "" // {
default = moduleArgs.osConfig.programs.virt-manager.enable or false;
};
config = lib.mkIf config.custom.programs.virt-manager.enable {
dconf.settings."org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
};
};
}

View file

@ -0,0 +1,68 @@
{
config,
inputs,
pkgs,
pkgs-unstable,
lib,
...
}:
{
options.custom.programs.vscode.enable = lib.mkEnableOption "";
config = lib.mkIf config.custom.programs.vscode.enable {
programs.vscode = {
enable = true;
package = pkgs-unstable.vscodium;
profiles.default.extensions =
let
inherit (inputs.nix-vscode-extensions.extensions.${pkgs.system}) open-vsx;
in
[
open-vsx.jnoortheen.nix-ide
open-vsx.aaron-bond.better-comments
open-vsx.llvm-vs-code-extensions.vscode-clangd
open-vsx.nefrob.vscode-just-syntax
open-vsx.github.github-vscode-theme
open-vsx.pkief.material-icon-theme
];
};
systemd.user.tmpfiles.rules =
let
settings = builtins.replaceStrings [ "," ] [ ",\\n" ] (
builtins.toJSON {
"workbench.colorTheme" =
{
dark = "GitHub Dark";
light = "GitHub Light";
}
.${config.custom.theme};
"workbench.iconTheme" = "material-icon-theme";
"editor.fontFamily" = "JetBrainsMono Nerd Font";
"explorer.confirmDelete" = false;
"explorer.confirmDragAndDrop" = false;
"extensions.autoCheckUpdates" = false;
"files.autoSave" = "afterDelay";
"git.autofetch" = true;
"git.confirmSync" = false;
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${lib.getExe pkgs.nixd}";
"update.mode" = "none";
"git.suggestSmartCommit" = false;
"workbench.sideBar.location" = "right";
"editor.renderWhitespace" = "none";
"editor.minimap.enabled" = false;
"window.menuBarVisibility" = "toggle";
"workbench.editor.decorations.colors" = false;
"window.titleBarStyle" = "native";
"window.customTitleBarVisibility" = "never";
}
);
in
[
"f+ %h/.config/VSCodium/User/settings.json - - - - ${settings}"
"f+ %h/.config/VSCodium/User/settings-default.json - - - - ${settings}"
];
};
}