Merge remote-tracking branch 'origin/nixos' into nixos-work

This commit is contained in:
Moritz Böhme 2022-10-16 13:55:42 +02:00
commit 7db3dd86f7
62 changed files with 1094 additions and 956 deletions

View file

@ -14,13 +14,7 @@ let
sxhkdHelp = import ./sxhkdHelp.nix { inherit pkgs; };
in
{
options.my.bin = {
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
options.my.bin.enable = mkEnableOption "bin";
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [

View file

@ -7,7 +7,6 @@
{
imports = [
./bin
./email.nix
./nix.nix
./shell.nix
./theming

View file

@ -1,50 +0,0 @@
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.email;
name = "Moritz Böhme";
email = "mail@moritzboeh.me";
mailDirectory = "/home/moritz/.mail";
in
{
options.my.email = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
passwordFile = mkOption {
default = null;
type = types.path;
description = "File containing the email password.";
};
};
config = mkIf cfg.enable {
# Protonbridge Setup
environment.systemPackages = with pkgs; [ protonmail-bridge ];
systemd.user.services.protonmail-bridge = {
description = "Protonmail Bridge";
enable = true;
script = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --log-level debug";
path = [
pkgs.gnome3.gnome-keyring
]; # HACK: https://github.com/ProtonMail/proton-bridge/issues/176
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
};
age.secrets.email = {
file = cfg.passwordFile;
owner = "1000";
};
# Email Applications
home-manager.users.moritz.home.packages = with pkgs; [ thunderbird ];
networking.firewall.allowedTCPPorts = [ 33728 1025 1143 ];
};
}

View file

@ -1,6 +1,7 @@
{ config
, lib
, pkgs
, inputs
, ...
}:
@ -10,22 +11,21 @@ let
in
{
options.my.nix = {
gc.enable = mkOption {
default = true;
type = types.bool;
example = false;
};
optimise.enable = mkOption {
default = true;
type = types.bool;
example = false;
gc = {
enable = mkEnableOption "nix-gc";
minimumFreedGB = mkOption {
default = 32;
type = types.int;
apply = number: toString (number * 1024 * 1024 * 1024);
};
};
optimise.enable = mkEnableOption "nix-optimise";
};
config.nix = {
gc = {
automatic = cfg.gc.enable;
options = "--max-freed $((32 * 1024**3)) --delete-older-than 14d";
options = "--max-freed ${cfg.gc.minimumFreedGB} --delete-older-than 14d";
dates = "weekly";
};
@ -34,6 +34,17 @@ in
dates = [ "weekly" ];
};
registry = {
master-upstream.to = {
type = "github";
owner = "nixos";
repo = "nixpkgs";
};
master.flake = inputs.master;
nixpkgs.flake = inputs.nixpkgs;
stable.flake = inputs.stable;
};
settings = {
substituters = [
"https://cache.nixos.org/"

View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.my.theming;
in
{
config = mkIf (cfg.scheme == "catppuccin-frappe")
(import ./catppuccin.nix
{
inherit config lib pkgs;
rosewater = "f2d5cf";
flamingo = "eebebe";
pink = "f4b8e4";
mauve = "ca9ee6";
red = "e78284";
maroon = "ea999c";
peach = "ef9f76";
yellow = "e5c890";
green = "a6d189";
teal = "81c8be";
sky = "99d1db";
sapphire = "85c1dc";
blue = "8caaee";
lavender = "babbf1";
text = "c6d0f5";
subtext1 = "b5bfe2";
subtext0 = "a5adce";
overlay2 = "949cbb";
overlay1 = "838ba7";
overlay0 = "737994";
surface2 = "626880";
surface1 = "51576d";
surface0 = "414559";
base = "303446";
mantle = "292c3c";
crust = "232634";
});
}

View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.my.theming;
in
{
config = mkIf (cfg.scheme == "catppuccin-latte")
(import ./catppuccin.nix
{
inherit config lib pkgs;
rosewater = "dc8a78";
flamingo = "dd7878";
pink = "ea76cb";
mauve = "8839ef";
red = "d20f39";
maroon = "e64553";
peach = "fe640b";
yellow = "df8e1d";
green = "40a02b";
teal = "179299";
sky = "04a5e5";
sapphire = "209fb5";
blue = "1e66f5";
lavender = "7287fd";
text = "4c4f69";
subtext1 = "5c5f77";
subtext0 = "6c6f85";
overlay2 = "7c7f93";
overlay1 = "8c8fa1";
overlay0 = "9ca0b0";
surface2 = "acb0be";
surface1 = "bcc0cc";
surface0 = "ccd0da";
base = "eff1f5";
mantle = "e6e9ef";
crust = "dce0e8";
});
}

View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.my.theming;
in
{
config = mkIf (cfg.scheme == "catppuccin-macchiato")
(import ./catppuccin.nix
{
inherit config lib pkgs;
rosewater = "f4dbd6";
flamingo = "f0c6c6";
pink = "f5bde6";
mauve = "c6a0f6";
red = "ed8796";
maroon = "ee99a0";
peach = "f5a97f";
yellow = "eed49f";
green = "a6da95";
teal = "8bd5ca";
sky = "91d7e3";
sapphire = "7dc4e4";
blue = "8aadf4";
lavender = "b7bdf8";
text = "cad3f5";
subtext1 = "b8c0e0";
subtext0 = "a5adcb";
overlay2 = "939ab7";
overlay1 = "8087a2";
overlay0 = "6e738d";
surface2 = "5b6078";
surface1 = "494d64";
surface0 = "363a4f";
base = "24273a";
mantle = "1e2030";
crust = "181926";
});
}

View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.my.theming;
in
{
config = mkIf (cfg.scheme == "catppuccin-mocha")
(import ./catppuccin.nix
{
inherit config lib pkgs;
rosewater = "f5e0dc";
flamingo = "f2cdcd";
pink = "f5c2e7";
mauve = "cba6f7";
red = "f38ba8";
maroon = "eba0ac";
peach = "fab387";
yellow = "f9e2af";
green = "a6e3a1";
teal = "94e2d5";
sky = "89dceb";
sapphire = "74c7ec";
blue = "89b4fa";
lavender = "b4befe";
text = "cdd6f4";
subtext1 = "bac2de";
subtext0 = "a6adc8";
overlay2 = "9399b2";
overlay1 = "7f849c";
overlay0 = "6c7086";
surface2 = "585b70";
surface1 = "45475a";
surface0 = "494d64";
base = "1e1e2e";
mantle = "181825";
crust = "11111b";
});
}

View file

@ -1,272 +1,326 @@
{ config, lib, pkgs, ... }:
{ config
, lib
, pkgs
, rosewater
, flamingo
, pink
, mauve
, red
, maroon
, peach
, yellow
, green
, teal
, sky
, sapphire
, blue
, lavender
, text
, subtext1
, subtext0
, overlay2
, overlay1
, overlay0
, surface2
, surface1
, surface0
, base
, mantle
, crust
}:
with lib;
let
cfg = config.my.theming;
rosewater = "#f2d5cf";
flamingo = "#eebebe";
pink = "#f4b8e4";
mauve = "#ca9ee6";
red = "#e78284";
maroon = "#ea999c";
peach = "#ef9f76";
yellow = "#e5c890";
green = "#a6d189";
teal = "#81c8be";
sky = "#99d1db";
sapphire = "#85c1dc";
blue = "#8caaee";
lavender = "#babbf1";
text = "#c6d0f5";
subtext1 = "#b5bfe2";
subtext0 = "#a5adce";
overlay2 = "#949cbb";
overlay1 = "#838ba7";
overlay0 = "#737994";
surface2 = "#626880";
surface1 = "#51576d";
surface0 = "#414559";
base = "#303446";
mantle = "#292c3c";
crust = "#232634";
in
{
config = mkIf (cfg.scheme == "catppuccin") {
home-manager.users.moritz = {
programs = {
kitty.extraConfig =
''
# vim:ft=kitty
home-manager.users.moritz = {
programs = {
kitty.extraConfig = ''
# vim:ft=kitty
## name: Catppuccin-Frappe
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/frappe.conf
## blurb: Soothing pastel theme for the high-spirited!
## name: Catppuccin-Frappe
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/frappe.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
foreground #C6D0F5
background #303446
selection_foreground #303446
selection_background ${rosewater}
# The basic colors
foreground #${text}
background #${base}
selection_foreground #${base}
selection_background #${rosewater}
# Cursor colors
cursor ${rosewater}
cursor_text_color #303446
# Cursor colors
cursor #${rosewater}
cursor_text_color #${base}
# URL underline color when hovering with mouse
url_color ${rosewater}
# URL underline color when hovering with mouse
url_color #${rosewater}
# Kitty window border colors
active_border_color #BABBF1
inactive_border_color #737994
bell_border_color #E5C890
# Kitty window border colors
active_border_color #${lavender}
inactive_border_color #${overlay0}
bell_border_color #${yellow}
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #232634
active_tab_background ${mauve}
inactive_tab_foreground #C6D0F5
inactive_tab_background #292C3C
tab_bar_background #232634
# Tab bar colors
active_tab_foreground #${crust}
active_tab_background #${mauve}
inactive_tab_foreground #${text}
inactive_tab_background #${mantle}
tab_bar_background #${crust}
# Colors for marks (marked text in the terminal)
mark1_foreground #303446
mark1_background #BABBF1
mark2_foreground #303446
mark2_background ${mauve}
mark3_foreground #303446
mark3_background #85C1DC
# Colors for marks (marked text in the terminal)
mark1_foreground #${base}
mark1_background #${lavender}
mark2_foreground #${base}
mark2_background #${mauve}
mark3_foreground #${base}
mark3_background #${sapphire}
# The 16 terminal colors
# The 16 terminal colors
# black
color0 #51576D
color8 #626880
# black
color0 #${surface1}
color8 #${surface2}
# red
color1 ${red}
color9 ${red}
# red
color1 #${red}
color9 #${red}
# green
color2 #A6D189
color10 #A6D189
# green
color2 #${green}
color10 #${green}
# yellow
color3 #E5C890
color11 #E5C890
# yellow
color3 #${yellow}
color11 #${yellow}
# blue
color4 #8CAAEE
color12 #8CAAEE
# blue
color4 #${blue}
color12 #${blue}
# magenta
color5 ${pink}
color13 ${pink}
# magenta
color5 #${pink}
color13 #${pink}
# cyan
color6 #81C8BE
color14 #81C8BE
# cyan
color6 #${teal}
color14 #${teal}
# white
color7 #B5BFE2
color15 #A5ADCE
'';
zathura.extraConfig = ''
set window-title-basename "true"
set selection-clipboard "clipboard"
# white
color7 #${subtext1}
color15 #${subtext0}
'';
zathura.extraConfig = ''
set window-title-basename "true"
set selection-clipboard "clipboard"
set default-fg "#C6D0F5"
set default-bg "#303446"
set default-fg "#${text}"
set default-bg "#${base}"
set completion-bg "#414559"
set completion-fg "#C6D0F5"
set completion-highlight-bg "#575268"
set completion-highlight-fg "#C6D0F5"
set completion-group-bg "#414559"
set completion-group-fg "#8CAAEE"
set completion-bg "#${surface0}"
set completion-fg "#${text}"
set completion-highlight-bg "#575268"
set completion-highlight-fg "#${text}"
set completion-group-bg "#${surface0}"
set completion-group-fg "#${blue}"
set statusbar-fg "#C6D0F5"
set statusbar-bg "#414559"
set statusbar-fg "#${text}"
set statusbar-bg "#${surface0}"
set notification-bg "#414559"
set notification-fg "#C6D0F5"
set notification-error-bg "#414559"
set notification-error-fg "${red}"
set notification-warning-bg "#414559"
set notification-warning-fg "#FAE3B0"
set notification-bg "#${surface0}"
set notification-fg "#${text}"
set notification-error-bg "#${surface0}"
set notification-error-fg "#${red}"
set notification-warning-bg "#${surface0}"
set notification-warning-fg "#FAE3B0"
set inputbar-fg "#C6D0F5"
set inputbar-bg "#414559"
set inputbar-fg "#${text}"
set inputbar-bg "#${surface0}"
set recolor-lightcolor "#303446"
set recolor-darkcolor "#C6D0F5"
set recolor-lightcolor "#${base}"
set recolor-darkcolor "#${text}"
set index-fg "#C6D0F5"
set index-bg "#303446"
set index-active-fg "#C6D0F5"
set index-active-bg "#414559"
set index-fg "#${text}"
set index-bg "#${base}"
set index-active-fg "#${text}"
set index-active-bg "#${surface0}"
set render-loading-bg "#303446"
set render-loading-fg "#C6D0F5"
set render-loading-bg "#${base}"
set render-loading-fg "#${text}"
set highlight-color "#575268"
set highlight-fg "${pink}"
set highlight-active-color "${pink}"
'';
rofi = {
theme = "custom";
extraConfig = {
show-icons = true;
terminal = "alacritty";
drun-display-format = "{icon} {name}";
location = 0;
disable-history = false;
hide-scrollbar = true;
display-drun = " Apps ";
display-run = " Run ";
display-window = " Window";
display-Network = " 󰤨 Network";
sidebar-mode = true;
set highlight-color "#575268"
set highlight-fg "#${pink}"
set highlight-active-color "#${pink}"
'';
rofi = {
theme = "custom";
extraConfig = {
show-icons = true;
terminal = "alacritty";
drun-display-format = "{icon} {name}";
location = 0;
disable-history = false;
hide-scrollbar = true;
display-drun = " Apps ";
display-run = " Run ";
display-window = " Window";
display-Network = " 󰤨 Network";
sidebar-mode = true;
};
};
};
xsession.windowManager.bspwm.settings = {
focused_border_color = "#${mauve}";
normal_border_color = "#${base}";
active_border_color = "#${base}";
};
services = {
dunst.settings = {
global = {
# Defines color of the frame around the notification window.
frame_color = "#${blue}";
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = "frame";
};
urgency_low = {
background = "#${base}";
foreground = "#${text}";
};
urgency_normal = {
background = "#${base}";
foreground = "#${text}";
};
urgency_critical = {
background = "#${base}";
foreground = "#${text}";
frame_color = "#${peach}";
};
};
polybar = {
config = {
"bar/bottom" = {
background = base;
foreground = text;
border-color = base;
};
"module/bspwm" = {
label-focused-foreground = pink;
label-occupied-foreground = overlay1;
label-urgent-foreground = maroon;
label-empty-foreground = overlay1;
label-separator-foreground = base;
};
"module/cpu" = {
format-foreground = base;
format-background = green;
};
"module/time" = {
format-foreground = base;
format-background = blue;
};
"module/date" = {
format-foreground = base;
format-background = peach;
};
"module/memory" = {
format-foreground = base;
format-background = blue;
};
"module/pulseaudio" = {
format-volume-foreground = base;
format-volume-background = mauve;
label-muted = " muted";
format-muted-foreground = base;
format-muted-background = red;
};
"module/network" = {
format-connected-foreground = base;
format-connected-background = mauve;
};
"module/battery" = {
format-charging-foreground = base;
format-charging-background = green;
format-full-foreground = base;
format-full-background = green;
format-discharging-foreground = base;
format-discharging-background = red;
};
};
};
xsession.windowManager.bspwm = {
settings = {
focused_border_color = mauve;
normal_border_color = base;
active_border_color = base;
};
};
services = {
dunst.settings = {
global = {
# Defines color of the frame around the notification window.
frame_color = blue;
};
xdg.configFile = {
"fish/conf.d/theme.fish".text = ''
# Catppuccin color palette
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = "frame";
};
# --> special
set -l foreground ${text}
set -l selection ${surface0}
urgency_low = {
background = base;
foreground = text;
};
urgency_normal = {
background = base;
foreground = text;
};
urgency_critical = {
background = base;
foreground = text;
frame_color = peach;
};
};
polybar = {
config = {
"bar/bottom" = {
background = base;
foreground = text;
border-color = base;
};
"module/bspwm" = {
label-focused-foreground = pink;
label-occupied-foreground = overlay1;
label-urgent-foreground = maroon;
label-empty-foreground = overlay1;
label-separator-foreground = base;
};
"module/cpu" = {
format-foreground = base;
format-background = green;
};
"module/time" = {
format-foreground = base;
format-background = blue;
};
"module/date" = {
format-foreground = base;
format-background = peach;
};
"module/memory" = {
format-foreground = base;
format-background = blue;
};
"module/pulseaudio" = {
format-volume-foreground = base;
format-volume-background = mauve;
label-muted = "%{F${red}} %{F${base}}muted";
format-muted-foreground = base;
format-muted-background = red;
};
"module/network" = {
format-connected-foreground = base;
format-connected-background = mauve;
};
};
};
};
xdg.configFile."rofi/custom.rasi".text = ''
# --> palette
set -l teal ${teal}
set -l flamingo ${flamingo}
set -l mauve ${mauve}
set -l pink ${pink}
set -l red ${red}
set -l peach ${peach}
set -l green ${green}
set -l yellow ${yellow}
set -l blue ${blue}
set -l gray ${overlay0}
# Syntax Highlighting
set -g fish_color_normal $foreground
set -g fish_color_command $blue
set -g fish_color_param $flamingo
set -g fish_color_keyword $red
set -g fish_color_quote $green
set -g fish_color_redirection $pink
set -g fish_color_end $peach
set -g fish_color_error $red
set -g fish_color_gray $gray
set -g fish_color_selection --background=$selection
set -g fish_color_search_match --background=$selection
set -g fish_color_operator $pink
set -g fish_color_escape $flamingo
set -g fish_color_autosuggestion $gray
set -g fish_color_cancel $red
# Prompt
set -g fish_color_cwd $yellow
set -g fish_color_user $teal
set -g fish_color_host $blue
# Completion Pager
set -g fish_pager_color_progress $gray
set -g fish_pager_color_prefix $pink
set -g fish_pager_color_completion $foreground
set -g fish_pager_color_description $gray
'';
"rofi/custom.rasi".text = ''
* {
bg-col: #303446;
bg-col-light: #303446;
border-col: #303446;
selected-col: #303446;
blue: #8caaee;
fg-col: #c6d0f5;
fg-col2: ${red};
grey: #737994;
bg-col: #${base};
bg-col-light: #${base};
border-col: #${base};
selected-col: #${base};
blue: #${blue};
fg-col: #${text};
fg-col2: #${red};
grey: #${overlay0};
width: 900;
font: "JetBrainsMono Nerd Font 14";

View file

@ -10,17 +10,25 @@ let
cfg = config.my.theming;
in
{
imports = [ ./dracula.nix ./catppuccin.nix ];
imports = [
./dracula.nix
./catppuccin-frappe.nix
./catppuccin-latte.nix
./catppuccin-macchiato.nix
./catppuccin-mocha.nix
];
options.my.theming = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
enable = mkEnableOption "theming";
scheme = mkOption {
default = "catppuccin";
type = types.enum [ "dracula" "catppuccin" ];
default = "catppuccin-macchiato";
type = types.enum [
"dracula"
"catppuccin-latte"
"catppuccin-frappe"
"catppuccin-macchiato"
"catppuccin-mocha"
];
};
};
@ -62,8 +70,11 @@ in
time-format = "%H:%M";
format-charging = "<animation-charging> <label-charging>";
format-charging-padding = 1;
format-discharging = "<animation-discharging> <label-discharging>";
format-discharging-padding = 1;
format-full = " <label-full>";
format-full-padding = 1;
label-charging = "%percentage%% %time% remaining";
label-discharging = "%percentage%% %time% remaining";

View file

@ -149,16 +149,18 @@ in
};
services = {
dunst.settings = {
# Defines color of the frame around the notification window.
frame_color = "#282a36";
global = {
# Defines color of the frame around the notification window.
frame_color = "#282a36";
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = "frame";
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = "frame";
};
urgency_low = {
background = "#282a36";
@ -219,148 +221,202 @@ in
};
};
};
xdg.configFile."rofi/dracula.rasi".text = ''
* {
/* Dracula theme colour palette */
drac-bgd: #282a36;
drac-cur: #44475a;
drac-fgd: #f8f8f2;
drac-cmt: #6272a4;
drac-cya: #8be9fd;
drac-grn: #50fa7b;
drac-ora: #ffb86c;
drac-pnk: #ff79c6;
drac-pur: #bd93f9;
drac-red: #ff5555;
drac-yel: #f1fa8c;
xdg.configFile = {
"fish/conf.d/theme.fish".text = ''
# Dracula Color Palette
set -l foreground f8f8f2
set -l selection 44475a
set -l comment 6272a4
set -l red ff5555
set -l orange ffb86c
set -l yellow f1fa8c
set -l green 50fa7b
set -l purple bd93f9
set -l cyan 8be9fd
set -l pink ff79c6
font: "FiraCode Nerd Font Mono 13";
# Syntax Highlighting Colors
set -gx fish_color_normal $foreground
set -gx fish_color_command $cyan
set -gx fish_color_keyword $pink
set -gx fish_color_quote $yellow
set -gx fish_color_redirection $foreground
set -gx fish_color_end $orange
set -gx fish_color_error $red
set -gx fish_color_param $purple
set -gx fish_color_comment $comment
set -gx fish_color_selection --background=$selection
set -gx fish_color_search_match --background=$selection
set -gx fish_color_operator $green
set -gx fish_color_escape $pink
set -gx fish_color_autosuggestion $comment
set -gx fish_color_cancel $red --reverse
set -gx fish_color_option $orange
foreground: @drac-fgd;
background-color: @drac-bgd;
active-background: @drac-pnk;
urgent-foreground: @foreground;
urgent-background: @drac-red;
# Default Prompt Colors
set -gx fish_color_cwd $green
set -gx fish_color_host $purple
set -gx fish_color_host_remote $purple
set -gx fish_color_user $cyan
selected-background: @active-background;
selected-urgent-background: @urgent-background;
selected-active-background: @active-background;
separatorcolor: @active-background;
bordercolor: #6272a4;
}
# Completion Pager Colors
set -gx fish_pager_color_progress $comment
set -gx fish_pager_color_background
set -gx fish_pager_color_prefix $cyan
set -gx fish_pager_color_completion $foreground
set -gx fish_pager_color_description $comment
set -gx fish_pager_color_selected_background --background=$selection
set -gx fish_pager_color_selected_prefix $cyan
set -gx fish_pager_color_selected_completion $foreground
set -gx fish_pager_color_selected_description $comment
set -gx fish_pager_color_secondary_background
set -gx fish_pager_color_secondary_prefix $cyan
set -gx fish_pager_color_secondary_completion $foreground
set -gx fish_pager_color_secondary_description $comment
'';
"rofi/dracula.rasi".text = ''
* {
/* Dracula theme colour palette */
drac-bgd: #282a36;
drac-cur: #44475a;
drac-fgd: #f8f8f2;
drac-cmt: #6272a4;
drac-cya: #8be9fd;
drac-grn: #50fa7b;
drac-ora: #ffb86c;
drac-pnk: #ff79c6;
drac-pur: #bd93f9;
drac-red: #ff5555;
drac-yel: #f1fa8c;
#window {
background-color: @background-color;
border: 3;
border-radius: 6;
border-color: @bordercolor;
padding: 5;
}
#mainbox {
border: 0;
padding: 5;
}
#message {
border: 1px dash 0px 0px ;
border-color: @separatorcolor;
padding: 1px ;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 2px dash 0px 0px ;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 1px ;
}
#element.normal.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @background-color;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @background-color;
}
#element.alternate.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @drac-cya;
}
#prompt {
spacing: 0;
text-color: @drac-grn;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em ;
text-color: @drac-grn;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
'';
font: "FiraCode Nerd Font Mono 13";
foreground: @drac-fgd;
background-color: @drac-bgd;
active-background: @drac-pnk;
urgent-foreground: @foreground;
urgent-background: @drac-red;
selected-background: @active-background;
selected-urgent-background: @urgent-background;
selected-active-background: @active-background;
separatorcolor: @active-background;
bordercolor: #6272a4;
}
#window {
background-color: @background-color;
border: 3;
border-radius: 6;
border-color: @bordercolor;
padding: 5;
}
#mainbox {
border: 0;
padding: 5;
}
#message {
border: 1px dash 0px 0px ;
border-color: @separatorcolor;
padding: 1px ;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 2px dash 0px 0px ;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 1px ;
}
#element.normal.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @background-color;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @background-color;
}
#element.alternate.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @drac-cya;
}
#prompt {
spacing: 0;
text-color: @drac-grn;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em ;
text-color: @drac-grn;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
'';
};
};
};
}

View file

@ -9,13 +9,7 @@ let
cfg = config.my.wallpapers;
in
{
options.my.wallpapers = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.wallpapers.enable = mkEnableOption "wallpapers";
config = mkIf cfg.enable {
home-manager.users.moritz.xdg = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.yubikey;
in
{
options.my.yubikey = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.yubikey = mkEnableOption "yubikey";
config = {
services.udev.packages = [ pkgs.yubikey-personalization ];

View file

@ -9,7 +9,7 @@ with lib;
users.users.moritz = {
isNormalUser = true;
home = "/home/moritz";
extraGroups = [ "wheel" ]; # "networkmanager" "video" "dialout"
extraGroups = [ "wheel" "networkmanager" "video" ];
initialPassword = "password"; # CHANGE ME PLEASE
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGoAqa2m7hIzZ2LS96Z+RCIlRvhBM/j7h27tMBCwMT+a" # Moritz
@ -22,10 +22,15 @@ with lib;
time.timeZone = "Europe/Berlin";
my = {
nix = {
gc.enable = true;
optimise.enable = true;
};
bin.enable = true;
shell = {
abbreviations = {
us = "systemctl --user";
rs = "doas systemctl";
rs = "sudo systemctl";
};
aliases = {
ls = "exa -lh --icons --git";
@ -34,8 +39,8 @@ with lib;
rm = "rm -i";
mv = "mv -i";
nix-switch = "doas nixos-rebuild switch --flake ~/.dotfiles";
nix-boot = "doas nixos-rebuild boot --flake ~/.dotfiles";
nix-switch = "sudo nixos-rebuild switch --flake ~/.dotfiles";
nix-boot = "sudo nixos-rebuild boot --flake ~/.dotfiles";
nix-lock = "pushd ~/.dotfiles && nix flake update && popd";
latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent'';
@ -43,9 +48,13 @@ with lib;
variables = { EDITOR = "vim"; };
};
programs = {
vim.enable = true;
direnv.enable = true;
fish.enable = true;
git.enable = true;
gpg.enable = true;
helix.enable = true;
kakoune.enable = true;
vim.enable = true;
};
};
@ -81,14 +90,14 @@ with lib;
entr
exa
gparted
hub
hut
lazygit
neofetch
tmux
ttyper
up
viu
wget
hut
];
fonts.fonts = with pkgs; [
@ -110,6 +119,12 @@ with lib;
(builtins.attrValues config.fileSystems));
};
i18n.extraLocaleSettings = {
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
home-manager.users.moritz = {
programs = {
# Let Home Manager install and manage itself.
@ -120,12 +135,6 @@ with lib;
home = {
username = "moritz";
homeDirectory = "/home/moritz";
language = {
base = "en_US.UTF-8";
time = "de_DE.UTF-8";
numeric = "de_DE.UTF-8";
paper = "de_DE.UTF-8";
};
stateVersion = "21.05";
};
xdg.userDirs.enable = true;

View file

@ -78,16 +78,17 @@ with lib; {
hub.enable = true;
kitty.enable = true;
ledger.enable = true;
logseq.enable = true;
python.enable = true;
rofi.enable = true;
spotify.enable = true;
thunar.enable = true;
zathura.enable = true;
};
services = {
dunst.enable = true;
kdeconnect.enable = true;
mullvad.enable = true;
openconnect.enable = true;
openvpn.enable = true;
picom.enable = true;
@ -96,6 +97,8 @@ with lib; {
};
};
programs.xss-lock.enable = true;
environment.systemPackages = with pkgs; [
# nix
nixpkgs-review
@ -111,11 +114,11 @@ with lib; {
jellyfin-media-player
keepassxc
libreoffice
logseq
pavucontrol
signal-desktop
tlaplusToolbox
vlc
thunderbird
];
home-manager.users.moritz = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.adb;
in
{
options.my.programs.adb = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.adb.enable = mkEnableOption "adb";
config = mkIf cfg.enable {
programs.adb.enable = true;

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.bspwm;
in
{
options.my.programs.bspwm = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.bspwm.enable = mkEnableOption "true";
config = lib.mkIf cfg.enable {
services = {
@ -51,7 +45,6 @@ in
focus_follows_pointer = true;
};
startupPrograms = [
"${pkgs.systemd}/bin/systemctl --user start polybar.service"
"randomWallpaper"
"${pkgs.synology-drive-client}/bin/synology-drive"
];
@ -72,16 +65,24 @@ in
'';
};
};
home.packages = with pkgs; [
bc # HACK to get bsp-layout to work
brightnessctl
bsp-layout
feh
pamixer
playerctl
synology-drive-client
];
systemd.user.targets.tray = {
Unit = {
Description = "Bspwm Tray Target";
After = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
environment.systemPackages = with pkgs; [
bc # HACK to get bsp-layout to work
brightnessctl
bsp-layout
feh
pamixer
playerctl
synology-drive-client
];
};
}

View file

@ -9,13 +9,8 @@ let
cfg = config.my.programs.code;
in
{
options.my.programs.code = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.code.enable = mkEnableOption "code";
config = mkIf cfg.enable {
home-manager.users.moritz = {
programs.vscode = {

View file

@ -21,6 +21,7 @@
./kakoune.nix
./kitty.nix
./ledger
./logseq.nix
./python.nix
./rofi
./spotify.nix

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.direnv;
in
{
options.my.programs.direnv = {
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
options.my.programs.direnv.enable = mkEnableOption "direnv";
config = mkIf cfg.enable {
home-manager.users.moritz.programs.direnv = {

View file

@ -8,94 +8,87 @@
with lib;
let
cfg = config.my.programs.emacs;
myEmacs = with pkgs; ((emacsPackagesFor emacsUnstable).emacsWithPackages
myEmacs = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages
(epkgs: [ epkgs.vterm ]));
in
{
options.my.programs.emacs = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.emacs.enable = mkEnableOption "emacs";
config = mkIf cfg.enable {
my.shell.aliases = {
emacs = "emacsclient -t -a 'emacs -t'";
};
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
environment.systemPackages = with pkgs; [
### Emacs itself
binutils # native-comp needs 'as', provided by this
myEmacs
### Doom dependencies
git
(ripgrep.override { withPCRE2 = true; })
gnutls # for TLS connectivity
### Optional dependencies
fd # faster projectile indexing
imagemagick # for image-dired
zstd # for undo-fu-session/undo-tree compression
### Module dependencies
## :checkers
# spell
(hunspellWithDicts [
hunspellDicts.en_GB-ize
hunspellDicts.en_US
hunspellDicts.de_DE
])
# grammar
languagetool
## : tools
# lookup & org +roam
sqlite
gcc # HACK to get emacsqlite binary
wordnet
graphviz
## :lang
# latex & org (latex previews)
stable.texlive.combined.scheme-full # HACK to fix broken perl package
texlab
# nix
nixfmt # for formating nix
rnix-lsp
# markdown & org +pandoc
pandoc
# python
nodePackages.pyright
# sh
nodePackages.bash-language-server
## :email
# mu4e
mu
isync
## :app
# everywhere
xdotool
xorg.xwininfo
xclip
xorg.xprop
];
home-manager.users.moritz = {
home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ];
services.emacs = {
enable = true;
package = myEmacs;
};
home.packages = with pkgs; [
### Emacs itself
binutils # native-comp needs 'as', provided by this
myEmacs
### Doom dependencies
git
(ripgrep.override { withPCRE2 = true; })
gnutls # for TLS connectivity
### Optional dependencies
fd # faster projectile indexing
imagemagick # for image-dired
zstd # for undo-fu-session/undo-tree compression
### Module dependencies
## :checkers
# spell
(hunspellWithDicts [
hunspellDicts.en_GB-ize
hunspellDicts.en_US
hunspellDicts.de_DE
])
# grammar
languagetool
## : tools
# lookup & org +roam
sqlite
gcc # HACK to get emacsqlite binary
wordnet
graphviz
## :lang
# latex & org (latex previews)
stable.texlive.combined.scheme-full # HACK to fix broken perl package
texlab
# nix
nixfmt # for formating nix
rnix-lsp
# markdown & org +pandoc
pandoc
# python
nodePackages.pyright
# sh
nodePackages.bash-language-server
## :email
# mu4e
mu
isync
## :app
# everywhere
xdotool
xorg.xwininfo
xclip
xorg.xprop
];
};
};
}

View file

@ -12,11 +12,7 @@ let
in
{
options.my.programs.firefox = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
enable = mkEnableOption "firefox";
arkenfox = {
enable = mkEnableOption "arkenfox";
overrides = mkOption {

View file

@ -14,17 +14,12 @@ let
exportedVariables = lib.concatStringsSep "\n" exportVariables;
in
{
options.my.programs.fish = {
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
options.my.programs.fish.enable = mkEnableOption "fish";
config = lib.mkIf cfg.enable {
# set as default shell
users.users.moritz.shell = pkgs.fish;
environment.systemPackages = with pkgs.fishPlugins; [ fzf-fish pisces ];
# needed for nix completions
programs.fish.enable = true;
@ -88,7 +83,6 @@ in
fzf.enableFishIntegration = true;
starship.enableFishIntegration = true;
};
home.packages = with pkgs.fishPlugins; [ fzf-fish pisces ];
};
};
}

View file

@ -10,11 +10,7 @@ let
in
{
options.my.programs.git = {
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
enable = mkEnableOption "git";
signing = mkOption {
default = false;
type = types.bool;

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.gnome;
in
{
options.my.programs.gnome = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.gnome.enable = mkEnableOption "gnome";
config = lib.mkIf cfg.enable {
hardware = {

View file

@ -9,13 +9,8 @@ let
cfg = config.my.programs.gpg;
in
{
options.my.programs.gpg = {
enable = mkOption {
default = true;
type = types.bool;
example = true;
};
};
options.my.programs.gpg.enable = mkEnableOption "gpg";
config = mkIf cfg.enable {
home-manager.users.moritz.programs.gpg.enable = true;
environment.shellInit = ''

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.helix;
in
{
options.my.programs.helix = {
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
options.my.programs.helix.enable = mkEnableOption "helix";
config = mkIf cfg.enable {
home-manager.users.moritz.programs.helix = {

View file

@ -9,13 +9,8 @@ let
cfg = config.my.programs.hub;
in
{
options.my.programs.hub = {
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
options.my.programs.hub.enable = mkEnableOption "hub";
config = mkIf cfg.enable {
age.secrets = {
github = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.kakoune;
in
{
options.my.programs.kakoune = {
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
options.my.programs.kakoune.enable = mkEnableOption "kakoune";
config = mkIf cfg.enable {
home-manager.users.moritz = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.kitty;
in
{
options.my.programs.kitty = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.kitty.enable = mkEnableOption "kitty";
config = mkIf cfg.enable {
my.shell.aliases.ssh = "kitty +kitten ssh";

View file

@ -9,48 +9,45 @@ let
cfg = config.my.programs.ledger;
in
{
options.my.programs.ledger = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.ledger.enable = mkEnableOption "ledger";
config = mkIf cfg.enable {
my.shell.aliases = {
bal = "ledger bal";
balcash = "ledger bal -R -X --current --flat ^assets:bank ^liabilities";
balnet = "ledger bal -R -X --current --depth 2 ^assets ^liabilities";
bud = ''ledger --budget --unbudgeted bal ^expenses -p "this month"'';
budr = ''ledger --budget reg -p "this month" ^expenses'';
reg = "ledger reg -R -V --tail 15";
};
home-manager.users.moritz = {
home.packages = with pkgs; let
reg-copy = writeShellApplication {
name = "reg-copy";
runtimeInputs = [ ledger xclip ];
text = ''
table="$(printf '%-10s %-30s %8s %8s\n' Datum Beschreibung Einzeln Gesamt && ledger reg -V --format '%10D %.30P %8t %8T\n' "$@")"
echo "$table"
echo "$table" | xclip -selection clipboard
'';
my.shell = {
variables = {
LEDGER_FILE = "/home/moritz/Nextcloud/Notes/ledger/main.ledger";
};
aliases =
let
applyCommon = name: command: "${command} --payee note --strict --explicit";
in
mapAttrs applyCommon {
bal = "ledger bal";
balcash = "ledger bal -R -X --current --flat ^assets:bank ^liabilities";
balnet = "ledger bal -R -X --current --depth 2 ^assets ^liabilities";
bud = ''ledger bal --budget --unbudgeted -p "this month"'';
budr = ''ledger reg --budget --unbudgeted -p "this month"'';
reg = "ledger reg -R -V --tail 15";
};
in
[ ledger reg-copy ];
};
environment.systemPackages = with pkgs; let
reg-copy = writeShellApplication {
name = "reg-copy";
runtimeInputs = [ ledger xclip ];
text = ''
table="$(printf '%-10s %-30s %8s %8s\n' Datum Beschreibung Einzeln Gesamt && ledger reg -V --format '%10D %.30P %8t %8T\n' "$@")"
echo "$table"
echo "$table" | xclip -selection clipboard
'';
};
in
[ ledger reg-copy hledger hledger-ui hledger-web ];
home-manager.users.moritz = {
xdg.configFile = {
"fish/completions/ledger.fish" = {
text = builtins.readFile ./ledger.fish;
};
"ledger/ledgerrc".text = ''
--strict
--explicit
--payee note
--file ~/Notes/ledger/main.ledger
'';
};
};
};

View file

@ -0,0 +1,20 @@
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.programs.logseq;
in
{
options.my.programs.logseq.enable = mkEnableOption "logseq";
config = mkIf cfg.enable {
users.users.moritz.packages = with pkgs; [
logseq
];
xdg.mime.defaultApplications."x-scheme-handler/logseq" = "logseq.desktop";
};
}

View file

@ -30,7 +30,14 @@ in
example = [ "python39" ];
};
packages = mkOption {
default = [ "isort" "pytest" "flake8" "python-lsp-server" ];
default = [
"flake8"
"isort"
"mypy"
"poetry"
"pytest"
"python-lsp-server"
];
type = with types; listOf (enum commonPackages);
};
};

View file

@ -7,51 +7,16 @@
with lib;
let
cfg = config.my.programs.rofi;
rofi-bluetooth = with pkgs; stdenv.mkDerivation rec {
pname = "rofi-bluetooth";
version = "unstable-2021-03-05";
src = fetchFromGitHub {
repo = pname;
owner = "nickclyde";
# https://github.com/nickclyde/rofi-bluetooth/issues/19
rev = "893db1f2b549e7bc0e9c62e7670314349a29cdf2";
sha256 = "sha256-3oROJKEQCuSnLfbJ+JSSc9hcmJTPrLHRQJsrUcaOMss=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
install -D --target-directory=$out/bin/ ./rofi-bluetooth
wrapProgram $out/bin/rofi-bluetooth \
--prefix PATH ":" ${lib.makeBinPath [ rofi-unwrapped bluez ] }
runHook postInstall
'';
meta = with lib; {
description = "Rofi-based interface to connect to bluetooth devices and display status info";
homepage = "https://github.com/nickclyde/rofi-bluetooth";
license = licenses.gpl3Only;
maintainers = with maintainers; [ MoritzBoehme ];
platforms = platforms.linux;
};
};
in
{
options.my.programs.rofi = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.rofi.enable = mkEnableOption "rofi";
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
(lib.mkIf config.networking.networkmanager.enable networkmanager_dmenu)
(lib.mkIf config.hardware.bluetooth.enable rofi-bluetooth)
rofi-power-menu
];
home-manager.users.moritz = {
programs.rofi = {
enable = true;
@ -59,11 +24,6 @@ in
pkgs.rofi.override { plugins = with pkgs; [ rofi-calc rofi-emoji ]; };
extraConfig = { combi-modi = "drun,window,emoji"; };
};
home.packages = with pkgs; [
(lib.mkIf config.networking.networkmanager.enable networkmanager_dmenu)
(lib.mkIf config.hardware.bluetooth.enable rofi-bluetooth)
rofi-power-menu
];
xdg = {
enable = true;
configFile."networkmanager-dmenu/config.ini".text = ''

View file

@ -9,21 +9,15 @@ let
cfg = config.my.programs.spotify;
in
{
options.my.programs.spotify = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.spotify.enable = mkEnableOption "spotify";
config = mkIf cfg.enable {
age.secrets.spotifyd = {
file = ../../secrets/spotifyd.age;
owner = "1000";
};
environment.systemPackages = with pkgs; [ spotify-tui sptlrx ];
home-manager.users.moritz = {
home.packages = with pkgs; [ spotify-tui sptlrx ];
services.spotifyd = {
enable = true;
package = pkgs.spotifyd.override { withMpris = true; };

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.sway;
in
{
options.my.programs.sway = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.sway.enable = mkEnableOption "sway";
config = lib.mkIf cfg.enable {
hardware.opengl = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.thunar;
in
{
options.my.programs.thunar = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.thunar.enable = mkEnableOption "thunar";
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
@ -26,7 +20,7 @@ in
];
services.gvfs = {
enable = true;
package = lib.mkForce pkgs.gnome3.gvfs;
package = lib.mkForce pkgs.gnome.gvfs;
};
};
}

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.xmonad;
in
{
options.my.programs.xmonad = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.xmonad.enable = mkEnableOption "xmonad";
config = lib.mkIf cfg.enable {
services = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.zathura;
in
{
options.my.programs.zathura = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.zathura.enable = mkEnableOption "zathura";
config = mkIf cfg.enable {
home-manager.users.moritz.programs.zathura = {

View file

@ -11,13 +11,7 @@ let
shellConfig = config.my.shell;
in
{
options.my.programs.zsh = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.programs.zsh.enable = mkEnableOption "zsh";
config = lib.mkIf cfg.enable {
environment.pathsToLink = [ "/share/zsh" ];

View file

@ -68,19 +68,6 @@
# So we don't have to do this later...
security.acme.acceptTerms = true;
# Enable doas as an alternative to sudo
security.doas = {
enable = lib.mkDefault true;
extraRules = [
# Do not ask for a password again for some time after the user successfully authenticates.
{
groups = [ "wheel" "doas" ];
persist = true;
}
];
};
security.sudo.enable = !config.security.doas.enable;
# SSH
services.openssh = {
# Disable ssh password login

View file

@ -6,6 +6,7 @@
imports = [
./dunst.nix
./kdeconnect.nix
./mullvad.nix
./openconnect.nix
./openvpn.nix
./picom.nix

View file

@ -9,13 +9,7 @@ let
cfg = config.my.services.dunst;
in
{
options.my.services.dunst = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.services.dunst.enable = mkEnableOption "dunst";
config = lib.mkIf cfg.enable {
home-manager.users.moritz = {

View file

@ -13,13 +13,7 @@ let
cfg = config.my.services.kdeconnect;
in
{
options.my.services.kdeconnect = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.services.kdeconnect.enable = mkEnableOption "kdeconnect";
config = mkIf cfg.enable {
home-manager.users.moritz.services.kdeconnect.enable = mkIf (!config.my.programs.gnome.enable) true;

View file

@ -0,0 +1,20 @@
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.services.mullvad;
in
{
options.my.services.mullvad.enable = mkEnableOption "mullvad";
config = lib.mkIf cfg.enable {
services.mullvad-vpn.enable = true;
users.users.moritz.packages = with pkgs; [
mullvad-vpn
];
};
}

View file

@ -9,13 +9,7 @@ let
cfg = config.my.services.openconnect;
in
{
options.my.services.openconnect = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.services.openconnect.enable = mkEnableOption "openconnect";
config = lib.mkIf cfg.enable {
networking.openconnect.interfaces = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.services.openvpn;
in
{
options.my.services.openvpn = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.services.openvpn.enable = mkEnableOption "openvpn";
config = lib.mkIf cfg.enable {
age.secrets = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.services.picom;
in
{
options.my.services.picom = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.services.picom.enable = mkEnableOption "picom";
config = lib.mkIf cfg.enable {
home-manager.users.moritz = {
@ -30,6 +24,9 @@ in
glx-no-rebind-pixmap = true;
glx-no-stencil = true;
# against flicker
unredir-if-possible = false;
# fastest swap method
glx-swap-method = 1;
@ -45,7 +42,6 @@ in
# needed for nvidia with glx backend
xrender-sync-fence = true;
};
experimentalBackends = true;
inactiveOpacity = 0.97;
opacityRules = [ "100:fullscreen" "100:class_g = 'Polybar'" ];
vSync = true;

View file

@ -5,13 +5,7 @@ let
cfg = config.my.services.printing;
in
{
options.my.services.printing = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.services.printing.enable = mkEnableOption "printing";
config = lib.mkIf cfg.enable {
services = {

View file

@ -5,13 +5,7 @@ let
cfg = config.my.services.redshift;
in
{
options.my.services.redshift = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.services.redshift.enable = mkEnableOption "redshift";
config = lib.mkIf cfg.enable {
services.redshift.enable = true;

View file

@ -9,13 +9,7 @@ let
cfg = config.my.virtualisation.podman;
in
{
options.my.virtualisation.podman = {
enable = mkOption {
default = false;
type = types.bool;
example = false;
};
};
options.my.virtualisation.podman.enable = mkEnableOption "podman";
config = mkIf cfg.enable {
virtualisation.podman = {

View file

@ -9,20 +9,17 @@ let
cfg = config.my.virtualisation.libvirtd;
in
{
options.my.virtualisation.libvirtd = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
options.my.virtualisation.libvirtd.enable = mkEnableOption "libvirtd";
config = mkIf cfg.enable {
virtualisation.libvirtd = {
enable = true;
package = pkgs.libvirt;
};
home-manager.users.moritz.home.packages = with pkgs; [ virt-manager ];
users.users.moritz.extraGroups = [ "libvirtd" ];
users.users.moritz = {
extraGroups = [ "libvirtd" ];
packages = with pkgs; [ virt-manager ];
};
};
}