1
Fork 0

Added a few more apps and revamped my secret handling

This commit is contained in:
Matei Adriel 2023-01-10 16:05:48 +01:00
parent dab371e809
commit 5767736f86
24 changed files with 387 additions and 43 deletions

View file

@ -1,6 +1,5 @@
{ config, pkgs, ... }:
let
base16-fish = pkgs.fetchFromGitHub {
let base16-fish = pkgs.fetchFromGitHub {
owner = "tomyun";
repo = "base16-fish";
sha256 = "142fmqm324gy3qsv48vijm5k81v6mw85ym9mmhnvyv2q2ndg5rix";

View file

@ -1,6 +1,5 @@
{ pkgs, config, ... }:
let
base16-tmux = pkgs.fetchFromGitHub {
let base17-tmux = pkgs.fetchFromGitHub {
owner = "tinted-theming";
repo = "base16-tmux";
sha256 = "1p6czpd9f0sbibdsph1hdw4ljp6zzjij2159bks16wbfbg3p1hhx";

View file

@ -0,0 +1,7 @@
{
programs.discord = {
enable = true;
disableUpdateCheck = true;
base16Styles.enable = true;
};
}

View file

@ -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;
};
};
}

View file

@ -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}
'';

View file

@ -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

View file

@ -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 {

View file

@ -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)}
'';

View file

@ -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 ];
};
}

View file

@ -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}"
'';
};
}

View file

@ -1,3 +1,3 @@
{
imports = [ ./common/rofi ./common/polybar ];
imports = [ ./common/rofi ./common/polybar ./common/fonts.nix ];
}

View file

@ -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

View file

@ -2,5 +2,7 @@
imports = [
./global
./features/desktop/xmonad.nix
./features/desktop/common/discord.nix
./features/desktop/common/zathura.nix
];
}

View file

@ -8,7 +8,7 @@
./openssh.nix
./fish.nix
./locale.nix
./wireless.nix
./wireless
];
nixpkgs = {

View file

@ -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;

View file

@ -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

View file

@ -2,4 +2,6 @@
{
# example = import ./example.nix;
discord = import ./discord.nix;
fonts = import ./fonts.nix;
}

View file

@ -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)
}
'';
};
}

View file

@ -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 ];
};
}

8
secrets.nix Normal file
View file

@ -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 ];
}

View file

@ -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 ];
}