diff --git a/boxes/colony.nix b/boxes/colony.nix index 4a809c1..4001869 100644 --- a/boxes/colony.nix +++ b/boxes/colony.nix @@ -18,7 +18,8 @@ homeConfig = { programs = { - fish.enable = true; + lsd.enable = true; + starship.enable = true; }; }; }; diff --git a/home-modules/gui.nix b/home-modules/gui.nix index 395c885..341d327 100644 --- a/home-modules/gui.nix +++ b/home-modules/gui.nix @@ -1,6 +1,6 @@ { lib, pkgs, config, ... }: let - inherit (lib) mkIf mkDefault; + inherit (lib) mkIf mkDefault mkMerge; inherit (lib.my) mkBoolOpt'; cfg = config.my.gui; @@ -10,27 +10,33 @@ in enable = mkBoolOpt' true "Enable settings and packages meant for graphical systems"; }; - config = mkIf cfg.enable { - programs = { - lsd = { - enable = mkDefault true; - enableAliases = mkDefault true; + config = mkMerge [ + (mkIf cfg.enable { + programs = { + lsd.enable = true; + starship.enable = mkDefault true; }; - starship = { - enable = mkDefault true; - settings = { - aws.disabled = true; + home = { + packages = with pkgs; [ + (nerdfonts.override { + fonts = [ "DroidSansMono" "SourceCodePro" ]; + }) + ]; + }; + }) + { + programs = { + lsd = { + enableAliases = mkDefault true; + }; + + starship = { + settings = { + aws.disabled = true; + }; }; }; - }; - - home = { - packages = with pkgs; [ - (pkgs.nerdfonts.override { - fonts = [ "DroidSansMono" "SourceCodePro" ]; - }) - ]; - }; - }; + } + ]; } diff --git a/modules/common.nix b/modules/common.nix index edbca8b..2b42305 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,8 +1,11 @@ { lib, pkgs, inputs, options, config, ... }: let inherit (builtins) attrValues; - inherit (lib) mkIf mkDefault mkAliasDefinitions; + inherit (lib) mkIf mkDefault mkMerge mkAliasDefinitions; inherit (lib.my) mkOpt' dummyOption; + + defaultUsername = "dev"; + uname = config.my.user.name; in { options = with lib.types; { @@ -16,11 +19,7 @@ in documentation.nixos.options.warningsAreErrors = dummyOption; }; - config = - let - defaultUsername = "dev"; - uname = config.my.user.name; - in + config = mkMerge [ { my = { user = { @@ -106,15 +105,35 @@ in vim ]; - services.openssh = { - enable = true; + services = { + kmscon = { + enable = mkDefault true; + hwRender = mkDefault true; + extraOptions = "--verbose"; + extraConfig = + '' + font-name=SauceCodePro Nerd Font Mono + ''; + }; + + openssh = { + enable = true; + }; }; system = { stateVersion = "21.11"; configurationRevision = with inputs; mkIf (self ? rev) self.rev; }; - }; + } + (mkIf config.services.kmscon.enable { + fonts.fonts = with pkgs; [ + (nerdfonts.override { + fonts = [ "SourceCodePro" ]; + }) + ]; + }) + ]; meta.buildDocsInSandbox = false; } diff --git a/modules/server.nix b/modules/server.nix index 24c8996..14777d4 100644 --- a/modules/server.nix +++ b/modules/server.nix @@ -8,7 +8,14 @@ in { options.my.server.enable = mkBoolOpt' false "Whether to enable common configuration for servers."; config = mkIf cfg.enable { - services.getty.autologinUser = config.my.user.name; + services = { + getty.autologinUser = config.my.user.name; + kmscon.autologinUser = config.my.user.name; + }; + + my.homeConfig = { + my.gui.enable = false; + }; }; meta.buildDocsInSandbox = false;