diff --git a/common/default.nix b/common/default.nix new file mode 100644 index 0000000..3263497 --- /dev/null +++ b/common/default.nix @@ -0,0 +1,12 @@ +{ config, lib, helpers, ... }: + +{ + options.custom = { + modules = lib.mkOption { + type = lib.types.listOf lib.types.path; + default = []; + }; + }; + + imports = (helpers.getModules "/default.nix" config.custom.modules); +} diff --git a/common/helpers.nix b/common/helpers.nix new file mode 100644 index 0000000..afebf0b --- /dev/null +++ b/common/helpers.nix @@ -0,0 +1,25 @@ +{ lib, ... }: { + getModules = (filename: modules: + (builtins.filter + (path: builtins.pathExists path) + # (builtins.map + # (dirname: ./. + ("/" + dirname) + filename) + # (lib.attrsets.filterAttrs + # (entry: entry == "directory") + # (builtins.readDir ../modules) + # ) + # ) + (builtins.map + (path: path + filename) + modules + ) + ) + ); + + filterModules = (modules: + (builtins.filter + (path: builtins.pathExists path) + modules + ) + ); +} \ No newline at end of file diff --git a/common/home.nix b/common/home.nix new file mode 100644 index 0000000..25219d7 --- /dev/null +++ b/common/home.nix @@ -0,0 +1,70 @@ +{ pkgs, config, lib, helpers, ... }: + +{ + options.custom = { + username = lib.mkOption { + type = lib.types.str; + default = "dakedres"; + }; + + nonFreePackages = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = []; + }; + + wallpaper = lib.mkOption { + type = lib.types.path; + }; + + colors = + let + colorOption = lib.mkOption { + type = lib.types.str; + default = "#000000"; + }; + in + { + base00 = colorOption; + base01 = colorOption; + base02 = colorOption; + base03 = colorOption; + base04 = colorOption; + base05 = colorOption; + base06 = colorOption; + base07 = colorOption; + base08 = colorOption; + base09 = colorOption; + base0A = colorOption; + base0B = colorOption; + base0C = colorOption; + base0D = colorOption; + base0E = colorOption; + base0F = colorOption; + }; + }; + + config = + let + username = config.custom.username; + nonFreePackages = config.custom.nonFreePackages; + in + { + home = { + username = username; + homeDirectory = "/home/${username}"; + }; + + # Unfree packages + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) nonFreePackages; + + home.packages = + map (name: pkgs.${name}) nonFreePackages; + + # Take over my xsession + xsession.enable = true; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + }; +} diff --git a/common/homeOptions.nix b/common/homeOptions.nix new file mode 100644 index 0000000..f7569bd --- /dev/null +++ b/common/homeOptions.nix @@ -0,0 +1,3 @@ +{ lib, ... }: { + +} diff --git a/flake.nix b/flake.nix index 3f7a500..7742acf 100644 --- a/flake.nix +++ b/flake.nix @@ -19,15 +19,29 @@ let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; + specialArgs = { + inherit system; + helpers = import ./common/helpers.nix { + inherit inputs; + lib = nixpkgs.lib; + }; + }; in - { - - nixosConfigurations.default = nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs; - }; + { + nixpkgs.hostPlatform = "x86_64-linux"; + + nixosConfigurations.vulpes = nixpkgs.lib.nixosSystem { + inherit specialArgs; modules = [ - ./host/configuration.nix + ./hosts/vulpes/configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; + + nixosConfigurations.vinegar = nixpkgs.lib.nixosSystem { + inherit specialArgs; + modules = [ + ./hosts/vinegar/configuration.nix inputs.home-manager.nixosModules.default ]; }; diff --git a/home/default.nix b/home/default.nix deleted file mode 100644 index 6a29352..0000000 --- a/home/default.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ config, pkgs, inputs, ... }: - -{ - # Home Manager needs a bit of information about you and the paths it should - # manage. - home.username = "dakedres"; - home.homeDirectory = "/home/dakedres"; - - # 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 should not change this value, even if you update Home Manager. If you do - # want to update the value, then make sure to first check the Home Manager - # release notes. - home.stateVersion = "23.11"; # Please read the comment before changing. - - nixpkgs.config.allowUnfree = true; - # The home.packages option allows you to install Nix packages into your - # environment. - home.packages = with pkgs; [ - # # 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}!" - # '') - - # Util - neofetch - bitwarden - qutebrowser - discord - - # Visual - imagemagick - kate - - # Audio - ncspot - - # Environment - fishPlugins.grc - ]; - - # Home Manager is pretty good at managing dotfiles. The primary way to manage - # plain files is through 'home.file'. - home.file = { - # # Building this configuration will create a copy of 'dotfiles/screenrc' in - # # the Nix store. Activating the configuration will then make '~/.screenrc' a - # # symlink to the Nix store copy. - # ".screenrc".source = dotfiles/screenrc; - - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; - }; - - # Home Manager can also manage your environment variables through - # 'home.sessionVariables'. If you don't want to manage your shell through Home - # Manager then you have to manually source 'hm-session-vars.sh' located at - # either - # - # ~/.nix-profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # /etc/profiles/per-user/dakedres/etc/profile.d/hm-session-vars.sh - # - home.sessionVariables = { - # EDITOR = "emacs"; - }; - - programs.fish = { - enable = true; - interactiveShellInit = '' - set fish_greeting # Disable greeting - ''; - shellAliases = { - ll = "ls -lh"; - }; - }; - - programs.kitty = { - enable = true; - shellIntegration.enableFishIntegration = true; - }; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; -} diff --git a/home/newm.nix b/home/newm.nix deleted file mode 100644 index 7ad3bc2..0000000 --- a/home/newm.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, pkgs, inputs, ... }: - -{ - homeManager.home.file = { - "testFile".text = "test"; - }; -} diff --git a/host/home.nix b/host/home.nix deleted file mode 100644 index 599cbe1..0000000 --- a/host/home.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ pkgs, lib, ... }: - -let - -terminal = "kitty"; -# newm = inputs.newmpkgs.packages.${system}.newm-atha; - -packages = [ - # Utility - pkgs.bitwarden - pkgs.vimiv-qt - - # Visual - pkgs.imagemagick - pkgs.kate - pkgs.helix - pkgs.howl - - #Games - pkgs.prismlauncher-qt5 - - # Env - pkgs.eww-wayland - pkgs.socat - pkgs.jq -]; - -nonFreePackages = [ - "discord" -]; - -in { - custom.colors = import ../themes/colors/base16-monokai.nix; - custom.wallpaper = ../wallpapers/blip-blip-blip-blip.jpg; - - home = { - sessionVariables = { - EDITOR = "kate"; - BROWSER = "qutebrowser"; - TERMINAL = "kitty"; - TERM = "kitty"; - FILEMANAGER = "kitty lf"; - - # Tell Electron apps it's wayland - NIXOS_OZONE_WL = 1; - }; - - sessionPath = [ - "$HOME/.local/bin" - ]; - - stateVersion = "23.11"; - }; - - # Add packages - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) nonFreePackages; - - home.packages = - map (name: pkgs.${name}) nonFreePackages - ++ packages; - - xdg.mimeApps = { - enable = true; - }; - - # Directories - xdg.userDirs = { - createDirectories = false; - download = "$HOME/downloads"; - music = "$HOME/music"; - }; - - # Openers - xdg.mimeApps.defaultApplications = { - "inode/directory" = [ - # "lf.desktop" - "kitty-open.desktop" - ]; - }; - - # Standard programs - programs.bat = { - enable = true; - config = { - paging = "never"; - }; - }; - - # lf - programs.lf = { - enable = true; - commands = { - q = "quit"; # Why didn't they do this btw - }; - keybindings = { - "" = "$$OPENER $f"; - }; - }; - - xdg.desktopEntries.lf = { - name = "LF"; - genericName = "File browser"; - exec = "lf %U"; - terminal = true; - mimeType = [ "inode/directory" ]; - }; - - # Take over my xsession - xsession.enable = true; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; -} diff --git a/host/homeOptions.nix b/host/homeOptions.nix deleted file mode 100644 index 2005e50..0000000 --- a/host/homeOptions.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib, ... }: { - options.custom = { - wallpaper = lib.mkOption { - type = lib.types.path; - }; - - colors = - let - colorOption = lib.mkOption { - type = lib.types.str; - default = "#000000"; - }; - in - { - base00 = colorOption; - base01 = colorOption; - base02 = colorOption; - base03 = colorOption; - base04 = colorOption; - base05 = colorOption; - base06 = colorOption; - base07 = colorOption; - base08 = colorOption; - base09 = colorOption; - base0A = colorOption; - base0B = colorOption; - base0C = colorOption; - base0D = colorOption; - base0E = colorOption; - base0F = colorOption; - }; - }; -} diff --git a/host/user.nix b/host/user.nix deleted file mode 100644 index 9a2ce0c..0000000 --- a/host/user.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, lib, inputs, ... }: - -let - modules = import ./modules.nix; - username = config.custom.username; -in { - options.custom = { - username = lib.mkOption { - type = lib.types.str; - default = "dakedres"; - }; - }; - - config.home-manager.users."${username}" = { - imports = - (builtins.filter - (path: builtins.pathExists path) - (builtins.map - (path: path + "/home.nix") - modules - ) - ) ++ [ - ./home.nix - ./homeOptions.nix - ]; - - config.home = { - username = username; - homeDirectory = "/home/${username}"; - }; - }; - - imports = - (builtins.filter - (path: builtins.pathExists path) - (builtins.map - (path: path + "/default.nix") - modules - ) - ); -} diff --git a/hosts/vinegar/configuration.nix b/hosts/vinegar/configuration.nix new file mode 100644 index 0000000..1ca3a7f --- /dev/null +++ b/hosts/vinegar/configuration.nix @@ -0,0 +1,67 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +# NixOS-WSL specific options are documented on the NixOS-WSL repository: +# https://github.com/nix-community/NixOS-WSL + +args@{ config, lib, pkgs, helpers, ... }: + +let + username = "nixos"; +in { + imports = + helpers.getModules "/default.nix" (import ./modules.nix) ++ [ + # include NixOS-WSL modules + + ]; + + home-manager.users."${username}" = { + imports = helpers.getModules "/home.nix" (import ./modules.nix) ++ [ + ../../common/home.nix + ./home.nix + ]; + + config.custom.username = username; + }; + + wsl = { + enable = true; + defaultUser = username; + }; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + + services.xserver = { + layout = "us"; + xkb.options = "caps:swapescape,altwin:swap_alt_win"; + }; + + services.xserver.enable = true; + services.xserver.displayManager.sddm.enable = true; + services.xserver.desktopManager.plasma5.enable = true; + + services.xrdp.enable = true; + services.xrdp.defaultWindowManager = "dbus-run-session bspwm"; + # services.xrdp.defaultWindowManager = "Hyprland"; + services.xrdp.openFirewall = true; + services.xrdp.port = 3390; + + environment.systemPackages = [ + pkgs.vscodium + pkgs.git + pkgs.wget + pkgs.micro + ]; + + fonts.packages = [ + pkgs.ubuntu_font_family + ]; + + # 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 = "23.11"; # Did you read the comment? +} diff --git a/hosts/vinegar/home.nix b/hosts/vinegar/home.nix new file mode 100644 index 0000000..3203da8 --- /dev/null +++ b/hosts/vinegar/home.nix @@ -0,0 +1,45 @@ +{ pkgs, helpers, ... }: + +{ + imports = + # helpers.getModules "/home.nix" (import ./modules.nix) ++ + [ + ../../colors/monokai-dark + ./start-session/home.nix + ]; + custom.wallpaper = ../../wallpapers/blip-blip-blip-blip.jpg; + + xsession.windowManager.bspwm.extraConfig = '' + pgrep -x sxhkd > /dev/null || sxhkd & + ''; + + home = { + sessionVariables = { + EDITOR = "codium"; + BROWSER = "qutebrowser"; + TERMINAL = "kitty"; + TERM = "kitty"; + FILEMANAGER = "kitty lf"; + + # Tell Electron apps it's wayland + NIXOS_OZONE_WL = 1; + }; + + sessionPath = [ + "$HOME/.local/bin" + ]; + + stateVersion = "23.11"; + }; + + # Defaults + xdg.mimeApps.enable = true; + xdg.mimeApps.defaultApplications = { + "inode/directory" = [ + # "lf.desktop" + "kitty-open.desktop" + ]; + }; + + +} \ No newline at end of file diff --git a/hosts/vinegar/modules.nix b/hosts/vinegar/modules.nix new file mode 100644 index 0000000..1932999 --- /dev/null +++ b/hosts/vinegar/modules.nix @@ -0,0 +1,10 @@ +[ + ../../modules/fish + ../../modules/kitty + ../../modules/lf + + ../../modules/ncspot + + ../../modules/bspwm + ../../modules/qutebrowser +] \ No newline at end of file diff --git a/hosts/vinegar/start-session.nix b/hosts/vinegar/start-session.nix new file mode 100644 index 0000000..740096e --- /dev/null +++ b/hosts/vinegar/start-session.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: + +{ + home.file.".local/bin/qutesearch".source = ./start-session + environment.systemPackages = [ startSession ]; +} \ No newline at end of file diff --git a/hosts/vinegar/start-session/home.nix b/hosts/vinegar/start-session/home.nix new file mode 100644 index 0000000..236800f --- /dev/null +++ b/hosts/vinegar/start-session/home.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: { + home.file.".local/bin/start-session" = { + source = ./start-session; + executable = true; + }; + + home.packages = [ + pkgs.xwayland + pkgs.xorg.xrandr + pkgs.gawk + ]; +} \ No newline at end of file diff --git a/hosts/vinegar/start-session/start-session b/hosts/vinegar/start-session/start-session new file mode 100644 index 0000000..7d2c56b --- /dev/null +++ b/hosts/vinegar/start-session/start-session @@ -0,0 +1,5 @@ +#!/bin/sh +Xwayland :1 -geometry $(xrandr -q | gawk 'match($0, /([0-9]+x[0-9]+)/, ary) {print ary[1]; exit}') -fullscreen & +xw_pid=$! +WAYLAND_DISPLAY= DISPLAY=:1 dbus-launch $1 +kill $xw_pid \ No newline at end of file diff --git a/host/configuration.nix b/hosts/vulpes/configuration.nix similarity index 98% rename from host/configuration.nix rename to hosts/vulpes/configuration.nix index d91e819..060e10c 100644 --- a/host/configuration.nix +++ b/hosts/vulpes/configuration.nix @@ -80,6 +80,8 @@ in { # Enable bluetooth hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true; + # Blueman + services.blueman.enable = true; # Enable sound with pipewire. sound.enable = true; diff --git a/host/hardware-configuration.nix b/hosts/vulpes/hardware-configuration.nix similarity index 100% rename from host/hardware-configuration.nix rename to hosts/vulpes/hardware-configuration.nix diff --git a/hosts/vulpes/home.nix b/hosts/vulpes/home.nix new file mode 100644 index 0000000..4c6c675 --- /dev/null +++ b/hosts/vulpes/home.nix @@ -0,0 +1,81 @@ +{ pkgs, lib, ... }: + +# let + +# terminal = "kitty"; +# # newm = inputs.newmpkgs.packages.${system}.newm-atha; + +# in { +{ + custom.colors = import ../themes/colors/base16-monokai.nix; + custom.wallpaper = ../wallpapers/blip-blip-blip-blip.jpg; + + home = { + sessionVariables = { + EDITOR = "kate"; + BROWSER = "qutebrowser"; + TERMINAL = "kitty"; + TERM = "kitty"; + FILEMANAGER = "kitty lf"; + + # Tell Electron apps it's wayland time + NIXOS_OZONE_WL = 1; + }; + + sessionPath = [ + "$HOME/.local/bin" + ]; + + stateVersion = "23.11"; + }; + + home.packages = [ + # Utility + pkgs.bitwarden + pkgs.vimiv-qt + + # Visual + pkgs.imagemagick + pkgs.kate + pkgs.helix + pkgs.vscodium + + #Games + pkgs.prismlauncher-qt5 + + # Env + pkgs.eww-wayland + pkgs.socat + pkgs.jq + ]; + + custom.nonFreePackages = [ + "discord" + ]; + + # Directories + xdg.userDirs = { + createDirectories = false; + download = "$HOME/downloads"; + music = "$HOME/music"; + }; + + # Openers + xdg.mimeApps.enable = true; + xdg.mimeApps.defaultApplications = { + "inode/directory" = [ + # "lf.desktop" + "kitty-open.desktop" + ]; + }; + + # Standard programs + programs.bat = { + enable = true; + config = { + paging = "never"; + }; + }; + + services.blueman-applet.enable = true; +} diff --git a/host/modules.nix b/hosts/vulpes/modules.nix similarity index 88% rename from host/modules.nix rename to hosts/vulpes/modules.nix index c6ca234..5c83b73 100644 --- a/host/modules.nix +++ b/hosts/vulpes/modules.nix @@ -2,6 +2,7 @@ ../modules/fish ../modules/qutebrowser ../modules/kitty + ../modules/lf ../modules/ncspot diff --git a/host/swhkdrc b/hosts/vulpes/swhkdrc similarity index 100% rename from host/swhkdrc rename to hosts/vulpes/swhkdrc diff --git a/modules/bspwm/home.nix b/modules/bspwm/home.nix index 7e22cf0..4a904f3 100644 --- a/modules/bspwm/home.nix +++ b/modules/bspwm/home.nix @@ -1,77 +1,90 @@ { pkgs, lib, config, ... }: { + options.custom.bspwm.enable = lib.mkEnable "bspwm"; + imports = [ ../qutesearch/home.nix ../tint2/home.nix ../rofi/home.nix ]; - home.packages = [ - pkgs.feh - pkgs.flameshot - ]; + config = { + # programs.qutebrowser.enable = true; + # custom.qutesearch.enable = true; + # programs.tint2.enable = true; + # programs.rofi.enable = true; - services.network-manager-applet.enable = true; - - xdg.portal = { - enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-kde + home.packages = [ + pkgs.feh + pkgs.flameshot ]; - configPackages = [ - pkgs.xdg-desktop-portal-kde - ]; - }; - # handled by home manager - # home.sessionVariables = { - # # Tell java it's in no-reparenting land - # "_JAVA_AWT_WM_NONREPARENTING" = 1; - # }; + services.network-manager-applet.enable = true; - services.sxhkd.enable = true; - xdg.configFile."sxhkd/sxhkdrc" = { - source = ./sxhkdrc; - executable = true; - }; - - home.file.".local/bin" = { - source = ./scripts; - recursive = true; - executable = true; - }; - - xsession.windowManager.bspwm = { - enable = true; - - monitors = { - "eDP-1" = [ "I" "II" "III" "IV" "V" ]; + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-kde + ]; + configPackages = [ + pkgs.xdg-desktop-portal-kde + ]; }; - settings = { - border_width = 1; - window_gap = 4; - split_ratio = 0.52; + # handled by home manager + # home.sessionVariables = { + # # Tell java it's in no-reparenting land + # "_JAVA_AWT_WM_NONREPARENTING" = 1; + # }; - pointer_modifier = "super"; - pointer_action1 = "move"; - pointer_action2 = "resize_corner"; - - focus_follows_pointer = true; - pointer_follows_focus = true; + services.sxhkd.enable = true; + xdg.configFile."sxhkd/sxhkdrc" = { + source = ./sxhkdrc; + executable = true; }; - rules = { - Gimp = { - state = "floating"; + home.file.".local/bin" = { + source = ./scripts; + recursive = true; + executable = true; + }; + + xsession.windowManager.bspwm = { + enable = true; + + # monitors = { + # "eDP-1" = [ "I" "II" "III" "IV" "V" ]; + # }; + + extraConfigEarly = '' + bspc monitor -d I II III IV V + ''; + + settings = { + border_width = 1; + window_gap = 4; + split_ratio = 0.52; + + pointer_modifier = "super"; + pointer_action1 = "move"; + pointer_action2 = "resize_corner"; + + focus_follows_pointer = true; + pointer_follows_focus = true; }; - }; - startupPrograms = [ - # "pgrep -x sxhkd > /dev/null || sxhkd &" - "wmname LG3D" - # "xsetroot -cursor_name left_ptr &" - "tint2" - "feh --bg-scale ${config.custom.wallpaper}" - ]; + rules = { + Gimp = { + state = "floating"; + }; + }; + + startupPrograms = [ + # "pgrep -x sxhkd > /dev/null || sxhkd &" + "wmname LG3D" + # "xsetroot -cursor_name left_ptr &" + "tint2" + "feh --bg-scale ${config.custom.wallpaper}" + ]; + }; }; } diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/discord/home.nix b/modules/discord/home.nix index d01154d..3d590c1 100644 --- a/modules/discord/home.nix +++ b/modules/discord/home.nix @@ -1,10 +1,12 @@ -{ pkgs, lib, ... }: { - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "discord" - ]; +{ pkgs, lib, config, ... }: { + config = { + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "discord" + ]; - home.packages = [ - pkgs.discord - ]; + home.packages = [ + pkgs.discord + ]; + } } diff --git a/modules/fish/home.nix b/modules/fish/home.nix index 283d69e..cf1dadd 100644 --- a/modules/fish/home.nix +++ b/modules/fish/home.nix @@ -1,11 +1,10 @@ -{ pkgs, ... }: { +{ pkgs, lib, config, ... }: { home.packages = [ pkgs.grc pkgs.fishPlugins.grc ]; programs.fish = { - enable = true; interactiveShellInit = '' set fish_greeting # Disable greeting ''; diff --git a/modules/home.nix b/modules/home.nix new file mode 100644 index 0000000..ad1402e --- /dev/null +++ b/modules/home.nix @@ -0,0 +1,5 @@ +{ ... } : { + imports = [ + + ] +} \ No newline at end of file diff --git a/modules/homeModule.nix b/modules/homeModule.nix deleted file mode 100644 index 640aff9..0000000 --- a/modules/homeModule.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ lib, ... }: - -{ - options = { - homeManager = lib.mkOption { - type = lib.types.set; - }; - }; - - config = { - home-manager.users.dakedres = config.homeManager; - }; -} diff --git a/modules/hyprland/home.nix b/modules/hyprland/home.nix index 4df6321..7bbed57 100644 --- a/modules/hyprland/home.nix +++ b/modules/hyprland/home.nix @@ -5,131 +5,137 @@ ../rofi/home.nix ]; - home.packages = [ - pkgs.swaybg - ]; + # options.custom.hyprland.enable = lib.mkEnable "hyprland"; - # When swhkd is available, wlogout could be started via a script - # that disables keybind watching, starts wlogout, and enables keybind - # watching again once it's closed - programs.wlogout = { - enable = true; - }; + config = { + home.packages = [ + pkgs.swaybg + ]; - xdg.portal = { - enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - ]; - configPackages = [ - pkgs.xdg-desktop-portal-gtk - ]; - }; + programs.waybar.enable = true; - wayland.windowManager.hyprland = { - enable = true; - settings = { - exec-once = [ - "swaybg -i $WALLPAPER" - "waybar" + # When swhkd is available, wlogout could be started via a script + # that disables keybind watching, starts wlogout, and enables keybind + # watching again once it's closed + programs.wlogout = { + enable = true; + }; + + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk ]; - - monitor = [ - "eDP-1,1920x1080@59.96,0x0,auto" - # "X11-1,600x800@59.96,0x0,auto" + configPackages = [ + pkgs.xdg-desktop-portal-gtk ]; + }; - input = { - # kb_options = "caps:swapescape,altwin:swap_alt_win"; + wayland.windowManager.hyprland = { + enable = true; + settings = { + exec-once = [ + "swaybg -i $WALLPAPER" + "waybar" + ]; + + monitor = [ + "eDP-1,1920x1080@59.96,0x0,auto" + # "X11-1,600x800@59.96,0x0,auto" + ]; + + input = { + # kb_options = "caps:swapescape,altwin:swap_alt_win"; + }; + + + + general = { + gaps_in = 3; + gaps_out = 6; + }; + + group = { + groupbar = { + gradients = false; + text_color = "0xff111111"; + }; + }; + + misc = { + disable_hyprland_logo = true; + background_color = "0x000000"; + }; + + animation = [ + "workspaces,1,3,default,slidevert" + "windows,1,2,default,slide" + ]; + + + + workspace = [ + "name:I" + "name:II" + "name:III" + "name:IV" + "name:V" + ]; + + windowrule = [ + "fullscreen,noanim,noborder,title:(Albert)" + ]; + + + + "$mod" = "SUPER"; + + bind = [ + "$mod, Return, exec, $TERMINAL" + "$mod, o, exec, qutesearch" + "$mod, Space, exec, rofi -show drun" + "SUPERSHIFT, Space, exec, rofi -show run" + "$mod, Escape, exec, wlogout" + + "$mod, w, killactive" # This closes the window and the name is dumb + "$mod, f, togglefloating" + "$mod, t, togglegroup" + + "$mod, h, movefocus, l" + "$mod, j, movefocus, d" + "$mod, k, movefocus, u" + "$mod, l, movefocus, r" + "$mod, left, movefocus, l" + "$mod, down, movefocus, d" + "$mod, up, movefocus, u" + "$mod, right, movefocus, r" + + "$mod, a, changegroupactive, f" + "$mod, d, changegroupactive, f" + + "$mod, Tab, cyclenext" + + "SUPERSHIFT, h, movewindoworgroup, l" + "SUPERSHIFT, j, movewindoworgroup, d" + "SUPERSHIFT, k, movewindoworgroup, u" + "SUPERSHIFT, l, movewindoworgroup, r" + "SUPERSHIFT, left, movewindoworgroup, l" + "SUPERSHIFT, down, movewindoworgroup, d" + "SUPERSHIFT, up, movewindoworgroup, u" + "SUPERSHIFT, right, movewindoworgroup, r" + + "$mod, 1, workspace, 1" + "$mod, 2, workspace, 2" + "$mod, 3, workspace, 3" + "$mod, 4, workspace, 4" + "$mod, 5, workspace, 5" + ]; + + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; }; - - - - general = { - gaps_in = 3; - gaps_out = 6; - }; - - group = { - groupbar = { - gradients = false; - text_color = "0xff111111"; - }; - }; - - misc = { - disable_hyprland_logo = true; - background_color = "0x000000"; - }; - - animation = [ - "workspaces,1,3,default,slidevert" - "windows,1,2,default,slide" - ]; - - - - workspace = [ - "name:I" - "name:II" - "name:III" - "name:IV" - "name:V" - ]; - - windowrule = [ - "fullscreen,noanim,noborder,title:(Albert)" - ]; - - - - "$mod" = "SUPER"; - - bind = [ - "$mod, Return, exec, $TERMINAL" - "$mod, o, exec, qutesearch" - "$mod, Space, exec, rofi -show drun" - "SUPERSHIFT, Space, exec, rofi -show run" - "$mod, Escape, exec, wlogout" - - "$mod, w, killactive" # This closes the window and the name is dumb - "$mod, f, togglefloating" - "$mod, t, togglegroup" - - "$mod, h, movefocus, l" - "$mod, j, movefocus, d" - "$mod, k, movefocus, u" - "$mod, l, movefocus, r" - "$mod, left, movefocus, l" - "$mod, down, movefocus, d" - "$mod, up, movefocus, u" - "$mod, right, movefocus, r" - - "$mod, a, changegroupactive, f" - "$mod, d, changegroupactive, f" - - "$mod, Tab, cyclenext" - - "SUPERSHIFT, h, movewindoworgroup, l" - "SUPERSHIFT, j, movewindoworgroup, d" - "SUPERSHIFT, k, movewindoworgroup, u" - "SUPERSHIFT, l, movewindoworgroup, r" - "SUPERSHIFT, left, movewindoworgroup, l" - "SUPERSHIFT, down, movewindoworgroup, d" - "SUPERSHIFT, up, movewindoworgroup, u" - "SUPERSHIFT, right, movewindoworgroup, r" - - "$mod, 1, workspace, 1" - "$mod, 2, workspace, 2" - "$mod, 3, workspace, 3" - "$mod, 4, workspace, 4" - "$mod, 5, workspace, 5" - ]; - - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; }; }; } diff --git a/modules/kitty/colors.nix b/modules/kitty/colors.nix index 68f8eb2..61d1ede 100644 --- a/modules/kitty/colors.nix +++ b/modules/kitty/colors.nix @@ -8,7 +8,7 @@ }; }; - config = lib.mkIf config.custom.colors.kitty.enable { + config = { programs.kitty.settings = with config.custom.colors; { # Based on https://github.com/mk12/base16-kitty diff --git a/modules/lf/home.nix b/modules/lf/home.nix new file mode 100644 index 0000000..386fbad --- /dev/null +++ b/modules/lf/home.nix @@ -0,0 +1,19 @@ +{ ... }: { + programs.lf = { + enable = true; + commands = { + q = "quit"; # Why didn't they do this btw + }; + keybindings = { + "" = "$$OPENER $f"; + }; + }; + + xdg.desktopEntries.lf = { + name = "LF"; + genericName = "File browser"; + exec = "lf %U"; + terminal = true; + mimeType = [ "inode/directory" ]; + }; +} \ No newline at end of file diff --git a/modules/ncspot/colors.nix b/modules/ncspot/colors.nix index 80ff741..af3b391 100644 --- a/modules/ncspot/colors.nix +++ b/modules/ncspot/colors.nix @@ -8,7 +8,7 @@ }; }; - config = lib.mkIf config.custom.colors.ncspot.enable { + config = { programs.ncspot.settings.theme = with config.custom.colors; { # Attempts to look kinda green like the official client diff --git a/modules/ncspot/home.nix b/modules/ncspot/home.nix index 5c8d556..408dd5a 100644 --- a/modules/ncspot/home.nix +++ b/modules/ncspot/home.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, config, ... }: { imports = [ ./colors.nix ]; home.packages = [ @@ -7,6 +7,7 @@ programs.ncspot = { enable = true; + settings = { cover_max_scale = 2; }; diff --git a/modules/qutebrowser/colors.nix b/modules/qutebrowser/colors.nix index 39d4dce..45b215f 100644 --- a/modules/qutebrowser/colors.nix +++ b/modules/qutebrowser/colors.nix @@ -11,7 +11,7 @@ }; }; - config = lib.mkIf config.custom.colors.qutebrowser.enable { + config = { programs.qutebrowser.settings = with config.custom.colors; { # Text color of the completion widget. May be a single color to use for # all columns or a list of three colors, one for each column. diff --git a/modules/tint2/home.nix b/modules/tint2/home.nix index f182683..80549ab 100644 --- a/modules/tint2/home.nix +++ b/modules/tint2/home.nix @@ -1,7 +1,8 @@ { ... }: { programs.tint2.enable = true; + xdg.configFile."tint2/tint2rc" = { - source = ./tint2rc; - executable = true; + source = ./tint2rc; + executable = true; }; } diff --git a/modules/waybar/home.nix b/modules/waybar/home.nix index 95a2573..6c5b05e 100644 --- a/modules/waybar/home.nix +++ b/modules/waybar/home.nix @@ -1,6 +1,5 @@ { ... }: { programs.waybar = { - enable = true; settings = { mainBar = { diff --git a/result b/result new file mode 120000 index 0000000..3364c76 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/hq65zx7jbxkbn8kqpfhn8gklv9xi6kpx-nixos-system-nixos-24.05.20240117.842d9d8 \ No newline at end of file