diff options
author | Franck Cuny <franck@fcuny.net> | 2022-04-09 09:42:03 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-04-09 09:42:03 -0700 |
commit | 1125aaa49aec6a220fd3b9d03076fec398b35a14 (patch) | |
tree | 5570b0c094ead9d7879ca3d360ff3de7f45d4516 /users | |
parent | delete all CLI modules (diff) | |
download | world-1125aaa49aec6a220fd3b9d03076fec398b35a14.tar.gz |
add a few more modules to home/ and delete stuff
Diffstat (limited to 'users')
-rw-r--r-- | users/fcuny/default.nix | 15 | ||||
-rw-r--r-- | users/fcuny/desktop/browser.nix | 54 | ||||
-rw-r--r-- | users/fcuny/desktop/default.nix | 45 | ||||
-rw-r--r-- | users/fcuny/desktop/emacs.nix | 9 | ||||
-rw-r--r-- | users/fcuny/desktop/gtk.nix | 34 | ||||
-rw-r--r-- | users/fcuny/desktop/multimedia.nix | 15 | ||||
-rw-r--r-- | users/fcuny/desktop/scanner-printer/default.nix | 5 | ||||
-rw-r--r-- | users/fcuny/desktop/syncthing.nix | 7 | ||||
-rw-r--r-- | users/fcuny/desktop/terminal.nix | 19 | ||||
-rw-r--r-- | users/fcuny/desktop/theme.nix | 62 | ||||
-rw-r--r-- | users/fcuny/desktop/wm/bar.nix | 136 | ||||
-rw-r--r-- | users/fcuny/desktop/wm/default.nix | 86 | ||||
-rw-r--r-- | users/fcuny/desktop/wm/gammastep.nix | 14 | ||||
-rw-r--r-- | users/fcuny/desktop/wm/launcher.nix | 58 | ||||
-rw-r--r-- | users/fcuny/desktop/wm/notification.nix | 26 | ||||
-rw-r--r-- | users/fcuny/desktop/wm/screenlock.nix | 27 | ||||
-rw-r--r-- | users/fcuny/desktop/wm/screenshot.nix | 8 | ||||
-rw-r--r-- | users/fcuny/desktop/xdg.nix | 28 |
18 files changed, 0 insertions, 648 deletions
diff --git a/users/fcuny/default.nix b/users/fcuny/default.nix deleted file mode 100644 index ffbcb0b..0000000 --- a/users/fcuny/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, pkgs, isDesktop, isTrusted, ... }: - -{ - imports = [ ./cli ] ++ (if isDesktop then [ ./desktop ] else [ ]); - - programs.home-manager.enable = true; - - home.sessionVariables = { - EDITOR = "emacsclient -c -a="; - VISUAL = "emacsclient -c -a="; - LANG = "en_US.UTF-8"; - LC_CTYPE = "en_US.UTF-8"; - LC_ALL = "en_US.UTF-8"; - }; -} diff --git a/users/fcuny/desktop/browser.nix b/users/fcuny/desktop/browser.nix deleted file mode 100644 index d901691..0000000 --- a/users/fcuny/desktop/browser.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ pkgs, ... }: - -{ - programs.firefox = { - enable = true; - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - https-everywhere - pkgs.nur.repos.rycee.firefox-addons."1password-x-password-manager" - ublock-origin - ]; - profiles = { - default = { - settings = { - ## nix handle updates - "app.update.auto" = false; - "browser.bookmarks.showMobileBookmarks" = false; - "browser.compactmode.show" = true; - "browser.contentblocking.category" = "strict"; - "browser.search.countryCode" = "US"; - "browser.search.defaultenginename" = "DuckDuckGo"; - "browser.search.isUS" = true; - "browser.search.region" = "US"; - "browser.search.selectedEngine" = "DuckDuckGo"; - ## don't check if it's the default browser - "browser.shell.checkDefaultBrowser" = false; - "browser.startup.homepage" = "https://duckduckgo.com"; - "browser.urlbar.placeholderName" = "DuckDuckGo"; - ## keep this with ff 96 - "media.ffmpeg.vaapi.enabled" = true; - ## remove on ff 96 - "media.ffvpx.enabled" = false; - ## remove on ff 96 - "media.navigator.mediadatadecoder_vpx_enabled" = true; - "media.peerconnection.enabled" = true; - ## keep this with ff 96 - "media.rdd-ffmpeg.enabled" = true; - ## remove on ff 96 - "media.rdd-vpx.enabled" = false; - ## Block third-party cookies - "network.cookie.cookieBehavior" = 1; - "privacy.donottrackheader.enabled" = true; - "privacy.trackingprotection.enabled" = true; - "privacy.trackingprotection.socialtracking.enabled" = true; - }; - - userChrome = '' - #TabsToolbar { - visibility: collapse; - } - ''; - }; - }; - }; -} diff --git a/users/fcuny/desktop/default.nix b/users/fcuny/desktop/default.nix deleted file mode 100644 index 7450444..0000000 --- a/users/fcuny/desktop/default.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./browser.nix - ./emacs.nix - ./gtk.nix - ./multimedia.nix - ./scanner-printer - ./syncthing.nix - ./terminal.nix - ./wm - ./xdg.nix - ./theme.nix - ]; - - base16-theme.enable = true; - - home.packages = [ - pkgs.easyeffects - pkgs.gnome.seahorse - pkgs.gnome3.eog - pkgs.gnome3.evince - pkgs.pcmanfm - pkgs.transmission-remote-gtk - pkgs.xdg-utils - pkgs.element-desktop - ]; - - home = { - sessionVariables = { - TERMINAL = [ "alacritty" ]; - TERM = [ "xterm-256color" ]; - }; - }; - - systemd.user.tmpfiles.rules = [ - # Delete files that are 90 days old - "d %h/.cache - - - amAM:90d -" - "x %h/.cache/.nobackup - - - - -" - # Delete files that are 1 year old - "d %h/downloads - - - amAM:365d -" - "x %h/downloads/.nobackup - - - - -" - ]; -} diff --git a/users/fcuny/desktop/emacs.nix b/users/fcuny/desktop/emacs.nix deleted file mode 100644 index 6c2f42c..0000000 --- a/users/fcuny/desktop/emacs.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ lib, config, pkgs, ... }: - -{ - home.packages = with pkgs; [ - emacsPgtkGcc - # see https://github.com/hlissner/doom-emacs/issues/4138 - (aspellWithDicts (dicts: with dicts; [ en en-computers en-science ])) - ]; -} diff --git a/users/fcuny/desktop/gtk.nix b/users/fcuny/desktop/gtk.nix deleted file mode 100644 index eea9d5e..0000000 --- a/users/fcuny/desktop/gtk.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - # This is required for the gtk configuration below - home.packages = [ - pkgs.gnome3.dconf - ]; - - gtk = { - enable = true; - theme.name = "Adwaita"; - iconTheme = { - name = "Adwaita"; - package = pkgs.gnome3.adwaita-icon-theme; - }; - - gtk2 = { - extraConfig = '' - gtk-xft-antialias = 1 - gtk-xft-hinting = 1 - gtk-xft-hintstyle = "hintslight" - gtk-cursor-theme-size = cursorSize - ''; - }; - - gtk3 = { - extraConfig = { - gtk-xft-antialias = 1; - gtk-xft-hinting = 1; - gtk-xft-hintstyle = "hintslight"; - }; - }; - }; -} diff --git a/users/fcuny/desktop/multimedia.nix b/users/fcuny/desktop/multimedia.nix deleted file mode 100644 index 34347b8..0000000 --- a/users/fcuny/desktop/multimedia.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, config, pkgs, ... }: - -{ - home.packages = [ pkgs.pavucontrol pkgs.vlc pkgs.sublime-music ]; - programs.mpv = { - enable = true; - config = { - sub-auto = "fuzzy"; - vo = "gpu"; - hwdec = "auto-safe"; - gpu-context = "wayland"; - }; - scripts = lib.attrVals [ "sponsorblock" ] pkgs.mpvScripts; - }; -} diff --git a/users/fcuny/desktop/scanner-printer/default.nix b/users/fcuny/desktop/scanner-printer/default.nix deleted file mode 100644 index 3fda294..0000000 --- a/users/fcuny/desktop/scanner-printer/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - home.packages = with pkgs; [ tesseract imagemagick exiftool sane-airscan ]; -} diff --git a/users/fcuny/desktop/syncthing.nix b/users/fcuny/desktop/syncthing.nix deleted file mode 100644 index 02123a9..0000000 --- a/users/fcuny/desktop/syncthing.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - services.syncthing = { - enable = true; - }; -} diff --git a/users/fcuny/desktop/terminal.nix b/users/fcuny/desktop/terminal.nix deleted file mode 100644 index c5c419a..0000000 --- a/users/fcuny/desktop/terminal.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - programs.alacritty = { - enable = true; - - settings = { - env = { TERM = "xterm-256color"; }; - live_config_reload = true; - draw_bold_text_with_bright_colors = true; - selection = { save_to_clipboard = true; }; - font = { size = 12; }; - cursor = { - style.blinking = "Never"; - unfocused_hollow = true; - }; - }; - }; -} diff --git a/users/fcuny/desktop/theme.nix b/users/fcuny/desktop/theme.nix deleted file mode 100644 index e70c4ec..0000000 --- a/users/fcuny/desktop/theme.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ config, lib, ... }: -let - inherit (lib) mkOption mkMerge mkIf mkEnableOption types; - cfg = config.base16-theme; - cnotation = builtins.replaceStrings [ "#" ] [ "0x" ]; - color = default: - mkOption { - inherit default; - type = types.str; - }; - alpha = clr: a: "${clr}${a}"; -in { - options.base16-theme = { - enable = mkEnableOption "Enable base16 theme systemwide"; - base00 = color "#2E3440"; # polar night - base01 = color "#3B4252"; # polar night - base02 = color "#434C5E"; # polar night - base03 = color "#4C566A"; # polar night - base04 = color "#D8DEE9"; # snow storm - base05 = color "#E5E9F0"; # snow storm - base06 = color "#ECEFF4"; # snow storm - base07 = color "#8FBCBB"; # frost - base08 = color "#88C0D0"; # frost - base09 = color "#81A1C1"; # frost - base0A = color "#5E81AC"; # frost - base0B = color "#BF616A"; # aurora - base0C = color "#D08770"; # aurora - base0D = color "#EBCB8B"; # aurora - base0E = color "#A3BE8C"; # aurora - base0F = color "#B48EAD"; # aurora - }; - - config = mkIf cfg.enable (mkMerge [({ - wayland.windowManager.sway.config.colors = rec { - focused = { - border = cfg.base0A; - background = cfg.base0A; - text = cfg.base06; - indicator = cfg.base0A; - childBorder = cfg.base0A; - }; - - focusedInactive = { - border = cfg.base00; - background = cfg.base00; - text = cfg.base07; - indicator = cfg.base00; - childBorder = cfg.base00; - }; - - unfocused = focusedInactive; - - urgent = { - border = cfg.base0B; - background = cfg.base0B; - text = cfg.base05; - indicator = cfg.base0B; - childBorder = cfg.base0B; - }; - }; - })]); -} diff --git a/users/fcuny/desktop/wm/bar.nix b/users/fcuny/desktop/wm/bar.nix deleted file mode 100644 index 91eff31..0000000 --- a/users/fcuny/desktop/wm/bar.nix +++ /dev/null @@ -1,136 +0,0 @@ -{ pkgs, ... }: - -{ - programs.waybar = { - enable = true; - systemd = { enable = true; }; - - settings = [{ - layer = "bottom"; - position = "top"; - margin-top = 0; - margin-left = 0; - margin-right = 0; - margin-bottom = 0; - modules-left = [ "sway/workspaces" "sway/mode" ]; - modules-right = [ "pulseaudio" "network" "battery" "clock" "tray" ]; - modules = { - "sway/workspaces" = { format = "{name}"; }; - "sway/mode" = { format = "{}"; }; - tray = { spacing = 10; }; - clock = { format = "{: %a %b %d %R}"; }; - battery = { - states = { - warning = 30; - critical = 15; - }; - format = "ac:{capacity}%"; - tooltip = true; - tooltip-format = "{timeTo} ({capacity}%)"; - }; - pulseaudio = { - format = "vol:{volume}%"; - format-bluetooth = "bt:{volume}% {icon} ({format_source})"; - format-bluetooth-muted = "bt:{volume}%"; - format-muted = "vol:{volume}%"; - on-click = "pavucontrol"; - }; - "network" = { - format-wifi = "{essid}:{signalStrength}%"; - format-ethernet = "{ipaddr}/{cidr}"; - format-linked = "{ifname} (No IP)"; - format-disconnected = "network unavailable"; - format-alt = "{ifname}: {ipaddr}/{cidr}"; - tooltip = false; - }; - }; - }]; - - style = '' - * { - border-radius: 0; - border: none; - margin: 0; - min-height: 0; - padding: 0; - } - #waybar { - font-family: Source Code Pro; - font-size: 15px; - } - window#waybar { - background-color: rgba(43, 48, 59, 0.5); - color: #ffffff; - transition-property: background-color; - transition-duration: .5s; - } - #workspaces button { - padding: 0 3px; - background-color: transparent; - color: #888888; - box-shadow: inset 0 -3px transparent; - font-weight: bold; - } - #workspaces button.focused { - background-color: #285577; - border: 1px solid #4c7899; - color: #ffffff; - } - #workspaces button.urgent { - background-color: #900000; - color: #ffffff; - border: 1px solid #2f343a; - } - #tray { - /* No styles */ - } - #clock, - #battery, - #network, - #pulseaudio, - #tray, - #mode { - padding-left: 10px; - padding-right: 10px; - } - #mode { - background: #64727D; - border-top: 2px solid white; - /* To compensate for the top border and still have vertical centering */ - padding-bottom: 2px; - } - #clock { - /* No styles */ - } - #battery { - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - #battery.discharging { - color: #90a1ad; - } - #battery.charging { - color: #fffff8; - } - #battery.warning { - border-bottom: 2px solid #ff9e21; - } - #battery.critical { - border-bottom: 2px solid #ff3121; - } - #network { - /* No styles */ - } - #network.disconnected { - color: orange; - } - #pulseaudio { - /* No styles */ - } - #pulseaudio.muted { - color: #90a1ad; - } - ''; - }; -} diff --git a/users/fcuny/desktop/wm/default.nix b/users/fcuny/desktop/wm/default.nix deleted file mode 100644 index 24c7f8e..0000000 --- a/users/fcuny/desktop/wm/default.nix +++ /dev/null @@ -1,86 +0,0 @@ -{ config, lib, pkgs, ... }: { - imports = [ - ./bar.nix - ./gammastep.nix - ./launcher.nix - ./notification.nix - ./screenlock.nix - ./screenshot.nix - ]; - - home.packages = [ pkgs.wev pkgs.wf-recorder pkgs.wofi pkgs.wlogout ]; - - home.sessionVariables = { - MOZ_ENABLE_WAYLAND = true; - XDG_CURRENT_DESKTOP = "sway"; - XDG_SESSION_TYPE = "wayland"; - }; - - wayland.windowManager.sway = { - enable = true; - systemdIntegration = true; - extraSessionCommands = '' - export XDG_SESSION_TYPE=wayland - export XDG_CURRENT_DESKTOP=sway - export MOZ_ENABLE_WAYLAND=1 - ''; - config = rec { - modifier = "Mod4"; - terminal = "${config.programs.alacritty.package}/bin/alacritty"; - menu = ''${pkgs.wofi}/bin/wofi -S drun -p "app:" -L 10''; - bars = [ ]; - fonts = { - names = [ "Source Code Pro" ]; - size = 10.0; - }; - keybindings = lib.mkOptionDefault { - "XF86AudioRaiseVolume" = - "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; - "XF86AudioLowerVolume" = - "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%"; - "XF86AudioMute" = - "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; - "XF86AudioMicMute" = - "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle"; - "XF86MonBrightnessDown" = - "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"; - "XF86MonBrightnessUp" = - "exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%"; - "${modifier}+Escape" = "exec ${pkgs.wlogout}/bin/wlogout"; - "${modifier}+s" = - "exec ${pkgs.grim}/bin/grim $(xdg-user-dir DOCUMENTS)/screenshots/$(date +'%Y-%m-%d-%H%M%S_screenshot.png')"; - "${modifier}+Shift+s" = - "exec ${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - $(xdg-user-dir DOCUMENTS)/screenshots/$(date +'%Y-%m-%d-%H%M%S_screenshot.png')"; - }; - window.commands = [{ - command = "floating enable"; - criteria.app_id = "pavucontrol"; - }]; - input = { - "*" = { - "xkb_layout" = "us,fr"; - # map capslock to ctrl, and switch layout using shift+caps - "xkb_options" = "ctrl:nocaps,grp:shift_caps_toggle"; - }; - }; - assigns = { - "1" = [{ app_id = "emacs"; }]; - "2" = [{ app_id = "Alacritty"; }]; - "3" = [{ app_id = "firefox"; }]; - "4" = [{ class = "Element"; }]; - }; - output = { - "*" = { - scale = "1.5"; - bg = "#2E3440 solid_color"; - }; - # This is for aptos - "eDP-1" = { scale = "1.3"; }; - }; - startup = [{ - command = '' - exec "systemctl --user import-environment; systemctl --user start sway-session.target"''; - }]; - }; - }; -} diff --git a/users/fcuny/desktop/wm/gammastep.nix b/users/fcuny/desktop/wm/gammastep.nix deleted file mode 100644 index 510cb10..0000000 --- a/users/fcuny/desktop/wm/gammastep.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - services.gammastep = { - enable = true; - #TODO: this needs to come from locale.nix - latitude = 37.8715; - longitude = -122.2730; - temperature = { - day = 5000; - night = 3700; - }; - }; -} diff --git a/users/fcuny/desktop/wm/launcher.nix b/users/fcuny/desktop/wm/launcher.nix deleted file mode 100644 index 9b0b7a3..0000000 --- a/users/fcuny/desktop/wm/launcher.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ pkgs, config, ... }: - -{ - home.packages = with pkgs; [ wofi ]; - - xdg.configFile."wofi/config".text = '' - allow_images=true - image_size=20px - drun-display_generic=true - dynamic_lines=true - ''; - - xdg.configFile."wofi/style.css".text = '' - *{ - font-family: monospace; - } - - window { - color: #5E81AC; - background-color: rgba(27, 27, 28, 0.92); - border: 2px solid #75d5ff; - } - - #input { - margin: 10px 0px; - border-radius: 0px; - border: none; - background: transparent; - color: white; - } - - #inner-box { - background-color: transparent; - } - - #outer-box { - margin: 0px; - padding:5px; - background-color: transparent; - } - - #text { - padding: 5px; - color: white; - } - - #entry:selected { - color: #75d5ff; - background-color: transparent; - border: 0px; - } - - #text:selected { - color: #75d5ff; - background-color: transparent; - } - ''; -} diff --git a/users/fcuny/desktop/wm/notification.nix b/users/fcuny/desktop/wm/notification.nix deleted file mode 100644 index ad801c1..0000000 --- a/users/fcuny/desktop/wm/notification.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - home.packages = [ - pkgs.libnotify # to send notifications - ]; - - systemd.user.services.mako = { - Service = { ExecStart = "${pkgs.mako}/bin/mako"; }; - Install = { WantedBy = [ "sway-session.target" ]; }; - }; - - # All the options are documented via `man 5 mako` - programs.mako = { - enable = true; - layer = "overlay"; - # The timeout value is in millisecond - defaultTimeout = 30000; - # The maximum number of notifications - maxVisible = 3; - maxIconSize = 24; - # Enable pango markup (see https://docs.gtk.org/Pango/pango_markup.html) - markup = true; - actions = true; - }; -} diff --git a/users/fcuny/desktop/wm/screenlock.nix b/users/fcuny/desktop/wm/screenlock.nix deleted file mode 100644 index 24fde8c..0000000 --- a/users/fcuny/desktop/wm/screenlock.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, config, ... }: - -{ - - xdg.configFile."swaylock/config" = { - source = ../../configs/swaylock/config; - }; - - # https://github.com/nix-community/home-manager/pull/2610 - # won't be needed for ever - systemd.user.services.swayidle = { - Unit.PartOf = [ "sway-session.target" ]; - Install.WantedBy = [ "sway-session.target" ]; - - Service = { - Environment = "PATH=${pkgs.bash}/bin:${config.wayland.windowManager.sway.package}/bin"; - ExecStart = '' - ${pkgs.swayidle}/bin/swayidle -w \ - timeout 300 "${pkgs.swaylock}/bin/swaylock" \ - timeout 300 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"' \ - before-sleep "${pkgs.swaylock}/bin/swaylock" - ''; - Restart = "on-failure"; - }; - }; -} diff --git a/users/fcuny/desktop/wm/screenshot.nix b/users/fcuny/desktop/wm/screenshot.nix deleted file mode 100644 index e396cb7..0000000 --- a/users/fcuny/desktop/wm/screenshot.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - home.packages = [ - pkgs.slurp - pkgs.grim - ]; -} diff --git a/users/fcuny/desktop/xdg.nix b/users/fcuny/desktop/xdg.nix deleted file mode 100644 index 44a5ce1..0000000 --- a/users/fcuny/desktop/xdg.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - home.packages = [ - pkgs.xdg-user-dirs - ]; - - xdg = { - enable = true; - - mimeApps = { - enable = true; - }; - - userDirs = { - enable = true; - createDirectories = true; - desktop = "${config.home.homeDirectory}/documents"; - documents = "${config.home.homeDirectory}/documents"; - download = "${config.home.homeDirectory}/downloads"; - music = "${config.home.homeDirectory}/media/music"; - pictures = "${config.home.homeDirectory}/media/pictures"; - publicShare = "${config.home.homeDirectory}/documents/public"; - templates = "${config.home.homeDirectory}/documents/templates"; - videos = "${config.home.homeDirectory}/media/videos"; - }; - }; -} |