From 91fb4f28ef5d87e8bcf7749928d30ba4a9cbbd34 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 19 Feb 2023 17:50:35 +0300 Subject: 2023-02-19 --- modules/nixos/default.nix | 2 + modules/nixos/emacs.nix | 2 +- modules/nixos/firefox/default.nix | 279 +++++++++++++++++++++++++++++ modules/nixos/firefox/userChrome.css | 210 ++++++++++++++++++++++ modules/nixos/firefox/userContent.css | 323 ++++++++++++++++++++++++++++++++++ modules/nixos/git/default.nix | 57 +----- modules/nixos/mpd.nix | 212 ++++++++++++++++++++++ modules/nixos/openssh.nix | 18 +- modules/nixos/profiles/headful.nix | 1 - 9 files changed, 1038 insertions(+), 66 deletions(-) create mode 100644 modules/nixos/firefox/default.nix create mode 100644 modules/nixos/firefox/userChrome.css create mode 100644 modules/nixos/firefox/userContent.css create mode 100644 modules/nixos/mpd.nix (limited to 'modules/nixos') diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 188a999..850d93e 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -12,6 +12,7 @@ _: { ./endlessh-go.nix ./endlessh.nix ./fail2ban.nix + ./firefox ./fonts.nix ./games ./git @@ -27,6 +28,7 @@ _: { ./lxc.nix ./matrix ./monitoring + ./mpd.nix ./nextcloud.nix ./nginx.nix ./node-exporter.nix diff --git a/modules/nixos/emacs.nix b/modules/nixos/emacs.nix index 2db8120..e348398 100644 --- a/modules/nixos/emacs.nix +++ b/modules/nixos/emacs.nix @@ -17,7 +17,7 @@ in { nixfiles.modules.x11.enable = true; hm = { - programs.doom-emacs.extraConfig = mkAfter '' + programs.emacs.extraConfig = mkAfter '' (appendq! auth-sources '("${config.secrets.authinfo.path}")) ''; diff --git a/modules/nixos/firefox/default.nix b/modules/nixos/firefox/default.nix new file mode 100644 index 0000000..7038773 --- /dev/null +++ b/modules/nixos/firefox/default.nix @@ -0,0 +1,279 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.nixfiles.modules.firefox; +in { + options.nixfiles.modules.firefox.enable = mkEnableOption "Firefox"; + + config = mkIf cfg.enable { + hm = { + imports = [inputs.arkenfox-nixos.hmModules.arkenfox]; + + home.packages = with pkgs; [profile-cleaner]; + + programs.firefox = { + enable = true; + + package = pkgs.firefox; + + arkenfox.enable = true; + + profiles.default = let + mkCssWithRoot = css: + mkMerge [ + (with config.colourScheme; '' + :root { + --black: ${black}; + --red: ${red}; + --green: ${green}; + --yellow: ${yellow}; + --blue: ${blue}; + --magenta: ${magenta}; + --cyan: ${cyan}; + --white: ${white}; + --bright-black: ${brightBlack}; + --bright-red: ${brightRed}; + --bright-green: ${brightGreen}; + --bright-yellow: ${brightYellow}; + --bright-blue: ${brightBlue}; + --bright-magenta: ${brightMagenta}; + --bright-cyan: ${brightCyan}; + --bright-white: ${brightWhite}; + --background: ${background}; + --foreground: ${foreground}; + '') + (with config.fontScheme; '' + --sans-serif-font-family: "${sansSerifFont.family}", "${sansSerifFontFallback.family}", sans-serif; + --sans-serif-font-size: ${toString sansSerifFont.size}px; + --serif-font-family: "${serifFont.family}", "${serifFontFallback.family}", serif; + --serif-font-size: ${toString serifFont.size}px; + --monospace-font-family: "${monospaceFont.family}", "${monospaceFontFallback.family}", monospace; + --monospace-font-size: ${toString monospaceFont.size}px; + } + '') + (builtins.readFile css) + ]; + in { + id = 0; + + isDefault = true; + + userChrome = mkCssWithRoot ./userChrome.css; + + userContent = mkCssWithRoot ./userContent.css; + + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + bitwarden + consent-o-matic + darkreader + localcdn + noscript + privacy-redirect + ublock-origin + violentmonkey + ]; + + # https://github.com/arkenfox/user.js/blob/master/user.js + arkenfox = { + enable = true; + "0000".enable = true; + "0100" = { + enable = true; + "0102" = { + enable = true; + "browser.startup.page" = { + enable = true; + value = 3; + }; + }; + }; + "0200".enable = true; + "0300".enable = true; + "0400" = { + enable = false; + "0401" = { + enable = true; + "browser.safebrowsing.malware.enabled" = { + enable = true; + value = false; + }; + "browser.safebrowsing.phishing.enabled" = { + enable = true; + value = false; + }; + }; + "0402" = { + enable = true; + "browser.safebrowsing.downloads.enabled" = { + enable = true; + value = false; + }; + }; + "0404" = { + enable = true; + "browser.safebrowsing.downloads.remote.block_potentially_unwanted" = { + enable = true; + value = false; + }; + "browser.safebrowsing.downloads.remote.block_uncommon" = { + enable = true; + value = false; + }; + }; + }; + "0600".enable = true; + "0700" = { + enable = true; + "0701" = { + enable = true; + "network.dns.disableIPv6" = { + enable = true; + value = false; + }; + }; + "0710" = { + enable = true; + "network.trr.mode" = { + enable = true; + value = 5; + }; + }; + }; + "0800" = { + enable = true; + "0801" = { + enable = true; + "keyword.enabled" = { + enable = true; + value = true; + }; + }; + "0808" = { + enable = true; + "browser.urlbar.suggest.engines" = { + enable = true; + value = false; + }; + }; + "0810" = { + enable = true; + "browser.formfill.enable" = { + enable = true; + value = true; + }; + }; + }; + "0900".enable = true; + "1000" = { + enable = true; + "1001"."browser.cache.disk.enable" = { + enable = true; + value = true; + }; + }; + "1200" = { + enable = true; + }; + "1700" = { + enable = false; + "1701" = { + enable = true; + "privacy.userContext.enabled" = { + enable = true; + value = false; + }; + "privacy.userContext.ui.enabled" = { + enable = true; + value = false; + }; + }; + "1702" = { + enable = true; + "privacy.userContext.newTabContainerOnLeftClick.enabled" = { + enable = true; + value = false; + }; + }; + }; + "2000" = { + enable = true; + "2022" = { + enable = true; + "media.eme.enabled" = { + enable = true; + value = false; + }; + "browser.eme.ui.enabled" = { + enable = true; + value = false; + }; + }; + }; + "2400".enable = false; + "2600" = { + enable = true; + "2615" = { + enable = true; + "permissions.default.shortcuts" = { + enable = true; + value = 2; + }; + }; + }; + "2700".enable = true; + "2800".enable = true; + }; + + settings = { + "app.update.auto" = false; + "browser.backspace_action" = 0; + "browser.bookmarks.max_backups" = 1; + "browser.disableResetPrompt" = true; + "browser.download.autohideButton" = false; + "browser.newtabpage.activity-stream.feeds.system.topsites" = false; + "browser.newtabpage.activity-stream.feeds.topsites" = false; + "browser.newtabpage.introShown" = true; + "browser.onboarding.enabled" = false; + "browser.search.update" = false; + "browser.startup.homepage_welcome_url" = ""; + "browser.startup.homepage_welcome_url.additional" = ""; + "browser.tabs.closeWindowWithLastTab" = true; + "browser.tabs.firefox-view" = false; + "browser.tabs.inTitlebar" = + if config.nixfiles.modules.kde.enable + then 1 + else 0; + "browser.tabs.warnOnClose" = false; + "browser.tabs.warnOnCloseOtherTabs" = false; + "browser.tabs.warnOnOpen" = false; + "browser.toolbars.bookmarks.visibility" = "never"; + "browser.urlbar.decodeURLsOnCopy" = true; + "browser.warnOnQuitShortcut" = false; + "extensions.pocket.enabled" = false; + "extensions.screenshots.disabled" = true; + "extensions.update.autoUpdateDefault" = false; + "extensions.update.enabled" = false; + "full-screen-api.warning.delay" = 0; + "full-screen-api.warning.timeout" = 0; + "general.autoScroll" = true; + "general.smoothScroll" = true; + "gfx.font_rendering.opentype_svg.enabled" = false; + "identity.fxaccounts.enabled" = false; + "media.autoplay.blocking_policy" = 2; + "media.autoplay.default" = 5; + "media.autoplay.enabled" = false; + "media.hardwaremediakeys.enabled" = false; + "reader.parse-on-load.enabled" = false; + "signon.rememberSignons" = false; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + }; + }; + }; + }; + }; +} diff --git a/modules/nixos/firefox/userChrome.css b/modules/nixos/firefox/userChrome.css new file mode 100644 index 0000000..58e450e --- /dev/null +++ b/modules/nixos/firefox/userChrome.css @@ -0,0 +1,210 @@ +@-moz-document url(chrome://browser/content/browser.xul), url(chrome://browser/content/browser.xhtml) +{ + /* :root { */ + /* /\* */ + /* * Helper colours. */ + /* *\/ */ + /* --background: var(--black) !important; */ + /* --foreground: var(--white) !important; */ + /* --background-alt: var(--bright-black) !important; */ + /* --foreground-alt: var(--bright-white) !important; */ + + /* /\* */ + /* * Various root values that can be redefined. */ + /* *\/ */ + /* --arrowpanel-border-radius: 0 !important; */ + /* --autocomplete-popup-highlight-background: var(--background) !important; */ + /* --autocomplete-popup-highlight-color: var(--foreground) !important; */ + /* --backbutton-background: transparent !important; */ + /* --backbutton-border-color: transparent !important; */ + /* --tab-block-margin: 0 !important; */ + /* --tab-border-radius: 0 !important; */ + /* --tabs-border-color: transparent !important; */ + /* --tabs-top-border-width: 0 !important; */ + /* --toolbar-field-focus-border-color: var(--background) !important; */ + /* --toolbar-non-lwt-bgcolor: var(--background) !important; */ + /* --toolbar-non-lwt-bgimage: none !important; */ + /* --toolbar-non-lwt-textcolor: var(--foreground) !important; */ + /* --toolbarbutton-border-radius: 0 !important; */ + /* } */ + + /* + *** + * Tabbar + *** + */ + + /* + * Apply colours and fonts. + */ + /* .tabbrowser-tab { */ + /* color: var(--background-alt) !important; */ + /* font-family: var(--sans-serif-font-family) !important; */ + /* font-size: var(--sans-serif-font-size) !important; */ + /* } */ + /* .tabbrowser-tab[visuallyselected="true"] { */ + /* background: var(--background) !important; */ + /* color: var(--foreground) !important; */ + /* } */ + + /* + * Not sure why is this shit even exists... + */ + .titlebar-spacer { + display: none !important; + } + + /* + * Disable borders and margins. + */ + #tabbrowser-tabs { + border-inline-start: 0 !important; + /* padding-inline-start: 0 !important; */ + margin-inline-start: 0 !important; + } + #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) + > #tabbrowser-arrowscrollbox + > .tabbrowser-tab[first-visible-unpinned-tab] { + margin-inline-start: none !important; + } + .tabbrowser-tab::after, + .tabbrowser-tab::before { + border: none !important; + } + + /* + * Make tabs backgroundless. + */ + /* .tab-background, */ + /* .tab-line { */ + /* display: none !important; */ + /* } */ + + /* + * Stretch tabs to the max by default. + */ + .tabbrowser-tab[fadein]:not([pinned="true"]) { + max-width: 100% !important; + } + + /* + * Fix favicon location. + */ + /* .tab-icon-image { */ + /* margin-inline-end: 10px !important; */ + /* margin-top: 0px !important; */ + /* } */ + + /* + * "C-t" exists. + */ + /* #tabs-newtab-button, */ + /* #TabsToolbar #new-tab-button { */ + /* display: none !important; */ + /* } */ + + /* + * "C-w" exists. + */ + .tab-close-button { + display: none !important; + } + + /* + *** + * Navbar & urlbar. + *** + */ + + /* + * Remove useless buttons. + */ + /* #forward-button, */ + /* #back-button, */ + /* #reload-button, */ + /* #stop-button { */ + /* display: none !important; */ + /* } */ + + /* + * Remove padding between urlbar and side elements. + */ + #customizableui-special-spring1, + #customizableui-special-spring2 { + display: none !important; + } + + /* #urlbar { */ + /* background: var(--background) !important; */ + /* color: var(--forground) !important; */ + /* font-family: var(--sans-serif-font-family) !important; */ + /* font-size: var(--sans-serif-font-size) !important; */ + /* border-color: transparent !important; */ + /* } */ + + /* #urlbar:not(:-moz-lwtheme):not([focused="true"]) > #urlbar-background, */ + /* #searchbar:not(:-moz-lwtheme):not(:focus-within) { */ + /* border: none !important; */ + /* } */ + + /* #urlbar *|*.textbox-input::-moz-placeholder { */ + /* color: transparent !important; */ + /* } */ + + /* .urlbar-icon:hover:not([disabled]), */ + /* .urlbar-icon-wrapper:hover:not([disabled]) { */ + /* background-color: var(--background-alt) !important; */ + /* } */ + + /* #urlbar-background { */ + /* background: transparent !important; */ + /* } */ + + /* .urlbarView-tags, */ + /* .urlbarView-url, */ + /* .urlbarView-title:not(:empty) ~ .urlbarView-action { */ + /* font-size: var(--sans-serif-font-size) !important; */ + /* } */ + + .urlbarView-row[label="Firefox Suggest"] { + margin-block-start: 0 !important; + } + .urlbarView-row[label="Firefox Suggest"]::before { + display: none !important; + } + + /* + *** + * Misc. + *** + */ + + /* + * Call indicator that some "designer" decided to make floating and + * impossible to hide. + */ + #webrtcIndicator { + display: none !important; + } + + /* + * Disable some context menu entries. + */ + #context-navigation { + display: none !important; + } + + /* + * Disable all animations. + */ + /* * { */ + /* transition: none !important; */ + /* } */ + + /* + * Remove dumb websites that Mozilla is forced to include. + */ + .search-one-offs { + display: none !important; + } +} diff --git a/modules/nixos/firefox/userContent.css b/modules/nixos/firefox/userContent.css new file mode 100644 index 0000000..2de8cde --- /dev/null +++ b/modules/nixos/firefox/userContent.css @@ -0,0 +1,323 @@ +@-moz-document media-document(all) { + body { + background-image: none !important; + background-color: var(--background) !important; + } +} + +@-moz-document regexp("about:(blank|home|newtab|privatebrowsing|welcome)") { + html, + body { + background: var(--background) !important; + } + + body { + display: none !important; + } +} + +@-moz-document regexp("https?://(www)?yandex\.(com|ru)/search/.*") +{ + #search-result-aside, + .RelatedAbove { + display: none !important; + } +} + +@-moz-document regexp("https?://music\.yandex\.ru.*") +{ + .bar-below.bar-below_plus, + .footer, + .notify, + .teaser { + display: none !important; + } +} + +@-moz-document regexp("https?://(.*.)?gitlab(\..*)?\.(com|org).*") +{ + body { + font-family: var(--sans-serif-font-family) !important; + font-size: var(--sans-serif-font-size) !important; + } + + code { + font-family: var(--monospace-font-family) !important; + font-size: var(--monospace-font-size) !important; + } +} + +@-moz-document regexp("https?://(.*\.)?github.com.*") +{ + #org-repo-pin-select-menu, + #sponsor-button, + .dropdown-divider, + .footer, + .octicon.octicon-info, + .pt-3.mt-3.d-none.d-md-block, /* Profile achievements. */ + .starring-container, + .user-following-container, + .user-profile-link, + .user-status-circle-badge-container, + .user-status-container, + a[href^="/account/choose?action=upgrade"], + a[href^="/codespaces"], + a[href^="/collections"], + a[href^="/events"], + a[href^="/explore"], + a[href^="/marketplace"], + a[href^="/organizations/enterprise"], + a[href^="/sponsors"], + a[href^="/topics"], + a[href^="/trending"] { + display: none !important; + } + + .application-main { + padding-bottom: 20px !important; + } + + .blob-num, + .blob-code-inner { + font-family: var(--monospace-font-family) !important; + font-size: var(--monospace-font-size) !important; + } +} + +@-moz-document regexp("https?://github.com/?") +{ + .application-main { + display: none !important; + } +} + +@-moz-document regexp("https?://.*(stack(exchange|overflow)|askubuntu|superuser|serverfault)\.com/questions/.*") +{ + html, + body { + --ff-mono: var(--monospace-font-family) !important; + --ff-sans: var(--sans-serif-font-family) !important; + --ff-serif: var(--serif-font-family) !important; + } + + #announcement-banner, + #footer, + #left-sidebar, + #noscript-warning, + #notify-container, + #post-form, + #sidebar, + .ai-start, + .bottom-notice, + .comment-user, + .d-flex.g4, + .d-flex.s-btn-group, + .js-add-link.comments-link, + .js-consent-banner, + .js-dismissable-hero, + .js-post-issue, + .js-show-link.comments-link, + .post-taglist, + .s-notice, + .s-topbar, + .site-header, + a.ws-nowrap { + display: none !important; + } + + #mainbar { + width: 100% !important; + } + + #content { + margin-top: -50px !important; + border-width: 0 0 0 0 !important; + } +} + +@-moz-document regexp("https?://kubernetes\.io/docs/.*") +{ + .announcement, + .announcement-main, + .d-none { + display: none !important; + } +} + +@-moz-document regexp("https?://min\.io/docs/.*") +{ + #cookie { + display: none !important; + } +} + +@-moz-document regexp("https?://werf\.io/documentation/.*") +{ + .guides-banner { + display: none !important; + } +} + +@-moz-document regexp("https?://habr\.com/(ru|en)/(article|company/.*/news|blog|post)/.*") +{ + .Vue-Toastification__container, + .tm-article-presenter__footer, + .tm-article-presenter__meta, + .tm-article-snippet__labels, + .tm-article-sticky-panel, + .tm-base-layout__header, + .tm-block.tm-block_spacing-bottom, + .tm-block_spacing-around, + .tm-comment-footer, + .tm-comment__header, + .tm-editoral-subscription, + .tm-footer, + .tm-footer-menu, + .tm-header, + .tm-notice, + .tm-page__header, + .tm-page__sidebar, + .tm-placeholder-inset, + .tm-placeholder-promo, + .tm-user-info, + vue-portal-target { + display: none !important; + } + + * { + transition: none !important; + } + + html, + body { + font-family: var(--sans-serif-font-family) !important; + font-size: var(--sans-serif-font-size) !important; + } + + #app { + height: auto !important; + } + + .tm-article-presenter__footer, + .tm-page__main_has-sidebar { + margin-left: auto !important; + margin-right: auto !important; + max-width: 100% !important; + } + + .tm-page { + padding: 0 !important; + } + + .tm-comment__buttons { + margin: 0 !important; + } + + html, + body { + font-family: var(--sans-serif-font-family) !important; + font-size: var(--sans-serif-font-size) !important; + } + + code { + font-family: var(--monospace-font-family) !important; + font-size: var(--monospace-font-size) !important; + } +} + +@-moz-document regexp("https?://jisho\.org.*") +{ + header, + footer { + display: none !important; + } +} + +@-moz-document regexp("https?:\/\/gog\.com.*") { + .galaxy-section-wrapper, + footer { + display: none !important; + } +} + +@-moz-document regexp("https?://steamdb\.info.*") +{ + #steamdb-extension-protip { + display: none !important; + } +} + +@-moz-document regexp("https?://(.*\.)?hh\.ru.*") +{ + .HH-Supernova-Footer, + .index-dashboard-applicant__banners, + .notification-manager, + .resume-sidebar-background, + .supernova-overlay { + display: none !important; + } +} + +@-moz-document regexp("https?://www\.songsterr\.com.*") +{ + #favorite, + #fullscreen, + #logo, + #menu-favorites, + #menu-help, + #menu-plus, + #menu-signin, + #menu-submit, + #promo, + #revisions, + #showroom, + #showroom_sidebar, + #text-showroom, + footer { + display: none !important; + } +} + +@-moz-document regexp("https?://developer\.mozilla\.org.*") +{ + #nav-footer, + .main-document-header-container.top-navigation, + .mdn-cta-container { + display: none !important; + } + + .sidebar { + --offset: default !important; + } + + html, + body { + font-family: var(--sans-serif-font-family) !important; + font-size: var(--sans-serif-font-size) !important; + } +} + +@-moz-document regexp("https?://(.*\.)?wikipedia\.org/wiki/.*") +{ + #footer, + #mp-topbanner, + #siteNotice, + #siteSub, + .mw-footer-container, + .mw-header, + .vector-page-toolbar { + display: none !important; + } + + html, + body { + font-family: var(--sans-serif-font-family) !important; + font-size: var(--sans-serif-font-size) !important; + } + + .k-player, + body.mediawiki, + #dialogEngineContainer #dialogEngineDialog { + background: inherit !important; + } +} diff --git a/modules/nixos/git/default.nix b/modules/nixos/git/default.nix index 86891ae..1bf63c7 100644 --- a/modules/nixos/git/default.nix +++ b/modules/nixos/git/default.nix @@ -20,7 +20,7 @@ in { package = mkOption { description = "Package."; type = types.package; - default = pkgs.cgit-pink; + default = pkgs.cgit; }; }; @@ -58,6 +58,8 @@ in { root-desc=Homo sum, humani a me nihil alienum puto. footer= + clone-url=https://${cfg.server.domain}/$CGIT_REPO_URL + logo=/cgit-custom-logo.gif favicon=/cgit-custom-favicon.gif css=/cgit-custom-style.css @@ -68,7 +70,6 @@ in { enable-git-config=1 enable-gitweb-owner=1 - enable-index-owner=0 remove-suffix=1 readme=:README @@ -106,63 +107,11 @@ in { pkgs.writeText "custom.css" '' @import url("cgit.css"); - form { - display: none; - } - div#cgit { - max-width: 157ch; - margin: auto; font-family: "${config.fontScheme.monospaceFont.family}", monospace; -moz-tab-size: 4; tab-size: 4; } - - div#cgit table#header td.sub { - border-top: none; - } - - div#cgit table#header td.sub.right { - padding-right: 1em; - } - - div#cgit table.tabs { - border-bottom: none; - } - - div#cgit div.content { - border-bottom: none; - } - - div#cgit table.list th a { - color: inherit; - } - - div#cgit table.list tr:nth-child(even) { - background: inherit; - } - - div#cgit table.list tr:hover { - background: inherit; - } - - div#cgit table.list tr.nohover-highlight:hover:nth-child(even) { - background: inherit; - } - - div#cgit table.blob td.linenumbers a:target { - color: goldenrod; - text-decoration: underline; - outline: none; - } - - div#cgit div#summary { - max-width: 80ch; - } - - div#cgit a.permalink { - color: inherit; - } ''; in '' alias ${css}; diff --git a/modules/nixos/mpd.nix b/modules/nixos/mpd.nix new file mode 100644 index 0000000..4b49213 --- /dev/null +++ b/modules/nixos/mpd.nix @@ -0,0 +1,212 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.nixfiles.modules.mpd; +in { + options.nixfiles.modules.mpd.enable = + mkEnableOption "Wether to enable MPD and its clients."; + + config = mkIf cfg.enable { + hm = { + home.packages = with pkgs; [mpc_cli]; + + services.mpd = { + enable = true; + musicDirectory = "${config.my.home}/music"; + extraConfig = '' + restore_paused "yes" + + auto_update "no" + + replaygain "album" + replaygain_preamp "0" + replaygain_limit "yes" + + volume_normalization "no" + + zeroconf_enabled "no" + + audio_output { + type "pipewire" + name "piepwire" + } + ''; + }; + + programs.ncmpcpp = { + enable = true; + + settings = rec { + ncmpcpp_directory = "${config.dirs.data}/ncmpcpp"; + lyrics_directory = "${ncmpcpp_directory}/lyrics"; + + playlist_disable_highlight_delay = 1; + message_delay_time = 1; + + song_window_title_format = "{%a - }{%t}|{%f}"; + song_list_format = "{$6%t}|{$2%f}$1 $R{$8%b}$1 {$5%a}"; + song_columns_list_format = "(20)[red]{a} (30)[cyan]{b} (50)[blue]{t|f}"; + song_status_format = "{{$8%a$9{ $b-$/b $6%b$9 {(%y)} } - } '{%t}}|{%f}'"; + song_library_format = "{%n - }{%t}|{%f}"; + + now_playing_prefix = "$b"; + now_playing_suffix = "$/b"; + + selected_item_prefix = "$0"; + selected_item_suffix = "$9"; + modified_item_prefix = "$3> $9"; + + browser_playlist_prefix = "$2playlist$9 "; + browser_sort_format = "{%a - }{%t}|{%f} {(%l)}"; + + playlist_show_mpd_host = false; + playlist_show_remaining_time = false; + playlist_shorten_total_times = false; + playlist_separate_albums = false; + + playlist_display_mode = "classic"; + browser_display_mode = "classic"; + search_engine_display_mode = "classic"; + playlist_editor_display_mode = "classic"; + + incremental_seeking = true; + seek_time = 1; + + volume_change_step = 5; + + autocenter_mode = true; + centered_cursor = true; + + progressbar_look = "=*-"; + + default_place_to_search_in = "database"; + search_engine_default_search_mode = 1; + data_fetching_delay = false; + media_library_primary_tag = "album_artist"; + browser_sort_mode = "name"; + default_find_mode = "wrapped"; + default_tag_editor_pattern = "%n - %t"; + empty_tag_marker = ""; + tags_separator = " | "; + tag_editor_extended_numeration = true; + media_library_sort_by_mtime = false; + regular_expressions = "none"; + block_search_constraints_change_if_items_found = true; + + ignore_leading_the = true; + + enable_window_title = false; + + header_visibility = false; + statusbar_visibility = false; + titles_visibility = false; + + display_volume_level = false; + display_bitrate = false; + display_remaining_time = false; + + cyclic_scrolling = true; + lines_scrolled = 1; + + follow_now_playing_lyrics = false; + fetch_lyrics_for_current_song_in_background = false; + store_lyrics_in_song_dir = false; + + generate_win32_compatible_filenames = false; + allow_for_physical_item_deletion = false; + show_hidden_files_in_local_browser = false; + + screen_switcher_mode = "playlist, browser"; + startup_screen = "playlist"; + startup_slave_screen = ""; + startup_slave_screen_focus = false; + locked_screen_width_part = 50; + ask_for_locked_screen_width_part = true; + + jump_to_now_playing_song_at_start = false; + + ask_before_clearing_playlists = false; + + clock_display_seconds = false; + + mouse_support = false; + + external_editor = "${config.programs.vim.package}/bin/vim"; + use_console_editor = true; + + colors_enabled = true; + discard_colors_if_item_is_selected = true; + + empty_tag_color = "cyan"; + header_window_color = "cyan"; + volume_color = "cyan"; + state_line_color = "cyan"; + state_flags_color = "green"; + main_window_color = "blue"; + color1 = "cyan"; + color2 = "red"; + progressbar_color = "cyan"; + progressbar_elapsed_color = "white"; + statusbar_color = "yellow"; + window_border_color = "green"; + active_window_border = "red"; + }; + + bindings = [ + { + key = "j"; + command = "scroll_down"; + } + { + key = "k"; + command = "scroll_up"; + } + { + key = "J"; + command = ["select_item" "scroll_down"]; + } + { + key = "K"; + command = ["select_item" "scroll_up"]; + } + { + key = "h"; + command = ["previous_column" "master_screen"]; + } + { + key = "l"; + command = ["next_column" "slave_screen"]; + } + { + key = "g"; + command = "move_home"; + } + { + key = "G"; + command = "move_end"; + } + { + key = "d"; + command = [ + "delete_playlist_items" + "delete_browser_items" + "delete_stored_playlist" + ]; + } + { + key = "L"; + command = "show_lyrics"; + } + { + key = "H"; + command = "toggle_lyrics_fetcher"; + } + ]; + }; + }; + }; +} diff --git a/modules/nixos/openssh.nix b/modules/nixos/openssh.nix index c7a144e..6f4614c 100644 --- a/modules/nixos/openssh.nix +++ b/modules/nixos/openssh.nix @@ -18,16 +18,14 @@ in { }; config = mkIf cfg.server.enable { - # FIXME This is mounted after the activation script is launched. - ark = { - files = [ - "/etc/ssh/ssh_host_ed25519_key" - "/etc/ssh/ssh_host_ed25519_key.pub" - "/etc/ssh/ssh_host_rsa_key" - "/etc/ssh/ssh_host_rsa_key.pub" - ]; - # directories = ["/etc/ssh/authorized_keys.d"]; - }; + # authorized_keys is not added here because it only contains my SSH keys and + # all non-declarative ones are located in the home directory. + ark.files = [ + "/etc/ssh/ssh_host_ed25519_key" + "/etc/ssh/ssh_host_ed25519_key.pub" + "/etc/ssh/ssh_host_rsa_key" + "/etc/ssh/ssh_host_rsa_key.pub" + ]; programs.mosh.enable = true; diff --git a/modules/nixos/profiles/headful.nix b/modules/nixos/profiles/headful.nix index ca604cb..ede921a 100644 --- a/modules/nixos/profiles/headful.nix +++ b/modules/nixos/profiles/headful.nix @@ -13,7 +13,6 @@ in { chromium.enable = true; firefox.enable = true; sound.enable = true; - x11.enable = true; dwm.enable = mkDefault false; kde.enable = mkDefault true; -- cgit 1.4.1