diff --git a/files/prompt.fish b/files/prompt.fish deleted file mode 100644 index f01bd42..0000000 --- a/files/prompt.fish +++ /dev/null @@ -1,64 +0,0 @@ -# name: Informative Vcs -# author: Mariusz Smykula - -# function fish_prompt --description 'Write out the prompt' - set -l last_pipestatus $pipestatus - set -lx __fish_last_status $status # Export for __fish_print_pipestatus. - - if not set -q __fish_git_prompt_show_informative_status - set -g __fish_git_prompt_show_informative_status 1 - end - if not set -q __fish_git_prompt_hide_untrackedfiles - set -g __fish_git_prompt_hide_untrackedfiles 1 - end - if not set -q __fish_git_prompt_color_branch - set -g __fish_git_prompt_color_branch magenta --bold - end - if not set -q __fish_git_prompt_showupstream - set -g __fish_git_prompt_showupstream informative - end - if not set -q __fish_git_prompt_color_dirtystate - set -g __fish_git_prompt_color_dirtystate blue - end - if not set -q __fish_git_prompt_color_stagedstate - set -g __fish_git_prompt_color_stagedstate yellow - end - if not set -q __fish_git_prompt_color_invalidstate - set -g __fish_git_prompt_color_invalidstate red - end - if not set -q __fish_git_prompt_color_untrackedfiles - set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal - end - if not set -q __fish_git_prompt_color_cleanstate - set -g __fish_git_prompt_color_cleanstate green --bold - end - - set -l color_cwd - set -l suffix - if functions -q fish_is_root_user; and fish_is_root_user - if set -q fish_color_cwd_root - set color_cwd $fish_color_cwd_root - else - set color_cwd $fish_color_cwd - end - set suffix '#' - else - set color_cwd $fish_color_cwd - set suffix '$' - end - - # PWD - set_color $color_cwd - echo -n (prompt_pwd) - set_color normal - - printf '%s ' (fish_vcs_prompt) - - set -l status_color (set_color $fish_color_status) - set -l statusb_color (set_color --bold $fish_color_status) - set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) - echo -n $prompt_status - set_color normal - - echo -n "$suffix " -# end diff --git a/home.nix b/home.nix deleted file mode 100644 index a9605b5..0000000 --- a/home.nix +++ /dev/null @@ -1,174 +0,0 @@ -args @ { inputs, lib, config, pkgs, ... }: -let - importCfg = ({prefix, name}: - let - cfg_path = ./${prefix}/${name}.nix; - in ( - if builtins.pathExists cfg_path then ( - ((import cfg_path) args) - ) else ( - { enable = true; } - ) - ) - ); -in rec { - home.stateVersion = "23.11"; - home.username = "krizej"; - home.homeDirectory = "/home/krizej"; - - services = lib.genAttrs (import ./services) - (cfg_name: importCfg { prefix = "services"; name = cfg_name; }); - - programs = lib.genAttrs (import ./programs) - (cfg_name: importCfg { prefix = "programs"; name = cfg_name; }); - - home.packages = with pkgs; [ - xarchiver - fortune - jetbrains.pycharm-community - jetbrains.clion -# android-studio -# android-tools - feh - element-desktop - lxappearance - pavucontrol - ezquake - discord - libreoffice-qt - wineWowPackages.stable - winetricks - pamixer - gimp - xorg.xkill - gamemode - gdb - trenchbroom - vkquake - ericw-tools - xdotool - yad - pcmanfm - gvfs - sqlitebrowser - xdg-desktop-portal - xdg-desktop-portal-gnome - # # It is sometimes useful to fine-tune packages, for example, by applying - # # overrides. You can do that directly here, just don't forget the - # # parentheses. Maybe you want to install Nerd Fonts with a limited number of - # # fonts? - # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) - - - # # You can also create simple shell scripts directly inside your - # # configuration. For example, this adds a command 'my-hello' to your - # # environment: - # (pkgs.writeShellScriptBin "my-hello" '' - # echo "Hello, ${config.home.username}!" - # '') - - (pkgs.writeShellScriptBin "i3custom-center-mouse-on-focus" '' - eval $(xdotool getwindowfocus getwindowgeometry --shell) - MX=$(($X + $WIDTH / 2)) - MY=$(($Y + $HEIGHT / 2)) - xdotool mousemove $MX $MY - '') - - (pkgs.writeShellScriptBin "i3custom-window-actions" '' - yad --splash --mouse --close-on-unfocus --undecorated \ - --gtkrc="${home.homeDirectory}/.config/i3/i3gtk.css" \ - --text="i3 window actions" \ - --button float:0 --button kill:1 - - case $? in - 0) i3custom-floating-toggle;; - 1) i3-msg "kill";; - -1) ;; - esac - '') - - (pkgs.writeShellScriptBin "i3custom-floating-toggle" '' - i3-msg "mark --add _; [con_mark=f] floating disable, border pixel 1, mark --add --toggle _; [con_mark=_] floating enable, border normal; mark --add --toggle f;" - '') - ]; - - home.file = { - ".config/i3/workspace2.json".source = files/workspace2.json; - ".config/i3/i3gtk.css".source = files/i3gtk.css; - # FIXME not .vim bro!!!!!!!!! - ".vim/colors/darcula.vim".source = files/darcula.vim; - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; - }; - - home.sessionVariables = let - HOME = home.homeDirectory; - in rec { - EDITOR = "vim"; - MANSECT = "2:3:3p:3type:1:1p:n:l:8:0:0p:5:4:9:6:7"; - - # xdg crap thx poz - XDG_DATA_HOME = "${HOME}/.local/share"; - XDG_CONFIG_HOME = "${HOME}/.config"; - XDG_STATE_HOME = "${HOME}/.local/state"; - XDG_CACHE_HOME = "${HOME}/.cache"; - ANDROID_USER_HOME = "${XDG_DATA_HOME}/android"; - ANDROID_HOME = "${XDG_DATA_HOME}/android/sdk"; - GRADLE_USER_HOME = "${XDG_DATA_HOME}/gradle"; - PYTHONSTARTUP = "${XDG_CONFIG_HOME}/python/pythonrc"; - HISTFILE = "${XDG_CACHE_HOME}/bash/history"; - CARGO_HOME = "${XDG_DATA_HOME}/cargo"; - _JAVA_OPTIONS = "-Djava.utils.prefs.userRoot=${XDG_CONFIG_HOME}/java"; - GNUPGHOME = "${XDG_DATA_HOME}/gnupg"; - WINEPREFIX = "${XDG_DATA_HOME}/wine"; - RUSTUP_HOME = "${XDG_DATA_HOME}/rustup"; - NUGET_PACKAGES = "${XDG_CACHE_HOME}/NuGetPackages"; - FCEUX_HOME = "${XDG_CONFIG_HOME}/fceux"; - DOTNET_CLI_HOME = "${XDG_CONFIG_HOME}/dotnet"; - GTK2_RC_FILES = lib.mkForce "${XDG_CONFIG_HOME}/gtk-2.0/gtkrc"; - }; - - xdg.userDirs = let - home = config.home.homeDirectory; - in { - enable = true; - desktop = "${home}/desktop"; - documents = "${home}/documents"; - download = "${home}/downloads"; - music = "${home}/music"; - pictures = "${home}/pictures"; - publicShare = "${home}/public"; - templates = "${home}/templates"; - videos = "${home}/videos"; - }; - - # xorg crap (incl. themes etc) - - xsession = { - enable = true; - # special case - i3 is not listed in ./programs/default.nix - windowManager.i3 = (import ./programs/i3.nix args); - }; - - home.pointerCursor = { - gtk.enable = true; - x11.enable = true; - name = "aero-drop"; - package = pkgs.win7-cursors; - }; - - gtk = { - enable = true; - iconTheme = { - name = "Arc"; - package = pkgs.arc-icon-theme; - }; - theme = { - name = "Arc-Mono"; - package = pkgs.arc-mono-gtk-theme; - }; - }; -} diff --git a/misc/default.nix b/misc/default.nix new file mode 100644 index 0000000..c79ee4b --- /dev/null +++ b/misc/default.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + imports = [ + ./dunst.nix + ./flameshot.nix + ./picom.nix + ]; +} diff --git a/misc/documentation.nix b/misc/documentation.nix new file mode 100644 index 0000000..e69de29 diff --git a/misc/networking.nix b/misc/networking.nix new file mode 100644 index 0000000..e69de29 diff --git a/misc/nix.nix b/misc/nix.nix new file mode 100644 index 0000000..7110d35 --- /dev/null +++ b/misc/nix.nix @@ -0,0 +1,12 @@ +{ ... }: +{ + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + nixpkgs.config.permittedInsecurePackages = [ + "freeimage-unstable-2021-11-01" + "openssl-1.1.1w" + ]; + + nixpkgs.overlays = import ./pkgs pkgs; + nixpkgs.config.allowUnfree = true; +} diff --git a/misc/sudo.nix b/misc/sudo.nix new file mode 100644 index 0000000..e69de29 diff --git a/misc/system.nix b/misc/system.nix new file mode 100644 index 0000000..e69de29 diff --git a/misc/theme.nix b/misc/theme.nix new file mode 100644 index 0000000..e69de29 diff --git a/misc/xdg.nix b/misc/xdg.nix new file mode 100644 index 0000000..b4da5ba --- /dev/null +++ b/misc/xdg.nix @@ -0,0 +1,45 @@ +{ config, pkgs, ... }: +let + HOME = config.home-manager.users.krizej.home.homeDirectory; +in { + home-manager.users.krizej = { + home.packages = with pkgs; [ + xdg-desktop-portal + xdg-desktop-portal-gnome + ]; + + home.sessionVariables = rec { + # xdg crap thx poz + XDG_DATA_HOME = "${HOME}/.local/share"; + XDG_CONFIG_HOME = "${HOME}/.config"; + XDG_STATE_HOME = "${HOME}/.local/state"; + XDG_CACHE_HOME = "${HOME}/.cache"; + ANDROID_USER_HOME = "${XDG_DATA_HOME}/android"; + ANDROID_HOME = "${XDG_DATA_HOME}/android/sdk"; + GRADLE_USER_HOME = "${XDG_DATA_HOME}/gradle"; + PYTHONSTARTUP = "${XDG_CONFIG_HOME}/python/pythonrc"; + HISTFILE = "${XDG_CACHE_HOME}/bash/history"; + CARGO_HOME = "${XDG_DATA_HOME}/cargo"; + _JAVA_OPTIONS = "-Djava.utils.prefs.userRoot=${XDG_CONFIG_HOME}/java"; + GNUPGHOME = "${XDG_DATA_HOME}/gnupg"; + WINEPREFIX = "${XDG_DATA_HOME}/wine"; + RUSTUP_HOME = "${XDG_DATA_HOME}/rustup"; + NUGET_PACKAGES = "${XDG_CACHE_HOME}/NuGetPackages"; + FCEUX_HOME = "${XDG_CONFIG_HOME}/fceux"; + DOTNET_CLI_HOME = "${XDG_CONFIG_HOME}/dotnet"; + GTK2_RC_FILES = lib.mkForce "${XDG_CONFIG_HOME}/gtk-2.0/gtkrc"; + }; + + xdg.userDirs = { + enable = true; + desktop = "${HOME}/desktop"; + documents = "${HOME}/documents"; + download = "${HOME}/downloads"; + music = "${HOME}/music"; + pictures = "${HOME}/pictures"; + publicShare = "${HOME}/public"; + templates = "${HOME}/templates"; + videos = "${HOME}/videos"; + }; + }; +} diff --git a/programs/i3status.nix b/programs/i3status.nix deleted file mode 100644 index 9ebc7f3..0000000 --- a/programs/i3status.nix +++ /dev/null @@ -1,48 +0,0 @@ -{...}: -{ - enable = true; - enableDefault = false; - - general = { - interval = 1; - colors = true; - color_good = "#91d956"; - color_bad = "#f43841"; - color_degraded = "#ffdd33"; - output_format = "i3bar"; - }; - - modules = { - "cpu_usage" = { - position = 0; - settings = { - format = "cpu: %usage"; - }; - }; - - "memory" = { - position = 1; - settings = { - format = "mem: %used"; - threshold_degraded = "1G"; - format_degraded = "MEMORY < %available"; - }; - }; - - "volume master" = { - position = 2; - settings = { - color_degraded = "#333333"; - format = "vol: %volume"; - format_muted = "vol: ---"; - }; - }; - - "tztime local" = { - position = 3; - settings = { - format = "%Y-%m-%d %H:%M:%S (%A)"; - }; - }; - }; -} diff --git a/programs/rofi.nix b/programs/rofi.nix deleted file mode 100644 index c1bf2bd..0000000 --- a/programs/rofi.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ config, ... }: -{ - enable = true; - theme = let - mkLiteral = config.lib.formats.rasi.mkLiteral; - Black = mkLiteral "Black"; - White = mkLiteral "White"; - north = mkLiteral "north"; - horizontal = mkLiteral "horizontal"; - in { - "*" = { - background-color = Black; - border-color = White; - text-color = White; - font = "JetBrains Mono NL 12"; - }; - window = { - anchor = north; - location = north; - width = mkLiteral "100%"; - padding = mkLiteral "4px"; - children = map mkLiteral [ "horibox" ]; - }; - horibox = { - orientation = horizontal; - children = map mkLiteral [ "prompt" "entry" "listview" ]; - }; - listview = { - layout = horizontal; - spacing = mkLiteral "5px"; - lines = 100; - }; - entry = { - expand = false; - width = mkLiteral "10em"; - }; - element = { - padding = mkLiteral "0px 2px"; - }; - "element selected" = { - background-color = mkLiteral "#333333"; - }; - prompt = { - text-color = mkLiteral "#00000000"; - }; - "element-text, element-icon" = { - background-color = mkLiteral "inherit"; - text-color = mkLiteral "inherit"; - }; - }; -} - diff --git a/services/picom.nix b/services/picom.nix deleted file mode 100644 index 5ceb68b..0000000 --- a/services/picom.nix +++ /dev/null @@ -1,4 +0,0 @@ -{...}: -{ - enable = true; -} diff --git a/services/sddm.nix b/services/sddm.nix new file mode 100644 index 0000000..e69de29 diff --git a/services/xserver.nix b/services/xserver.nix new file mode 100644 index 0000000..e69de29