From 5767736f868482ef4ada4051abe055db68d67ece Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Tue, 10 Jan 2023 16:05:48 +0100 Subject: [PATCH] Added a few more apps and revamped my secret handling --- home/adrielus/features/cli/fish.nix | 13 +- home/adrielus/features/cli/tmux/default.nix | 15 +- .../features/desktop/common/discord.nix | 7 + .../features/desktop/common/fonts.nix | 15 ++ .../desktop/common/polybar/default.nix | 5 + .../desktop/common/polybar/polybar.ini | 3 +- .../features/desktop/common/rofi/config.rasi | 3 - .../features/desktop/common/rofi/default.nix | 5 + .../desktop/common/wakatime/default.nix | 8 + .../common/wakatime/wakatime_config.age | Bin 0 -> 338 bytes .../features/desktop/common/zathura.nix | 23 ++ home/adrielus/features/desktop/xmonad.nix | 2 +- home/adrielus/global/default.nix | 18 +- home/adrielus/tethys.nix | 2 + hosts/nixos/common/global/default.nix | 2 +- .../{wireless.nix => wireless/default.nix} | 4 +- .../global/wireless}/wifi_passwords.age | 0 hosts/nixos/common/users/adrielus.nix | 4 +- .../nixos/common/users}/adrielus_password.age | 0 modules/home-manager/default.nix | 2 + modules/home-manager/discord.nix | 251 ++++++++++++++++++ modules/home-manager/fonts.nix | 33 +++ secrets.nix | 8 + secrets/secrets.nix | 7 - 24 files changed, 387 insertions(+), 43 deletions(-) create mode 100644 home/adrielus/features/desktop/common/discord.nix create mode 100644 home/adrielus/features/desktop/common/fonts.nix create mode 100644 home/adrielus/features/desktop/common/wakatime/default.nix create mode 100644 home/adrielus/features/desktop/common/wakatime/wakatime_config.age create mode 100644 home/adrielus/features/desktop/common/zathura.nix rename hosts/nixos/common/global/{wireless.nix => wireless/default.nix} (91%) rename {secrets => hosts/nixos/common/global/wireless}/wifi_passwords.age (100%) rename {secrets => hosts/nixos/common/users}/adrielus_password.age (100%) create mode 100644 modules/home-manager/discord.nix create mode 100644 modules/home-manager/fonts.nix create mode 100644 secrets.nix delete mode 100644 secrets/secrets.nix diff --git a/home/adrielus/features/cli/fish.nix b/home/adrielus/features/cli/fish.nix index bc6a88d..2fa7c94 100644 --- a/home/adrielus/features/cli/fish.nix +++ b/home/adrielus/features/cli/fish.nix @@ -1,11 +1,10 @@ { config, pkgs, ... }: -let - base16-fish = pkgs.fetchFromGitHub { - owner = "tomyun"; - repo = "base16-fish"; - sha256 = "142fmqm324gy3qsv48vijm5k81v6mw85ym9mmhnvyv2q2ndg5rix"; - rev = "2f6dd973a9075dabccd26f1cded09508180bf5fe"; - }; +let base16-fish = pkgs.fetchFromGitHub { + owner = "tomyun"; + repo = "base16-fish"; + sha256 = "142fmqm324gy3qsv48vijm5k81v6mw85ym9mmhnvyv2q2ndg5rix"; + rev = "2f6dd973a9075dabccd26f1cded09508180bf5fe"; +}; in { programs.fish = { diff --git a/home/adrielus/features/cli/tmux/default.nix b/home/adrielus/features/cli/tmux/default.nix index dbf7dc9..d9018dc 100644 --- a/home/adrielus/features/cli/tmux/default.nix +++ b/home/adrielus/features/cli/tmux/default.nix @@ -1,11 +1,10 @@ -{ pkgs, config, ... }: -let - base16-tmux = pkgs.fetchFromGitHub { - owner = "tinted-theming"; - repo = "base16-tmux"; - sha256 = "1p6czpd9f0sbibdsph1hdw4ljp6zzjij2159bks16wbfbg3p1hhx"; - rev = "3312bb2cbb26db7eeb2d2235ae17d4ffaef5e59b"; - }; +{ pkgs, config, ... }: +let base17-tmux = pkgs.fetchFromGitHub { + owner = "tinted-theming"; + repo = "base16-tmux"; + sha256 = "1p6czpd9f0sbibdsph1hdw4ljp6zzjij2159bks16wbfbg3p1hhx"; + rev = "3312bb2cbb26db7eeb2d2235ae17d4ffaef5e59b"; +}; in { programs.tmux = { diff --git a/home/adrielus/features/desktop/common/discord.nix b/home/adrielus/features/desktop/common/discord.nix new file mode 100644 index 0000000..85bfc92 --- /dev/null +++ b/home/adrielus/features/desktop/common/discord.nix @@ -0,0 +1,7 @@ +{ + programs.discord = { + enable = true; + disableUpdateCheck = true; + base16Styles.enable = true; + }; +} diff --git a/home/adrielus/features/desktop/common/fonts.nix b/home/adrielus/features/desktop/common/fonts.nix new file mode 100644 index 0000000..804d48f --- /dev/null +++ b/home/adrielus/features/desktop/common/fonts.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: { + fontProfiles = { + enable = true; + + monospace = { + family = "FiraCode Nerd Font"; + package = pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; }; + }; + + regular = { + family = "Fira Sans"; + package = pkgs.fira; + }; + }; +} diff --git a/home/adrielus/features/desktop/common/polybar/default.nix b/home/adrielus/features/desktop/common/polybar/default.nix index 9abade8..3794606 100644 --- a/home/adrielus/features/desktop/common/polybar/default.nix +++ b/home/adrielus/features/desktop/common/polybar/default.nix @@ -19,6 +19,11 @@ in ; Generated theme include-file = ${config.scheme base16-polybar} + ; Consistent fonts + [fonts] + regular = ${config.fontProfiles.regular.family} + monospace = ${config.fontProfiles.monospace.family} + ; Actual config include-file = ${./polybar.ini} ''; diff --git a/home/adrielus/features/desktop/common/polybar/polybar.ini b/home/adrielus/features/desktop/common/polybar/polybar.ini index dd2f6a3..1fe00fe 100644 --- a/home/adrielus/features/desktop/common/polybar/polybar.ini +++ b/home/adrielus/features/desktop/common/polybar/polybar.ini @@ -88,8 +88,7 @@ label-occupied-padding = 2 label-empty = [bar/main] -font-0 = FiraCode Nerd Font:style=Regular -font-1 = Source Code Pro Nerd Font:style=Regular +font-0 = ${fonts.monospace}:style=Regular modules-left = date battery modules-center = ewmh diff --git a/home/adrielus/features/desktop/common/rofi/config.rasi b/home/adrielus/features/desktop/common/rofi/config.rasi index f7a798e..7291cb4 100644 --- a/home/adrielus/features/desktop/common/rofi/config.rasi +++ b/home/adrielus/features/desktop/common/rofi/config.rasi @@ -1,8 +1,6 @@ configuration { location: 0; cycle: true; - font: "Source Code Pro 16"; - modi: "run,drun,window"; icon-theme: "Oranchelo"; show-icons: true; @@ -23,7 +21,6 @@ listview { * { width: 600; - font: "JetBrainsMono Nerd Font 14"; } element-text, element-icon , mode-switcher { diff --git a/home/adrielus/features/desktop/common/rofi/default.nix b/home/adrielus/features/desktop/common/rofi/default.nix index fa3a210..7c35d20 100644 --- a/home/adrielus/features/desktop/common/rofi/default.nix +++ b/home/adrielus/features/desktop/common/rofi/default.nix @@ -14,6 +14,11 @@ in // Manual config ${builtins.readFile ./config.rasi} + // Inject font + configuration { + font = ${config.fontProfiles.monospace.family}; + } + // Theme ${builtins.readFile (config.scheme base16-rofi)} ''; diff --git a/home/adrielus/features/desktop/common/wakatime/default.nix b/home/adrielus/features/desktop/common/wakatime/default.nix new file mode 100644 index 0000000..17c0fc5 --- /dev/null +++ b/home/adrielus/features/desktop/common/wakatime/default.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: { + age.secrets.wakatime.file = ./wakatime_config.age; + + home = { + file.".wakatime.cfg".source = config.age.secrets.wakatime.path; + packages = with pkgs; [ wakatime ]; + }; +} diff --git a/home/adrielus/features/desktop/common/wakatime/wakatime_config.age b/home/adrielus/features/desktop/common/wakatime/wakatime_config.age new file mode 100644 index 0000000000000000000000000000000000000000..43f5729a65592b93d410afcec3aecacde297755c GIT binary patch literal 338 zcmV-Y0j>UFXJsvAZewzJaCB*JZZ2Ly& zRzfjJdPi_fa%M(nGDA&ya58jIb$T;FS!8N3QEz!OQdwwJOmVlz4lGGjP(dRk#+M`CbsO=M1PMr2K8Xm@B;OjSWq3N0-yAZ&3n zQdwA6Hf}~RXL(sNbaPKbRyTNRS!`8zOHyHDWg;mwl6>ot@j!2Ip#h-izh^G>@`Z)1>aKc1BCfZ0UXt$bO| k;#>e;GR_Fq>58N)RF(ghTRv#Q*>R literal 0 HcmV?d00001 diff --git a/home/adrielus/features/desktop/common/zathura.nix b/home/adrielus/features/desktop/common/zathura.nix new file mode 100644 index 0000000..2a08116 --- /dev/null +++ b/home/adrielus/features/desktop/common/zathura.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: +let base16-zathura = pkgs.fetchFromGitHub { + owner = "doenerkebap"; + repo = "base16-zathura"; + sha256 = "1zcrzll13d4lmyzibwdqkkdssyhr3c9s4yxhqigg3azsizk8adb4"; + rev = "2caef8fff6a5412e05950c6105c5020a6f16ead2"; +}; +in +{ + programs.zathura = { + enable = true; + extraConfig = '' + # Generated theme + ${builtins.readFile (config.scheme base16-zathura)} + + # Open document in fit-width mode by default + set adjust-open "best-fit" + + # Inject font + set font "${config.fontProfiles.regular.family}" + ''; + }; +} diff --git a/home/adrielus/features/desktop/xmonad.nix b/home/adrielus/features/desktop/xmonad.nix index 6514c26..a8b76fb 100644 --- a/home/adrielus/features/desktop/xmonad.nix +++ b/home/adrielus/features/desktop/xmonad.nix @@ -1,3 +1,3 @@ { - imports = [ ./common/rofi ./common/polybar ]; + imports = [ ./common/rofi ./common/polybar ./common/fonts.nix ]; } diff --git a/home/adrielus/global/default.nix b/home/adrielus/global/default.nix index 1dc4c15..3e7e66b 100644 --- a/home/adrielus/global/default.nix +++ b/home/adrielus/global/default.nix @@ -1,25 +1,26 @@ { inputs, lib, pkgs, config, outputs, ... }: let + # Extra modules to import imports = [ - # inputs.impermanence.nixosModules.home-manager.impermanence inputs.base16.homeManagerModule + # inputs.impermanence.nixosModules.home-manager.impermanence ../features/cli ../features/neovim ]; - # Import all modules defined in modules/home-manager - moduleImports = builtins.attrValues outputs.homeManagerModules; + # Extra overlays to add + overlays = [ + inputs.neovim-nightly-overlay.overlay + ]; in { - imports = imports ++ moduleImports; + # Import all modules defined in modules/home-manager + moduleImports = builtins.attrValues outputs.homeManagerModules ++ imports; nixpkgs = { # Add all overlays defined in the overlays directory - overlays = builtins.attrValues outputs.overlays ++ - [ - inputs.neovim-nightly-overlay.overlay - ]; + overlays = builtins.attrValues outputs.overlays ++ overlays; # Allow unfree packages config = { @@ -37,6 +38,7 @@ in git.enable = true; }; + # Set default theme scheme = lib.mkDefault "${inputs.catppuccin-base16}/base16/latte.yaml"; # Set reasonable defaults for some settings diff --git a/home/adrielus/tethys.nix b/home/adrielus/tethys.nix index bafead4..84f2fa6 100644 --- a/home/adrielus/tethys.nix +++ b/home/adrielus/tethys.nix @@ -2,5 +2,7 @@ imports = [ ./global ./features/desktop/xmonad.nix + ./features/desktop/common/discord.nix + ./features/desktop/common/zathura.nix ]; } diff --git a/hosts/nixos/common/global/default.nix b/hosts/nixos/common/global/default.nix index 8216c51..97218eb 100644 --- a/hosts/nixos/common/global/default.nix +++ b/hosts/nixos/common/global/default.nix @@ -8,7 +8,7 @@ ./openssh.nix ./fish.nix ./locale.nix - ./wireless.nix + ./wireless ]; nixpkgs = { diff --git a/hosts/nixos/common/global/wireless.nix b/hosts/nixos/common/global/wireless/default.nix similarity index 91% rename from hosts/nixos/common/global/wireless.nix rename to hosts/nixos/common/global/wireless/default.nix index 8ab7694..c45bf1c 100644 --- a/hosts/nixos/common/global/wireless.nix +++ b/hosts/nixos/common/global/wireless/default.nix @@ -1,8 +1,6 @@ { config, lib, ... }: { # Wireless secrets stored through agenix - age.secrets.wireless = { - file = ../../../../secrets/wifi_passwords.age; - }; + age.secrets.wireless.file = ./wifi_passwords.age; networking.wireless = { enable = true; diff --git a/secrets/wifi_passwords.age b/hosts/nixos/common/global/wireless/wifi_passwords.age similarity index 100% rename from secrets/wifi_passwords.age rename to hosts/nixos/common/global/wireless/wifi_passwords.age diff --git a/hosts/nixos/common/users/adrielus.nix b/hosts/nixos/common/users/adrielus.nix index c4141c4..60eb983 100644 --- a/hosts/nixos/common/users/adrielus.nix +++ b/hosts/nixos/common/users/adrielus.nix @@ -1,9 +1,7 @@ { pkgs, config, ... }: { # Password file stored through agenix - age.secrets.adrielusPassword = { - file = ../../../../secrets/adrielus_password.age; - }; + age.secrets.adrielusPassword.file = ./adrielus_password.age; users = { # Configure users through nix only diff --git a/secrets/adrielus_password.age b/hosts/nixos/common/users/adrielus_password.age similarity index 100% rename from secrets/adrielus_password.age rename to hosts/nixos/common/users/adrielus_password.age diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 238f0cd..42bfe95 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -2,4 +2,6 @@ { # example = import ./example.nix; + discord = import ./discord.nix; + fonts = import ./fonts.nix; } diff --git a/modules/home-manager/discord.nix b/modules/home-manager/discord.nix new file mode 100644 index 0000000..73ba6ae --- /dev/null +++ b/modules/home-manager/discord.nix @@ -0,0 +1,251 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.programs.discord; + colors = config.scheme; +in +{ + options.programs.discord = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + }; + + disableUpdateCheck = lib.mkOption { + type = lib.types.bool; + default = false; + }; + + base16Styles.enable = lib.mkOption { + type = lib.types.bool; + default = false; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ + pkgs.discord + ] ++ + (if cfg.base16Styles.enable then [ pkgs.discocss ] else [ ]); + + + xdg.configFile."discord/settings.json".text = + builtins.toJSON + { + SKIP_HOST_UPDATE = cfg.disableUpdateCheck; + }; + + # Taken from [here](https://github.com/Misterio77/nix-config/blob/main/home/misterio/features/desktop/common/discord.nix) + xdg.configFile."discocss/custom.css".text = lib.mkIf cfg.base16Styles.enable + '' + .theme-light { + --header-primary: #${colors.base05}; + --header-secondary: #${colors.base04}; + --text-normal: #${colors.base05}; + --text-muted: #${colors.base04}; + --text-link: #${colors.base08}; + --channels-default: #${colors.base05}; + --interactive-normal: #${colors.base04}; + --interactive-hover: #${colors.base05}; + --interactive-active: #${colors.base05}; + --interactive-muted: #${colors.base03}; + --background-primary: #${colors.base00}; + --background-secondary: #${colors.base01}; + --background-secondary-alt: #${colors.base02}; + --background-tertiary: #${colors.base01}; + --background-accent: #${colors.base01}; + --background-floating: #${colors.base00}; + --background-mobile-primary: var(--background-primary); + --background-mobile-secondary: var(--background-secondary); + --background-modifier-selected: var(--background-secondary); + --scrollbar-thin-thumb: #${colors.base02}; + --scrollbar-auto-thumb: #${colors.base02}; + --scrollbar-auto-track: #${colors.base01}; + --scrollbar-auto-scrollbar-color-thumb: #${colors.base02}; + --scrollbar-auto-scrollbar-color-track: #${colors.base01}; + --focus-primary: #${colors.base08}; + --channeltextarea-background: #${colors.base01}; + --deprecated-card-bg: #${colors.base01}; + --deprecated-quickswitcher-input-background: #${colors.base01}; + --deprecated-quickswitcher-input-placeholder: #${colors.base05}; + --background-modifier-hover: var(--background-secondary); + --background-modifier-active: var(--background-secondary-alt); + --activity-card-background: var(--background-secondary); + } + body { + font-family: ${config.fontProfiles.regular.family}, sans serif; + } + + .scroller-1Bvpku { + background-color: var(--background-primary); + } + .scroller-2FKFPG { + background-color: var(--background-primary); + } + .headerPlaying-j0WQBV, .headerStreaming-2FjmGz { + background: var(--background-secondary-alt); + } + .theme-light .headerNormal-T_seeN { + background-color: var(--background-primary); + } + .theme-light .body-3iLsc4, .theme-light .footer-1fjuF6 { + background-color: var(--background-primary); + color: var(--header-secondary); + } + .theme-light .quickMessage-1yeL4E { + background-color: var(--background-secondary); + border-color: var(--background-secondary); + } + .theme-light .inset-3sAvek { + background-color: var(--background-secondary); + } + .theme-light .userSettingsAccount-2eMFVR .viewBody-2Qz-jg { + color: var(--header-primary); + } + .theme-light .modal-yWgWj- { + background-color: var(--background-primary); + } + .theme-light .footer-2gL1pp { + background-color: var(--background-primary); + } + .theme-light .lookLink-9FtZy-.colorPrimary-3b3xI6 { + color: var(--header-primary); + } + .theme-light .notDetected-33MY4s, .theme-light .notDetected-33MY4s { + background-color: var(--background-primary); + } + .theme-light .notDetected-33MY4s .gameName-1RiWHm, .theme-light .notDetected-33MY4s .gameName-1RiWHm { + color: var(--header-primary); + } + .theme-light .gameName-1RiWHm { + color: var(--header-primary); + } + .theme-light .notDetected-33MY4s .lastPlayed-3bQ7Bo, .theme-light .notDetected-33MY4s .lastPlayed-3bQ7Bo { + color: var(--header-primary); + } + .theme-light .nowPlayingAdd-1Kdmh_, .theme-light .nowPlayingAdd-1Kdmh_ { + color: var(--header-primary); + } + .css-1k00wn6-singleValue { + color: var(--header-primary); + } + .theme-light .codeRedemptionRedirect-1wVR4b { + color: var(--header-primary); + background-color: var(--background-primary); + border-color: var(--background-primary); + } + .theme-light .emptyStateHeader-248f_b { + color: var(--header-primary); + } + .theme-light .emptyStateSubtext-2hdA9c { + color: var(--header-primary); + } + .theme-light .root-1gCeng { + background-color: var(--background-primary); + } + .theme-light .date-EErlv4 { + color: var(--header-primary); + } + .theme-light .content-8bidB ol, .theme-light .content-8biNdB p, .theme-light .content-8biNdB ul li { + color: var(--header-primary); + } + .headerName-fajvi9, .headerTagUsernameNoNickname-2_H881 { + color: var(--header-primary); + } + .headerTag-2pZJzA { + color: var(--header-secondary); + } + .theme-light .activityProfile-2bJRaP .headerText-1HLrL7, .theme-light .activityUserPopout-2yItg2 .headerText-1HLrL7, .theme-light .activityProfile-2bJRaP .headerText-1HLrL7, .theme-light .activityUserPopout-2yItg2 .headerText-1HLrL7 { + color: var(--header-secondary); + } + .activityName-1IaRLn, .nameNormal-2lqVQK, .nameWrap-3Z4G_9 { + color: var(--header-secondary); + } + .theme-light .activityProfile-2bJRaP .content-3JfFJh, .theme-light .activityProfile-2bJRaP .details-38sfDr, .theme-light .activityProfile-2bJRaP .name-29ETJS, .theme-light .activityUserPopout-2yItg2 .content-3JfFJh, .theme-light .activityUserPopout-2yItg2 .details-38sfDr, .theme-light .activityUserPopout-2yItg2 .name-29ETJS, .theme-light .activityProfile-2bJRaP .content-3JfFJh, .theme-light .activityProfile-2bJRaP .details-38sfDr, .theme-light .activityProfile-2bJRaP .name-29ETJS, .theme-light .activityUserPopout-2yItg2 .content-3JfFJh, .theme-light .activityUserPopout-2yItg2 .details-38sfDr, .theme-light .activityUserPopout-2yItg2 .name-29ETJS { + color: var(--header-secondary); + } + .topSectionPlaying-1J5E4n { + background: var(--background-secondary-alt); + } + .username-3gJmXY { + color: var(--header-primary); + } + .discriminator-xUhQkU { + color: var(--header-secondary); + } + .tabBarItem-1b8RUP.item-PXvHYJ { + color: var(--header-secondary) !important; + border-color: transparent !important; + } + .theme-light .keybind-KpFkfr { + color: var(--header-primary); + } + .theme-light .closeButton-1tv5uR { + border-color: var(--header-primary); + } + .barFill-23-gu- { + background: var(--text-link); + } + .focused-3afm-j { + background-color: var(--background-secondary) !important; + color: var(--text-link) !important; + } + .colorDefault-2K3EoJ .checkbox-3s5GYZ, .colorDefault-2K3EoJ .radioSelection-1HmrQS { + color: var(--text-link); + } + .colorDefault-2K3EoJ .checkbox-3s5GYZ { + color: var(--text-link); + } + .colorDefault-2K3EoJ .check-1JyqgN { + color: var(--background-primary); + } + .colorDefault-2K3EoJ.focused-3afm-j .checkbox-3s5GYZ { + color: var(--background-primary) !important; + } + .colorDefault-2K3EoJ.focused-3afm-j .check-1JyqgN { + color: var(--text-link); + } + .wrapper-1BJsBx.selected-bZ3Lue .childWrapper-anI2G9, .wrapper-1BJsBx:hover .childWrapper-anI2G9 { + color: var(--background-primary); + background-color: var(--header-secondary); + } + .panels-j1Uci_ { + background-color: var(--background-primary); + } + .navButton-2gQCx- { + color: var(--interactive-normal); + } + .navButtonActive-1MkytQ { + color: var(--header-primary); + } + .input-3Xdcic { + color: var(--header-primary); + } + .clickable-2ap7je .header-2o-2hj { + background-color: var(--background-primary); + } + .peopleColumn-29fq28 { + background-color: var(--background-tertiary); + } + .theme-light .outer-1AjyKL.active-1xchHY, .theme-light .outer-1AjyKL.interactive-3B9GmY:hover { + background-color: var(--background-primary); + } + + .theme-light .popout-38lTFE { + background-color: var(--background-primary); + } + + .theme-light .scrollerThemed-2oenus.themedWithTrack-q8E3vB>.scroller-2FKFPG::-webkit-scrollbar-track-piece { + background-color: var(--background-primary); + border: 4px solid var(--background-secondary); + } + + .theme-light .scrollerThemed-2oenus.themedWithTrack-q8E3vB>.scroller-2FKFPG::-webkit-scrollbar-thumb { + background-color: var(--background-secondary); + border-color: var(--background-secondary); + } + .theme-light .header-sJd8D7 { + color: var(--text-normal) + } + ''; + }; +} diff --git a/modules/home-manager/fonts.nix b/modules/home-manager/fonts.nix new file mode 100644 index 0000000..5aadd85 --- /dev/null +++ b/modules/home-manager/fonts.nix @@ -0,0 +1,33 @@ +# Taken from [here](https://github.com/Misterio77/nix-config/blob/main/modules/home-manager/fonts.nix) +{ lib, config, ... }: + +let + mkFontOption = kind: { + family = lib.mkOption { + type = lib.types.str; + default = null; + description = "Family name for ${kind} font profile"; + example = "Fira Code"; + }; + + package = lib.mkOption { + type = lib.types.package; + default = null; + description = "Package for ${kind} font profile"; + example = "pkgs.fira-code"; + }; + }; + + cfg = config.fontProfiles; +in { + options.fontProfiles = { + enable = lib.mkEnableOption "Whether to enable font profiles"; + monospace = mkFontOption "monospace"; + regular = mkFontOption "regular"; + }; + + config = lib.mkIf cfg.enable { + fonts.fontconfig.enable = true; + home.packages = [ cfg.monospace.package cfg.regular.package ]; + }; +} diff --git a/secrets.nix b/secrets.nix new file mode 100644 index 0000000..d56d0dd --- /dev/null +++ b/secrets.nix @@ -0,0 +1,8 @@ +let + tethys = builtins.readFile ./hosts/nixos/tethys/ssh_host_ed25519_key.pub; +in +{ + "./hosts/nixos/common/global/wireless/wifi_passwords.age".publicKeys = [ tethys ]; + "./hosts/nixos/common/users/adrielus_password.age".publicKeys = [ tethys ]; + "./home/adrielus/features/desktop/common/wakatime/wakatime_config.age".publicKeys = [ tethys ]; +} diff --git a/secrets/secrets.nix b/secrets/secrets.nix deleted file mode 100644 index d6cf285..0000000 --- a/secrets/secrets.nix +++ /dev/null @@ -1,7 +0,0 @@ -let - tethys = builtins.readFile ../hosts/nixos/tethys/ssh_host_ed25519_key.pub; -in -{ - "wifi_passwords.age".publicKeys = [ tethys ]; - "adrielus_password.age".publicKeys = [ tethys ]; -}