progress in multi user config
This commit is contained in:
parent
f7891e1f30
commit
3a2f52f45e
68 changed files with 384 additions and 663 deletions
21
modules/home/desktop/applications/communication.nix
Normal file
21
modules/home/desktop/applications/communication.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.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
|
||||
{
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) vesktop teamspeak_client;
|
||||
};
|
||||
};
|
||||
}
|
51
modules/home/desktop/applications/email.nix
Normal file
51
modules/home/desktop/applications/email.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ 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
|
||||
{
|
||||
# user.packages = attrValues {
|
||||
# inherit (pkgs) thunderbird;
|
||||
# };
|
||||
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home-manager.users.${user}.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
|
||||
{
|
||||
user.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
|
||||
{
|
||||
user.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;
|
||||
|
||||
user.packages = with pkgs; [
|
||||
obs-studio
|
||||
obs-studio-plugins.wlrobs
|
||||
obs-studio-plugins.obs-backgroundremoval
|
||||
obs-studio-plugins.obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
}
|
57
modules/home/desktop/applications/steam.nix
Normal file
57
modules/home/desktop/applications/steam.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{ options, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf mkForce mkMerge;
|
||||
|
||||
cfg = config.modules.${user}.desktop.applications.steam;
|
||||
desktop = config.modules.${user}.desktop;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.applications.steam = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
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"];
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
53
modules/home/desktop/browsers/chrome.nix
Normal file
53
modules/home/desktop/browsers/chrome.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ 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.chrome;
|
||||
in {
|
||||
options.modules.${user}.desktop.browsers.chrome = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.types) attrsOf oneOf bool int lines str;
|
||||
inherit (lib.my) mkOpt mkOpt';
|
||||
in {
|
||||
enable = mkEnableOption "Enable Chrome";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
(ungoogled-chromium.override {
|
||||
commandLineArgs = [
|
||||
"--enable-features=AcceleratedVideoEncoder"
|
||||
"--ignore-gpu-blocklist"
|
||||
"--enable-zero-copy"
|
||||
"--ozone-platform-hint=auto"
|
||||
"--password-store=basic"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.${user}.programs.chromium = {
|
||||
enable = true;
|
||||
enablePlasmaBrowserIntegration = true;
|
||||
extensions = [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # UBlock origin
|
||||
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # Dark reader
|
||||
"nngceckbapebfimnlniiiahkandclblb" # Bitwarden
|
||||
];
|
||||
defaultSearchProviderEnabled = true;
|
||||
defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}";
|
||||
extraOpts = {
|
||||
"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;
|
||||
};
|
||||
}
|
230
modules/home/desktop/browsers/firefox.nix
Normal file
230
modules/home/desktop/browsers/firefox.nix
Normal file
|
@ -0,0 +1,230 @@
|
|||
{ 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;
|
||||
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 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.desktop.type == "wayland") {
|
||||
environment.variables.MOZ_ENABLE_WAYLAND = "1";
|
||||
})
|
||||
|
||||
(mkIf cfg.enable {
|
||||
user.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"];
|
||||
})
|
||||
];
|
||||
|
||||
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" = "${config.user.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.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 {
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) librewolf;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
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.desktop.type == "wayland") {
|
||||
environment.variables.MOZ_ENABLE_WAYLAND = "1";
|
||||
})
|
||||
|
||||
(mkIf cfg.enable {
|
||||
user.packages = let
|
||||
inherit (pkgs) makeDesktopItem;
|
||||
inherit (inputs.zen.packages.${pkgs.system}.specific) zen;
|
||||
in [
|
||||
zen
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
17
modules/home/desktop/default.nix
Normal file
17
modules/home/desktop/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (builtins) isAttrs;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.my) anyAttrs countAttrs value;
|
||||
|
||||
cfg = config.modules.${user}.desktop;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop = let
|
||||
inherit (lib.types) either str;
|
||||
inherit (lib.my) mkOpt;
|
||||
in {
|
||||
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" ]);
|
||||
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") {
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) imagemagick editorconfig-core-c sqlite deno pandoc nuspell;
|
||||
inherit (pkgs.hunspellDicts) en_GB nl_NL;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
16
modules/home/desktop/editors/kate.nix
Normal file
16
modules/home/desktop/editors/kate.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
29
modules/home/desktop/editors/nano.nix
Normal file
29
modules/home/desktop/editors/nano.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ 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}.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 @@
|
|||
{ inputs, config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = options.modules.${user}.desktop.editors.nvim;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nvf.nixosModules.default
|
||||
];
|
||||
|
||||
options.modules.${user}.desktop.editors.nvim = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "neo-vim (nixvim)"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${user}.programs.nvf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim = {
|
||||
statusline.lualine.enable = true;
|
||||
telescope.enable = true;
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
|
||||
languages = {
|
||||
enableLSP = true;
|
||||
enableTreesitter = true;
|
||||
|
||||
nix.enable = true;
|
||||
ts.enable = true;
|
||||
rust.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
modules/home/desktop/editors/vscodium.nix
Normal file
19
modules/home/desktop/editors/vscodium.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.meta) getExe;
|
||||
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 {
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) vscodium;
|
||||
};
|
||||
};
|
||||
}
|
61
modules/home/desktop/editors/zed.nix
Normal file
61
modules/home/desktop/editors/zed.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ config, options, lib, pkgs, user, ... }: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
|
||||
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 {
|
||||
user.packages = with pkgs; [
|
||||
zed-editor
|
||||
];
|
||||
|
||||
home-manager.users.${user}.programs.zed-editor = {
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs; [ nixd nil alejandra ];
|
||||
extensions = ["nix" "toml" "html"];
|
||||
|
||||
userSettings = {
|
||||
assistant.enabled = false;
|
||||
|
||||
vim_mode = false;
|
||||
load_direnv = "shell_hook";
|
||||
base_keymap = "JetBrains";
|
||||
|
||||
tabs = {
|
||||
file_icons = true;
|
||||
git_status = true;
|
||||
};
|
||||
project_panel.auto_reveal_entries = false;
|
||||
|
||||
hour_format = "hour24";
|
||||
auto_update = false;
|
||||
|
||||
lsp = {
|
||||
nixd = {};
|
||||
nil = {
|
||||
initialization_options = {
|
||||
formatting = {
|
||||
command = ["alejandra" "--quiet" "--"];
|
||||
};
|
||||
};
|
||||
binary = {
|
||||
path_lookup = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
languages = {
|
||||
"Nix" = {
|
||||
language_servers = ["nixd" "nil"];
|
||||
format_on_save = "on";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
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
|
||||
# ];
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) modrinth-app prismlauncher;
|
||||
};
|
||||
};
|
||||
}
|
60
modules/home/desktop/plasma.nix
Normal file
60
modules/home/desktop/plasma.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkOption mkIf;
|
||||
|
||||
cfg = config.modules.${user}.desktop.plasma;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.desktop.plasma = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
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 {
|
||||
services = {
|
||||
desktopManager.plasma6.enable = true;
|
||||
|
||||
displayManager = {
|
||||
sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
autoLogin = mkIf cfg.autoLogin {
|
||||
enable = true;
|
||||
inherit user;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
konsole
|
||||
];
|
||||
|
||||
# should enable theme integration with gtk apps (i.e. firefox, thunderbird)
|
||||
home-manager.users.${user}.programs.dconf.enable = true;
|
||||
|
||||
home-manager.users.${user}.programs.plasma = {
|
||||
enable = true;
|
||||
|
||||
kwin = {
|
||||
edgeBarrier = 0;
|
||||
cornerBarrier = false;
|
||||
};
|
||||
|
||||
spectacle.shortcuts = {
|
||||
captureRectangularRegion = "Meta+Shift+S";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
52
modules/home/desktop/terminal/alacritty.nix
Normal file
52
modules/home/desktop/terminal/alacritty.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) toString;
|
||||
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.${user}.modules.desktop.terminal.alacritty.enable {
|
||||
modules.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;
|
||||
};
|
||||
|
||||
live_config_reload = true;
|
||||
|
||||
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:everforest,light:everforest";
|
||||
window-theme = "dark";
|
||||
background-opacity = 0.8;
|
||||
minimum-contrast = 1.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
16
modules/home/develop/default.nix
Normal file
16
modules/home/develop/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
in
|
||||
{
|
||||
options.modules.develop = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in
|
||||
{
|
||||
xdg.enable = mkEnableOption "XDG-related conf" // { default = true; };
|
||||
};
|
||||
|
||||
config = mkIf config.modules.develop.xdg.enable {
|
||||
|
||||
};
|
||||
}
|
18
modules/home/develop/dotnet.nix
Normal file
18
modules/home/develop/dotnet.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ inputs, config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) attrValues;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
in
|
||||
{
|
||||
options.modules.develop.dotnet = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption ".NET developmnt";
|
||||
};
|
||||
|
||||
config = mkIf config.modules.develop.dotnet.enable {
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) dotnet-sdk_8;
|
||||
};
|
||||
};
|
||||
}
|
28
modules/home/develop/js.nix
Normal file
28
modules/home/develop/js.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ inputs, config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) attrValues;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
in
|
||||
{
|
||||
options.modules.develop.js = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "JS developmnt";
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf config.modules.develop.js.enable {
|
||||
user.packages = with pkgs; [
|
||||
bun
|
||||
nodejs
|
||||
nodePackages_latest.typescript-language-server
|
||||
];
|
||||
|
||||
})
|
||||
|
||||
(mkIf config.modules.develop.xdg.enable {
|
||||
home = {
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
36
modules/home/develop/rust.nix
Normal file
36
modules/home/develop/rust.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ inputs, config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) attrValues;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
in
|
||||
{
|
||||
options.modules.develop.rust = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "Rust developmnt";
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
# (mkIf config.modules.develop.rust.enable {
|
||||
# # nixpkgs.overlays = [inputs.rust.overlays.default];
|
||||
#
|
||||
# user.packages = attrValues {
|
||||
# # rust-package = pkgs.rust-bin.stable.latest.default;
|
||||
# # inherit (pkgs) rust-analyzer rust-script;
|
||||
# };
|
||||
#
|
||||
# environment.shellAliases = {
|
||||
# rs = "rustc";
|
||||
# ca = "cargo";
|
||||
# };
|
||||
# })
|
||||
#
|
||||
# (mkIf config.modules.develop.xdg.enable {
|
||||
# home = {
|
||||
# sessionVariables.CARGO_HOME = "$XDG_DATA_HOME/cargo";
|
||||
# sessionPath = ["$CARGO_HOME/bin"];
|
||||
# };
|
||||
# })
|
||||
];
|
||||
}
|
57
modules/home/shell/default.nix
Normal file
57
modules/home/shell/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{ options, config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) attrValues;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
|
||||
cfg = config.modules.${user}.shell;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.shell = let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) nullOr enum;
|
||||
in {
|
||||
default = mkOption {
|
||||
type = nullOr (enum ["fish" "zsh" "xonsh"]);
|
||||
default = null;
|
||||
description = "Default system shell";
|
||||
};
|
||||
corePkgs.enable = mkEnableOption "core shell packages";
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf (cfg.default != null) {
|
||||
users.defaultUserShell = pkgs."${cfg.default}";
|
||||
|
||||
modules.shell.toolset.gnupg.enable = true;
|
||||
})
|
||||
|
||||
(mkIf cfg.corePkgs.enable {
|
||||
modules.shell.toolset = {
|
||||
btop.enable = true;
|
||||
fzf.enable = true;
|
||||
starship.enable = true;
|
||||
tmux.enable = true;
|
||||
};
|
||||
|
||||
home-manager.users.${user}.programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
config.whitelist.prefix = ["/home"];
|
||||
};
|
||||
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) any-nix-shell pwgen yt-dlp ripdrag yazi;
|
||||
inherit (pkgs) bat fd zoxide;
|
||||
|
||||
rgFull = pkgs.ripgrep.override {withPCRE2 = true;};
|
||||
};
|
||||
|
||||
home-manager.users.${user}.programs = {
|
||||
bat.enable = true;
|
||||
eza.enable = true;
|
||||
fzf.enable = true;
|
||||
zoxide.enable = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
92
modules/home/shell/toolset/btop.nix
Normal file
92
modules/home/shell/toolset/btop.nix
Normal file
|
@ -0,0 +1,92 @@
|
|||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.strings) concatStringsSep;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.shell.toolset.btop = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "system-monitor"; };
|
||||
|
||||
config = mkIf config.modules.${user}.shell.toolset.btop.enable {
|
||||
home-manager.users.${user}.programs.btop = let
|
||||
inherit (config.modules.themes) active;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
force_tty = false;
|
||||
vim_keys = true; # Directional keys: "h,j,k,l,g,G"
|
||||
update_ms = 1500; # ms (s^{-3})
|
||||
temp_scale = "celsius";
|
||||
base_10_sizes = false;
|
||||
show_cpu_freq = true;
|
||||
clock_format = "%H:%M";
|
||||
background_update = true;
|
||||
disks_filter = "exclude=/boot";
|
||||
|
||||
rounded_corners = true;
|
||||
theme_background = false;
|
||||
truecolor = true;
|
||||
presets = concatStringsSep "," [
|
||||
"cpu:1:default"
|
||||
"proc:0:default cpu:0:default"
|
||||
"mem:0:default"
|
||||
"net:0:default cpu:0:block"
|
||||
"net:0:tty"
|
||||
];
|
||||
graph_symbol = "braille";
|
||||
graph_symbol_cpu = "default";
|
||||
graph_symbol_mem = "default";
|
||||
graph_symbol_net = "default";
|
||||
graph_symbol_proc = "default";
|
||||
shown_boxes = "proc cpu mem net";
|
||||
|
||||
proc_sorting = "cpu lazy";
|
||||
proc_reversed = false;
|
||||
proc_tree = false;
|
||||
proc_colors = true;
|
||||
proc_gradient = true;
|
||||
proc_per_core = true;
|
||||
proc_mem_bytes = true;
|
||||
proc_info_smaps = false;
|
||||
proc_left = false;
|
||||
|
||||
cpu_graph_upper = "total";
|
||||
cpu_graph_lower = "total";
|
||||
cpu_single_graph = false;
|
||||
cpu_bottom = false;
|
||||
show_uptime = true;
|
||||
check_temp = true;
|
||||
cpu_sensor = "Auto";
|
||||
show_coretemp = true;
|
||||
cpu_core_map = "";
|
||||
custom_cpu_name = "";
|
||||
|
||||
mem_graphs = true;
|
||||
mem_below_net = false;
|
||||
|
||||
show_swap = true;
|
||||
swap_disk = true;
|
||||
show_disks = true;
|
||||
only_physical = true;
|
||||
use_fstab = false; # Enable -> disables `only_physical`
|
||||
disk_free_priv = false;
|
||||
show_io_stat = true;
|
||||
|
||||
io_mode = false;
|
||||
io_graph_combined = false;
|
||||
io_graph_speeds = "";
|
||||
|
||||
net_download = 100;
|
||||
net_upload = 100;
|
||||
net_auto = true;
|
||||
net_sync = false;
|
||||
net_iface = "br0";
|
||||
show_battery = true;
|
||||
selected_battery = "Auto";
|
||||
log_level = "DEBUG";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
34
modules/home/shell/toolset/fzf.nix
Normal file
34
modules/home/shell/toolset/fzf.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) optionalAttrs;
|
||||
inherit (lib.modules) mkIf;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.shell.toolset.fzf = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "TUI Fuzzy Finder."; };
|
||||
|
||||
config = mkIf config.modules.${user}.shell.toolset.fzf.enable {
|
||||
home-manager.users.${user}.programs.fzf = let
|
||||
defShell = config.modules.shell.default;
|
||||
in {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = defShell == "zsh";
|
||||
enableFishIntegration = defShell == "fish";
|
||||
|
||||
tmux.enableShellIntegration = true;
|
||||
tmux.shellIntegrationOptions = ["-d 40%"];
|
||||
|
||||
defaultCommand = "fd --type f";
|
||||
defaultOptions = ["--height 40%" "--border"];
|
||||
|
||||
changeDirWidgetCommand = "fd --type d";
|
||||
changeDirWidgetOptions = ["--preview 'tree -C {} | head -200'"];
|
||||
|
||||
fileWidgetCommand = "fd --type f";
|
||||
fileWidgetOptions = ["--preview 'head {}'"];
|
||||
historyWidgetOptions = ["--sort" "--exact"];
|
||||
};
|
||||
};
|
||||
}
|
117
modules/home/shell/toolset/git.nix
Normal file
117
modules/home/shell/toolset/git.nix
Normal file
|
@ -0,0 +1,117 @@
|
|||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
inherit (lib.attrsets) attrValues optionalAttrs;
|
||||
inherit (lib.modules) mkIf;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.shell.toolset.git = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "version-control system"; };
|
||||
|
||||
config = mkIf config.modules.${user}.shell.toolset.git.enable {
|
||||
user.packages = attrValues ({
|
||||
inherit (pkgs) act dura lazygit;
|
||||
inherit (pkgs.gitAndTools) gh git-open;
|
||||
}
|
||||
// optionalAttrs config.modules.shell.toolset.gnupg.enable {
|
||||
inherit (pkgs.gitAndTools) git-crypt;
|
||||
});
|
||||
|
||||
environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)";
|
||||
|
||||
home-manager.users.${user}.programs = {
|
||||
zsh.initExtra = ''
|
||||
# -------===[ Helpful Git Fn's ]===------- #
|
||||
gitignore() {
|
||||
curl -s -o .gitignore https://gitignore.io/api/$1
|
||||
}
|
||||
'';
|
||||
|
||||
fish.functions = {
|
||||
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
difftastic = {
|
||||
enable = true;
|
||||
background = "dark";
|
||||
color = "always";
|
||||
display = "inline";
|
||||
};
|
||||
|
||||
ignores = [
|
||||
# General:
|
||||
"*.bloop"
|
||||
"*.bsp"
|
||||
"*.metals"
|
||||
"*.metals.sbt"
|
||||
"*metals.sbt"
|
||||
"*.direnv"
|
||||
"*.envrc"
|
||||
"*hie.yaml"
|
||||
"*.mill-version"
|
||||
"*.jvmopts"
|
||||
|
||||
# OS-related:
|
||||
".DS_Store?"
|
||||
".DS_Store"
|
||||
".CFUserTextEncoding"
|
||||
".Trash"
|
||||
".Xauthority"
|
||||
"thumbs.db"
|
||||
"Thumbs.db"
|
||||
"Icon?"
|
||||
|
||||
# Compiled residues:
|
||||
"*.class"
|
||||
"*.exe"
|
||||
"*.o"
|
||||
"*.pyc"
|
||||
"*.elc"
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
core = {
|
||||
editor = "nvim";
|
||||
whitespace = "trailing-space,space-before-tab";
|
||||
};
|
||||
credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
|
||||
|
||||
user = {
|
||||
name = "Chris Kruining";
|
||||
email = "chris@kruining.eu";
|
||||
signingKey = readFile "${config.user.home}/.ssh/id_rsa.pub";
|
||||
};
|
||||
|
||||
gpg.format = "ssh";
|
||||
commit.gpgSign = true;
|
||||
tag.gpgSign = true;
|
||||
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
default = "current";
|
||||
gpgSign = "if-asked";
|
||||
autoSquash = true;
|
||||
};
|
||||
pull.rebase = true;
|
||||
|
||||
filter = {
|
||||
required = true;
|
||||
smudge = "git-lfs smudge -- %f";
|
||||
process = "git-lfs filter-process";
|
||||
clean = "git-lfs clean -- %f";
|
||||
};
|
||||
|
||||
url = {
|
||||
"https://github.com/".insteadOf = "gh:";
|
||||
"git@github.com:".insteadOf = "ssh+gh:";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
modules/home/shell/toolset/gnupg.nix
Normal file
31
modules/home/shell/toolset/gnupg.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (builtins) getEnv;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.${user}.shell.toolset.gnupg;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.shell.toolset.gnupg = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "cryptographic suite"; };
|
||||
|
||||
config = mkIf config.modules.shell.toolset.gnupg.enable {
|
||||
environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg";
|
||||
|
||||
home-manager.users.${user}.programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
|
||||
settings = let
|
||||
cacheTTL = 86400;
|
||||
in {
|
||||
default-cache-ttl = cacheTTL;
|
||||
default-cache-ttl-ssh = cacheTTL;
|
||||
max-cache-ttl = cacheTTL;
|
||||
max-cache-ttl-ssh = cacheTTL;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
85
modules/home/shell/toolset/starship.nix
Normal file
85
modules/home/shell/toolset/starship.nix
Normal file
|
@ -0,0 +1,85 @@
|
|||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.shell.toolset.starship = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "minimal shell ricing"; };
|
||||
|
||||
config = mkIf config.modules.${user}.shell.toolset.starship.enable {
|
||||
home-manager.users.${user}.programs.starship = {
|
||||
enable = true;
|
||||
settings = let
|
||||
inherit (config.lib.stylix.colors) cyan red magenta yellow green blue;
|
||||
in {
|
||||
scan_timeout = 10;
|
||||
add_newline = true;
|
||||
line_break.disabled = true;
|
||||
|
||||
format = "$username$hostname$nix_shell$git_branch$git_commit$git_state$git_status$directory$jobs$cmd_duration$character";
|
||||
username = {
|
||||
style_user = "${cyan} bold";
|
||||
style_root = "${red} bold";
|
||||
format = "[$user]($style) ";
|
||||
disabled = false;
|
||||
show_always = true;
|
||||
};
|
||||
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
ssh_symbol = "🌐 ";
|
||||
format = "on [$hostname](bold ${red}) ";
|
||||
trim_at = ".local";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
symbol = " ";
|
||||
format = "[$symbol$name]($style) ";
|
||||
style = "${magenta} bold";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
only_attached = true;
|
||||
format = "[$symbol$branch]($style) ";
|
||||
symbol = "שׂ";
|
||||
style = "${yellow} bold";
|
||||
};
|
||||
|
||||
git_commit = {
|
||||
only_detached = true;
|
||||
format = "[ﰖ$hash]($style) ";
|
||||
style = "${yellow} bold";
|
||||
};
|
||||
|
||||
git_state = {
|
||||
style = "${magenta} bold";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
style = "${green} bold";
|
||||
};
|
||||
|
||||
directory = {
|
||||
read_only = " ";
|
||||
truncation_length = 0;
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
format = "[$duration]($style) ";
|
||||
style = "${blue}";
|
||||
};
|
||||
|
||||
jobs = {
|
||||
style = "${green} bold";
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[\\$](${green}} bold)";
|
||||
error_symbol = "[\\$](${red} bold)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
103
modules/home/shell/toolset/tmux.nix
Normal file
103
modules/home/shell/toolset/tmux.nix
Normal file
|
@ -0,0 +1,103 @@
|
|||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
in
|
||||
{
|
||||
options.modules.${user}.shell.toolset.tmux = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "terminal multiplexer"; };
|
||||
|
||||
config = mkIf config.modules.${user}.shell.toolset.tmux.enable {
|
||||
home-manager.users.${user}.programs.tmux = {
|
||||
enable = true;
|
||||
secureSocket = true;
|
||||
keyMode = "vi";
|
||||
prefix = "C-a";
|
||||
terminal = "tmux-256color";
|
||||
|
||||
baseIndex = 1;
|
||||
clock24 = true;
|
||||
disableConfirmationPrompt = true;
|
||||
escapeTime = 0;
|
||||
|
||||
aggressiveResize = false;
|
||||
resizeAmount = 2;
|
||||
reverseSplit = false;
|
||||
historyLimit = 5000;
|
||||
newSession = true;
|
||||
|
||||
plugins = let
|
||||
inherit (pkgs.tmuxPlugins) resurrect continuum;
|
||||
in [
|
||||
{
|
||||
plugin = resurrect;
|
||||
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
||||
}
|
||||
{
|
||||
plugin = continuum;
|
||||
extraConfig = ''
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-save-interval '60' # minutes
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
# -------===[ Color Correction ]===------- #
|
||||
set-option -ga terminal-overrides ",*256col*:Tc"
|
||||
set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
||||
set-environment -g COLORTERM "truecolor"
|
||||
|
||||
# -------===[ General-Configurations ]===------- #
|
||||
set-option -g renumber-windows on
|
||||
set-window-option -g automatic-rename on
|
||||
set-window-option -g word-separators ' @"=()[]'
|
||||
|
||||
set-option -g mouse on
|
||||
set-option -s focus-events on
|
||||
set-option -g renumber-windows on
|
||||
set-option -g allow-rename off
|
||||
|
||||
# -------===[ Activity/Sound ]===------- #
|
||||
set-option -g bell-action none
|
||||
set-option -g visual-bell off
|
||||
set-option -g visual-silence off
|
||||
set-option -g visual-activity off
|
||||
set-window-option -g monitor-activity off
|
||||
|
||||
# -------===[ Status-Bar ]===------- #
|
||||
set-option -g status on
|
||||
set-option -g status-interval 1
|
||||
set-option -g status-style bg=default,bold,italics
|
||||
|
||||
set-option -g status-position top
|
||||
set-option -g status-justify left
|
||||
|
||||
set-option -g status-left-length "40"
|
||||
set-option -g status-right-length "80"
|
||||
|
||||
# -------===[ Keybindings ]===------- #
|
||||
bind-key c clock-mode
|
||||
|
||||
# Window Control(s):
|
||||
bind-key q kill-session
|
||||
bind-key Q kill-server
|
||||
bind-key t new-window -c '#{pane_current_path}'
|
||||
|
||||
# Buffers:
|
||||
bind-key b list-buffers
|
||||
bind-key p paste-buffer
|
||||
bind-key P choose-buffer
|
||||
|
||||
# Split bindings:
|
||||
bind-key - split-window -v -c '#{pane_current_path}'
|
||||
bind-key / split-window -h -c '#{pane_current_path}'
|
||||
|
||||
# Copy/Paste bindings:
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection -N "Start visual mode for selection"
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection -N "Yank text into buffer"
|
||||
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle -N "Yank region into buffer"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
99
modules/home/shell/zsh.nix
Normal file
99
modules/home/shell/zsh.nix
Normal file
|
@ -0,0 +1,99 @@
|
|||
{ config, options, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.strings) concatStrings escapeNixString;
|
||||
|
||||
cfg = config.modules.shell;
|
||||
in
|
||||
{
|
||||
config = mkIf (cfg.default == "zsh") {
|
||||
modules.shell = {
|
||||
corePkgs.enable = true;
|
||||
toolset = {
|
||||
starship.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.${user}.programs.starship.enableZshIntegration = true;
|
||||
|
||||
# Enable completion for sys-packages:
|
||||
environment.pathsToLink = ["/share/zsh"];
|
||||
|
||||
home-manager.users.${user}.programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "$XDG_CONFIG_HOME/zsh/history";
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = ["git" "docker-compose" "zoxide"];
|
||||
};
|
||||
|
||||
plugins = let
|
||||
mkZshPlugin = {
|
||||
pkg,
|
||||
file ? "${pkg.pname}.plugin.zsh",
|
||||
}: {
|
||||
name = pkg.pname;
|
||||
src = pkg.src;
|
||||
inherit file;
|
||||
};
|
||||
in
|
||||
with pkgs; [
|
||||
(mkZshPlugin {pkg = zsh-abbr;})
|
||||
(mkZshPlugin {pkg = zsh-autopair;})
|
||||
(mkZshPlugin {pkg = zsh-you-should-use;})
|
||||
(mkZshPlugin {
|
||||
pkg = zsh-nix-shell;
|
||||
file = "nix-shell.plugin.zsh";
|
||||
})
|
||||
|
||||
{
|
||||
name = "zsh-autosuggestion";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-autosuggestions";
|
||||
rev = "v0.7.0";
|
||||
sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-completions";
|
||||
rev = "0.34.0";
|
||||
sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.7.0";
|
||||
sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.${user}.xdg.configFile."zsh-abbreviations" = {
|
||||
target = "zsh/abbreviations";
|
||||
text = let
|
||||
abbrevs = import "${config.sneeuwvlok.configDir}/shell-abbr";
|
||||
in ''
|
||||
${concatStrings (mapAttrsToList
|
||||
(k: v: "abbr ${k}=${escapeNixString v}")
|
||||
abbrevs
|
||||
)}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
BIN
modules/home/themes/catppuccin-latte.jpg
Normal file
BIN
modules/home/themes/catppuccin-latte.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
75
modules/home/themes/default.nix
Normal file
75
modules/home/themes/default.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{ inputs, config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (builtins) getEnv map;
|
||||
inherit (lib.attrsets) attrValues mapAttrsToList;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.strings) concatStringsSep optionalString;
|
||||
|
||||
cfg = config.modules.${user}.themes;
|
||||
desktop = config.modules.${user}.desktop;
|
||||
in {
|
||||
imports = [
|
||||
inputs.stylix.nixosModules.stylix
|
||||
];
|
||||
|
||||
options.modules.${user}.themes = let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) nullOr enum;
|
||||
in {
|
||||
enable = mkEnableOption "Theming (Stylix)";
|
||||
|
||||
theme = mkOption {
|
||||
type = nullOr (enum [ "everforest" "catppuccin-latte" "chalk" ]);
|
||||
default = "everforest";
|
||||
description = "The theme to set the system to";
|
||||
example = "everforest";
|
||||
};
|
||||
|
||||
polarity = mkOption {
|
||||
type = nullOr (enum [ "dark" "light" ]);
|
||||
default = "dark";
|
||||
description = "determine if system is in dark or light mode";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
stylix = {
|
||||
enable = true;
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml";
|
||||
image = ./${cfg.theme}.jpg;
|
||||
polarity = cfg.polarity;
|
||||
|
||||
targets = {
|
||||
grub.enable = true;
|
||||
plymouth.enable = true;
|
||||
console.enable = true;
|
||||
nixos-icons.enable = true;
|
||||
qt.enable = true;
|
||||
};
|
||||
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Serif";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Sans";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Sans Mono";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
BIN
modules/home/themes/everforest.jpg
Normal file
BIN
modules/home/themes/everforest.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 183 KiB |
32
modules/home/xgd.nix
Normal file
32
modules/home/xgd.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, user, ... }:
|
||||
{
|
||||
home-manager.users.${user}.xdg.enable = true;
|
||||
|
||||
environment = {
|
||||
sessionVariables = {
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
XDG_BIN_HOME = "$HOME/.local/bin";
|
||||
};
|
||||
|
||||
variables = {
|
||||
__GL_SHADER_DISK_CACHE_PATH = "$XDG_CACHE_HOME/nv";
|
||||
ASPELL_CONF = ''
|
||||
per-conf $XDG_CONFIG_HOME/aspell/aspell.conf;
|
||||
personal $XDG_CONFIG_HOME/aspell/en_US.pws;
|
||||
repl $XDG_CONFIG_HOME/aspell/en.prepl;
|
||||
'';
|
||||
CUDA_CACHE_PATH = "$XDG_CACHE_HOME/nv";
|
||||
HISTFILE = "$XDG_DATA_HOME/bash/history";
|
||||
INPUTRC = "$XDG_CONFIG_HOME/readline/inputrc";
|
||||
LESSHISTFILE = "$XDG_CACHE_HOME/lesshst";
|
||||
WGETRC = "$XDG_CONFIG_HOME/wgetrc";
|
||||
};
|
||||
|
||||
extraInit = ''
|
||||
export XAUTHORITY=/tmp/Xauthority
|
||||
[ -e ~/.Xauthority ] && mv -f ~/.Xauthority "$XAUTHORITY"
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue