started migration to snowfall
This commit is contained in:
parent
091438d802
commit
5ba5d55108
100 changed files with 49 additions and 32 deletions
19
_modules/home/desktop/applications/communication.nix
Normal file
19
_modules/home/desktop/applications/communication.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ options, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf mkForce mkMerge;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
|
||||
cfg = config.modules.${user}.desktop.applications.communication;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.applications.communication = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "Enable office suite (only-office)";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
home-manager.users.${user}.home.packages = with pkgs; [vesktop teamspeak_client signal-desktop];
|
||||
};
|
||||
}
|
53
_modules/home/desktop/applications/email.nix
Normal file
53
_modules/home/desktop/applications/email.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ options, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf mkForce mkMerge;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
|
||||
cfg = config.modules.${user}.desktop.applications.email;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.applications.email = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "Enable email client (thunderbird)";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home-manager.users.${user} = {
|
||||
home.packages = attrValues {
|
||||
inherit (pkgs) thunderbird;
|
||||
};
|
||||
|
||||
accounts.email.accounts = {
|
||||
kruining = {
|
||||
primary = true;
|
||||
address = "chris@kruinin.eu";
|
||||
realName = "Chris Kruining";
|
||||
imap = {
|
||||
host = "imap.kruining.eu";
|
||||
port = 993;
|
||||
};
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
profiles = [ "chris" ];
|
||||
};
|
||||
};
|
||||
|
||||
cgames = {
|
||||
primary = false;
|
||||
address = "chris@cgames.nl";
|
||||
realName = "Chris P Bacon";
|
||||
imap = {
|
||||
host = "imap.cgames.nl";
|
||||
port = 993;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
28
_modules/home/desktop/applications/office.nix
Normal file
28
_modules/home/desktop/applications/office.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ options, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf mkForce mkMerge;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
|
||||
cfg = config.modules.${user}.desktop.applications.office;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.applications.office = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "Enable office suite (only-office)";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
home-manager.users.${user}.home.packages = attrValues {
|
||||
inherit (pkgs) onlyoffice-bin;
|
||||
};
|
||||
|
||||
# nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
# builtins.elem (lib.getName pkg) [ "corefonts" ];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
corefonts
|
||||
];
|
||||
};
|
||||
}
|
21
_modules/home/desktop/applications/passwords.nix
Normal file
21
_modules/home/desktop/applications/passwords.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ options, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf mkForce mkMerge;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
|
||||
cfg = config.modules.${user}.desktop.applications.passwords;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.applications.passwords = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "Enable password manager (bitwarden)";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
home-manager.users.${user}.home.packages = attrValues {
|
||||
inherit (pkgs) bitwarden-desktop;
|
||||
};
|
||||
};
|
||||
}
|
36
_modules/home/desktop/applications/recording.nix
Normal file
36
_modules/home/desktop/applications/recording.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ options, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf mkForce mkMerge;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
|
||||
cfg = config.modules.${user}.desktop.applications.recording;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.applications.recording = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "Enable recording software (OBS Studio)";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
boot = {
|
||||
extraModulePackages = with config.boot.kernelPackages; [
|
||||
v4l2loopback
|
||||
];
|
||||
|
||||
extraModprobeConfig = ''
|
||||
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
|
||||
'';
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
home-manager.users.${user}.home.packages = with pkgs; [
|
||||
obs-studio
|
||||
obs-studio-plugins.wlrobs
|
||||
obs-studio-plugins.obs-backgroundremoval
|
||||
obs-studio-plugins.obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
}
|
55
_modules/home/desktop/applications/steam.nix
Normal file
55
_modules/home/desktop/applications/steam.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{ config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkForce mkMerge;
|
||||
|
||||
cfg = config.modules.${user}.desktop.applications.steam;
|
||||
desktop = config.modules.${user}.desktop;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.applications.steam = {
|
||||
enable = mkEnableOption "Enable steam, the game/software store";
|
||||
hardware.enable = mkEnableOption "Support for steam hardware";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
package = pkgs.steam-small.override {
|
||||
extraEnv = {
|
||||
DXVK_HUD = "compiler";
|
||||
MANGOHUD = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
hardware.steam-hardware.enable = mkForce cfg.hardware.enable;
|
||||
|
||||
# https://github.com/FeralInteractive/gamemode
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
enableRenice = true;
|
||||
settings = {};
|
||||
};
|
||||
}
|
||||
|
||||
(mkIf (desktop.type == "wayland") {
|
||||
# https://github.com/ValveSoftware/gamescope
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
env = {
|
||||
DXVK_HDR = "1";
|
||||
ENABLE_GAMESCOPE_WSI = "1";
|
||||
WINE_FULLSCREEN_FSR = "1";
|
||||
WLR_RENDERER = "vulkan";
|
||||
};
|
||||
args = ["--hdr-enabled"];
|
||||
};
|
||||
|
||||
programs.steam.gamescopeSession = {
|
||||
enable = true;
|
||||
args = ["--immediate-flips"];
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
17
_modules/home/desktop/applications/studio.nix
Normal file
17
_modules/home/desktop/applications/studio.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, config, lib, user, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
|
||||
cfg = config.modules.${user}.desktop.applications.studio;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.applications.studio = {
|
||||
enable = mkEnableOption "Enable Bricklink Studio";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
my.studio
|
||||
];
|
||||
};
|
||||
}
|
82
_modules/home/desktop/browsers/chrome.nix
Normal file
82
_modules/home/desktop/browsers/chrome.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
{ config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (builtins) fetchurl;
|
||||
|
||||
cfg = config.modules.${user}.desktop.browsers.chrome;
|
||||
in {
|
||||
options.modules.${user}.desktop.browsers.chrome = {
|
||||
enable = mkEnableOption "Enable Chrome";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${user}.home.packages = [
|
||||
pkgs.chromium
|
||||
# (pkgs.ungoogled-chromium.override {
|
||||
# commandLineArgs = [
|
||||
# "--enable-features=AcceleratedVideoEncoder"
|
||||
# "--ignore-gpu-blocklist"
|
||||
# "--enable-zero-copy"
|
||||
# "--ozone-platform-hint=auto"
|
||||
# "--password-store=basic"
|
||||
# ];
|
||||
# })
|
||||
];
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
enablePlasmaBrowserIntegration = true;
|
||||
extensions = let
|
||||
# create_extension_for = browserVersion: { id, sha256, version }: {
|
||||
# inherit id;
|
||||
# crxPath = fetchurl {
|
||||
# url = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${browserVersion}&x=id%3D${id}%26installsource%3Dondemand%26uc";
|
||||
# name = "${id}.crx";
|
||||
# inherit sha256;
|
||||
# };
|
||||
# inherit version;
|
||||
# };
|
||||
# create_extension = create_extension_for (lib.versions.major pkgs.ungoogled-chromium.version);
|
||||
in [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # UBlock origin
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone" # Sponsor block
|
||||
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # Dark reader
|
||||
"nngceckbapebfimnlniiiahkandclblb" # Bitwarden
|
||||
# (create_extension {
|
||||
# id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; # UBlock origin
|
||||
# sha256 = "sha256:1lnk0k8zy0w33cxpv93q1am0d7ds2na64zshvbwdnbjq8x4sw5p6";
|
||||
# version = "1.63.2";
|
||||
# })
|
||||
# (create_extension {
|
||||
# id = "mnjggcdmjocbbbhaepdhchncahnbgone"; # Sponsor block
|
||||
# sha265 = "";
|
||||
# version = "";
|
||||
# })
|
||||
# (create_extension {
|
||||
# id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; # Dark reader
|
||||
# sha265 = "";
|
||||
# version = "";
|
||||
# })
|
||||
# (create_extension {
|
||||
# id = "nngceckbapebfimnlniiiahkandclblb"; # Bitwarden
|
||||
# sha265 = "";
|
||||
# version = "";
|
||||
# })
|
||||
];
|
||||
defaultSearchProviderEnabled = true;
|
||||
defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}";
|
||||
extraOpts = {
|
||||
"ExtensionManifestV2Availability" = 2;
|
||||
"BrowserSignin" = 0;
|
||||
"SyncDisabled" = true;
|
||||
"PasswordManagerEnabled" = false;
|
||||
"SpellcheckEnabled" = true;
|
||||
"SpellcheckLanguage" = [
|
||||
"nl-NL"
|
||||
"en-GB"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
27
_modules/home/desktop/browsers/default.nix
Normal file
27
_modules/home/desktop/browsers/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
cfg = config.modules.${user}.desktop.browsers;
|
||||
in {
|
||||
options.modules.${user}.desktop.browsers = let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) nullOr str;
|
||||
in {
|
||||
default = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Default system browser";
|
||||
example = "firefox";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.default != null) {
|
||||
home-manager.users.${user}.home.sessionVariables.BROWSER = cfg.default;
|
||||
};
|
||||
}
|
233
_modules/home/desktop/browsers/firefox.nix
Normal file
233
_modules/home/desktop/browsers/firefox.nix
Normal file
|
@ -0,0 +1,233 @@
|
|||
{ inputs, options, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (builtins) toJSON;
|
||||
inherit (lib.attrsets) attrValues mapAttrsToList;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.strings) concatStrings;
|
||||
|
||||
cfg = config.modules.${user}.desktop.browsers.firefox;
|
||||
usr = config.users.users.${user};
|
||||
in {
|
||||
options.modules.${user}.desktop.browsers.firefox = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.types) attrsOf oneOf bool int lines str;
|
||||
inherit (lib.my) mkOpt mkOpt';
|
||||
in {
|
||||
enable = mkEnableOption "Gecko-based libre browser";
|
||||
privacy.enable = mkEnableOption "Privacy Focused Firefox fork";
|
||||
|
||||
profileName = mkOpt str usr.name;
|
||||
settings = mkOpt' (attrsOf (oneOf [bool int str])) {} ''
|
||||
Firefox preferences set in <filename>user.js</filename>
|
||||
'';
|
||||
extraConfig = mkOpt' lines "" ''
|
||||
Extra lines to add to <filename>user.js</filename>
|
||||
'';
|
||||
userChrome = mkOpt' lines "" "CSS Styles for Firefox's interface";
|
||||
userContent = mkOpt' lines "" "Global CSS Styles for websites";
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf (config.modules.${user}.desktop.type == "wayland") {
|
||||
environment.variables.MOZ_ENABLE_WAYLAND = "1";
|
||||
})
|
||||
|
||||
(mkIf cfg.enable {
|
||||
modules.${user}.desktop.browsers.firefox.settings = {
|
||||
# TAB cycle URL's, not buttons..
|
||||
"browser.toolbars.keyboard_navigation" = false;
|
||||
# Disable annoying translation pop-up!
|
||||
"browser.translations.automaticallyPopup" = false;
|
||||
# Enables dark-themed flash before page-load:
|
||||
"ui.systemUsesDarkTheme" = "1";
|
||||
# Developer tools -> uses dark theme
|
||||
"devtools.theme" = "dark";
|
||||
# FIXME: IM-Wheel -> Manual scroll speed ctrl bcs == buggy...
|
||||
"mousewheel.min_line_scroll_amount" = 35;
|
||||
# Enables ETP = decent security -> firefox containers = redundent
|
||||
"browser.contentblocking.category" = "strict";
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"privacy.donottrackheader.value" = 1;
|
||||
"privacy.purge_trackers.enabled" = true;
|
||||
# Syncs Firefox toolbar settings across machines
|
||||
# WARNING: May not work across OS'es
|
||||
"services.sync.prefs.sync.browser.uiCustomization.state" = true;
|
||||
# Enables userContent.css and userChrome.css for our theme modules
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
# Stop creating ~/Downloads!
|
||||
"browser.download.dir" = "${usr.home}/downloads";
|
||||
# Disables built-in password manager -> use external PM!
|
||||
"signon.rememberSignons" = false;
|
||||
# Firefox, DO NOT CHECK if you are the default browser..
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
# Disables "New Tab Page" feature
|
||||
"browser.newtabpage.enabled" = false;
|
||||
# Disables Activity Stream
|
||||
"browser.newtabpage.activity-stream.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.telemetry" = false;
|
||||
# Disables new tab tile ads & preload
|
||||
"browser.newtabpage.enhanced" = false;
|
||||
"browser.newtabpage.introShown" = true;
|
||||
"browser.newtab.preload" = false;
|
||||
"browser.newtabpage.directory.ping" = "";
|
||||
"browser.newtabpage.directory.source" = "data:text/plain,{}";
|
||||
# Reduces search engine noise in the urlbar's completion window
|
||||
# PS: Shortcuts and suggestions still work
|
||||
"browser.urlbar.suggest.searches" = false;
|
||||
"browser.urlbar.shortcuts.bookmarks" = false;
|
||||
"browser.urlbar.shortcuts.history" = false;
|
||||
"browser.urlbar.shortcuts.tabs" = false;
|
||||
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
||||
"browser.urlbar.speculativeConnect.enabled" = false;
|
||||
# Prevents search terms from being sent to ISP
|
||||
"browser.urlbar.dnsResolveSingleWordsAfterSearch" = 0;
|
||||
# Disables sponsored search results
|
||||
"browser.urlbar.suggest.quicksuggest.nonsponsored" = false;
|
||||
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
|
||||
# Shows whole URL in address bar
|
||||
"browser.urlbar.trimURLs" = false;
|
||||
# Disables non-useful funcionality of certain features
|
||||
"browser.disableResetPrompt" = true;
|
||||
"browser.onboarding.enabled" = false;
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
|
||||
"extensions.pocket.enabled" = false;
|
||||
"extensions.shield-recipe-client.enabled" = false;
|
||||
"reader.parse-on-load.enabled" = false;
|
||||
# Allow seperate search-engine usage in private mode!
|
||||
"browser.search.separatePrivateDefault.ui.enabled" = true;
|
||||
|
||||
# Security-oriented defaults:
|
||||
"security.family_safety.mode" = 0;
|
||||
# https://blog.mozilla.org/security/2016/10/18/phasing-out-sha-1-on-the-public-web/
|
||||
"security.pki.sha1_enforcement_level" = 1;
|
||||
# https://github.com/tlswg/tls13-spec/issues/1001
|
||||
"security.tls.enable_0rtt_data" = false;
|
||||
# Uses Mozilla geolocation service instead of Google if given permission
|
||||
"geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
|
||||
"geo.provider.use_gpsd" = false;
|
||||
# https://support.mozilla.org/en-US/kb/extension-recommendations
|
||||
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr" = false;
|
||||
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" =
|
||||
false;
|
||||
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" =
|
||||
false;
|
||||
"extensions.htmlaboutaddons.recommendations.enabled" = false;
|
||||
"extensions.htmlaboutaddons.discover.enabled" = false;
|
||||
"extensions.getAddons.showPane" = false; # Uses Google Analytics
|
||||
"browser.discovery.enabled" = false;
|
||||
# Reduces File IO / SSD abuse, 15 seconds -> 30 minutes
|
||||
"browser.sessionstore.interval" = "1800000";
|
||||
# Disables battery API
|
||||
"dom.battery.enabled" = false;
|
||||
# Disable cross-site ad-view tracking
|
||||
"dom.private-attribution.submission.enabled" = false;
|
||||
# Disables "beacon" asynchronous HTTP transfers (used for analytics)
|
||||
"beacon.enabled" = false;
|
||||
# Disables pinging URIs specified in HTML <a> ping= attributes
|
||||
"browser.send_pings" = false;
|
||||
# Disables gamepad API to prevent USB device enumeration
|
||||
"dom.gamepad.enabled" = false;
|
||||
# Prevents guessing domain names on invalid entry in URL-bar
|
||||
"browser.fixup.alternate.enabled" = false;
|
||||
# Disables telemetry settings
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.server" = "data:,";
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"toolkit.telemetry.coverage.opt-out" = true;
|
||||
"toolkit.coverage.opt-out" = true;
|
||||
"toolkit.coverage.endpoint.base" = "";
|
||||
"experiments.supported" = false;
|
||||
"experiments.enabled" = false;
|
||||
"experiments.manifest.uri" = "";
|
||||
"browser.ping-centre.telemetry" = false;
|
||||
# https://mozilla.github.io/normandy/
|
||||
"app.normandy.enabled" = false;
|
||||
"app.normandy.api_url" = "";
|
||||
"app.shield.optoutstudies.enabled" = false;
|
||||
# Disables health reports (basically more telemetry)
|
||||
"datareporting.healthreport.uploadEnabled" = false;
|
||||
"datareporting.healthreport.service.enabled" = false;
|
||||
"datareporting.policy.dataSubmissionEnabled" = false;
|
||||
# Disables crash reports
|
||||
"breakpad.reportURL" = "";
|
||||
"browser.tabs.crashReporting.sendReport" = false;
|
||||
# Prevents the submission of backlogged reports
|
||||
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
|
||||
|
||||
# Disable automatic Form autofill
|
||||
"browser.formfill.enable" = false;
|
||||
"extensions.formautofill.addresses.enabled" = false;
|
||||
"extensions.formautofill.available" = "off";
|
||||
"extensions.formautofill.creditCards.available" = false;
|
||||
"extensions.formautofill.creditCards.enabled" = false;
|
||||
"extensions.formautofill.heuristics.enabled" = false;
|
||||
};
|
||||
|
||||
# Use a stable profile name so we can target it in themes
|
||||
home-manager.users.${user}.home = {
|
||||
packages = let
|
||||
inherit (pkgs) makeDesktopItem;
|
||||
inherit (inputs.firefox.packages.${pkgs.system}) firefox-nightly-bin;
|
||||
in [
|
||||
firefox-nightly-bin
|
||||
(makeDesktopItem {
|
||||
name = "firefox-nightly-private";
|
||||
desktopName = "Firefox Nightly (Private)";
|
||||
genericName = "Launch a private Firefox Nightly instance";
|
||||
icon = "firefox-nightly";
|
||||
exec = "${lib.getExe firefox-nightly-bin} --private-window";
|
||||
categories = ["Network" "WebBrowser"];
|
||||
})
|
||||
];
|
||||
|
||||
file = let
|
||||
cfgPath = ".mozilla/firefox";
|
||||
in {
|
||||
firefox-profiles = {
|
||||
target = "${cfgPath}/profiles.ini";
|
||||
text = ''
|
||||
[Profile0]
|
||||
Name=default
|
||||
IsRelative=1
|
||||
Path=${cfg.profileName}.default
|
||||
Default=1
|
||||
|
||||
[General]
|
||||
StartWithLastProfile=1
|
||||
Version=2
|
||||
'';
|
||||
};
|
||||
|
||||
user-js = mkIf (cfg.settings != {} || cfg.extraConfig != "") {
|
||||
target = "${cfgPath}/${cfg.profileName}.default/user.js";
|
||||
text = ''
|
||||
${concatStrings (mapAttrsToList (name: value: ''
|
||||
user_pref("${name}", ${toJSON value});
|
||||
'')
|
||||
cfg.settings)}
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
};
|
||||
|
||||
user-chrome = mkIf (cfg.userChrome != "") {
|
||||
target = "${cfgPath}/${cfg.profileName}.default/chrome/userChrome.css";
|
||||
text = cfg.userChrome;
|
||||
};
|
||||
|
||||
user-content = mkIf (cfg.userContent != "") {
|
||||
target = "${cfgPath}/${cfg.profileName}.default/chrome/userContent.css";
|
||||
text = cfg.userContent;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf cfg.privacy.enable {
|
||||
home-manager.users.${user}.home.packages = attrValues {
|
||||
inherit (pkgs) librewolf;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
17
_modules/home/desktop/browsers/ladybird.nix
Normal file
17
_modules/home/desktop/browsers/ladybird.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.${user}.desktop.browsers.ladybird;
|
||||
in {
|
||||
options.modules.${user}.desktop.browsers.ladybird = {
|
||||
enable = mkEnableOption "Enable Ladybird";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
ladybird
|
||||
];
|
||||
};
|
||||
}
|
43
_modules/home/desktop/browsers/zen.nix
Normal file
43
_modules/home/desktop/browsers/zen.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ inputs, options, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (builtins) toJSON;
|
||||
inherit (lib.attrsets) attrValues mapAttrsToList;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.strings) concatStrings;
|
||||
|
||||
cfg = config.modules.${user}.desktop.browsers.zen;
|
||||
in {
|
||||
options.modules.${user}.desktop.browsers.zen = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.types) attrsOf oneOf bool int lines str;
|
||||
inherit (lib.my) mkOpt mkOpt';
|
||||
in {
|
||||
enable = mkEnableOption "Gecko-based libre browser";
|
||||
privacy.enable = mkEnableOption "Privacy Focused Firefox fork";
|
||||
|
||||
profileName = mkOpt str config.user.name;
|
||||
settings = mkOpt' (attrsOf (oneOf [bool int str])) {} ''
|
||||
Firefox preferences set in <filename>user.js</filename>
|
||||
'';
|
||||
extraConfig = mkOpt' lines "" ''
|
||||
Extra lines to add to <filename>user.js</filename>
|
||||
'';
|
||||
userChrome = mkOpt' lines "" "CSS Styles for Firefox's interface";
|
||||
userContent = mkOpt' lines "" "Global CSS Styles for websites";
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf (config.modules.${user}.desktop.type == "wayland") {
|
||||
environment.variables.MOZ_ENABLE_WAYLAND = "1";
|
||||
})
|
||||
|
||||
(mkIf cfg.enable {
|
||||
home-manager.users.${user}.home.packages = let
|
||||
inherit (pkgs) makeDesktopItem;
|
||||
inherit (inputs.zen.packages.${pkgs.system}.specific) zen;
|
||||
in [
|
||||
zen
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
10
_modules/home/desktop/default.nix
Normal file
10
_modules/home/desktop/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ lib, user, ... }:
|
||||
let
|
||||
inherit (lib.types) either str;
|
||||
inherit (lib.my) mkOpt;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop = {
|
||||
type = mkOpt (either str null) "wayland";
|
||||
};
|
||||
}
|
39
_modules/home/desktop/editors/default.nix
Normal file
39
_modules/home/desktop/editors/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.attrsets) attrValues;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
cfg = config.modules.${user}.desktop.editors;
|
||||
in {
|
||||
options.modules.${user}.desktop.editors = let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) nullOr enum;
|
||||
in {
|
||||
default = mkOption {
|
||||
type = nullOr (enum [ "nano" "nvim" "zed" "kate" "vscodium" ]);
|
||||
default = "nano";
|
||||
description = "Default editor for text manipulation";
|
||||
example = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf (cfg.default != null) {
|
||||
home-manager.users.${user}.home.sessionVariables = {
|
||||
EDITOR = cfg.default;
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf (cfg.default == "nvim") {
|
||||
home-manager.users.${user}.home.packages = attrValues {
|
||||
inherit (pkgs) imagemagick editorconfig-core-c sqlite deno pandoc nuspell;
|
||||
inherit (pkgs.hunspellDicts) nl_NL en_GB-ise;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
18
_modules/home/desktop/editors/kate.nix
Normal file
18
_modules/home/desktop/editors/kate.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.${user}.desktop.editors.kate;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.editors.kate = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "kate";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${user}.programs.kate.enable = true;
|
||||
};
|
||||
}
|
33
_modules/home/desktop/editors/nano.nix
Normal file
33
_modules/home/desktop/editors/nano.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.${user}.desktop.editors.nano;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.editors.nano = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "nano"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${user}.home.packages = with pkgs; [
|
||||
nano
|
||||
];
|
||||
|
||||
programs.nano = {
|
||||
enable = true;
|
||||
syntaxHighlight = true;
|
||||
nanorc = ''
|
||||
set autoindent
|
||||
set jumpyscrolling
|
||||
set linenumbers
|
||||
set mouse
|
||||
set saveonexit
|
||||
set smarthome
|
||||
set tabstospaces
|
||||
set tabsize 2
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
38
_modules/home/desktop/editors/nvim.nix
Normal file
38
_modules/home/desktop/editors/nvim.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ config, lib, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.${user}.desktop.editors.nvim;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.editors.nvim = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "neo-vim (nixvim)";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
modules.desktop.editors.nvim.enable = true;
|
||||
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim = {
|
||||
statusline.lualine.enable = true;
|
||||
telescope.enable = true;
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
|
||||
lsp.enable = true;
|
||||
|
||||
languages = {
|
||||
enableTreesitter = true;
|
||||
|
||||
nix.enable = true;
|
||||
ts.enable = true;
|
||||
rust.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
18
_modules/home/desktop/editors/vscodium.nix
Normal file
18
_modules/home/desktop/editors/vscodium.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
|
||||
cfg = config.modules.${user}.desktop.editors.vscodium;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.editors.vscodium = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "vscodium"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${user}.home.packages = attrValues {
|
||||
inherit (pkgs) vscodium;
|
||||
};
|
||||
};
|
||||
}
|
75
_modules/home/desktop/editors/zed.nix
Normal file
75
_modules/home/desktop/editors/zed.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{ config, lib, pkgs, user, ... }: let
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.${user}.desktop.editors.zed;
|
||||
in {
|
||||
options.modules.${user}.desktop.editors.zed = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {enable = mkEnableOption "zed";};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${user} = {
|
||||
home.packages = with pkgs; [
|
||||
zed-editor nixd nil alejandra
|
||||
];
|
||||
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
|
||||
extensions = ["nix" "toml" "html"];
|
||||
|
||||
userSettings = {
|
||||
assistant.enabled = false;
|
||||
|
||||
vim_mode = false;
|
||||
load_direnv = "shell_hook";
|
||||
base_keymap = "JetBrains";
|
||||
|
||||
format_on_save = "on";
|
||||
bindings = {
|
||||
"ctrl+s" = "workspace::SaveAll";
|
||||
};
|
||||
|
||||
tabs = {
|
||||
file_icons = true;
|
||||
git_status = true;
|
||||
};
|
||||
project_panel.auto_reveal_entries = false;
|
||||
|
||||
"experimental.theme_overrides" = {
|
||||
border = "#ffffff07";
|
||||
};
|
||||
|
||||
hour_format = "hour24";
|
||||
auto_update = false;
|
||||
|
||||
lsp = {
|
||||
nixd = {};
|
||||
nil = {
|
||||
initialization_options = {
|
||||
nix = {
|
||||
flake = {
|
||||
autoArchive = true;
|
||||
};
|
||||
};
|
||||
formatting = {
|
||||
command = ["alejandra" "--quiet" "--"];
|
||||
};
|
||||
};
|
||||
binary = {
|
||||
path_lookup = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
languages = {
|
||||
"Nix" = {
|
||||
language_servers = ["nixd" "nil"];
|
||||
format_on_save = "on";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
20
_modules/home/desktop/games/default.nix
Normal file
20
_modules/home/desktop/games/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config, lib, pkgs, user, ... }: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.modules.${user}.desktop.games;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.games = {
|
||||
enable = mkEnableOption "enable proton GE";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${user} = {
|
||||
home.packages = with pkgs; [ protonup ];
|
||||
|
||||
home.sessionVariables = {
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
23
_modules/home/desktop/games/minecraft.nix
Normal file
23
_modules/home/desktop/games/minecraft.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ options, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf mkForce mkMerge;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
|
||||
cfg = config.modules.${user}.desktop.games.minecraft;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.games.minecraft = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "minecraft (Modrinth)";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# environment.systemPackages = [
|
||||
# pkgs.minecract
|
||||
# ];
|
||||
home-manager.users.${user}.home.packages = attrValues {
|
||||
inherit (pkgs) prismlauncher;
|
||||
};
|
||||
};
|
||||
}
|
286
_modules/home/desktop/plasma.nix
Normal file
286
_modules/home/desktop/plasma.nix
Normal file
|
@ -0,0 +1,286 @@
|
|||
{ inputs, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.${user}.desktop.plasma;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.plasma = let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
in {
|
||||
enable = mkEnableOption "plasma 6";
|
||||
|
||||
autoLogin = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable plasma's auto login feature.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs.kdePackages; [
|
||||
kcoreaddons
|
||||
];
|
||||
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter oxygen ];
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
services = {
|
||||
xserver.enable = true;
|
||||
|
||||
desktopManager.plasma6.enable = true;
|
||||
|
||||
displayManager = {
|
||||
defaultSession = "plasma";
|
||||
sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
autoLogin = mkIf cfg.autoLogin {
|
||||
enable = true;
|
||||
inherit user;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# should enable theme integration with gtk apps (i.e. firefox, thunderbird)
|
||||
programs.dconf.enable = true;
|
||||
|
||||
home-manager = {
|
||||
sharedModules = [
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
];
|
||||
|
||||
users.${user}.programs.plasma = {
|
||||
enable = true;
|
||||
immutableByDefault = true;
|
||||
windows.allowWindowsToRememberPositions = true;
|
||||
|
||||
session = {
|
||||
general.askForConfirmationOnLogout = false;
|
||||
sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout";
|
||||
};
|
||||
|
||||
workspace = {
|
||||
clickItemTo = "select";
|
||||
colorScheme = "EverforestDark";
|
||||
wallpaper = config.stylix.image;
|
||||
};
|
||||
|
||||
spectacle.shortcuts = {
|
||||
captureRectangularRegion = "Meta+Shift+S";
|
||||
};
|
||||
|
||||
kwin = {
|
||||
edgeBarrier = 0;
|
||||
cornerBarrier = false;
|
||||
|
||||
effects = {
|
||||
translucency.enable = true;
|
||||
|
||||
blur = {
|
||||
enable = true;
|
||||
strength = 5;
|
||||
noiseStrength = 5;
|
||||
};
|
||||
|
||||
snapHelper.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
panels = [
|
||||
# Windows-like panel at the bottom
|
||||
{
|
||||
location = "bottom";
|
||||
floating = true;
|
||||
lengthMode = "fill";
|
||||
height = 42;
|
||||
hiding = "none";
|
||||
screen = "all";
|
||||
widgets = [
|
||||
{
|
||||
panelSpacer = {
|
||||
expanding = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
kickoff = {
|
||||
applicationsDisplayMode = "list";
|
||||
compactDisplayStyle = false;
|
||||
favoritesDisplayMode = "grid";
|
||||
sortAlphabetically = true;
|
||||
showButtonsFor = {
|
||||
custom = [
|
||||
"shutdown"
|
||||
"reboot"
|
||||
"logout"
|
||||
"lock-screen"
|
||||
];
|
||||
};
|
||||
showActionButtonCaptions = true;
|
||||
};
|
||||
}
|
||||
# {
|
||||
# appMenu = {
|
||||
# compactView = false;
|
||||
# };
|
||||
# }
|
||||
{
|
||||
iconTasks = {
|
||||
appearance = {
|
||||
fill = false;
|
||||
highlightWindows = true;
|
||||
iconSpacing = "medium";
|
||||
indicateAudioStreams = true;
|
||||
rows = {
|
||||
multirowView = "never";
|
||||
maximum = null;
|
||||
};
|
||||
showTooltips = true;
|
||||
};
|
||||
behavior = {
|
||||
grouping = {
|
||||
clickAction = "showPresentWindowsEffect";
|
||||
method = "byProgramName";
|
||||
};
|
||||
minimizeActiveTaskOnClick = true;
|
||||
newTasksAppearOn = "right";
|
||||
showTasks = {
|
||||
onlyInCurrentActivity = true;
|
||||
onlyInCurrentDesktop = true;
|
||||
onlyMinimized = false;
|
||||
onlyInCurrentScreen = false;
|
||||
};
|
||||
sortingMethod = "manually";
|
||||
unhideOnAttentionNeeded = true;
|
||||
wheel = {
|
||||
ignoreMinimizedTasks = true;
|
||||
switchBetweenTasks = true;
|
||||
};
|
||||
};
|
||||
launchers = [
|
||||
"preferred://filemanager"
|
||||
"preferred://browser"
|
||||
"preferred://terminalemulator"
|
||||
"preferred://email"
|
||||
"applications:zededitor.desktop"
|
||||
"applications:vesktop.desktop"
|
||||
"applications:steam.desktop"
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
panelSpacer = {
|
||||
expanding = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
systemTray = {
|
||||
icons = {
|
||||
scaleToFit = true;
|
||||
spacing = "small";
|
||||
};
|
||||
items = {
|
||||
hidden = [
|
||||
"org.kde.plasma.brightness"
|
||||
];
|
||||
};
|
||||
pin = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
digitalClock = {
|
||||
date = {
|
||||
enable = true;
|
||||
format = "shortDate";
|
||||
position = "belowTime";
|
||||
};
|
||||
time = {
|
||||
format = "24h";
|
||||
showSeconds = "onlyInTooltip";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
powerdevil = {
|
||||
AC = {
|
||||
powerButtonAction = "shutDown";
|
||||
whenLaptopLidClosed = "doNothing";
|
||||
|
||||
autoSuspend.action = "nothing";
|
||||
dimDisplay.enable = false;
|
||||
|
||||
turnOffDisplay = {
|
||||
idleTimeout = "never";
|
||||
};
|
||||
};
|
||||
|
||||
battery = {
|
||||
powerButtonAction = "shutDown";
|
||||
whenLaptopLidClosed = "doNothing";
|
||||
|
||||
autoSuspend.action = "nothing";
|
||||
dimDisplay.enable = false;
|
||||
|
||||
turnOffDisplay = {
|
||||
idleTimeout = "never";
|
||||
};
|
||||
};
|
||||
|
||||
lowBattery = {
|
||||
powerButtonAction = "shutDown";
|
||||
whenLaptopLidClosed = "doNothing";
|
||||
|
||||
autoSuspend.action = "nothing";
|
||||
dimDisplay.enable = false;
|
||||
|
||||
turnOffDisplay = {
|
||||
idleTimeout = "never";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
kscreenlocker = {
|
||||
autoLock = false;
|
||||
lockOnResume = false;
|
||||
lockOnStartup = false;
|
||||
|
||||
appearance = {
|
||||
alwaysShowClock = true;
|
||||
showMediaControls = true;
|
||||
};
|
||||
};
|
||||
|
||||
configFile = {
|
||||
baloofilerc = {
|
||||
|
||||
};
|
||||
kdeglobals = {
|
||||
General = {
|
||||
# enable font antialiasing
|
||||
XftAntialias = true;
|
||||
XftHintStyle = "hintslight";
|
||||
XftSubPixel = "rgb";
|
||||
};
|
||||
};
|
||||
kwalletrc = {
|
||||
Wallet.Enabled = false;
|
||||
};
|
||||
plasmarc = {
|
||||
General = {
|
||||
RaiseMaximumVolume = true;
|
||||
VolumeStep = 2;
|
||||
};
|
||||
};
|
||||
kcminputrc = {
|
||||
Keyboard.NumLock.value = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
50
_modules/home/desktop/terminal/alacritty.nix
Normal file
50
_modules/home/desktop/terminal/alacritty.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
in {
|
||||
options.modules.${user}.desktop.terminal.alacritty = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "OpenGL terminal emulator"; };
|
||||
|
||||
config = mkIf config.modules.${user}.desktop.terminal.alacritty.enable {
|
||||
modules.${user}.shell.toolset.tmux.enable = true;
|
||||
|
||||
home-manager.users.${user}.programs.alacritty = {
|
||||
enable = true;
|
||||
|
||||
settings = mkMerge [
|
||||
{
|
||||
env = {
|
||||
TERM = "xterm-256color";
|
||||
WINIT_X11_SCALE_FACTOR = "1.0";
|
||||
};
|
||||
|
||||
window.dynamic_title = true;
|
||||
|
||||
scrolling = {
|
||||
history = 5000;
|
||||
multiplier = 3;
|
||||
};
|
||||
|
||||
selection = {
|
||||
semantic_escape_chars = '',│`|:"' ()[]{}<>'';
|
||||
save_to_clipboard = false;
|
||||
};
|
||||
|
||||
general.live_config_reload = true;
|
||||
|
||||
terminal.shell = {
|
||||
program = "${getExe pkgs.zsh}";
|
||||
args = ["-l" "-c" "tmux new || tmux"];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
24
_modules/home/desktop/terminal/default.nix
Normal file
24
_modules/home/desktop/terminal/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkDefault mkIf mkMerge;
|
||||
|
||||
cfg = config.modules.${user}.desktop.terminal;
|
||||
in {
|
||||
options.modules.${user}.desktop.terminal = let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) str;
|
||||
in {
|
||||
default = mkOption {
|
||||
type = str;
|
||||
default = "alacrity";
|
||||
description = "Default terminal";
|
||||
example = "alacrity";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
{
|
||||
home-manager.users.${user}.home.sessionVariables.TERMINAL = cfg.default;
|
||||
}
|
||||
];
|
||||
}
|
35
_modules/home/desktop/terminal/ghostty.nix
Normal file
35
_modules/home/desktop/terminal/ghostty.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) toString;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
in {
|
||||
options.modules.${user}.desktop.terminal.ghostty = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "ghostty"; };
|
||||
|
||||
config = mkIf config.modules.${user}.desktop.terminal.ghostty.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.ghostty
|
||||
];
|
||||
|
||||
modules.${user}.shell.toolset.tmux.enable = true;
|
||||
|
||||
home-manager.users.${user}.programs.ghostty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background-blur-radius = 20;
|
||||
theme = "dark:stylix,light:stylix";
|
||||
window-theme = (config.modules.${user}.themes.polarity or "dark");
|
||||
background-opacity = 0.8;
|
||||
minimum-contrast = 1.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue