From b0214d50e9a728d77d98d791e92dfe3747f27e23 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Tue, 21 Feb 2023 22:34:46 +0100 Subject: factor out common home-manager configuration --- home/config/alacritty.nix | 22 - home/config/default.nix | 18 - home/config/direnv.nix | 34 -- home/config/dotfiles/background-image | Bin 581223 -> 0 bytes home/config/dotfiles/latexmkrc | 5 - home/config/dotfiles/rofi.rasi | 201 ------- home/config/dotfiles/spacemacs | 651 ----------------------- home/config/dotfiles/venv-manager.nix | 39 -- home/config/emacs.nix | 43 -- home/config/environment.nix | 67 --- home/config/firefox/default.nix | 164 ------ home/config/git.nix | 17 - home/config/i3/bar/.envrc | 1 - home/config/i3/bar/default.nix | 18 - home/config/i3/bar/i3status.go | 289 ---------- home/config/i3/bar/shell.nix | 4 - home/config/i3/default.nix | 40 -- home/config/i3/keybindings.nix | 49 -- home/config/i3/startup.nix | 24 - home/config/kdeconnect.nix | 8 - home/config/redshift.nix | 15 - home/config/rofi.nix | 10 - home/config/scripts/nixos-update-config | 6 - home/config/syncthing.nix | 5 - home/config/xsession.nix | 49 -- home/default.nix | 35 +- home/modules/default.nix | 5 - home/modules/wallpaper.nix | 17 - home/pkgs/barista/default.nix | 35 -- home/pkgs/default.nix | 13 - home/pkgs/firefoxPackages/.envrc | 1 - home/pkgs/firefoxPackages/addons.json | 16 - home/pkgs/firefoxPackages/addons.nix | 182 ------- home/pkgs/firefoxPackages/default.nix | 15 - home/pkgs/firefoxPackages/shell.nix | 9 - home/pkgs/fontMetadata/default.nix | 6 - home/pkgs/fontMetadata/fontawesome.nix | 17 - home/pkgs/fontMetadata/material-design-icons.nix | 18 - home/pkgs/gitignore/default.nix | 16 - home/pkgs/icons/default.nix | 15 - home/pkgs/icons/generate-package.sh | 11 - home/pkgs/icons/icons.txt | 3 - home/pkgs/lib/default.nix | 11 - home/pkgs/lockscreen/default.nix | 28 - 44 files changed, 10 insertions(+), 2222 deletions(-) delete mode 100644 home/config/alacritty.nix delete mode 100644 home/config/default.nix delete mode 100644 home/config/direnv.nix delete mode 100644 home/config/dotfiles/background-image delete mode 100644 home/config/dotfiles/latexmkrc delete mode 100644 home/config/dotfiles/rofi.rasi delete mode 100644 home/config/dotfiles/spacemacs delete mode 100644 home/config/dotfiles/venv-manager.nix delete mode 100644 home/config/emacs.nix delete mode 100644 home/config/environment.nix delete mode 100644 home/config/firefox/default.nix delete mode 100644 home/config/git.nix delete mode 100644 home/config/i3/bar/.envrc delete mode 100644 home/config/i3/bar/default.nix delete mode 100644 home/config/i3/bar/i3status.go delete mode 100644 home/config/i3/bar/shell.nix delete mode 100644 home/config/i3/default.nix delete mode 100644 home/config/i3/keybindings.nix delete mode 100644 home/config/i3/startup.nix delete mode 100644 home/config/kdeconnect.nix delete mode 100644 home/config/redshift.nix delete mode 100644 home/config/rofi.nix delete mode 100644 home/config/scripts/nixos-update-config delete mode 100644 home/config/syncthing.nix delete mode 100644 home/config/xsession.nix delete mode 100644 home/modules/default.nix delete mode 100644 home/modules/wallpaper.nix delete mode 100644 home/pkgs/barista/default.nix delete mode 100644 home/pkgs/default.nix delete mode 100644 home/pkgs/firefoxPackages/.envrc delete mode 100644 home/pkgs/firefoxPackages/addons.json delete mode 100644 home/pkgs/firefoxPackages/addons.nix delete mode 100644 home/pkgs/firefoxPackages/default.nix delete mode 100644 home/pkgs/firefoxPackages/shell.nix delete mode 100644 home/pkgs/fontMetadata/default.nix delete mode 100644 home/pkgs/fontMetadata/fontawesome.nix delete mode 100644 home/pkgs/fontMetadata/material-design-icons.nix delete mode 100644 home/pkgs/gitignore/default.nix delete mode 100644 home/pkgs/icons/default.nix delete mode 100755 home/pkgs/icons/generate-package.sh delete mode 100644 home/pkgs/icons/icons.txt delete mode 100644 home/pkgs/lib/default.nix delete mode 100644 home/pkgs/lockscreen/default.nix (limited to 'home') diff --git a/home/config/alacritty.nix b/home/config/alacritty.nix deleted file mode 100644 index 411fd44..0000000 --- a/home/config/alacritty.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ ... }: - -{ - programs.alacritty = { - enable = true; - - settings = { - window = { - padding = { - x = 10; - y = 10; - }; - dimensions = { - lines = 75; - columns = 100; - }; - }; - - font = { size = 8.0; }; - }; - }; -} diff --git a/home/config/default.nix b/home/config/default.nix deleted file mode 100644 index a69b3b6..0000000 --- a/home/config/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ ... }: - -{ - imports = [ - ./alacritty.nix - ./direnv.nix - ./environment.nix - ./emacs.nix - ./firefox - ./git.nix - ./i3 - ./kdeconnect.nix - ./redshift.nix - ./rofi.nix - ./syncthing.nix - ./xsession.nix - ]; -} diff --git a/home/config/direnv.nix b/home/config/direnv.nix deleted file mode 100644 index 7594ee5..0000000 --- a/home/config/direnv.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, lib, pkgs, ... }: - -let cfg = config.programs.direnv; -in { - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; - - systemd.user = lib.mkIf cfg.enable - (pkgs.personal.lib.serviceWithTimer "direnv-clean-update" { - Unit = { - Description = - "Remove old virtual environments and update the current ones"; - After = [ "network-online.target" ]; - }; - Service = { - Type = "oneshot"; - ExecSearchPath = "${pkgs.coreutils}/bin:${pkgs.findutils}/bin:${pkgs.direnv}/bin:/bin/sh"; - WorkingDirectory = "${config.home.homeDirectory}"; - ExecStart = '' - find -type d -name .direnv \ - -execdir /bin/sh -c "rm -f .direnv/{nix,flake}-profile*" \; \ - -execdir direnv exec . true \; - ''; - }; - Timer = { - Persistent = true; - OnCalendar = "daily"; - }; - Install = { WantedBy = [ "default.target " ]; }; - }); -} - diff --git a/home/config/dotfiles/background-image b/home/config/dotfiles/background-image deleted file mode 100644 index 4288f3e..0000000 Binary files a/home/config/dotfiles/background-image and /dev/null differ diff --git a/home/config/dotfiles/latexmkrc b/home/config/dotfiles/latexmkrc deleted file mode 100644 index 788ceb7..0000000 --- a/home/config/dotfiles/latexmkrc +++ /dev/null @@ -1,5 +0,0 @@ -$clean_ext = 'bbl nav prv_%R.fmt prv_%R.log prv/*/* prv/* prv run.xml snm vrb'; - -$ENV{'TZ'}='Europe/Paris'; - -$pdf_previewer = 'evince %O %S 2>&1 | grep -v Gtk-WARNING | grep . 1>&2'; \ No newline at end of file diff --git a/home/config/dotfiles/rofi.rasi b/home/config/dotfiles/rofi.rasi deleted file mode 100644 index 375b28b..0000000 --- a/home/config/dotfiles/rofi.rasi +++ /dev/null @@ -1,201 +0,0 @@ -/** - * rofi -dump-theme output. - * Rofi version: 1.7.0 - **/ -* { - alternate-urgent-background: var(lightbg); - alternate-active-foreground: var(blue); - selected-active-background: var(actbg); - selected-urgent-foreground: var(background-color); - hide-scrollbar: "true"; - padding: 0; - normal-foreground: var(text-color); - text-color: rgba ( 178, 174, 168, 100 % ); - line-padding: 2; - background: rgba ( 253, 246, 227, 100 % ); - line-margin: 2; - alternate-normal-foreground: var(foreground); - urgent-foreground: var(text-color); - active-background: var(selbg); - selected-normal-background: var(actbg); - blue: rgba ( 38, 139, 210, 100 % ); - selected-urgent-background: var(urgbg); - selected-active-foreground: var(winbg); - separator-style: "none"; - separatorcolor: var(foreground); - urgbg: rgba ( 229, 57, 53, 100 % ); - lightfg: rgba ( 88, 104, 117, 100 % ); - alternate-active-background: var(lightbg); - selbg: rgba ( 57, 73, 163, 100 % ); - spacing: 2; - winbg: rgba ( 179, 190, 255, 100 % ); - actbg: rgba ( 38, 38, 38, 100 % ); - alternate-urgent-foreground: var(red); - margin: 0; - lightbg: rgba ( 238, 232, 213, 100 % ); - red: rgba ( 220, 50, 47, 100 % ); - background-color: rgba ( 0, 0, 0, 0 % ); - normal-background: var(background-color); - border-color: var(foreground); - foreground: rgba ( 0, 43, 54, 100 % ); - alternate-normal-background: var(lightbg); - urgent-background: var(background-color); - selected-normal-foreground: var(winbg); - active-foreground: var(text-color); -} -element { - padding: 10px ; - cursor: pointer; - spacing: 5px ; - border: 0; -} -element normal.normal { - background-color: var(normal-background); - text-color: var(normal-foreground); -} -element normal.urgent { - background-color: var(urgent-background); - text-color: var(urgent-foreground); -} -element normal.active { - background-color: var(active-background); - text-color: var(active-foreground); -} -element selected.normal { - background-color: var(selected-normal-background); - border-color: var(active-background); - text-color: var(selected-normal-foreground); - border: 0px 5px 0px 0px ; -} -element selected.urgent { - background-color: var(selected-urgent-background); - text-color: var(selected-urgent-foreground); -} -element selected.active { - background-color: var(selected-active-background); - text-color: var(selected-active-foreground); -} -element alternate.normal { - background-color: var(normal-background); - text-color: var(normal-foreground); -} -element alternate.urgent { - background-color: var(urgent-background); - text-color: var(urgent-foreground); -} -element alternate.active { - background-color: var(active-background); - text-color: var(active-foreground); -} -element-text { - background-color: rgba ( 0, 0, 0, 0 % ); - cursor: inherit; - highlight: inherit; - text-color: inherit; -} -element-icon { - background-color: rgba ( 0, 0, 0, 0 % ); - size: 1.0000em ; - cursor: inherit; - text-color: inherit; -} -window { - transparency: "real"; - padding: 5; - width: 10.0000em ; - orientation: horizontal; - location: west; - children: [ mainbox ]; - background-color: rgba ( 0, 0, 0, 100 % ); - height: 100.0000% ; - anchor: west; - border: 1; -} -mainbox { - padding: 0; - spacing: 0.8000em ; - border: 0; - children: [ entry,listview ]; -} -message { - padding: 1px ; - border-color: var(separatorcolor); - border: 2px dash 0px 0px ; -} -textbox { - text-color: var(foreground); -} -listview { - fixed-height: 0; - padding: 2px 0px 0px ; - scrollbar: true; - cycle: false; - dynamic: false; - border-color: var(separatorcolor); - border: 2px dash 0px 0px ; - spacing: 0; -} -scrollbar { - width: 4px ; - padding: 0; - handle-width: 8px ; - border: 0; - handle-color: var(normal-foreground); -} -sidebar { - border-color: var(separatorcolor); - border: 2px dash 0px 0px ; -} -button { - padding: 5px 2px ; - cursor: pointer; - spacing: 0; - text-color: var(normal-foreground); -} -button selected { - background-color: var(active-background); - text-color: var(background-color); -} -num-filtered-rows { - expand: false; - text-color: rgba ( 128, 128, 128, 100 % ); -} -num-rows { - expand: false; - text-color: rgba ( 128, 128, 128, 100 % ); -} -textbox-num-sep { - expand: false; - str: "/"; - text-color: rgba ( 128, 128, 128, 100 % ); -} -inputbar { - padding: 5px ; - spacing: 5px ; - text-color: var(normal-foreground); - children: [ prompt,textbox-prompt-colon,entry,num-filtered-rows,textbox-num-sep,num-rows,case-indicator ]; -} -case-indicator { - spacing: 0; - text-color: var(normal-foreground); -} -entry { - text-color: var(normal-foreground); - cursor: text; - padding: 5px ; - placeholder-color: rgba ( 128, 128, 128, 100 % ); - vertical-align: 1; - expand: false; - spacing: 0; - placeholder: "Type to filter"; -} -prompt { - spacing: 0; - text-color: var(normal-foreground); -} -textbox-prompt-colon { - margin: 0px 0.3000em 0.0000em 0.0000em ; - expand: false; - str: ":"; - text-color: inherit; -} diff --git a/home/config/dotfiles/spacemacs b/home/config/dotfiles/spacemacs deleted file mode 100644 index bd80241..0000000 --- a/home/config/dotfiles/spacemacs +++ /dev/null @@ -1,651 +0,0 @@ -;; -*- mode: emacs-lisp; lexical-binding: t -*- -;; This file is loaded by Spacemacs at startup. -;; It must be stored in your home directory. - -(defun dotspacemacs/layers () - "Layer configuration: -This function should only modify configuration layer settings." - (setq-default - ;; Base distribution to use. This is a layer contained in the directory - ;; `+distribution'. For now available distributions are `spacemacs-base' - ;; or `spacemacs'. (default 'spacemacs) - dotspacemacs-distribution 'spacemacs - - ;; Lazy installation of layers (i.e. layers are installed only when a file - ;; with a supported type is opened). Possible values are `all', `unused' - ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers - ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will - ;; lazy install any layer that support lazy installation even the layers - ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy - ;; installation feature and you have to explicitly list a layer in the - ;; variable `dotspacemacs-configuration-layers' to install it. - ;; (default 'unused) - dotspacemacs-enable-lazy-installation 'unused - - ;; If non-nil then Spacemacs will ask for confirmation before installing - ;; a layer lazily. (default t) - dotspacemacs-ask-for-lazy-installation t - - ;; List of additional paths where to look for configuration layers. - ;; Paths must have a trailing slash (i.e. `~/.mycontribs/') - dotspacemacs-configuration-layer-path '() - - ;; List of configuration layers to load. - dotspacemacs-configuration-layers - '( - ;; ---------------------------------------------------------------- - ;; Example of useful layers you may want to use right away. - ;; Uncomment some layer names and press `SPC f e R' (Vim style) or - ;; `M-m f e R' (Emacs style) to install them. - ;; ---------------------------------------------------------------- - auto-completion - better-defaults - ;; eww - git - helm - multiple-cursors - ;; (shell :variables - ;; shell-default-height 30 - ;; shell-default-position 'bottom) - ;; spell-checking - ;; syntax-checking - version-control - treemacs - ;; ---------------------------------------------------------------- - ;; Programming (and markup) languages - ;; ---------------------------------------------------------------- - lsp - csv - emacs-lisp spacemacs-misc - go - haskell - html javascript - latex - markdown - nixos - org - ocaml coq - php - python - rust - yaml - ;; ---------------------------------------------------------------- - ;; Private layers - ;; ---------------------------------------------------------------- - direnv - bibli-paris - why3 - ) - - ;; List of additional packages that will be installed without being wrapped - ;; in a layer (generally the packages are installed only and should still be - ;; loaded using load/require/use-package in the user-config section below in - ;; this file). If you need some configuration for these packages, then - ;; consider creating a layer. You can also put the configuration in - ;; `dotspacemacs/user-config'. To use a local version of a package, use the - ;; `:location' property: '(your-package :location "~/path/to/your-package/") - ;; Also include the dependencies as they will not be resolved automatically. - dotspacemacs-additional-packages '(request-deferred parse-csv) - - ;; A list of packages that cannot be updated. - dotspacemacs-frozen-packages '() - - ;; A list of packages that will not be installed and loaded. - dotspacemacs-excluded-packages '() - - ;; Defines the behaviour of Spacemacs when installing packages. - ;; Possible values are `used-only', `used-but-keep-unused' and `all'. - ;; `used-only' installs only explicitly used packages and deletes any unused - ;; packages as well as their unused dependencies. `used-but-keep-unused' - ;; installs only the used packages but won't delete unused ones. `all' - ;; installs *all* packages supported by Spacemacs and never uninstalls them. - ;; (default is `used-only') - dotspacemacs-install-packages 'used-but-keep-unused)) - -(defun dotspacemacs/init () - "Initialization: -This function is called at the very beginning of Spacemacs startup, -before layer configuration. -It should only modify the values of Spacemacs settings." - ;; This setq-default sexp is an exhaustive list of all the supported - ;; spacemacs settings. - (setq-default - ;; If non-nil then enable support for the portable dumper. You'll need to - ;; compile Emacs 27 from source following the instructions in file - ;; EXPERIMENTAL.org at to root of the git repository. - ;; - ;; WARNING: pdumper does not work with Native Compilation, so it's disabled - ;; regardless of the following setting when native compilation is in effect. - ;; - ;; (default nil) - dotspacemacs-enable-emacs-pdumper nil - - ;; Name of executable file pointing to emacs 27+. This executable must be - ;; in your PATH. - ;; (default "emacs") - dotspacemacs-emacs-pdumper-executable-file "emacs" - - ;; Name of the Spacemacs dump file. This is the file will be created by the - ;; portable dumper in the cache directory under dumps sub-directory. - ;; To load it when starting Emacs add the parameter `--dump-file' - ;; when invoking Emacs 27.1 executable on the command line, for instance: - ;; ./emacs --dump-file=$HOME/.emacs.d/.cache/dumps/spacemacs-27.1.pdmp - ;; (default (format "spacemacs-%s.pdmp" emacs-version)) - dotspacemacs-emacs-dumper-dump-file (format "spacemacs-%s.pdmp" emacs-version) - - ;; If non-nil ELPA repositories are contacted via HTTPS whenever it's - ;; possible. Set it to nil if you have no way to use HTTPS in your - ;; environment, otherwise it is strongly recommended to let it set to t. - ;; This variable has no effect if Emacs is launched with the parameter - ;; `--insecure' which forces the value of this variable to nil. - ;; (default t) - dotspacemacs-elpa-https t - - ;; Maximum allowed time in seconds to contact an ELPA repository. - ;; (default 5) - dotspacemacs-elpa-timeout 5 - - ;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes. - ;; This is an advanced option and should not be changed unless you suspect - ;; performance issues due to garbage collection operations. - ;; (default '(100000000 0.1)) - dotspacemacs-gc-cons '(100000000 0.1) - - ;; Set `read-process-output-max' when startup finishes. - ;; This defines how much data is read from a foreign process. - ;; Setting this >= 1 MB should increase performance for lsp servers - ;; in emacs 27. - ;; (default (* 1024 1024)) - dotspacemacs-read-process-output-max (* 1024 1024) - - ;; If non-nil then Spacelpa repository is the primary source to install - ;; a locked version of packages. If nil then Spacemacs will install the - ;; latest version of packages from MELPA. Spacelpa is currently in - ;; experimental state please use only for testing purposes. - ;; (default nil) - dotspacemacs-use-spacelpa nil - - ;; If non-nil then verify the signature for downloaded Spacelpa archives. - ;; (default t) - dotspacemacs-verify-spacelpa-archives t - - ;; If non-nil then spacemacs will check for updates at startup - ;; when the current branch is not `develop'. Note that checking for - ;; new versions works via git commands, thus it calls GitHub services - ;; whenever you start Emacs. (default nil) - dotspacemacs-check-for-update nil - - ;; If non-nil, a form that evaluates to a package directory. For example, to - ;; use different package directories for different Emacs versions, set this - ;; to `emacs-version'. (default 'emacs-version) - dotspacemacs-elpa-subdirectory 'emacs-version - - ;; One of `vim', `emacs' or `hybrid'. - ;; `hybrid' is like `vim' except that `insert state' is replaced by the - ;; `hybrid state' with `emacs' key bindings. The value can also be a list - ;; with `:variables' keyword (similar to layers). Check the editing styles - ;; section of the documentation for details on available variables. - ;; (default 'vim) - dotspacemacs-editing-style 'vim - - ;; If non-nil show the version string in the Spacemacs buffer. It will - ;; appear as (spacemacs version)@(emacs version) - ;; (default t) - dotspacemacs-startup-buffer-show-version t - - ;; Specify the startup banner. Default value is `official', it displays - ;; the official spacemacs logo. An integer value is the index of text - ;; banner, `random' chooses a random text banner in `core/banners' - ;; directory. A string value must be a path to an image format supported - ;; by your Emacs build. - ;; If the value is nil then no banner is displayed. (default 'official) - dotspacemacs-startup-banner 'official - - ;; Scale factor controls the scaling (size) of the startup banner. Default - ;; value is `auto' for scaling the logo automatically to fit all buffer - ;; contents, to a maximum of the full image height and a minimum of 3 line - ;; heights. If set to a number (int or float) it is used as a constant - ;; scaling factor for the default logo size. - dotspacemacs-startup-banner-scale 'auto - - ;; List of items to show in startup buffer or an association list of - ;; the form `(list-type . list-size)`. If nil then it is disabled. - ;; Possible values for list-type are: - ;; `recents' `recents-by-project' `bookmarks' `projects' `agenda' `todos'. - ;; List sizes may be nil, in which case - ;; `spacemacs-buffer-startup-lists-length' takes effect. - ;; The exceptional case is `recents-by-project', where list-type must be a - ;; pair of numbers, e.g. `(recents-by-project . (7 . 5))', where the first - ;; number is the project limit and the second the limit on the recent files - ;; within a project. - dotspacemacs-startup-lists '((recents . 5) - (projects . 7)) - - ;; True if the home buffer should respond to resize events. (default t) - dotspacemacs-startup-buffer-responsive t - - ;; Show numbers before the startup list lines. (default t) - dotspacemacs-show-startup-list-numbers t - - ;; The minimum delay in seconds between number key presses. (default 0.4) - dotspacemacs-startup-buffer-multi-digit-delay 0.4 - - ;; If non-nil, show file icons for entries and headings on Spacemacs home buffer. - ;; This has no effect in terminal or if "all-the-icons" package or the font - ;; is not installed. (default nil) - dotspacemacs-startup-buffer-show-icons nil - - ;; Default major mode for a new empty buffer. Possible values are mode - ;; names such as `text-mode'; and `nil' to use Fundamental mode. - ;; (default `text-mode') - dotspacemacs-new-empty-buffer-major-mode 'text-mode - - ;; Default major mode of the scratch buffer (default `text-mode') - dotspacemacs-scratch-mode 'text-mode - - ;; If non-nil, *scratch* buffer will be persistent. Things you write down in - ;; *scratch* buffer will be saved and restored automatically. - dotspacemacs-scratch-buffer-persistent nil - - ;; If non-nil, `kill-buffer' on *scratch* buffer - ;; will bury it instead of killing. - dotspacemacs-scratch-buffer-unkillable nil - - ;; Initial message in the scratch buffer, such as "Welcome to Spacemacs!" - ;; (default nil) - dotspacemacs-initial-scratch-message nil - - ;; List of themes, the first of the list is loaded when spacemacs starts. - ;; Press `SPC T n' to cycle to the next theme in the list (works great - ;; with 2 themes variants, one dark and one light) - dotspacemacs-themes '(spacemacs-dark - spacemacs-light) - - ;; Set the theme for the Spaceline. Supported themes are `spacemacs', - ;; `all-the-icons', `custom', `doom', `vim-powerline' and `vanilla'. The - ;; first three are spaceline themes. `doom' is the doom-emacs mode-line. - ;; `vanilla' is default Emacs mode-line. `custom' is a user defined themes, - ;; refer to the DOCUMENTATION.org for more info on how to create your own - ;; spaceline theme. Value can be a symbol or list with additional properties. - ;; (default '(spacemacs :separator wave :separator-scale 1.5)) - dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.5) - - ;; If non-nil the cursor color matches the state color in GUI Emacs. - ;; (default t) - dotspacemacs-colorize-cursor-according-to-state t - - ;; Default font or prioritized list of fonts. The `:size' can be specified as - ;; a non-negative integer (pixel size), or a floating-point (point size). - ;; Point size is recommended, because it's device independent. (default 10.0) - dotspacemacs-default-font '("Source Code Pro" - :size 14.0 - :weight normal - :width normal) - - ;; The leader key (default "SPC") - dotspacemacs-leader-key "SPC" - - ;; The key used for Emacs commands `M-x' (after pressing on the leader key). - ;; (default "SPC") - dotspacemacs-emacs-command-key "SPC" - - ;; The key used for Vim Ex commands (default ":") - dotspacemacs-ex-command-key ":" - - ;; The leader key accessible in `emacs state' and `insert state' - ;; (default "M-m") - dotspacemacs-emacs-leader-key "M-m" - - ;; Major mode leader key is a shortcut key which is the equivalent of - ;; pressing ` m`. Set it to `nil` to disable it. (default ",") - dotspacemacs-major-mode-leader-key "," - - ;; Major mode leader key accessible in `emacs state' and `insert state'. - ;; (default "C-M-m" for terminal mode, "" for GUI mode). - ;; Thus M-RET should work as leader key in both GUI and terminal modes. - ;; C-M-m also should work in terminal mode, but not in GUI mode. - dotspacemacs-major-mode-emacs-leader-key (if window-system "" "C-M-m") - - ;; These variables control whether separate commands are bound in the GUI to - ;; the key pairs `C-i', `TAB' and `C-m', `RET'. - ;; Setting it to a non-nil value, allows for separate commands under `C-i' - ;; and TAB or `C-m' and `RET'. - ;; In the terminal, these pairs are generally indistinguishable, so this only - ;; works in the GUI. (default nil) - dotspacemacs-distinguish-gui-tab nil - - ;; Name of the default layout (default "Default") - dotspacemacs-default-layout-name "Default" - - ;; If non-nil the default layout name is displayed in the mode-line. - ;; (default nil) - dotspacemacs-display-default-layout nil - - ;; If non-nil then the last auto saved layouts are resumed automatically upon - ;; start. (default nil) - dotspacemacs-auto-resume-layouts nil - - ;; If non-nil, auto-generate layout name when creating new layouts. Only has - ;; effect when using the "jump to layout by number" commands. (default nil) - dotspacemacs-auto-generate-layout-names nil - - ;; Size (in MB) above which spacemacs will prompt to open the large file - ;; literally to avoid performance issues. Opening a file literally means that - ;; no major mode or minor modes are active. (default is 1) - dotspacemacs-large-file-size 1 - - ;; Location where to auto-save files. Possible values are `original' to - ;; auto-save the file in-place, `cache' to auto-save the file to another - ;; file stored in the cache directory and `nil' to disable auto-saving. - ;; (default 'cache) - dotspacemacs-auto-save-file-location 'cache - - ;; Maximum number of rollback slots to keep in the cache. (default 5) - dotspacemacs-max-rollback-slots 5 - - ;; If non-nil, the paste transient-state is enabled. While enabled, after you - ;; paste something, pressing `C-j' and `C-k' several times cycles through the - ;; elements in the `kill-ring'. (default nil) - dotspacemacs-enable-paste-transient-state nil - - ;; Which-key delay in seconds. The which-key buffer is the popup listing - ;; the commands bound to the current keystroke sequence. (default 0.4) - dotspacemacs-which-key-delay 0.4 - - ;; Which-key frame position. Possible values are `right', `bottom' and - ;; `right-then-bottom'. right-then-bottom tries to display the frame to the - ;; right; if there is insufficient space it displays it at the bottom. - ;; (default 'bottom) - dotspacemacs-which-key-position 'bottom - - ;; Control where `switch-to-buffer' displays the buffer. If nil, - ;; `switch-to-buffer' displays the buffer in the current window even if - ;; another same-purpose window is available. If non-nil, `switch-to-buffer' - ;; displays the buffer in a same-purpose window even if the buffer can be - ;; displayed in the current window. (default nil) - dotspacemacs-switch-to-buffer-prefers-purpose nil - - ;; If non-nil a progress bar is displayed when spacemacs is loading. This - ;; may increase the boot time on some systems and emacs builds, set it to - ;; nil to boost the loading time. (default t) - dotspacemacs-loading-progress-bar t - - ;; If non-nil the frame is fullscreen when Emacs starts up. (default nil) - ;; (Emacs 24.4+ only) - dotspacemacs-fullscreen-at-startup nil - - ;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen. - ;; Use to disable fullscreen animations in OSX. (default nil) - dotspacemacs-fullscreen-use-non-native nil - - ;; If non-nil the frame is maximized when Emacs starts up. - ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil. - ;; (default nil) (Emacs 24.4+ only) - dotspacemacs-maximized-at-startup nil - - ;; If non-nil the frame is undecorated when Emacs starts up. Combine this - ;; variable with `dotspacemacs-maximized-at-startup' to obtain fullscreen - ;; without external boxes. Also disables the internal border. (default nil) - dotspacemacs-undecorated-at-startup nil - - ;; A value from the range (0..100), in increasing opacity, which describes - ;; the transparency level of a frame when it's active or selected. - ;; Transparency can be toggled through `toggle-transparency'. (default 90) - dotspacemacs-active-transparency 90 - - ;; A value from the range (0..100), in increasing opacity, which describes - ;; the transparency level of a frame when it's inactive or deselected. - ;; Transparency can be toggled through `toggle-transparency'. (default 90) - dotspacemacs-inactive-transparency 90 - - ;; A value from the range (0..100), in increasing opacity, which describes the - ;; transparency level of a frame background when it's active or selected. Transparency - ;; can be toggled through `toggle-background-transparency'. (default 90) - dotspacemacs-background-transparency 90 - - ;; If non-nil show the titles of transient states. (default t) - dotspacemacs-show-transient-state-title t - - ;; If non-nil show the color guide hint for transient state keys. (default t) - dotspacemacs-show-transient-state-color-guide t - - ;; If non-nil unicode symbols are displayed in the mode line. - ;; If you use Emacs as a daemon and wants unicode characters only in GUI set - ;; the value to quoted `display-graphic-p'. (default t) - dotspacemacs-mode-line-unicode-symbols t - - ;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth - ;; scrolling overrides the default behavior of Emacs which recenters point - ;; when it reaches the top or bottom of the screen. (default t) - dotspacemacs-smooth-scrolling t - - ;; Show the scroll bar while scrolling. The auto hide time can be configured - ;; by setting this variable to a number. (default t) - dotspacemacs-scroll-bar-while-scrolling t - - ;; Control line numbers activation. - ;; If set to `t', `relative' or `visual' then line numbers are enabled in all - ;; `prog-mode' and `text-mode' derivatives. If set to `relative', line - ;; numbers are relative. If set to `visual', line numbers are also relative, - ;; but only visual lines are counted. For example, folded lines will not be - ;; counted and wrapped lines are counted as multiple lines. - ;; This variable can also be set to a property list for finer control: - ;; '(:relative nil - ;; :visual nil - ;; :disabled-for-modes dired-mode - ;; doc-view-mode - ;; markdown-mode - ;; org-mode - ;; pdf-view-mode - ;; text-mode - ;; :size-limit-kb 1000) - ;; When used in a plist, `visual' takes precedence over `relative'. - ;; (default nil) - dotspacemacs-line-numbers nil - - ;; Code folding method. Possible values are `evil', `origami' and `vimish'. - ;; (default 'evil) - dotspacemacs-folding-method 'evil - - ;; If non-nil and `dotspacemacs-activate-smartparens-mode' is also non-nil, - ;; `smartparens-strict-mode' will be enabled in programming modes. - ;; (default nil) - dotspacemacs-smartparens-strict-mode nil - - ;; If non-nil smartparens-mode will be enabled in programming modes. - ;; (default t) - dotspacemacs-activate-smartparens-mode t - - ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes - ;; over any automatically added closing parenthesis, bracket, quote, etc... - ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil) - dotspacemacs-smart-closing-parenthesis nil - - ;; Select a scope to highlight delimiters. Possible values are `any', - ;; `current', `all' or `nil'. Default is `all' (highlight any scope and - ;; emphasis the current one). (default 'all) - dotspacemacs-highlight-delimiters 'all - - ;; If non-nil, start an Emacs server if one is not already running. - ;; (default nil) - dotspacemacs-enable-server nil - - ;; Set the emacs server socket location. - ;; If nil, uses whatever the Emacs default is, otherwise a directory path - ;; like \"~/.emacs.d/server\". It has no effect if - ;; `dotspacemacs-enable-server' is nil. - ;; (default nil) - dotspacemacs-server-socket-dir nil - - ;; If non-nil, advise quit functions to keep server open when quitting. - ;; (default nil) - dotspacemacs-persistent-server nil - - ;; List of search tool executable names. Spacemacs uses the first installed - ;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'. - ;; (default '("rg" "ag" "pt" "ack" "grep")) - dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep") - - ;; Format specification for setting the frame title. - ;; %a - the `abbreviated-file-name', or `buffer-name' - ;; %t - `projectile-project-name' - ;; %I - `invocation-name' - ;; %S - `system-name' - ;; %U - contents of $USER - ;; %b - buffer name - ;; %f - visited file name - ;; %F - frame name - ;; %s - process status - ;; %p - percent of buffer above top of window, or Top, Bot or All - ;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All - ;; %m - mode name - ;; %n - Narrow if appropriate - ;; %z - mnemonics of buffer, terminal, and keyboard coding systems - ;; %Z - like %z, but including the end-of-line format - ;; If nil then Spacemacs uses default `frame-title-format' to avoid - ;; performance issues, instead of calculating the frame title by - ;; `spacemacs/title-prepare' all the time. - ;; (default "%I@%S") - dotspacemacs-frame-title-format "%I@%S" - - ;; Format specification for setting the icon title format - ;; (default nil - same as frame-title-format) - dotspacemacs-icon-title-format nil - - ;; Color highlight trailing whitespace in all prog-mode and text-mode derived - ;; modes such as c++-mode, python-mode, emacs-lisp, html-mode, rst-mode etc. - ;; (default t) - dotspacemacs-show-trailing-whitespace t - - ;; Delete whitespace while saving buffer. Possible values are `all' - ;; to aggressively delete empty line and long sequences of whitespace, - ;; `trailing' to delete only the whitespace at end of lines, `changed' to - ;; delete only whitespace for changed lines or `nil' to disable cleanup. - ;; (default nil) - dotspacemacs-whitespace-cleanup nil - - ;; If non-nil activate `clean-aindent-mode' which tries to correct - ;; virtual indentation of simple modes. This can interfere with mode specific - ;; indent handling like has been reported for `go-mode'. - ;; If it does deactivate it here. - ;; (default t) - dotspacemacs-use-clean-aindent-mode t - - ;; Accept SPC as y for prompts if non-nil. (default nil) - dotspacemacs-use-SPC-as-y nil - - ;; If non-nil shift your number row to match the entered keyboard layout - ;; (only in insert state). Currently supported keyboard layouts are: - ;; `qwerty-us', `qwertz-de' and `querty-ca-fr'. - ;; New layouts can be added in `spacemacs-editing' layer. - ;; (default nil) - dotspacemacs-swap-number-row nil - - ;; Either nil or a number of seconds. If non-nil zone out after the specified - ;; number of seconds. (default nil) - dotspacemacs-zone-out-when-idle nil - - ;; Run `spacemacs/prettify-org-buffer' when - ;; visiting README.org files of Spacemacs. - ;; (default nil) - dotspacemacs-pretty-docs nil - - ;; If nil the home buffer shows the full path of agenda items - ;; and todos. If non-nil only the file name is shown. - dotspacemacs-home-shorten-agenda-source nil - - ;; If non-nil then byte-compile some of Spacemacs files. - dotspacemacs-byte-compile nil)) - -(defun dotspacemacs/user-env () - "Environment variables setup. -This function defines the environment variables for your Emacs session. By -default it calls `spacemacs/load-spacemacs-env' which loads the environment -variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'. -See the header of this file for more information." - (spacemacs/load-spacemacs-env) -) - -(defun dotspacemacs/user-init () - "Initialization for user code: -This function is called immediately after `dotspacemacs/init', before layer -configuration. -It is mostly for variables that should be set before packages are loaded. -If you are unsure, try setting them in `dotspacemacs/user-config' first." -) - - -(defun dotspacemacs/user-load () - "Library to load while dumping. -This function is called only while dumping Spacemacs configuration. You can -`require' or `load' the libraries of your choice that will be included in the -dump." -) - - -(defun dotspacemacs/user-config () - "Configuration for user code: -This function is called at the very end of Spacemacs startup, after layer -configuration. -Put your configuration code here, except for variables that should be set -before packages are loaded." - ;; Variables customization - (custom-set-variables - '(merlin-command "ocamlmerlin") - - ;; reftex - ;; https://tex.stackexchange.com/a/54825 - '(reftex-bibliography-commands '("bibliography" - "nobibliography" - "addbibresource")) - ;; https://tex.stackexchange.com/a/213909 - '(reftex-use-external-file-finders t) - - ;; don't pop warning buffer on native comp - '(native-comp-async-report-warnings-errors 'silent) - - ;; restrict which warnings are shown - '(warning-minimum-level :emergency) - ) - - ;; auto-completion - (global-company-mode t) - - ;; hooks - (add-hook 'LaTeX-mode-hook 'outline-minor-mode) - - ;; Key bindings - (defun my-ediff-dotfile-and-template () - (interactive) - (ediff-files "~/code/nix/latitude-7490/home/config/dotfiles/spacemacs" - (concat dotspacemacs-template-directory ".spacemacs.template"))) - (spacemacs/set-leader-keys "feD" 'my-ediff-dotfile-and-template) - (defun my-open-dotfile () - (interactive) - (find-file "~/code/nix/latitude-7490/home/config/dotfiles/spacemacs")) - (spacemacs/set-leader-keys "fed" 'my-open-dotfile) - - (spacemacs/set-leader-keys-for-major-mode 'magit-mode "b" 'magit-branch) -) - -;; Do not write anything past this comment. This is where Emacs will -;; auto-generate custom variable definitions. -(defun dotspacemacs/emacs-custom-settings () - "Emacs custom settings. -This is an auto-generated function, do not modify its content directly, use -Emacs customize menu instead. -This function is called at the very end of Spacemacs initialization." -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(package-selected-packages - '(yapfify utop tuareg caml sphinx-doc pytest pyenv-mode py-isort poetry pippel pipenv pyvenv pip-requirements ocp-indent ocamlformat merlin-eldoc live-py-mode importmagic epc ctable concurrent deferred helm-pydoc flycheck-ocaml merlin dune cython-mode company-reftex company-math math-symbol-lists company-auctex company-anaconda blacken auctex anaconda-mode pythonic yasnippet-snippets unfill treemacs-magit smeargle orgit-forge orgit org-rich-yank org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download org-cliplink org-brain nix-mode mwim mmm-mode markdown-toc magit-svn magit-section magit-gitflow magit-popup htmlize helm-org-rifle helm-nixos-options helm-gitignore helm-git-grep helm-company helm-c-yasnippet gnuplot gitignore-templates gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ fringe-helper git-gutter+ gh-md fuzzy forge markdown-mode magit ghub closql emacsql-sqlite emacsql treepy git-commit with-editor transient flyspell-correct-helm flyspell-correct flycheck-pos-tip pos-tip evil-org company-nixos-options nixos-options company browse-at-remote auto-yasnippet yasnippet auto-dictionary ac-ispell auto-complete ws-butler writeroom-mode visual-fill-column winum volatile-highlights vi-tilde-fringe uuidgen undo-tree treemacs-projectile treemacs-persp treemacs-icons-dired treemacs-evil treemacs cfrs ht pfuture posframe toc-org symon symbol-overlay string-inflection string-edit spaceline-all-the-icons memoize all-the-icons spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode password-generator paradox spinner overseer org-superstar open-junk-file nameless multi-line shut-up macrostep lorem-ipsum link-hint indent-guide hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-xref helm-themes helm-swoop helm-purpose window-purpose imenu-list helm-projectile helm-org helm-mode-manager helm-make helm-ls-git helm-flx helm-descbinds helm-ag google-translate golden-ratio flycheck-package package-lint flycheck flycheck-elsa flx-ido flx fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired f evil-tutor evil-textobj-line evil-surround evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-escape evil-ediff evil-easymotion evil-collection annalist evil-cleverparens smartparens evil-args evil-anzu anzu eval-sexp-fu emr iedit clang-format projectile paredit list-utils pkg-info epl elisp-slime-nav editorconfig dumb-jump s drag-stuff dired-quick-sort devdocs define-word dash column-enforce-mode clean-aindent-mode centered-cursor-mode auto-highlight-symbol auto-compile packed aggressive-indent ace-window ace-link ace-jump-helm-line helm avy helm-core popup which-key use-package pcre2el org-plus-contrib hydra lv hybrid-mode font-lock+ evil goto-chg dotenv-mode diminish bind-map bind-key async))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) -) diff --git a/home/config/dotfiles/venv-manager.nix b/home/config/dotfiles/venv-manager.nix deleted file mode 100644 index 248cb0c..0000000 --- a/home/config/dotfiles/venv-manager.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - direnv.enable = lib.mkDefault true; - - haskell = { spacemacs.enable = lib.mkDefault true; }; - - latex = { - packages = tl: { - inherit (tl) - scheme-basic # scheme - koma-script ragged2e everysel footmisc # koma - ; - }; - latexmk = { - enable = lib.mkDefault true; - output.pdf.enable = lib.mkDefault true; - rc = - lib.optional (lib.pathExists ~/.config/latexmkrc) ~/.config/latexmkrc; - }; - }; - - nix.enable = lib.mkDefault true; - - ocaml.tuareg.enable = lib.mkDefault true; - - coq.coq = pkgs.coq_8_15; - # pkgs.coq_8_15.override { buildIde = false; }; - - why3 = { - defaultEditor = "emacsclient -c"; - extraConfig = lib.optionalString config.coq.enable '' - [prover] - editor = "" - name = "Coq" - version = "8.15+rc1" - ''; - }; -} diff --git a/home/config/emacs.nix b/home/config/emacs.nix deleted file mode 100644 index 4bb1143..0000000 --- a/home/config/emacs.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.programs.emacs; - spacemacs-update-script = pkgs.writeShellScript "spacemacs-update" '' - ${pkgs.git}/bin/git pull - ${cfg.package}/bin/emacsclient --eval '(configuration-layer/update-packages "no-confirmation")' - ''; -in { - programs.emacs = { - enable = true; - package = - pkgs.emacsWithPackages (ep: with ep; [ emacsql-sqlite emacsql-sqlite3 ]); - }; - services.emacs = { - enable = true; - client.enable = true; - }; - - home.packages = with pkgs; [ gnutar ]; - - home.file.".spacemacs.d/init.el".source = ./dotfiles/spacemacs; - - systemd.user = lib.mkIf cfg.enable - (pkgs.personal.lib.serviceWithTimer "spacemacs-update" { - Unit = { - Description = "Update Spacemacs by pulling the develop branch"; - After = [ "network-online.target" "emacs.service" ]; - }; - Service = { - Type = "oneshot"; - WorkingDirectory = "${config.home.homeDirectory}/.emacs.d/"; - ExecStart = "${spacemacs-update-script}"; - }; - Timer = { - Persistent = true; - OnCalendar = "daily"; - }; - Install = { - WantedBy = [ "default.target" ]; - }; - }); -} diff --git a/home/config/environment.nix b/home/config/environment.nix deleted file mode 100644 index 77d00e5..0000000 --- a/home/config/environment.nix +++ /dev/null @@ -1,67 +0,0 @@ -{ config, pkgs, ... }: - -{ - home.packages = with pkgs; - [ - # Various - evince - gimp - gnupg - keepassxc - coreutils - moreutils - pavucontrol - transmission-gtk - vlc - zotero - ] ++ [ - # Social - signal-desktop - thunderbird - ] ++ [ - # Fonts - material-design-icons - roboto - source-code-pro - ] ++ [ - # Programming languages - python3Full - ]; - - home.wallpaper = ./dotfiles/background-image; - - programs.bash = { - enable = true; - shellAliases = let - nix-code-path = "~/code/nix"; - venv-manager-path = "~/.config/venv-manager"; - in { - amimullvad = "curl -Ls https://am.i.mullvad.net/connected"; - nixos-update-config = import ./scripts/nixos-update-config nix-code-path; - rm = "rm -f"; - ssh = "TERM=xterm-256color ssh"; - mkenv = '' - cp ${venv-manager-path}/shell-template.nix ./shell.nix ; - echo "use_nix" >> .envrc ; - direnv allow ; - $EDITOR shell.nix ; - ''; - fftmp = "firefox --profile $(mktemp -d)"; - edit = "$EDITOR"; - }; - sessionVariables = { - CDPATH = "~"; - EDITOR = "emacsclient -c"; - BROWSER = "firefox"; - }; - }; - - services.gpg-agent = { - enable = true; - enableSshSupport = true; - }; - - home.file.".config/latexmkrc".source = ./dotfiles/latexmkrc; - home.file.".config/venv-manager/config/default.nix".source = - ./dotfiles/venv-manager.nix; -} diff --git a/home/config/firefox/default.nix b/home/config/firefox/default.nix deleted file mode 100644 index e849df3..0000000 --- a/home/config/firefox/default.nix +++ /dev/null @@ -1,164 +0,0 @@ -{ pkgs, lib, config, fetchurl, stdenv, ... }: - -with lib; -let - mkUserJs = prefs: '' - ${concatStrings (mapAttrsToList (name: value: '' - user_pref("${name}", ${builtins.toJSON value}); - '') prefs)} - ''; - config-template = - builtins.readFile "${pkgs.personal.firefoxPackages.arkenfox-userjs}"; - config-default = config-template + mkUserJs { - "keyword.enabled" = true; # 0801 - "signon.rememberSignons" = false; # 0901 - "security.nocertdb" = true; # 1222 - "media.peerconnection.enabled" = false; # 2001 - "media.peerconnection.ice.no_host" = true; # 2004 - "dom.allow_cut_copy" = true; # 2404 - "dom.battery.enabled" = false; # 2502 - "permissions.default.xr" = 2; # 2521 - "privacy.clearOnShutdown.siteSettings" = true; # 2811 - - # Personal - ## Warnings - "browser.tabs.warnOnClose" = false; - "browser.tabs.warnOnCloseOtherTabs" = false; - ## Updates - "app.update.auto" = false; - "browser.search.update" = false; - ## Appearance - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - ## Content behavior - "clipboard.autocopy" = false; - ## UX behavior - "browser.quitShortcut.disabled" = true; - "browser.tabs.closeWindowWithLastTab" = false; - ## UX features - "extensions.pocket.enabled" = false; - "identity.fxaccounts.enabled" = false; - }; - - userchrome-treestyletabs = '' - /* Hide main tabs toolbar */ - #TabsToolbar { - visibility: collapse; - } - /* Sidebar min and max width removal */ - #sidebar { - max-width: none !important; - min-width: 0px !important; - } - /* Hide sidebar header, when using Tree Style Tab. */ - #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { - visibility: collapse; - } - ''; - extensions = attrValues pkgs.personal.firefoxPackages.addons; - -in { - programs.firefox = { - enable = true; - - # to add : - # floccus + LoFloccus - # Zotero - - profiles = { - default = { - inherit extensions; - id = 0; # isDefault = true - - extraConfig = config-default; - userChrome = userchrome-treestyletabs; - }; - - # For video streaming - streaming = { - inherit extensions; - id = 1; - - extraConfig = config-default + mkUserJs { - # Widevine (DRMs) - "media.gmp-widevinecdm.enabled" = true; - "media.eme.enabled" = true; - # Cache - "browser.cache.disk.enable" = true; - "browser.cache.offline.storage" = true; - # Privacy - "privacy.clearOnShutdown.cache" = false; - "privacy.clearOnShutdown.cookies" = false; - "privacy.clearOnShutdown.siteSettings" = false; - "privacy.clearOnShutdown.offlineApps" = false; - "privacy.resistFingerprinting" = false; # Netflix is whining - }; - userChrome = userchrome-treestyletabs; - }; - - videoconferencing = { - inherit extensions; - id = 2; - - extraConfig = config-default + mkUserJs { - # IMPORTANT: uncheck "Prevent WebRTC from leaking local IP addresses" in uBlock Origin's settings - # NOTE: if using RFP (4501) - # some sites, e.g. Zoom, need a canvas site exception [Right Click>View Page Info>Permissions] - # Discord video does not work: it thinks you are FF78: use a separate profile or spoof the user agent - "media.peerconnection.enabled" = true; - "media.peerconnection.ice.no_host" = - false; # may or may not be required - "webgl.disabled" = false; # required for Zoom - "webgl.min_capability_mode" = false; - "media.getusermedia.screensharing.enabled" = true; # optional - "media.autoplay.blocking_policy" = - 0; # optional (otherwise add site exceptions) - "javascript.options.wasm" = - true; # optional (some platforms may require this) - "dom.webaudio.enabled" = true; - }; - userChrome = userchrome-treestyletabs; - }; - }; - }; - - xdg.desktopEntries = let - icons = pkgs.personal.icons; - firefox-profiles-dir = "${config.home.homeDirectory}/.mozilla/firefox"; - firefoxInProfile = profile: - '' - ${pkgs.firefox}/bin/firefox --profile "${firefox-profiles-dir}/${profile}"''; - in { - netflix = { - name = "Netflix"; - genericName = "Streaming service"; - icon = "${icons.netflix}"; - comment = "Unlimited movies, TV shows, and more."; - exec = - "${firefoxInProfile "streaming"} https://www.netflix.com/fr-en/login"; - categories = [ "AudioVideo" "Video" "Player" ]; - }; - mubi = { - name = "MUBI"; - genericName = "Streaming service"; - icon = "${icons.mubi}"; - comment = "Watch hand-picked cinema."; - exec = "${firefoxInProfile "streaming"} https://mubi.com"; - categories = [ "AudioVideo" "Video" "Player" ]; - }; - deezer = { - name = "Deezer"; - genericName = "Streaming service"; - icon = "${icons.deezer}"; - comment = "Listen to music online"; - exec = "${firefoxInProfile "streaming"} https://deezer.com/login"; - categories = [ "AudioVideo" "Audio" "Player" "Music" ]; - }; - videoconferences = { - name = "Video Conferences"; - genericName = "Video conference"; - comment = "Use video conferencing software in a browser."; - exec = "${firefoxInProfile "videoconferencing"}"; - categories = [ "Network" "VideoConference" ]; - }; - }; -} diff --git a/home/config/git.nix b/home/config/git.nix deleted file mode 100644 index 6515e97..0000000 --- a/home/config/git.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ pkgs, ... }: - -{ - programs.git = { - enable = true; - - userName = "Quentin Aristote"; - userEmail = "quentin@aristote.fr"; - - ignores = (builtins.map builtins.readFile - (with pkgs.personal.gitignore; [ emacs linux direnv ])) ++ [ - ### Personal rules ### - "shell.nix" - ".nix-gc-roots" - ]; - }; -} diff --git a/home/config/i3/bar/.envrc b/home/config/i3/bar/.envrc deleted file mode 100644 index 4a4726a..0000000 --- a/home/config/i3/bar/.envrc +++ /dev/null @@ -1 +0,0 @@ -use_nix diff --git a/home/config/i3/bar/default.nix b/home/config/i3/bar/default.nix deleted file mode 100644 index e43095f..0000000 --- a/home/config/i3/bar/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ pkgs, ... }: - -let - statusPackage = - pkgs.personal.barista.override { i3statusGo = ./i3status.go; }; -in { - xsession.windowManager.i3.config.bars = [{ - statusCommand = "${statusPackage}/bin/i3status"; - fonts = { - names = [ "roboto" ]; - size = 11.0; - }; - colors.background = "#111111"; - }]; - - # (Miscellaneous) Tray icons - services.blueman-applet.enable = true; -} diff --git a/home/config/i3/bar/i3status.go b/home/config/i3/bar/i3status.go deleted file mode 100644 index 196e6cc..0000000 --- a/home/config/i3/bar/i3status.go +++ /dev/null @@ -1,289 +0,0 @@ -package main - -import ( - "io" - "net/http" - "os" - "regexp" - "strconv" - "time" - - "barista.run" - "barista.run/bar" - "barista.run/colors" - "barista.run/group" - "barista.run/modules/battery" - "barista.run/modules/clock" - "barista.run/modules/diskspace" - "barista.run/modules/funcs" - "barista.run/modules/netinfo" - "barista.run/modules/systemd" - "barista.run/modules/volume" - "barista.run/modules/volume/pulseaudio" - "barista.run/modules/wlan" - "barista.run/outputs" - "barista.run/pango" - "barista.run/pango/icons/mdi" -) - -func main() { - // Constants - colors.LoadFromMap(map[string]string{ - // Color palette of Cezanne's Vue de la Baie de Marseille - "good": "#C5D294", - "degraded": "#E9CC67", - "bad": "#FFBC88", - }) - mdi.Load() // repo path will be inserted at build time - - // Display status of several services - updateSuccessIcon := pango.Icon("mdi-reload") - updatingIcon := pango.Icon("mdi-update") - updateFailIcon := pango.Icon("mdi-reload-alert") - garbageFullIcon := pango.Icon("mdi-delete") - garbageEmptyingIcon := pango.Icon("mdi-delete-restore") - garbageEmptyIcon := pango.Icon("mdi-delete-outline") - barista.Add(group.Simple(systemd.Service("nixos-upgrade").Output(func(i systemd.ServiceInfo) bar.Output { - state := i.UnitInfo.State - var colorScheme string - var output *pango.Node - switch { - case state == systemd.StateInactive: - colorScheme = "good" - output = updateSuccessIcon - case state == systemd.StateActivating: - colorScheme = "degraded" - output = updatingIcon - default: - colorScheme = "bad" - output = updateFailIcon - } - return outputs.Pango(output).Color(colors.Scheme(colorScheme)) - }), - systemd.Service("nix-gc").Output(func(i systemd.ServiceInfo) bar.Output { - state := i.UnitInfo.State - var colorScheme string - var output *pango.Node - switch { - case state == systemd.StateInactive: - colorScheme = "good" - output = garbageEmptyIcon - case state == systemd.StateActivating: - colorScheme = "degraded" - output = garbageEmptyingIcon - default: - colorScheme = "bad" - output = garbageFullIcon - } - return outputs.Pango(output).Color(colors.Scheme(colorScheme)) - }))) - - // Display space left on / - storageIcon := pango.Icon("mdi-database") - barista.Add(diskspace.New("/").Output(func(i diskspace.Info) bar.Output { - used := i.UsedPct() - var colorScheme string - if used >= 90 { - colorScheme = "bad" - } else if used >= 50 { - colorScheme = "degraded" - } else { - colorScheme = "good" - } - return outputs.Pango(storageIcon, pango.Textf(" %d%%", used)).Color(colors.Scheme(colorScheme)) - })) - - // Check connection to the Mullvad VPN - mullvadIsUpRe := regexp.MustCompile(`^You are connected to Mullvad`) - mullvadServerRe := regexp.MustCompile(`\(server (.*)\)`) - mullvadIpRe := regexp.MustCompile(`Your IP address is (.*)`) - client := &http.Client{Timeout: 3 * time.Second} - incognitoIcon := pango.Icon("mdi-incognito") - incognitoOffIcon := pango.Icon("mdi-incognito-off") - barista.Add(funcs.Every(5*time.Second, func(s bar.Sink) { - icon := incognitoOffIcon - message := pango.Text("") - colorScheme := "bad" - res, err := client.Get("https://am.i.mullvad.net/connected") - if !s.Error(err) { - status, err := io.ReadAll(res.Body) - res.Body.Close() - if !s.Error(err) { - var re *regexp.Regexp - if mullvadIsUpRe.Match(status) { - re = mullvadServerRe - colorScheme = "good" - icon = incognitoIcon - } else { - re = mullvadIpRe - colorScheme = "degraded" - } - result := re.FindSubmatch(status) - if len(result) >= 2 { - message = pango.Textf(" %s", result[1]) - } - } - } - client.CloseIdleConnections() - s.Output(outputs.Pango(icon, message).Color(colors.Scheme(colorScheme))) - })) - - // Display the wifi status - wifiOffIcon := pango.Icon("mdi-wifi-off") - wifiRefreshIcon := pango.Icon("mdi-wifi-refresh") - wifiOnIcon := pango.Icon("mdi-wifi") - barista.Add(wlan.Named("wlp2s0").Output(func(w wlan.Info) bar.Output { - var output *pango.Node - var colorScheme string - switch { - case w.Connected(): - output = pango.New(wifiOnIcon, pango.Textf(" %s", w.SSID)) - colorScheme = "good" - case w.Connecting(): - output = wifiRefreshIcon - colorScheme = "degraded" - default: - output = wifiOffIcon - colorScheme = "bad" - } - return outputs.Pango(output).Color(colors.Scheme(colorScheme)) - })) - - // Display the ethernet status - ethernetCableOnIcon := pango.Icon("mdi-ethernet-cable") - ethernetCableOffIcon := pango.Icon("mdi-ethernet-cable-off") - barista.Add(netinfo.Prefix("e").Output(func(s netinfo.State) bar.Output { - var output *pango.Node - var colorScheme string - switch { - case s.Connected(): - ip := "" - if len(s.IPs) > 0 { - ip = s.IPs[0].String() - } - output = pango.New(ethernetCableOnIcon, pango.Textf(" %s", ip)) - colorScheme = "good" - case s.Connecting(): - output = ethernetCableOnIcon - colorScheme = "degraded" - default: - output = ethernetCableOffIcon - colorScheme = "bad" - } - return outputs.Pango(output).Color(colors.Scheme(colorScheme)) - })) - - // Display the battery status - batteryIcons := [11]*pango.Node{pango.Icon("mdi-battery-outline"), - pango.Icon("mdi-battery-10"), - pango.Icon("mdi-battery-20"), - pango.Icon("mdi-battery-30"), - pango.Icon("mdi-battery-40"), - pango.Icon("mdi-battery-50"), - pango.Icon("mdi-battery-60"), - pango.Icon("mdi-battery-70"), - pango.Icon("mdi-battery-80"), - pango.Icon("mdi-battery-90"), - pango.Icon("mdi-battery")} - batteryChargingIcons := [11]*pango.Node{pango.Icon("mdi-battery-charging-outline"), - pango.Icon("mdi-battery-charging-10"), - pango.Icon("mdi-battery-charging-20"), - pango.Icon("mdi-battery-charging-30"), - pango.Icon("mdi-battery-charging-40"), - pango.Icon("mdi-battery-charging-50"), - pango.Icon("mdi-battery-charging-60"), - pango.Icon("mdi-battery-charging-70"), - pango.Icon("mdi-battery-charging-80"), - pango.Icon("mdi-battery-charging-90"), - pango.Icon("mdi-battery-charging-100")} - barista.Add(battery.All().Output(func(b battery.Info) bar.Output { - switch b.Status { - case battery.Disconnected, battery.Unknown: - return nil - default: - var icons [11]*pango.Node - var colorScheme string - if b.Status == battery.Charging { - icons = batteryChargingIcons - colorScheme = "good" - } else { - icons = batteryIcons - if b.RemainingPct() <= 10 { - colorScheme = "bad" - } else if b.RemainingPct() <= 20 { - colorScheme = "degraded" - } else { - colorScheme = "good" - } - } - icon := icons[b.RemainingPct()/10] - return outputs.Pango(icon, pango.Textf(" %d%%", b.RemainingPct())).Color(colors.Scheme(colorScheme)) - } - })) - - // Display brightness - brightnessHighIcon := pango.Icon("mdi-lightbulb-on") - brightnessMidIcon := pango.Icon("mdi-lightbulb-on-outline") - brightnessLowIcon := pango.Icon("mdi-lightbulb-outline") - ReadBrightness := func(name string) (int, error) { - valueStr, err := os.ReadFile("/sys/class/backlight/intel_backlight/" + name) - if err != nil { - return 0, err - } - return strconv.Atoi(string(valueStr[:len(valueStr)-1])) - } - brightnessMax, _ := ReadBrightness("max_brightness") // always non-zero, unless there's an error - barista.Add(funcs.Every(time.Second, func(s bar.Sink) { - brightness, err := ReadBrightness("brightness") - if !s.Error(err) { - value := (brightness * 100) / brightnessMax - var icon *pango.Node - if value <= 30 { - icon = brightnessLowIcon - } else if value < 70 { - icon = brightnessMidIcon - } else { - icon = brightnessHighIcon - } - s.Output(outputs.Pango(icon, pango.Textf(" %d%%", value))) - } - })) - - // Display output volume - volumeOffIcon := pango.Icon("mdi-volume-variant-off") - volumeLowIcon := pango.Icon("mdi-volume-low") - volumeMidIcon := pango.Icon("mdi-volume-medium") - volumeHighIcon := pango.Icon("mdi-volume-high") - barista.Add(volume.New(pulseaudio.DefaultSink()).Output(func(v volume.Volume) bar.Output { - volume := v.Pct() - var icon *pango.Node - if volume == 0 || v.Mute { - icon = volumeOffIcon - } else if volume <= 30 { - icon = volumeLowIcon - } else if volume <= 70 { - icon = volumeMidIcon - } else { - icon = volumeHighIcon - } - return outputs.Pango(icon, pango.Textf(" %d%%", volume)) - })) - - // Display microphone volume - microphoneOffIcon := pango.Icon("mdi-microphone-off") - microphoneIcon := pango.Icon("mdi-microphone") - barista.Add(volume.New(pulseaudio.DefaultSource()).Output(func(v volume.Volume) bar.Output { - volume := v.Pct() // the value returned by pulseaudio may be weird - var icon *pango.Node - if volume == 0 || v.Mute { - icon = microphoneOffIcon - } else { - icon = microphoneIcon - } - return outputs.Pango(icon, pango.Textf(" %d%%", volume)) - })) - - barista.Add(clock.Local().OutputFormat("2006-01-02 15:04:05")) - - panic(barista.Run()) -} diff --git a/home/config/i3/bar/shell.nix b/home/config/i3/bar/shell.nix deleted file mode 100644 index 794d774..0000000 --- a/home/config/i3/bar/shell.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ pkgs ? import { } }: - -let settings = { golang.enable = true; }; -in import ~/.config/venv-manager { inherit pkgs settings; } diff --git a/home/config/i3/default.nix b/home/config/i3/default.nix deleted file mode 100644 index 8b613a1..0000000 --- a/home/config/i3/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = [ ./bar ./keybindings.nix ./startup.nix ]; - - xsession.windowManager.i3 = { - enable = true; - package = pkgs.i3-gaps; - - config = rec { - assigns = { - "8: media" = [{ class = "^Steam$"; }]; - "9: social" = [ - { class = "^Mail$"; } - { class = "^thunderbird$"; } - { class = "^Signal$"; } - ]; - }; - - window.border = 0; - gaps = { - inner = 15; - outer = 5; - }; - }; - }; - - home.file.".config/i3/i3status.sh" = { - text = '' - #!${pkgs.bash}/bin/sh - ${pkgs.i3status}/bin/i3status | while : - do - read line - echo "☼ $(${pkgs.brightnessctl}/bin/brightnessctl -m | cut -d',' -f4) |\ - $line" || exit 1 - done - ''; - executable = true; - }; -} diff --git a/home/config/i3/keybindings.nix b/home/config/i3/keybindings.nix deleted file mode 100644 index cfbcb2a..0000000 --- a/home/config/i3/keybindings.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - backgroundImage = config.home.wallpaper; - lockscreen = pkgs.personal.lockscreen.override { inherit backgroundImage; }; -in { - xsession.windowManager.i3.config = rec { - modifier = "Mod4"; - - keybindings = lib.mkOptionDefault (let - brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; - brightnessctlKbd = "${brightnessctl} --device dell:kbd_backlight"; - pactl = "${pkgs.pulseaudio}/bin/pactl"; - rofi = "${pkgs.rofi}/bin/rofi"; - in { - "${modifier}+Shift+Return" = "exec firefox"; - "${modifier}+Control+Return" = "exec $EDITOR"; - "${modifier}+Shift+e" = "exec i3-msg exit"; - "${modifier}+p" = "move workspace to output right"; - "XF86MonBrightnessUp" = "exec ${brightnessctl} set 5%+"; - "XF86MonBrightnessDown" = "exec ${brightnessctl} set 5%-"; - "XF86AudioRaiseVolume" = - "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%"; - "XF86AudioLowerVolume" = - "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%"; - "XF86AudioMute" = "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle"; - "Shift+XF86AudioRaiseVolume" = - "exec ${pactl} set-source-volume @DEFAULT_SOURCE@ +5%"; - "Shift+XF86AudioLowerVolume" = - "exec ${pactl} set-source-volume @DEFAULT_SOURCE@ -5%"; - "XF86AudioMicMute" = - "exec ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle"; - "XF86KbdBrightnessUp" = '' - exec ${brightnessctlKbd} set \ - $(( $(${brightnessctlKbd} max) - $(${brightnessctlKbd} get) )) - ''; - "Print" = "exec xfce4-screenshooter"; - } // (lib.optionalAttrs (backgroundImage != null) { - "${modifier}+l" = "exec ${lockscreen}/bin/lockscreen.sh"; - }) // (lib.optionalAttrs config.programs.alacritty.enable { - "${modifier}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; - }) // (lib.optionalAttrs config.programs.rofi.enable { - "${modifier}+d" = ''exec "${rofi} -modi drun,filebrowser,run,window -show drun"''; - "${modifier}+Shift+d" = "exec ${rofi} -show window"; - }) // (lib.optionalAttrs config.services.emacs.client.enable { - "${modifier}+Control+r" = "exec systemctl --user restart emacs.service"; - })); - }; -} diff --git a/home/config/i3/startup.nix b/home/config/i3/startup.nix deleted file mode 100644 index fe3056e..0000000 --- a/home/config/i3/startup.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ config, lib, pkgs, ... }: - -let background-image = config.home.wallpaper; -in { - xsession.windowManager.i3.config.startup = let - autostart = { command, always ? false, notification ? false }: { - inherit command always notification; - }; - in (lib.optional config.services.redshift.enable - (autostart { command = "systemctl --user start redshift"; })) - ++ (lib.optional (background-image != null) (autostart { - command = "${pkgs.feh}/bin/feh --bg-scale ${background-image}"; - })) ++ (lib.optional config.services.xidlehook.enable - (autostart { command = "systemctl --user xidlehook.service"; })) - ++ (lib.optional config.services.emacs.enable - (autostart { command = "systemctl --user start emacs.service"; })) ++ [ - (autostart { command = "xfce4-power-manager --daemon"; }) - (autostart { command = "rfkill block bluetooth"; }) - # Launch frequently used apps - (autostart { command = "thunderbird"; }) - (autostart { command = "signal-desktop"; }) - (autostart { command = ''i3-msg "workspace 10; exec keepassxc"''; }) - ]; -} diff --git a/home/config/kdeconnect.nix b/home/config/kdeconnect.nix deleted file mode 100644 index e615178..0000000 --- a/home/config/kdeconnect.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: - -{ - services.kdeconnect = { - enable = true; - indicator = true; - }; -} diff --git a/home/config/redshift.nix b/home/config/redshift.nix deleted file mode 100644 index e670c05..0000000 --- a/home/config/redshift.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ ... }: - -{ - services.redshift = { - enable = true; - tray = true; - temperature = { - day = 2500; - night = 2500; - }; - latitude = "48.856614"; - longitude = "2.3522219"; - settings = { redshift = { transition = 0; }; }; - }; -} diff --git a/home/config/rofi.nix b/home/config/rofi.nix deleted file mode 100644 index 32f852c..0000000 --- a/home/config/rofi.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ pkgs, ... }: - -{ - programs.rofi = { - enable = true; - - cycle = true; - theme = ./dotfiles/rofi.rasi; - }; -} diff --git a/home/config/scripts/nixos-update-config b/home/config/scripts/nixos-update-config deleted file mode 100644 index 8bbbcb3..0000000 --- a/home/config/scripts/nixos-update-config +++ /dev/null @@ -1,6 +0,0 @@ -nix-code-path: '' - # This script calls sudo, hence its content could be modified - # in the view of escalating privileges. It should thus be only - # writable by root. - sudo cp -rf ${nix-code-path}/latitude-7490/nixos/ /etc/ -'' diff --git a/home/config/syncthing.nix b/home/config/syncthing.nix deleted file mode 100644 index 4875361..0000000 --- a/home/config/syncthing.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: - -{ - services.syncthing = { enable = true; }; -} diff --git a/home/config/xsession.nix b/home/config/xsession.nix deleted file mode 100644 index fade032..0000000 --- a/home/config/xsession.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ config, pkgs, ... }: - -let - backgroundImage = config.home.wallpaper; - lockscreen = pkgs.personal.lockscreen.override { inherit backgroundImage; }; -in { - xsession.enable = true; - - # Look and feel - home.pointerCursor = { - name = "Numix-Cursor-Light"; - package = pkgs.numix-cursor-theme; - }; - dconf.enable = true; - home.packages = with pkgs; [ dconf ]; - gtk = { - enable = true; - theme = { - name = "Arc-Dark"; - package = pkgs.arc-theme; - }; - iconTheme = { - name = "breeze-dark"; - package = pkgs.breeze-icons; - }; - }; - qt = { - enable = true; - platformTheme = "gtk"; - }; - - # Session managment - services.xidlehook = { - enable = backgroundImage != null; - not-when-fullscreen = true; - not-when-audio = true; - timers = [ - { - delay = 120; - command = "${pkgs.brightnessctl}/bin/brightnessctl set 10%-"; - canceller = "${pkgs.brightnessctl}/bin/brightnessctl set +10%"; - } - { - delay = 180; - command = "${lockscreen}/bin/lockscreen.sh"; - } - ]; - }; -} diff --git a/home/default.nix b/home/default.nix index 9d96449..96d9405 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,30 +1,15 @@ { ... }: { - imports = [ ./config ./modules ]; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; - - # This value determines the Home Manager release that your - # configuration is compatible with. This helps avoid breakage - # when a new Home Manager release introduces backwards - # incompatible changes. - # - # You can update Home Manager without changing this value. See - # the Home Manager release notes for a list of state version - # changes in each release. - home.stateVersion = "21.03"; - - nixpkgs = { - overlays = [ - (final: prev: { - personal = import ./pkgs { pkgs = final; }; - nur = import (builtins.fetchTarball - "https://github.com/nix-community/NUR/archive/master.tar.gz") { - pkgs = prev; - }; - }) - ]; + personal = { + profiles = { + dev = true; + multimedia = true; + social = true; + syncing = true; + }; }; + + programs.thunderbird.profiles.all.isDefault = true; + accounts.email.accounts.personal.primary = true; } diff --git a/home/modules/default.nix b/home/modules/default.nix deleted file mode 100644 index 820cd87..0000000 --- a/home/modules/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: - -{ - imports = [ ./wallpaper.nix ]; -} diff --git a/home/modules/wallpaper.nix b/home/modules/wallpaper.nix deleted file mode 100644 index 844f0ba..0000000 --- a/home/modules/wallpaper.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, ... }: - -with lib; -let wallpaper = config.home.wallpaper; -in { - options.home.wallpaper = mkOption { - type = types.nullOr types.path; - default = null; - description = '' - Path to the desktop wallpaper. - ''; - example = - literalExample "${config.home.homeDirectory}/images/wallpaper.jpg"; - }; - - # config.home.file.".background-image".source = mkIf (wallpaper != null) wallpaper; -} diff --git a/home/pkgs/barista/default.nix b/home/pkgs/barista/default.nix deleted file mode 100644 index f93083f..0000000 --- a/home/pkgs/barista/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ pkgs, i3statusGo ? null }: - -with pkgs; -with lib; -let useDefaultConfig = i3statusGo == null; -in buildGoModule rec { - name = "barista"; - - src = fetchFromGitHub { - owner = "soumya92"; - repo = "barista"; - rev = "c8725f1d8765e36869eb54272f29c770ce1f2f67"; - sha256 = "19nvwrr8baf8k0pp7ph07hmjcrxm7kv5j4f2rsfa8m7hgcyarjp4"; - }; - - patchPhase = '' - mkdir main - '' + (if useDefaultConfig then # use samples/i3status/i3status.go as config - '' - mv samples/i3status/i3status.go main/i3status.go - '' else # import config and patch font loading - '' - cp "${i3statusGo}" main/i3status.go - sed -i '0,\|fontawesome.Load()|s||fontawesome.Load("${pkgs.personal.fontMetadata.fontawesome}")|' main/i3status.go - sed -i '0,\|mdi.Load()|s||mdi.Load("${pkgs.personal.fontMetadata.material-design-icons}")|' main/i3status.go - '') + # patch call to iwgetid - '' - sed -i '0,\|/sbin/iwgetid|s||${pkgs.wirelesstools}/bin/iwgetid|' modules/wlan/wlan.go - ''; - - subPackages = [ "main/i3status.go" ]; - - vendorSha256 = "1q8bmgv7aac29yvpvgh6hi4c33ydj7f54l7xn7jg2sjbac4f8kbk"; -} - diff --git a/home/pkgs/default.nix b/home/pkgs/default.nix deleted file mode 100644 index da42672..0000000 --- a/home/pkgs/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs }: - -{ - barista = pkgs.callPackage ./barista {}; - lockscreen = pkgs.callPackage ./lockscreen {}; - - firefoxPackages = import ./firefoxPackages { inherit pkgs; }; - fontMetadata = import ./fontMetadata { inherit pkgs; }; - gitignore = import ./gitignore { inherit pkgs; }; - icons = import ./icons { inherit pkgs; }; - - lib = import ./lib { inherit pkgs; }; -} diff --git a/home/pkgs/firefoxPackages/.envrc b/home/pkgs/firefoxPackages/.envrc deleted file mode 100644 index 4a4726a..0000000 --- a/home/pkgs/firefoxPackages/.envrc +++ /dev/null @@ -1 +0,0 @@ -use_nix diff --git a/home/pkgs/firefoxPackages/addons.json b/home/pkgs/firefoxPackages/addons.json deleted file mode 100644 index d39900d..0000000 --- a/home/pkgs/firefoxPackages/addons.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { "slug": "canvasblocker" }, - { "slug": "clearurls" }, - { "slug": "neat-url" }, - { "slug": "redirector" }, - { "slug": "smart-referer" }, - { "slug": "temporary-containers" }, - { "slug": "ublock-origin" }, - - { "slug": "darkreader" }, - { "slug": "add-custom-search-engine" }, - { "slug": "multi-account-containers" }, - { "slug": "tree-style-tab" }, - { "slug": "unpaywall" }, - { "slug": "url-in-title" } -] diff --git a/home/pkgs/firefoxPackages/addons.nix b/home/pkgs/firefoxPackages/addons.nix deleted file mode 100644 index 891bb99..0000000 --- a/home/pkgs/firefoxPackages/addons.nix +++ /dev/null @@ -1,182 +0,0 @@ -{ buildFirefoxXpiAddon, fetchurl, lib, stdenv }: - { - "add-custom-search-engine" = buildFirefoxXpiAddon { - pname = "add-custom-search-engine"; - version = "4.2"; - addonId = "{af37054b-3ace-46a2-ac59-709e4412bec6}"; - url = "https://addons.mozilla.org/firefox/downloads/file/3812756/add_custom_search_engine-4.2.xpi"; - sha256 = "86aaf173514ec2da55556eb339a9d7c115c6e070c5433ebff8db31baa8e165d5"; - meta = with lib; - { - description = "Add a custom search engine to the list of available search engines in the search bar and URL bar."; - license = licenses.mpl20; - platforms = platforms.all; - }; - }; - "canvasblocker" = buildFirefoxXpiAddon { - pname = "canvasblocker"; - version = "1.8"; - addonId = "CanvasBlocker@kkapsner.de"; - url = "https://addons.mozilla.org/firefox/downloads/file/3910598/canvasblocker-1.8.xpi"; - sha256 = "817a6181be877668eca1d0fef9ecf789c898e6d7d93dca7e29479d40f986c844"; - meta = with lib; - { - homepage = "https://github.com/kkapsner/CanvasBlocker/"; - description = "Alters some JS APIs to prevent fingerprinting."; - license = licenses.mpl20; - platforms = platforms.all; - }; - }; - "clearurls" = buildFirefoxXpiAddon { - pname = "clearurls"; - version = "1.24.1"; - addonId = "{74145f27-f039-47ce-a470-a662b129930a}"; - url = "https://addons.mozilla.org/firefox/downloads/file/3927638/clearurls-1.24.1.xpi"; - sha256 = "41259fc4c330261e19ff4d38734eb5fdad92e7a358a16175383e31c62d50f06b"; - meta = with lib; - { - homepage = "https://clearurls.xyz/"; - description = "Removes tracking elements from URLs"; - license = licenses.lgpl3; - platforms = platforms.all; - }; - }; - "darkreader" = buildFirefoxXpiAddon { - pname = "darkreader"; - version = "4.9.52"; - addonId = "addon@darkreader.org"; - url = "https://addons.mozilla.org/firefox/downloads/file/3968561/darkreader-4.9.52.xpi"; - sha256 = "418deb0a0aa6ee3e23c31babd57a5c1fc207945356f0617e8dd955496d80b46d"; - meta = with lib; - { - homepage = "https://darkreader.org/"; - description = "Dark mode for every website. Take care of your eyes, use dark theme for night and daily browsing."; - license = licenses.mit; - platforms = platforms.all; - }; - }; - "multi-account-containers" = buildFirefoxXpiAddon { - pname = "multi-account-containers"; - version = "8.0.7"; - addonId = "@testpilot-containers"; - url = "https://addons.mozilla.org/firefox/downloads/file/3932862/multi_account_containers-8.0.7.xpi"; - sha256 = "0e60e00c13dcc372b43ddb2e5428c2e3c1e79d2b23d7166df82d45245edc4f10"; - meta = with lib; - { - homepage = "https://github.com/mozilla/multi-account-containers/#readme"; - description = "Firefox Multi-Account Containers lets you keep parts of your online life separated into color-coded tabs. Cookies are separated by container, allowing you to use the web with multiple accounts and integrate Mozilla VPN for an extra layer of privacy."; - license = licenses.mpl20; - platforms = platforms.all; - }; - }; - "neat-url" = buildFirefoxXpiAddon { - pname = "neat-url"; - version = "5.0.0"; - addonId = "neaturl@hugsmile.eu"; - url = "https://addons.mozilla.org/firefox/downloads/file/3557562/neat_url-5.0.0.xpi"; - sha256 = "0b41899ea0eb424517bbe7ce067eae22de0ff659a0f171671e604edef86cfa2c"; - meta = with lib; - { - homepage = "http://hugsmile.eu"; - description = "Remove garbage from URLs."; - license = licenses.gpl2; - platforms = platforms.all; - }; - }; - "redirector" = buildFirefoxXpiAddon { - pname = "redirector"; - version = "3.5.3"; - addonId = "redirector@einaregilsson.com"; - url = "https://addons.mozilla.org/firefox/downloads/file/3535009/redirector-3.5.3.xpi"; - sha256 = "eddbd3d5944e748d0bd6ecb6d9e9cf0e0c02dced6f42db21aab64190e71c0f71"; - meta = with lib; - { - homepage = "http://einaregilsson.com/redirector/"; - description = "Automatically redirects to user-defined urls on certain pages"; - license = licenses.mit; - platforms = platforms.all; - }; - }; - "smart-referer" = buildFirefoxXpiAddon { - pname = "smart-referer"; - version = "0.2.15"; - addonId = "smart-referer@meh.paranoid.pk"; - url = "https://addons.mozilla.org/firefox/downloads/file/3470999/smart_referer-0.2.15.xpi"; - sha256 = "4751ab905c4d9d13b1f21c9fc179efed7d248e3476effb5b393268b46855bf1a"; - meta = with lib; - { - homepage = "https://gitlab.com/smart-referer/smart-referer"; - description = "Improve your privacy by limiting Referer information leak!"; - platforms = platforms.all; - }; - }; - "temporary-containers" = buildFirefoxXpiAddon { - pname = "temporary-containers"; - version = "1.9.2"; - addonId = "{c607c8df-14a7-4f28-894f-29e8722976af}"; - url = "https://addons.mozilla.org/firefox/downloads/file/3723251/temporary_containers-1.9.2.xpi"; - sha256 = "3340a08c29be7c83bd0fea3fc27fde71e4608a4532d932114b439aa690e7edc0"; - meta = with lib; - { - homepage = "https://github.com/stoically/temporary-containers"; - description = "Open tabs, websites, and links in automatically managed disposable containers which isolate the data websites store (cookies, storage, and more) from each other, enhancing your privacy and security while you browse."; - license = licenses.mit; - platforms = platforms.all; - }; - }; - "tree-style-tab" = buildFirefoxXpiAddon { - pname = "tree-style-tab"; - version = "3.8.26"; - addonId = "treestyletab@piro.sakura.ne.jp"; - url = "https://addons.mozilla.org/firefox/downloads/file/3975864/tree_style_tab-3.8.26.xpi"; - sha256 = "fad45a87897df26613c89403f8dc0eb22eea55faeb98119810e8c1856114e4c1"; - meta = with lib; - { - homepage = "http://piro.sakura.ne.jp/xul/_treestyletab.html.en"; - description = "Show tabs like a tree."; - platforms = platforms.all; - }; - }; - "ublock-origin" = buildFirefoxXpiAddon { - pname = "ublock-origin"; - version = "1.43.0"; - addonId = "uBlock0@raymondhill.net"; - url = "https://addons.mozilla.org/firefox/downloads/file/3961087/ublock_origin-1.43.0.xpi"; - sha256 = "ab2d4fa8dfc4f50841093830ff131d7a6e99052ba6e7359f8592e84f39c18a16"; - meta = with lib; - { - homepage = "https://github.com/gorhill/uBlock#ublock-origin"; - description = "Finally, an efficient wide-spectrum content blocker. Easy on CPU and memory."; - license = licenses.gpl3; - platforms = platforms.all; - }; - }; - "unpaywall" = buildFirefoxXpiAddon { - pname = "unpaywall"; - version = "3.98"; - addonId = "{f209234a-76f0-4735-9920-eb62507a54cd}"; - url = "https://addons.mozilla.org/firefox/downloads/file/3816853/unpaywall-3.98.xpi"; - sha256 = "6893bea86d3c4ed7f1100bf0e173591b526a062f4ddd7be13c30a54573c797fb"; - meta = with lib; - { - homepage = "https://unpaywall.org/products/extension"; - description = "Get free text of research papers as you browse, using Unpaywall's index of ten million legal, open-access articles."; - license = licenses.mit; - platforms = platforms.all; - }; - }; - "url-in-title" = buildFirefoxXpiAddon { - pname = "url-in-title"; - version = "0.5"; - addonId = "{fcdb71fb-c9e5-48a3-9d04-e32713f5da88}"; - url = "https://addons.mozilla.org/firefox/downloads/file/792317/url_in_title-0.5.xpi"; - sha256 = "5db99d775cef3c3da069b7e8e1b1e7d68c3720236c99827d85c4e78d3c35dbd7"; - meta = with lib; - { - homepage = "https://github.com/cloutierjo/titleUrl"; - description = "Add the current host name to the windows title bar. It adds the possibility to recognize the window from other application that work based on windows titles like KeePass's autotype."; - license = licenses.gpl3; - platforms = platforms.all; - }; - }; - } \ No newline at end of file diff --git a/home/pkgs/firefoxPackages/default.nix b/home/pkgs/firefoxPackages/default.nix deleted file mode 100644 index d4a240c..0000000 --- a/home/pkgs/firefoxPackages/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ pkgs }: - -let pkgs-rycee = pkgs.nur.repos.rycee; -in { - addons = import ./addons.nix { - inherit (pkgs) fetchurl stdenv lib; - inherit (pkgs-rycee.firefox-addons) buildFirefoxXpiAddon; - }; - arkenfox-userjs = let version = "109.0"; - in pkgs.fetchurl { - url = - "https://raw.githubusercontent.com/arkenfox/user.js/${version}/user.js"; - sha256 = "sha256:+GJgFyfmFqbD3eepN9udJImT9H3Z9T+xnXPrHuSwIH4="; - }; -} diff --git a/home/pkgs/firefoxPackages/shell.nix b/home/pkgs/firefoxPackages/shell.nix deleted file mode 100644 index 9ad81b6..0000000 --- a/home/pkgs/firefoxPackages/shell.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs ? import { } }: - -let - nur = import (builtins.fetchTarball - "https://github.com/nix-community/NUR/archive/master.tar.gz") { - inherit pkgs; - }; - settings = { nativeBuildInputs = [ nur.repos.rycee.mozilla-addons-to-nix ]; }; -in import ~/.config/venv-manager { inherit pkgs settings; } diff --git a/home/pkgs/fontMetadata/default.nix b/home/pkgs/fontMetadata/default.nix deleted file mode 100644 index 4779f43..0000000 --- a/home/pkgs/fontMetadata/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs }: - -{ - fontawesome = pkgs.callPackage ./fontawesome.nix { }; - material-design-icons = pkgs.callPackage ./material-design-icons.nix { }; -} diff --git a/home/pkgs/fontMetadata/fontawesome.nix b/home/pkgs/fontMetadata/fontawesome.nix deleted file mode 100644 index 9686557..0000000 --- a/home/pkgs/fontMetadata/fontawesome.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ pkgs }: - -with pkgs; -stdenv.mkDerivation rec { - name = "fontawesome-metadata"; - src = fetchFromGitHub { - owner = "FortAwesome"; - repo = "Font-Awesome"; - rev = "d79d85c3fad85ad1885e87ed558f4afd6fce8289"; - sha256 = "1sqj64vmnpysy0mc4w7b393030dzlk2vn2i1a0bzi8zlbsrccm88"; - }; - - installPhase = '' - mkdir -p $out - cp --parent metadata/icons.yml $out - ''; -} diff --git a/home/pkgs/fontMetadata/material-design-icons.nix b/home/pkgs/fontMetadata/material-design-icons.nix deleted file mode 100644 index 7abb7cb..0000000 --- a/home/pkgs/fontMetadata/material-design-icons.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ pkgs }: - -with pkgs; -stdenv.mkDerivation { - name = "material-design-icons-metadata"; - - src = fetchFromGitHub { - owner = "Templarian"; - repo = "MaterialDesign-Webfont"; - rev = "34bdb8135d3307eac87bcbd7377c5ae344f09b42"; - sha256 = "0mg6g262qjhjrkc9xjlv3s8a7qfh1wglfbg513d414xh3zlms4cl"; - }; - - installPhase = '' - mkdir -p $out - cp --parent scss/_variables.scss $out - ''; -} diff --git a/home/pkgs/gitignore/default.nix b/home/pkgs/gitignore/default.nix deleted file mode 100644 index a77083f..0000000 --- a/home/pkgs/gitignore/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs }: - -let - fetch-gitignore = module: sha256: - let url = "https://www.toptal.com/developers/gitignore/api/" + module; - name = module + ".gitignore"; - in pkgs.fetchurl { inherit url sha256 name; }; -in { - emacs = fetch-gitignore "emacs" - "sha256:34LaJsGa5fFSMjE7l8JgQAmH8f07jcQmsaOdPVctHMk="; - linux = fetch-gitignore "linux" - "sha256:Az39kpxJ1pG0T+3KUwx217+f+L8FQEWzwvRFSty8cJU="; - direnv = fetch-gitignore "direnv" - "sha256:CK47JLrsjf9yyjGAUfhjxLns0r1jDYgSBsp6LN0Yut8="; - fetcher = fetch-gitignore; -} diff --git a/home/pkgs/icons/default.nix b/home/pkgs/icons/default.nix deleted file mode 100644 index 8b722d8..0000000 --- a/home/pkgs/icons/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ pkgs }: { - netflix = pkgs.fetchurl { - url = "https://www.vectorlogo.zone/logos/netflix/netflix-icon.svg"; - sha256 = "0b4gqhw9y62fm72x61q03yzbllgfxpkjbbsdvj7d5wg3jshjkgdb"; - }; - mubi = pkgs.fetchurl { - url = "https://mubi.com/logo"; - sha256 = "0fj6bafba9z8yirklr74b708pzmy8pjg68l1vx139ddnimh2d4n3"; - }; - deezer = pkgs.fetchurl { - url = - "https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/deezer.svg"; - sha256 = "1qcj1gqz8gc9cwlj4cl6yj5ik1vz4ya6qcncr5fbciprzaaf3pg9"; - }; -} diff --git a/home/pkgs/icons/generate-package.sh b/home/pkgs/icons/generate-package.sh deleted file mode 100755 index 9485b87..0000000 --- a/home/pkgs/icons/generate-package.sh +++ /dev/null @@ -1,11 +0,0 @@ -icons=$(cat icons.txt) - -echo '{ pkgs }:' | tee default.nix -echo '{' | tee -a default.nix -while read -r line; do - name=$(echo $line | cut -f1 -d' ') - url=$(echo $line | cut -f2 -d' ') - sha256=$(nix-prefetch-url $url 2>/dev/null) - echo -e "\t$name = pkgs.fetchurl {\n\t\turl = \"$url\";\n\t\tsha256 = \"$sha256\";\n\t};" | tee -a default.nix -done <<< $icons -echo '}' | tee -a default.nix diff --git a/home/pkgs/icons/icons.txt b/home/pkgs/icons/icons.txt deleted file mode 100644 index 388daa2..0000000 --- a/home/pkgs/icons/icons.txt +++ /dev/null @@ -1,3 +0,0 @@ -netflix https://www.vectorlogo.zone/logos/netflix/netflix-icon.svg -mubi https://mubi.com/logo -deezer https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/deezer.svg diff --git a/home/pkgs/lib/default.nix b/home/pkgs/lib/default.nix deleted file mode 100644 index 55e6c20..0000000 --- a/home/pkgs/lib/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs }: - -{ - serviceWithTimer = name: { Unit, Service, Timer, Install, ... }@config: { - services.${name} = { inherit (config) Unit Install Service; }; - timers.${name} = { - inherit (config) Unit Install; - Timer = config.Timer // { Unit = "${name}.service"; }; - }; - }; -} diff --git a/home/pkgs/lockscreen/default.nix b/home/pkgs/lockscreen/default.nix deleted file mode 100644 index 120a727..0000000 --- a/home/pkgs/lockscreen/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, pkgs, backgroundImage ? null, resolution ? "1920x1080" }: - -let useBackgroundImage = backgroundImage != null; -in pkgs.runCommand "lockscreen" { envVariable = true; } ('' - mkdir -p $out/{bin,share} -'' + (lib.optionalString useBackgroundImage '' - ${pkgs.imagemagick}/bin/convert ${backgroundImage} -resize ${resolution} -blur 0x5 RGB:$out/share/lockscreen.png -'') + '' - echo > $out/bin/lockscreen.sh \ - "export PATH=$PATH - ${pkgs.i3lock-color}/bin/i3lock-color \\ - '' + (lib.optionalString useBackgroundImage '' - --raw ${resolution}:rgb \\ - --image $out/share/lockscreen.png \\ - '') + '' - --no-unlock-indicator \\ - --composite \\ - --clock \\ - --ignore-empty-password \\ - --time-color=FFFFFFFF \\ - --date-color=00000000 \\ - --time-size=100" - '' + (lib.optionalString useBackgroundImage '' - chmod 444 $out/share/lockscreen.png - '') + '' - chmod 555 $out/bin/lockscreen.sh - chmod 555 $out/{bin,share} - '') -- cgit v1.2.3