From f559d970d30d151374b47d8e5fb34e3c90040bd8 Mon Sep 17 00:00:00 2001 From: DerGrumpf Date: Mon, 24 Mar 2025 12:11:44 +0100 Subject: [PATCH] Added: Stuff --- home/core.nix | 26 +- home/hyprland/default.nix | 47 +++ home/programs/browsers.nix | 21 ++ home/programs/common.nix | 62 ++++ home/programs/default.nix | 9 + home/programs/git.nix | 12 + home/programs/media.nix | 33 +++ home/programs/xdg.nix | 47 +++ home/rofi/configs/arc_dark_colors.rasi | 34 +++ .../configs/arc_dark_transparent_colors.rasi | 34 +++ home/rofi/configs/power-profiles.rasi | 121 ++++++++ home/rofi/configs/powermenu.rasi | 124 ++++++++ home/rofi/configs/rofidmenu.rasi | 135 +++++++++ home/rofi/configs/rofikeyhint.rasi | 273 ++++++++++++++++++ home/rofi/default.nix | 12 + hosts/m920q/default.nix | 59 ++++ modules/hyprland.nix | 0 modules/system.nix | 190 ++++++++++++ users/phil/home.nix | 22 ++ users/phil/nixos.nix | 14 + 20 files changed, 1256 insertions(+), 19 deletions(-) create mode 100644 home/hyprland/default.nix create mode 100644 home/programs/browsers.nix create mode 100644 home/programs/common.nix create mode 100644 home/programs/default.nix create mode 100644 home/programs/git.nix create mode 100644 home/programs/media.nix create mode 100644 home/programs/xdg.nix create mode 100644 home/rofi/configs/arc_dark_colors.rasi create mode 100644 home/rofi/configs/arc_dark_transparent_colors.rasi create mode 100644 home/rofi/configs/power-profiles.rasi create mode 100644 home/rofi/configs/powermenu.rasi create mode 100644 home/rofi/configs/rofidmenu.rasi create mode 100644 home/rofi/configs/rofikeyhint.rasi create mode 100644 home/rofi/default.nix create mode 100644 modules/hyprland.nix diff --git a/home/core.nix b/home/core.nix index 54b2c79..521000b 100644 --- a/home/core.nix +++ b/home/core.nix @@ -1,21 +1,9 @@ -{username, ...}: { - # Home Manager needs a bit of information about you and the - # paths it should manage. - home = { - inherit username; - homeDirectory = "/home/${username}"; +{ + imports = [ + ../base/core + ../base/home.nix - # This value determines the Home Manager release that your - # configuration is compatible with. This helps avoid breakage - # when a new Home Manager release introduces backwards - # incompatible changes. - # - # You can update Home Manager without changing this value. See - # the Home Manager release notes for a list of state version - # changes in each release. - stateVersion = "24.05"; - }; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; + ./base + ]; } + diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix new file mode 100644 index 0000000..23d697d --- /dev/null +++ b/home/hyprland/default.nix @@ -0,0 +1,47 @@ +{ + pkgs, + config, + lib, + anyrun, + ... +} @ args: +with lib; let + cfg = config.modules.desktop.hyprland; +in { + imports = [ + anyrun.homeManagerModules.default + ./options + ]; + + options.modules.desktop.hyprland = { + enable = mkEnableOption "hyprland compositor"; + settings = lib.mkOption { + type = with lib.types; let + valueType = + nullOr (oneOf [ + bool + int + float + str + path + (attrsOf valueType) + (listOf valueType) + ]) + // { + description = "Hyprland configuration value"; + }; + in + valueType; + default = {}; + }; + }; + + config = mkIf cfg.enable ( + mkMerge ([ + { + wayland.windowManager.hyprland.settings = cfg.settings; + } + ] + ++ (import ./values args)) + ); +} diff --git a/home/programs/browsers.nix b/home/programs/browsers.nix new file mode 100644 index 0000000..15c51bc --- /dev/null +++ b/home/programs/browsers.nix @@ -0,0 +1,21 @@ +{ + pkgs, + config, + username, + ... +}: { + programs = { + chromium = { + enable = true; + commandLineArgs = ["--enable-features=TouchpadOverscrollHistoryNavigation"]; + extensions = [ + # {id = "";} // extension id, query from chrome web store + ]; + }; + + firefox = { + enable = true; + profiles.${username} = {}; + }; + }; +} diff --git a/home/programs/common.nix b/home/programs/common.nix new file mode 100644 index 0000000..0d1e485 --- /dev/null +++ b/home/programs/common.nix @@ -0,0 +1,62 @@ +{ + lib, + pkgs, + catppuccin-bat, + ... +}: { + home.packages = with pkgs; [ + # productivity + obsidian + + # docker + docker-compose + + ]; + + programs = { + tmux = { + enable = true; + clock24 = true; + keyMode = "vi"; + extraConfig = "mouse on"; + }; + + bat = { + enable = true; + config = { + pager = "less -FR"; + theme = "catppuccin-mocha"; + }; + themes = { + # https://raw.githubusercontent.com/catppuccin/bat/main/Catppuccin-mocha.tmTheme + catppuccin-mocha = { + src = catppuccin-bat; + file = "Catppuccin-mocha.tmTheme"; + }; + }; + }; + + btop.enable = true; # replacement of htop/nmon + eza.enable = true; # A modern replacement for ‘ls’ + jq.enable = true; # A lightweight and flexible command-line JSON processor + ssh.enable = true; + aria2.enable = true; + + skim = { + enable = true; + enableZshIntegration = true; + defaultCommand = "rg --files --hidden"; + changeDirWidgetOptions = [ + "--preview 'exa --icons --git --color always -T -L 3 {} | head -200'" + "--exact" + ]; + }; + }; + + services = { + #syncthing.enable = true; + + # auto mount usb drives + udiskie.enable = true; + }; +} diff --git a/home/programs/default.nix b/home/programs/default.nix new file mode 100644 index 0000000..4c3e81b --- /dev/null +++ b/home/programs/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./browsers.nix + ./common.nix + ./git.nix + ./media.nix + ./xdg.nix + ]; +} diff --git a/home/programs/git.nix b/home/programs/git.nix new file mode 100644 index 0000000..efa546b --- /dev/null +++ b/home/programs/git.nix @@ -0,0 +1,12 @@ +{ + pkgs, + ... +}: { + home.packages = [pkgs.gh]; + + programs.git = { + enable = true; + + # ... Other options ... + }; +} diff --git a/home/programs/media.nix b/home/programs/media.nix new file mode 100644 index 0000000..f38d4ff --- /dev/null +++ b/home/programs/media.nix @@ -0,0 +1,33 @@ +{ + pkgs, + config, + ... +}: +# media - control and enjoy audio/video +{ + # imports = [ + # ]; + + home.packages = with pkgs; [ + # audio control + pavucontrol + playerctl + pulsemixer + # images + imv + ]; + + programs = { + mpv = { + enable = true; + defaultProfiles = ["gpu-hq"]; + scripts = [pkgs.mpvScripts.mpris]; + }; + + obs-studio.enable = true; + }; + + services = { + playerctld.enable = true; + }; +} diff --git a/home/programs/xdg.nix b/home/programs/xdg.nix new file mode 100644 index 0000000..1b22a8a --- /dev/null +++ b/home/programs/xdg.nix @@ -0,0 +1,47 @@ +{config, ...}: let + browser = ["firefox.desktop"]; + + # XDG MIME types + associations = { + "application/x-extension-htm" = browser; + "application/x-extension-html" = browser; + "application/x-extension-shtml" = browser; + "application/x-extension-xht" = browser; + "application/x-extension-xhtml" = browser; + "application/xhtml+xml" = browser; + "text/html" = browser; + "x-scheme-handler/about" = browser; + "x-scheme-handler/chrome" = ["chromium-browser.desktop"]; + "x-scheme-handler/ftp" = browser; + "x-scheme-handler/http" = browser; + "x-scheme-handler/https" = browser; + "x-scheme-handler/unknown" = browser; + + "audio/*" = ["mpv.desktop"]; + "video/*" = ["mpv.dekstop"]; + "image/*" = ["imv.desktop"]; + "application/json" = browser; + "application/pdf" = ["org.pwmt.zathura.desktop.desktop"]; + "x-scheme-handler/discord" = ["discordcanary.desktop"]; + "x-scheme-handler/spotify" = ["spotify.desktop"]; + "x-scheme-handler/tg" = ["telegramdesktop.desktop"]; + }; +in { + xdg = { + enable = true; + cacheHome = config.home.homeDirectory + "/.local/cache"; + + mimeApps = { + enable = true; + defaultApplications = associations; + }; + + userDirs = { + enable = true; + createDirectories = true; + extraConfig = { + XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots"; + }; + }; + }; +} diff --git a/home/rofi/configs/arc_dark_colors.rasi b/home/rofi/configs/arc_dark_colors.rasi new file mode 100644 index 0000000..fdf4418 --- /dev/null +++ b/home/rofi/configs/arc_dark_colors.rasi @@ -0,0 +1,34 @@ +/******************************************************* + * ROFI Arc Dark colors for EndeavourOS + * Maintainer: joekamprad + *******************************************************/ +* { + selected-normal-foreground: rgba ( 249, 249, 249, 100 % ); + foreground: rgba ( 196, 203, 212, 100 % ); + normal-foreground: @foreground; + alternate-normal-background: rgba ( 64, 69, 82, 59 % ); + red: rgba ( 220, 50, 47, 100 % ); + selected-urgent-foreground: rgba ( 249, 249, 249, 100 % ); + blue: rgba ( 38, 139, 210, 100 % ); + urgent-foreground: rgba ( 204, 102, 102, 100 % ); + alternate-urgent-background: rgba ( 75, 81, 96, 90 % ); + active-foreground: rgba ( 101, 172, 255, 100 % ); + lightbg: rgba ( 238, 232, 213, 100 % ); + selected-active-foreground: rgba ( 249, 249, 249, 100 % ); + alternate-active-background: rgba ( 75, 81, 96, 89 % ); + background: rgba ( 45, 48, 59, 95 % ); + alternate-normal-foreground: @foreground; + normal-background: @background; + lightfg: rgba ( 88, 104, 117, 100 % ); + selected-normal-background: rgba ( 64, 132, 214, 100 % ); + border-color: rgba ( 124, 131, 137, 100 % ); + spacing: 2; + separatorcolor: rgba ( 29, 31, 33, 100 % ); + urgent-background: rgba ( 29, 31, 33, 17 % ); + selected-urgent-background: rgba ( 165, 66, 66, 100 % ); + alternate-urgent-foreground: @urgent-foreground; + background-color: rgba ( 0, 0, 0, 0 % ); + alternate-active-foreground: @active-foreground; + active-background: rgba ( 29, 31, 33, 17 % ); + selected-active-background: rgba ( 68, 145, 237, 100 % ); +} diff --git a/home/rofi/configs/arc_dark_transparent_colors.rasi b/home/rofi/configs/arc_dark_transparent_colors.rasi new file mode 100644 index 0000000..4dc8195 --- /dev/null +++ b/home/rofi/configs/arc_dark_transparent_colors.rasi @@ -0,0 +1,34 @@ +/******************************************************* + * ROFI Arch Dark Transparent colors for EndeavourOS + * Maintainer: joekamprad + *******************************************************/ +* { + selected-normal-foreground: rgba ( 255, 147, 5, 100 % ); + foreground: rgba ( 196, 203, 212, 100 % ); + normal-foreground: @foreground; + alternate-normal-background: rgba ( 45, 48, 59, 1 % ); + red: rgba ( 220, 50, 47, 100 % ); + selected-urgent-foreground: rgba ( 249, 249, 249, 100 % ); + blue: rgba ( 38, 139, 210, 100 % ); + urgent-foreground: rgba ( 204, 102, 102, 100 % ); + alternate-urgent-background: rgba ( 75, 81, 96, 90 % ); + active-foreground: rgba ( 101, 172, 255, 100 % ); + lightbg: rgba ( 238, 232, 213, 100 % ); + selected-active-foreground: rgba ( 249, 249, 249, 100 % ); + alternate-active-background: rgba ( 45, 48, 59, 88 % ); + background: rgba ( 45, 48, 59, 88 % ); + alternate-normal-foreground: @foreground; + normal-background: rgba ( 45, 48, 59, 1 % ); + lightfg: rgba ( 88, 104, 117, 100 % ); + selected-normal-background: rgba ( 24, 26, 32, 100 % ); + border-color: rgba ( 124, 131, 137, 100 % ); + spacing: 2; + separatorcolor: rgba ( 45, 48, 59, 1 % ); + urgent-background: rgba ( 45, 48, 59, 15 % ); + selected-urgent-background: rgba ( 165, 66, 66, 100 % ); + alternate-urgent-foreground: @urgent-foreground; + background-color: rgba ( 0, 0, 0, 0 % ); + alternate-active-foreground: @active-foreground; + active-background: rgba ( 29, 31, 33, 17 % ); + selected-active-background: rgba ( 26, 28, 35, 100 % ); +} diff --git a/home/rofi/configs/power-profiles.rasi b/home/rofi/configs/power-profiles.rasi new file mode 100644 index 0000000..f81cf72 --- /dev/null +++ b/home/rofi/configs/power-profiles.rasi @@ -0,0 +1,121 @@ +/******************************************************* + * ROFI configs i3 powermenu for EndeavourOS + * Maintainer: joekamprad + *******************************************************/ +configuration { + font: "Noto Sans Regular 10"; + show-icons: false; + icon-theme: "Qogir"; + scroll-method: 0; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "~/.config/rofi/arc_dark_colors.rasi" + + +window { + background-color: @background; + border: 0; + padding: 10; + transparency: "real"; + width: 170px; + location: east; + /*y-offset: 18;*/ + /*x-offset: 850;*/ +} +listview { + lines: 4; + columns: 1; +} +element { + border: 0; + padding: 1px; +} +element-text { + background-color: inherit; + text-color: inherit; +} +element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} +element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} +element.normal.active { + background-color: @active-background; + text-color: @active-foreground; +} +element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} +element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} +element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} +element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} +element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} +scrollbar { + width: 4px; + border: 0; + handle-color: @normal-foreground; + handle-width: 8px; + padding: 0; +} +mode-switcher { + border: 2px 0px 0px; + border-color: @separatorcolor; +} +button { + spacing: 0; + text-color: @normal-foreground; +} +button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +inputbar { + spacing: 0; + text-color: @normal-foreground; + padding: 1px; +} +case-indicator { + spacing: 0; + text-color: @normal-foreground; +} +entry { + spacing: 0; + text-color: @normal-foreground; +} +prompt { + spacing: 0; + text-color: @normal-foreground; +} +inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} +textbox-prompt-colon { + expand: false; + str: "Set Power Profile:"; + margin: 0px 0.3em 0em 0em; + text-color: @normal-foreground; +} diff --git a/home/rofi/configs/powermenu.rasi b/home/rofi/configs/powermenu.rasi new file mode 100644 index 0000000..3a64a74 --- /dev/null +++ b/home/rofi/configs/powermenu.rasi @@ -0,0 +1,124 @@ +/******************************************************* + * ROFI configs i3 powermenu for EndeavourOS + * Maintainer: joekamprad + *******************************************************/ +configuration { + font: "Noto Sans Regular 10"; + show-icons: false; + icon-theme: "Qogir"; + scroll-method: 0; + disable-history: false; + sidebar-mode: false; +} + +@import "~/.config/rofi/arc_dark_transparent_colors.rasi" + +window { + background-color: @background; + border: 0; + padding: 10; + transparency: "real"; + width: 120px; + location: east; + /*y-offset: 18;*/ + /*x-offset: 850;*/ +} +listview { + lines: 7; + columns: 1; + scrollbar: false; +} +element { + border: 0; + padding: 1px; +} +element-text { + background-color: inherit; + text-color: inherit; +} +element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} +element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} +element.normal.active { + background-color: @active-background; + text-color: @active-foreground; +} +element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} +element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} +element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} +element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} +element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} +scrollbar { + width: 4px; + border: 0; + handle-color: @normal-foreground; + handle-width: 8px; + padding: 0; +} +mode-switcher { + border: 2px 0px 0px; + border-color: @separatorcolor; +} +button { + spacing: 0; + text-color: @normal-foreground; +} +button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +inputbar { + spacing: 0; + text-color: @normal-foreground; + padding: 1px; +} +case-indicator { + spacing: 0; + text-color: @normal-foreground; +} +entry { + spacing: 0; + text-color: @normal-foreground; +} +prompt { + spacing: 0; + text-color: @normal-foreground; +} +inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} +textbox-prompt-colon { + expand: false; + str: ":"; + margin: 0px 0.3em 0em 0em; + text-color: @normal-foreground; +} + +/*removes the text input line*/ +mainbox { + children: [listview]; +} diff --git a/home/rofi/configs/rofidmenu.rasi b/home/rofi/configs/rofidmenu.rasi new file mode 100644 index 0000000..864363f --- /dev/null +++ b/home/rofi/configs/rofidmenu.rasi @@ -0,0 +1,135 @@ +/******************************************************* + * ROFI configs i3 Apps menu for EndeavourOS + * Maintainer: joekamprad + *******************************************************/ +configuration { + font: "Noto Sans Regular 10"; + show-icons: true; + icon-theme: "Qogir"; + display-drun: "Apps"; + drun-display-format: "{name}"; + scroll-method: 0; + disable-history: false; + sidebar-mode: false; +} + +@import "~/.config/rofi/arc_dark_transparent_colors.rasi" + +window { + background-color: @background; + border: 0; + padding: 30; +} +listview { + lines: 10; + columns: 3; +} +mainbox { + border: 0; + padding: 0; +} +message { + border: 2px 0px 0px; + border-color: @separatorcolor; + padding: 1px; +} +textbox { + text-color: @foreground; +} +listview { + fixed-height: 0; + border: 8px 0px 0px; + border-color: @separatorcolor; + spacing: 8px; + scrollbar: false; + padding: 2px 0px 0px; +} +element { + border: 0; + padding: 1px; +} +element-text { + background-color: inherit; + text-color: inherit; +} +element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} +element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} +element.normal.active { + background-color: @active-background; + text-color: @active-foreground; +} +element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} +element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} +element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} +element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} +element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} +scrollbar { + width: 4px; + border: 0; + handle-color: @normal-foreground; + handle-width: 8px; + padding: 0; +} +mode-switcher { + border: 2px 0px 0px; + border-color: @separatorcolor; +} +button { + spacing: 0; + text-color: @normal-foreground; +} +button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +inputbar { + spacing: 0; + text-color: @normal-foreground; + padding: 1px; +} +case-indicator { + spacing: 0; + text-color: @normal-foreground; +} +entry { + spacing: 0; + text-color: @normal-foreground; +} +prompt { + spacing: 0; + text-color: @normal-foreground; +} +inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} +textbox-prompt-colon { + expand: false; + str: ":"; + margin: 0px 0.3em 0em 0em; + text-color: @normal-foreground; +} diff --git a/home/rofi/configs/rofikeyhint.rasi b/home/rofi/configs/rofikeyhint.rasi new file mode 100644 index 0000000..92698ec --- /dev/null +++ b/home/rofi/configs/rofikeyhint.rasi @@ -0,0 +1,273 @@ +/******************************************************* + * ROFI configs i3 keyhint-menu for EndeavourOS + * Maintainer: joekamprad + *******************************************************/ +configuration { + font: "Noto Sans Regular 10"; + show-icons: false; + icon-theme: "Qogir"; + display-drun: "KeyHint"; + drun-display-format: "{name}"; + scroll-method: 0; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "~/.config/rofi/arc_dark_transparent_colors.rasi" + +window { + background-color: @background; + border: 0; + padding: 30; +} +listview { + lines: 10; + columns: 1; +} +mainbox { + border: 0; + padding: 0; +} +message { + border: 2px 0px 0px; + border-color: @separatorcolor; + padding: 1px; +} +textbox { + text-color: @foreground; +} +listview { + fixed-height: 0; + border: 8px 0px 0px; + border-color: @separatorcolor; + spacing: 8px; + scrollbar: false; + padding: 2px 0px 0px; +} +element { + border: 0; + padding: 1px; +} +element-text { + background-color: inherit; + text-color: inherit; +} +element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} +element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} +element.normal.active { + background-color: @active-background; + text-color: @active-foreground; +} +element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} +element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} +element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} +element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} +element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} +scrollbar { + width: 4px; + border: 0; + handle-color: @normal-foreground; + handle-width: 8px; + padding: 0; +} +mode-switcher { + border: 2px 0px 0px; + border-color: @separatorcolor; +} +button { + spacing: 0; + text-color: @normal-foreground; +} +button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +inputbar { + spacing: 0; + text-color: @normal-foreground; + padding: 1px; +} +case-indicator { + spacing: 0; + text-color: @normal-foreground; +} +entry { + spacing: 0; + text-color: @normal-foreground; +} +prompt { + spacing: 0; + text-color: @normal-foreground; +} +inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} +textbox-prompt-colon { + expand: false; + str: ":"; + margin: 0px 0.3em 0em 0em; + text-color: @normal-foreground; +}/******************************************************* + * ROFI configs i3 keyhint-menu for EndeavourOS + * Maintainer: joekamprad + *******************************************************/ +configuration { + font: "Noto Sans Regular 10"; + show-icons: false; + icon-theme: "Qogir"; + display-drun: "KeyHint"; + drun-display-format: "{name}"; + scroll-method: 0; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "~/.config/rofi/arc_dark_transparent_colors.rasi" + +window { + background-color: @background; + border: 0; + padding: 30; +} +listview { + lines: 10; + columns: 1; +} +mainbox { + border: 0; + padding: 0; +} +message { + border: 2px 0px 0px; + border-color: @separatorcolor; + padding: 1px; +} +textbox { + text-color: @foreground; +} +listview { + fixed-height: 0; + border: 8px 0px 0px; + border-color: @separatorcolor; + spacing: 8px; + scrollbar: false; + padding: 2px 0px 0px; +} +element { + border: 0; + padding: 1px; +} +element-text { + background-color: inherit; + text-color: inherit; +} +element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} +element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} +element.normal.active { + background-color: @active-background; + text-color: @active-foreground; +} +element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} +element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} +element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} +element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} +element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} +scrollbar { + width: 4px; + border: 0; + handle-color: @normal-foreground; + handle-width: 8px; + padding: 0; +} +mode-switcher { + border: 2px 0px 0px; + border-color: @separatorcolor; +} +button { + spacing: 0; + text-color: @normal-foreground; +} +button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +inputbar { + spacing: 0; + text-color: @normal-foreground; + padding: 1px; +} +case-indicator { + spacing: 0; + text-color: @normal-foreground; +} +entry { + spacing: 0; + text-color: @normal-foreground; +} +prompt { + spacing: 0; + text-color: @normal-foreground; +} +inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} +textbox-prompt-colon { + expand: false; + str: ":"; + margin: 0px 0.3em 0em 0em; + text-color: @normal-foreground; +} diff --git a/home/rofi/default.nix b/home/rofi/default.nix new file mode 100644 index 0000000..8ba9b0a --- /dev/null +++ b/home/rofi/default.nix @@ -0,0 +1,12 @@ +{ + pkgs, + config, + ... +}: { + # 基于 https://github.com/endeavouros-team/endeavouros-i3wm-setup + home.file.".config/rofi" = { + source = ./configs; + # copy the scripts directory recursively + recursive = true; + }; +} diff --git a/hosts/m920q/default.nix b/hosts/m920q/default.nix index e69de29..6c94bfd 100644 --- a/hosts/m920q/default.nix +++ b/hosts/m920q/default.nix @@ -0,0 +1,59 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + imports = + [ + ../../modules/system.nix + ../../modules/hyprland.nix + + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader = { + grub = { + enable = true; + device = "/dev/sda"; + }; + #efi = { + # canTouchEfiVariables = true; + # efiSysMountPoint = "/boot/efi"; # ← use the same mount point here. + #}; + systemd-boot.enable = true; + }; + + networking.hostName = "nix-cyperpunk.de"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + networking.defaultGateway = "192.168.2.41"; + + # for Nvidia GPU + #services.xserver.videoDrivers = ["nvidia"]; + hardware.opengl.enable = true; + #hardware.nvidia = { + # package = config.boot.kernelPackages.nvidiaPackages.stable; + # modesetting.enable = true; + #}; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "25.05"; # Did you read the comment? + +} + + diff --git a/modules/hyprland.nix b/modules/hyprland.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/system.nix b/modules/system.nix index e69de29..c8fbbcb 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -0,0 +1,190 @@ +{ + pkgs, + lib, + username, + ... +}: { + # ============================= User related ============================= + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.${username} = { + isNormalUser = true; + description = username; + extraGroups = ["networkmanager" "wheel"]; + }; + # given the users in this list the right to specify additional substituters via: + # 1. `nixConfig.substituers` in `flake.nix` + # 2. command line args `--options substituers http://xxx` + nix.settings.trusted-users = [username]; + + # customise /etc/nix/nix.conf declaratively via `nix.settings` + nix.settings = { + # enable flakes globally + experimental-features = ["nix-command" "flakes"]; + + substituters = [ + "https://cache.nixos.org" + ]; + + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + builders-use-substitutes = true; + }; + + # do garbage collection weekly to keep disk usage low + nix.gc = { + automatic = lib.mkDefault true; + dates = lib.mkDefault "weekly"; + options = lib.mkDefault "--delete-older-than 7d"; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # Set your time zone. + time.timeZone = "Europe/Berlin"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + fonts = { + packages = with pkgs; [ + # icon fonts + material-design-icons + + # normal fonts + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + + # nerdfonts + (nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];}) + ]; + + # use fonts specified by user rather than default ones + enableDefaultPackages = false; + + # user defined fonts + # the reason there's Noto Color Emoji everywhere is to override DejaVu's + # B&W emojis that would sometimes show instead of some Color emojis + fontconfig.defaultFonts = { + serif = ["Noto Serif" "Noto Color Emoji"]; + sansSerif = ["Noto Sans" "Noto Color Emoji"]; + monospace = ["JetBrainsMono Nerd Font" "Noto Color Emoji"]; + emoji = ["Noto Color Emoji"]; + }; + }; + + programs.dconf.enable = true; + + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + networking.firewall.enable = false; + + # Enable the OpenSSH daemon. + services.openssh = { + enable = true; + settings = { + X11Forwarding = true; + PermitRootLogin = "no"; # disable root login + PasswordAuthentication = false; # disable password login + }; + openFirewall = true; + }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # Bare minimum + neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + wget + git + + # System tools + sysstat + lm_sensors # for `sensors` command + ethtool + pciutils # lspci + usbutils # lsusb + + # Window Manager + hyprshot + fastfetch + nemo-with-extensions # cinnamons file manager + + # Terminal + yazi # file manager + jq # JSON Parser + yq-go # YAML Parser + glow # Markdown Reader + btop # system monitor + iotop # iomonitor + iftop # network monitor + iperf3 # network tester + nmap # network discovery + eza # ls replacement + curl + dnsutils + ldns + file + which + tree + gnused + gnutar + gawk + zstd + gnupg + + # Archives + zip + unzip + p7zip + xz + ]; + + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + services.power-profiles-daemon = { + enable = true; + }; + security.polkit.enable = true; + + services = { + dbus.packages = [pkgs.gcr]; + + geoclue2.enable = true; + + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + + udev.packages = with pkgs; [gnome.gnome-settings-daemon]; + }; +} diff --git a/users/phil/home.nix b/users/phil/home.nix index e69de29..b9dc091 100644 --- a/users/phil/home.nix +++ b/users/phil/home.nix @@ -0,0 +1,22 @@ +{pkgs, ...}: { + ################################################################################################################## + # + # All Ryan's Home Manager Configuration + # + ################################################################################################################## + + imports = [ + ../../home/core.nix + + ../../home/fcitx5 + ../../home/i3 + ../../home/programs + ../../home/rofi + ../../home/shell + ]; + + programs.git = { + userName = "DerGrumpf"; + userEmail = "p.keier@beyerstedt-it.de"; + }; +} diff --git a/users/phil/nixos.nix b/users/phil/nixos.nix index e69de29..8f22b24 100644 --- a/users/phil/nixos.nix +++ b/users/phil/nixos.nix @@ -0,0 +1,14 @@ +{ + ################################################################################################################## + # + # NixOS Configuration + # + ################################################################################################################## + + users.users.ryan = { + # Ryan's authorizedKeys + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCaLHfxVylghDMYR8t4QMUpeRRqXasNABQKBEy9MmhbUXCcWiPbPMSZH8FMHON34rm2OrXP1kY/8jQxqBJDA+SqpFR2AZ4Khk9iVMaq5GHxxpn2amZUjoBa+fB29WaiE1npV5JVJV3O0ylw6GtiCnpneE6fGx2MO1vOY/7zKrUX/OK7WfwkDpeEzZgV/j/md917HrzUVeZwdeTq3WCRO8Gew6R8Xs6FRjSiGuH0dq14D4Ow5Zf1cI1jx+JfD/5vGasw8HXPu1NdxsOE+6D7/22IKqGr+S74/lAoyyD5qqk0s05lw8UY/PXBLJaNLZu9Fwx0BqTHpJEvftpmvd9wUxgR3msx9VXtKNSrqivIbDgeU+3oGzzkrGZODl7FCp4XKGmbrX85Z6lKwEGgv5jez4MLZcmT86bxB7m1wIbqSbVtfhS+GI7yPTA/kLzzFa14Im/+LTj95pb8qs2ALMwTMP1j2f9A6D3RriOFihL+68qn+YbK58KuV1R0f+CQRmlfVbk= phil@web.cyperpunk.de" + ]; + }; +}