diff --git a/hosts/potatobook-g/configuration.nix b/hosts/potatobook-g/configuration.nix index 0c38075..034e487 100644 --- a/hosts/potatobook-g/configuration.nix +++ b/hosts/potatobook-g/configuration.nix @@ -28,29 +28,31 @@ # ]; # }; - nixpkgs = { - overlays = [ - (self: super: { - linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override { - structuredExtraConfig = with lib.kernel; { - #"FB" = yes; - #"FRAMEBUFFER_CONSOLE" = yes; - #"VGA_CONSOLE" = yes; - #"VIDEO_SELECT" = yes; - LOGO = lib.mkForce yes; - LOGO_LINUX_CLUT224 = yes; - }; - ignoreConfigErrors = true; - }); - }) - ]; - }; - boot.kernelPatches = [ - { - name = "fomx"; - patch = ../other/0001-fomx.patch; - } - ]; + #nixpkgs = { + #overlays = [ + #(self: super: { + #linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override { + #structuredExtraConfig = with lib.kernel; { + ##"FB" = yes; + ##"FRAMEBUFFER_CONSOLE" = yes; + ##"VGA_CONSOLE" = yes; + ##"VIDEO_SELECT" = yes; + #LOGO = lib.mkForce yes; + #LOGO_LINUX_CLUT224 = yes; + #}; + #ignoreConfigErrors = true; + #}); + #}) + #]; + #}; + #boot.kernelPatches = [ + #{ + #name = "fomx"; + #patch = ../other/0001-fomx.patch; + #} + #]; + + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; jade = { flatpak.enable = true; @@ -64,6 +66,7 @@ social.enable = true; mail.enable = true; }; + helix.enable = true; terminal.enable = true; neovim.enable = true; zsh.enable = true; diff --git a/modules/default.nix b/modules/default.nix index 0a0a827..bb2c642 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -7,5 +7,6 @@ ./zsh.nix ./flatpak.nix ./firewall.nix + ./helix.nix ]; } diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 99c5888..39de994 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -54,6 +54,7 @@ in with lib; { ./mail.nix ./specific-hardware ./xmonad.nix + ./i3 ]).content; options.jade.desktop = { enable = mkEnableOption "Enable the i3 setup"; diff --git a/modules/desktop/i3/default.nix b/modules/desktop/i3/default.nix index 4fa0289..2ef7562 100644 --- a/modules/desktop/i3/default.nix +++ b/modules/desktop/i3/default.nix @@ -1,13 +1,24 @@ { config, lib, pkgs, ... }: -with lib; { +let + searchwolf = import ../../../other/scripts/desktop/searchwolf.nix { inherit pkgs; }; + desktop-ctl = import ../../../other/scripts/desktop/desktopctl.nix { inherit pkgs; }; + pc-get = pkgs.writeShellScriptBin "pc-get.sh" (builtins.readFile ../../../other/scripts/desktop/permaclip/pc-get.sh); + pc-set = pkgs.writeShellScriptBin "pc-set.sh" (builtins.readFile ../../../other/scripts/desktop/permaclip/pc-set.sh); + em-record = pkgs.writeShellScriptBin "em-record.sh" (builtins.readFile ../../../other/scripts/desktop/macros/record.sh); + em-play = pkgs.writeShellScriptBin "em-play.sh" (builtins.readFile ../../../other/scripts/desktop/macros/play.sh); + em-play-loop = pkgs.writeShellScriptBin "em-play-loop.sh" (builtins.readFile ../../../other/scripts/desktop/macros/play-loop.sh); + ocr-screenshot = pkgs.writeShellScriptBin "ocr-screenshot.sh" (builtins.readFile ../../../other/scripts/desktop/ocr-screenshot.sh); + # rofi calculator copied from https://github.com/barbuk/menu-qalc + menu-qalc = pkgs.writeShellScriptBin "menu-qalc" (builtins.readFile ../../../other/scripts/desktop/menu-qalc.sh); +in with lib; { options.jade.desktop.i3wm = { enable = mkEnableOption "Enable i3wm"; }; - config = mkIf cfg.enable { + config = mkIf config.jade.desktop.i3wm.enable { services.xserver.windowManager.i3.enable = true; home-manager.users.jade = { pkgs, ... }: { xsession.windowManager.i3 = { - enable = false; + enable = true; config = { bars = []; workspaceAutoBackAndForth = true; @@ -18,7 +29,7 @@ with lib; { startup = [ # wallpaper { - command = "feh --bg-fill ${../../other/wallpaper.jpg}"; + command = "feh --bg-fill ${../../../other/wallpaper.jpg}"; always = true; notification = false; } @@ -90,10 +101,10 @@ with lib; { "${mod}+t" = "exec ocr-screenshot.sh"; # rofi fuckery - "${mod}+d" = "exec --no-startup-id rofi -show drun -theme ${../../other/rofi-themes/applauncher.rasi}"; - "${mod}+space" = "exec --no-startup-id rofi -show combi -combi-show window#run -modes combi -theme ${../../other/rofi-themes/applauncher.rasi}"; + "${mod}+d" = "exec --no-startup-id rofi -show drun -theme ${../../../other/rofi-themes/applauncher.rasi}"; + "${mod}+space" = "exec --no-startup-id rofi -show combi -combi-show window#run -modes combi -theme ${../../../other/rofi-themes/applauncher.rasi}"; "${mod}+i" = "exec --no-startup-id rofimoji -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy"; - "${mod}+Shift+e" = "exec --no-startup-id rofi -show \"desktopctl\" -modes \"desktopctl:${desktop-ctl.outPath}/bin/desktopctl\" -theme ${../../other/rofi-themes/applauncher.rasi}"; + "${mod}+Shift+e" = "exec --no-startup-id rofi -show \"desktopctl\" -modes \"desktopctl:${desktop-ctl.outPath}/bin/desktopctl\" -theme ${../../../other/rofi-themes/applauncher.rasi}"; "${mod}+m" = "exec --no-startup-id menu-qalc"; "${mod}+o" = "exec --no-startup-id rofi -show searchwolf -modes \"searchwolf:${searchwolf.outPath}/bin/searchwolf\""; diff --git a/modules/helix.nix b/modules/helix.nix new file mode 100644 index 0000000..f25a91d --- /dev/null +++ b/modules/helix.nix @@ -0,0 +1,23 @@ + +{ config, lib, pkgs, ... }: + +let cfg = config.jade.helix; +in with lib; { + options.jade.helix = { + enable = mkEnableOption "Enable helix"; + }; + config = mkIf cfg.enable { + home-manager.users.jade = { pkgs, ... }: { + programs.helix = { + enable = true; + settings = { + theme = "gruvbox"; + editor = { + line-number = "relative"; + lsp.display-messages = true; + }; + }; + }; + }; + }; +}