summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/gui/plasma.nix20
-rw-r--r--components/gui/xfce.nix47
-rw-r--r--components/programs/alacritty.nix53
-rw-r--r--components/programs/fastfetch.nix57
-rw-r--r--components/programs/fonts.nix11
-rw-r--r--components/programs/games.nix16
-rw-r--r--components/programs/git.nix18
-rw-r--r--components/programs/keepassxc.nix33
-rw-r--r--components/programs/tmux.nix12
-rw-r--r--components/programs/zed.nix37
-rw-r--r--components/programs/zsh.nix35
-rw-r--r--components/services/i2pd.nix19
-rw-r--r--components/services/openssh.nix15
13 files changed, 373 insertions, 0 deletions
diff --git a/components/gui/plasma.nix b/components/gui/plasma.nix
new file mode 100644
index 0000000..fc6b6eb
--- /dev/null
+++ b/components/gui/plasma.nix
@@ -0,0 +1,20 @@
+{lib, config, pkgs, ...}: {
+ options.plasma.enable = lib.mkEnableOption "KDE Plasma";
+
+ config = lib.mkIf config.plasma.enable {
+ services.desktopManager.plasma6.enable = true;
+
+ # XDG
+ xdg.portal.extraPortals = with pkgs.kdePackages; [ xdg-desktop-portal-kde ];
+
+ # Packages
+ environment.systemPackages = with pkgs.kdePackages; [
+ kate filelight
+
+ flatpak-kcm
+ ];
+
+ # Excluded
+ environment.plasma6.excludePackages = with pkgs.kdePackages; [ plasma-browser-integration elisa discover ];
+ };
+}
diff --git a/components/gui/xfce.nix b/components/gui/xfce.nix
new file mode 100644
index 0000000..55f1475
--- /dev/null
+++ b/components/gui/xfce.nix
@@ -0,0 +1,47 @@
+{inputs, lib, config, pkgs, ...}:
+let
+ thunar-archive-plugin-with-xarchiver = pkgs.thunar-archive-plugin.overrideAttrs (old: {
+ postInstall = (old.postInstall or "") + ''
+ cp ${pkgs.xarchiver}/libexec/thunar-archive-plugin/xarchiver.tap \
+ $out/libexec/thunar-archive-plugin/
+ '';
+ });
+in {
+ options.xfce.enable = lib.mkEnableOption "Xfce Desktop Environment";
+
+ config = lib.mkIf config.xfce.enable {
+ services.xserver = {
+ enable = true;
+
+ desktopManager.xfce.enable = true;
+ };
+
+ # File manager
+ programs.thunar = {
+ enable = true;
+
+ plugins = with pkgs; [
+ thunar-archive-plugin-with-xarchiver
+ thunar-media-tags-plugin
+ thunar-vcs-plugin
+ thunar-volman
+ ];
+ };
+
+ # XDG
+ xdg.portal.extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
+
+ # Packages
+ environment.systemPackages = with pkgs; [
+ bluez blueman
+ xarchiver
+
+ xfce4-whiskermenu-plugin
+ xfce4-docklike-plugin
+ inputs.xfce4-hiddenapps-plugin.packages.x86_64-linux.default
+ ];
+
+ # Excluded
+ environment.xfce.excludePackages = with pkgs; [ parole ];
+ };
+}
diff --git a/components/programs/alacritty.nix b/components/programs/alacritty.nix
new file mode 100644
index 0000000..da80465
--- /dev/null
+++ b/components/programs/alacritty.nix
@@ -0,0 +1,53 @@
+{lib, config, ...}: {
+ options.alacritty.enable = lib.mkEnableOption "Alacritty's config";
+
+ config = lib.mkIf config.alacritty.enable {
+ programs.alacritty = {
+ enable = true;
+
+ settings = {
+ window = {
+ dimensions = { columns = 110; lines = 30; };
+ padding = { x = 0; y = 0; };
+ opacity = 1.0;
+ blur = false;
+ };
+
+ font = {
+ normal = { family = "IosevkaTerm NF"; style = "regular"; };
+ bold = { family = "IosevkaTerm NF"; style = "bold"; };
+ size = 14.00;
+ };
+
+ colors = {
+ primary = {
+ background = "#282c34";
+ foreground = "#abb2bf";
+ };
+
+ normal = {
+ black = "#1e2127";
+ red = "#e06c75";
+ green = "#98c379";
+ yellow = "#d19a66";
+ blue = "#61afef";
+ magenta = "#c678dd";
+ cyan = "#56b6c2";
+ white = "#abb2bf";
+ };
+
+ bright = {
+ black = "#5c6370";
+ red = "#e06c75";
+ green = "#98c379";
+ yellow = "#d19a66";
+ blue = "#61afef";
+ magenta = "#c678dd";
+ cyan = "#56b6c2";
+ white = "#ffffff";
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/components/programs/fastfetch.nix b/components/programs/fastfetch.nix
new file mode 100644
index 0000000..63f148e
--- /dev/null
+++ b/components/programs/fastfetch.nix
@@ -0,0 +1,57 @@
+{lib, config, ...}: {
+ options.fastfetch.enable = lib.mkEnableOption "Fastfetch's config";
+
+ config = lib.mkIf config.fastfetch.enable {
+ programs.fastfetch = {
+ enable = true;
+
+ settings = {
+ display = {
+ size = {
+ maxPrefix = "MB";
+ ndigits = 0;
+ spaceBeforeUnit = "never";
+ };
+ freq = {
+ ndigits = 3;
+ spaceBeforeUnit = "never";
+ };
+ };
+ modules = [
+ "title"
+ "separator"
+ "os"
+ {
+ type = "kernel";
+ format = "{release}";
+ }
+ {
+ type = "packages";
+ combined = true;
+ }
+ "shell"
+ {
+ type = "display";
+ compactType = "original";
+ key = "Resolution";
+ }
+ "de"
+ "wm"
+ "terminal"
+ "cpu"
+ {
+ type = "gpu";
+ key = "GPU";
+ format = "{name}";
+ }
+ {
+ type = "memory";
+ format = "{used} / {total}";
+ }
+ "break"
+ "colors"
+ ];
+ };
+ };
+ };
+}
diff --git a/components/programs/fonts.nix b/components/programs/fonts.nix
new file mode 100644
index 0000000..558cf83
--- /dev/null
+++ b/components/programs/fonts.nix
@@ -0,0 +1,11 @@
+{lib, config, pkgs, ...}: {
+ options.fonts.enable = lib.mkEnableOption "Additional fonts";
+
+ config = lib.mkIf config.fonts.enable {
+ environment.systemPackages = with pkgs; [
+ noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji
+ nerd-fonts.iosevka-term nerd-fonts.jetbrains-mono
+ corefonts vista-fonts
+ ];
+ };
+}
diff --git a/components/programs/games.nix b/components/programs/games.nix
new file mode 100644
index 0000000..560e210
--- /dev/null
+++ b/components/programs/games.nix
@@ -0,0 +1,16 @@
+{lib, config, pkgs, ...}: {
+ options.games.enable = lib.mkEnableOption "Games";
+
+ config = lib.mkIf config.games.enable {
+ hardware.steam-hardware.enable = true;
+
+ #Steam
+ programs = {
+ gamemode.enable = true;
+ steam.enable = true;
+ };
+
+ # Packages
+ environment.systemPackages = with pkgs; [ prismlauncher heroic ];
+ };
+}
diff --git a/components/programs/git.nix b/components/programs/git.nix
new file mode 100644
index 0000000..10226b8
--- /dev/null
+++ b/components/programs/git.nix
@@ -0,0 +1,18 @@
+{lib, config, ...}: {
+ options.git.enable = lib.mkEnableOption "Git CMS";
+
+ config = lib.mkIf config.git.enable {
+ programs.git = {
+ enable = true;
+
+ config = {
+ init = {
+ defaultBranch = "master";
+ };
+ core = {
+ editor = "vim";
+ };
+ };
+ };
+ };
+}
diff --git a/components/programs/keepassxc.nix b/components/programs/keepassxc.nix
new file mode 100644
index 0000000..7211364
--- /dev/null
+++ b/components/programs/keepassxc.nix
@@ -0,0 +1,33 @@
+{lib, config, ...}: {
+ options.keepassxc.enable = lib.mkEnableOption "KeepassXC's config";
+
+ config = lib.mkIf config.keepassxc.enable {
+ xdg.autostart.enable = true;
+
+ programs.keepassxc = {
+ enable = true;
+ autostart = true;
+
+ settings = {
+ Browser.Enabled=true;
+ FdoSecrets.Enabled = true;
+
+ GUI = {
+ MinimizeOnStartup = true;
+ MinimizeOnClose = true;
+
+ ApplicationTheme = "dark";
+ HideUsernames = true;
+ TrayIconAppearance = "monochrome-light";
+ };
+
+ PasswordGenerator = {
+ Length = 128;
+ LowerCase = true;
+ UpperCase = true;
+ SpecialChars = true;
+ };
+ };
+ };
+ };
+}
diff --git a/components/programs/tmux.nix b/components/programs/tmux.nix
new file mode 100644
index 0000000..db3f7a6
--- /dev/null
+++ b/components/programs/tmux.nix
@@ -0,0 +1,12 @@
+{lib, config, ...}: {
+ options.tmux.enable = lib.mkEnableOption "Tmux's config";
+
+ config = lib.mkIf config.tmux.enable {
+ programs.tmux = {
+ enable = true;
+
+ baseIndex = 1;
+ clock24 = true;
+ };
+ };
+}
diff --git a/components/programs/zed.nix b/components/programs/zed.nix
new file mode 100644
index 0000000..14f7195
--- /dev/null
+++ b/components/programs/zed.nix
@@ -0,0 +1,37 @@
+{lib, config, ...}: {
+ options.zed.enable = lib.mkEnableOption "Zed editor's config";
+
+ config = lib.mkIf config.zed.enable {
+ programs.zed-editor = {
+ enable = true;
+
+ userSettings = {
+ telemetry = {
+ metrics = false;
+ };
+
+ ui_font_size = 18;
+ buffer_font_size = 18;
+ vim_mode = false;
+
+ format_on_save = "off";
+ hard_tabs = false;
+ tab_size = 2;
+
+ theme = {
+ mode = "system";
+ light = "Gruvbox Dark Soft";
+ dark = "Gruvbox Dark Soft";
+ };
+
+ terminal = {
+ shell = {
+ program = "zsh";
+ };
+
+ cursor_shape = "bar";
+ };
+ };
+ };
+ };
+}
diff --git a/components/programs/zsh.nix b/components/programs/zsh.nix
new file mode 100644
index 0000000..9ace5fd
--- /dev/null
+++ b/components/programs/zsh.nix
@@ -0,0 +1,35 @@
+{lib, config, ...}: {
+ options.zsh.enable = lib.mkEnableOption "ZSH config";
+
+ config = lib.mkIf config.zsh.enable {
+ programs.zsh = {
+ enable = true;
+ enableCompletion = true;
+ enableVteIntegration = true;
+
+ syntaxHighlighting.enable = true;
+
+ history.size = 10000;
+
+ oh-my-zsh = {
+ enable = true;
+ theme = "robbyrussell";
+
+ plugins = [ "git" "ssh" ];
+ };
+
+ initContent = ''
+ # Ctrl + arrow keys
+ bindkey '^[Oc' forward-word
+ bindkey '^[Od' backward-word
+ bindkey '^[[1;5D' backward-word
+ bindkey '^[[1;5C' forward-word
+ bindkey '^H' backward-kill-word
+
+ # Theme
+ autoload -U colors
+ colors
+ '';
+ };
+ };
+}
diff --git a/components/services/i2pd.nix b/components/services/i2pd.nix
new file mode 100644
index 0000000..8477dc3
--- /dev/null
+++ b/components/services/i2pd.nix
@@ -0,0 +1,19 @@
+{lib, config, ...}: {
+ options.i2pd.enable = lib.mkEnableOption "An I2P router";
+
+ config = lib.mkIf config.i2pd.enable {
+ services.i2pd = {
+ enable = true;
+ address = "127.0.0.1";
+ port = 4444;
+
+ proto = {
+ http.enable = true;
+ httpProxy.enable = true;
+ socksProxy.enable = true;
+ sam.enable = true;
+ i2cp.enable = true;
+ };
+ };
+ };
+}
diff --git a/components/services/openssh.nix b/components/services/openssh.nix
new file mode 100644
index 0000000..66a6499
--- /dev/null
+++ b/components/services/openssh.nix
@@ -0,0 +1,15 @@
+{lib, config, ...}: {
+ options.openssh.enable = lib.mkEnableOption "OpenSSH server";
+
+ config = lib.mkIf config.openssh.enable {
+ services.openssh = {
+ enable = true;
+
+ settings = {
+ PermitRootLogin = "no";
+ PasswordAuthentication = false;
+ PrintMotd = false;
+ };
+ };
+ };
+}