mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
status-on-console: convert to module
This commit is contained in:
parent
40fc860b6e
commit
dcb1e17982
2 changed files with 10 additions and 6 deletions
|
@ -12,8 +12,6 @@ in
|
|||
|
||||
scroll-boost = mkEnableOption "Patch libinput scroll speed";
|
||||
|
||||
status-on-console = mkEnableOption "Display Neofetch on system console";
|
||||
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
|
@ -32,7 +30,6 @@ in
|
|||
]))
|
||||
|
||||
(mkIf cfg.scroll-boost (import ./modules/scroll-boost { }))
|
||||
(mkIf cfg.status-on-console (import ./modules/status-on-console { inherit pkgs; }))
|
||||
|
||||
];
|
||||
|
||||
|
@ -40,5 +37,6 @@ in
|
|||
./modules/alacritty.nix
|
||||
./modules/baseline.nix
|
||||
./modules/cli.nix
|
||||
./modules/status-on-console.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.sconfig.status-on-console;
|
||||
|
||||
ncfg = pkgs.writeText "neofetch.conf" ''
|
||||
print_info() {
|
||||
info title
|
||||
|
@ -33,6 +35,10 @@ let
|
|||
|
||||
in
|
||||
{
|
||||
options.sconfig.status-on-console = lib.mkEnableOption "Display Neofetch on system console";
|
||||
|
||||
config = lib.mkIf cfg {
|
||||
environment.etc.issue.source = pkgs.lib.mkForce "/run/issue";
|
||||
systemd.services."getty@".serviceConfig.ExecStartPre = "-${nscript}";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue