Add kmscon

This commit is contained in:
Jack O'Sullivan 2022-02-16 01:38:17 +00:00
parent abbd7de1c4
commit cde64cf95e
4 changed files with 64 additions and 31 deletions

View File

@ -18,7 +18,8 @@
homeConfig = { homeConfig = {
programs = { programs = {
fish.enable = true; lsd.enable = true;
starship.enable = true;
}; };
}; };
}; };

View File

@ -1,6 +1,6 @@
{ lib, pkgs, config, ... }: { lib, pkgs, config, ... }:
let let
inherit (lib) mkIf mkDefault; inherit (lib) mkIf mkDefault mkMerge;
inherit (lib.my) mkBoolOpt'; inherit (lib.my) mkBoolOpt';
cfg = config.my.gui; cfg = config.my.gui;
@ -10,27 +10,33 @@ in
enable = mkBoolOpt' true "Enable settings and packages meant for graphical systems"; enable = mkBoolOpt' true "Enable settings and packages meant for graphical systems";
}; };
config = mkIf cfg.enable { config = mkMerge [
programs = { (mkIf cfg.enable {
lsd = { programs = {
enable = mkDefault true; lsd.enable = true;
enableAliases = mkDefault true; starship.enable = mkDefault true;
}; };
starship = { home = {
enable = mkDefault true; packages = with pkgs; [
settings = { (nerdfonts.override {
aws.disabled = true; fonts = [ "DroidSansMono" "SourceCodePro" ];
})
];
};
})
{
programs = {
lsd = {
enableAliases = mkDefault true;
};
starship = {
settings = {
aws.disabled = true;
};
}; };
}; };
}; }
];
home = {
packages = with pkgs; [
(pkgs.nerdfonts.override {
fonts = [ "DroidSansMono" "SourceCodePro" ];
})
];
};
};
} }

View File

@ -1,8 +1,11 @@
{ lib, pkgs, inputs, options, config, ... }: { lib, pkgs, inputs, options, config, ... }:
let let
inherit (builtins) attrValues; inherit (builtins) attrValues;
inherit (lib) mkIf mkDefault mkAliasDefinitions; inherit (lib) mkIf mkDefault mkMerge mkAliasDefinitions;
inherit (lib.my) mkOpt' dummyOption; inherit (lib.my) mkOpt' dummyOption;
defaultUsername = "dev";
uname = config.my.user.name;
in in
{ {
options = with lib.types; { options = with lib.types; {
@ -16,11 +19,7 @@ in
documentation.nixos.options.warningsAreErrors = dummyOption; documentation.nixos.options.warningsAreErrors = dummyOption;
}; };
config = config = mkMerge [
let
defaultUsername = "dev";
uname = config.my.user.name;
in
{ {
my = { my = {
user = { user = {
@ -106,15 +105,35 @@ in
vim vim
]; ];
services.openssh = { services = {
enable = true; kmscon = {
enable = mkDefault true;
hwRender = mkDefault true;
extraOptions = "--verbose";
extraConfig =
''
font-name=SauceCodePro Nerd Font Mono
'';
};
openssh = {
enable = true;
};
}; };
system = { system = {
stateVersion = "21.11"; stateVersion = "21.11";
configurationRevision = with inputs; mkIf (self ? rev) self.rev; configurationRevision = with inputs; mkIf (self ? rev) self.rev;
}; };
}; }
(mkIf config.services.kmscon.enable {
fonts.fonts = with pkgs; [
(nerdfonts.override {
fonts = [ "SourceCodePro" ];
})
];
})
];
meta.buildDocsInSandbox = false; meta.buildDocsInSandbox = false;
} }

View File

@ -8,7 +8,14 @@ in
{ {
options.my.server.enable = mkBoolOpt' false "Whether to enable common configuration for servers."; options.my.server.enable = mkBoolOpt' false "Whether to enable common configuration for servers.";
config = mkIf cfg.enable { 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; meta.buildDocsInSandbox = false;