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 = {
programs = {
fish.enable = true;
lsd.enable = true;
starship.enable = true;
};
};
};

View File

@ -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" ];
})
];
};
};
}
];
}

View File

@ -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;
}

View File

@ -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;