mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
Remove services.ttyBackgrounds
This hasn't worked in a long time.
This commit is contained in:
parent
b7b2476499
commit
82e1d0c8b1
@ -15,12 +15,6 @@
|
||||
}
|
||||
];
|
||||
|
||||
services = {
|
||||
ttyBackgrounds = {
|
||||
enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableFontConfig = false;
|
||||
};
|
||||
|
@ -1,7 +0,0 @@
|
||||
{stdenv, theme}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "theme";
|
||||
builder = ./unpack-theme.sh;
|
||||
inherit theme;
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
ensureDir $out
|
||||
|
||||
(cd $out && unpackFile $theme)
|
||||
|
||||
themeName=$(cd $out && ls)
|
||||
|
||||
for i in $out/$themeName/config/*.cfg; do
|
||||
echo "converting $i"
|
||||
# Rewrite /etc paths. Also, the file names
|
||||
# config/bootsplash-<RES>.cfg should be <RES>.cfg.
|
||||
sed "s^/etc/bootsplash/themes^$out^g" < $i > $out/$themeName/$(basename $i | sed 's^.*-^^')
|
||||
done
|
||||
|
||||
rm $out/$themeName/config/*.cfg
|
||||
|
||||
ln -s $themeName $out/default
|
@ -154,8 +154,6 @@ in
|
||||
|
||||
jobs.openssh.startOn = pkgs.lib.mkOverrideTemplate 50 {} "";
|
||||
|
||||
services.ttyBackgrounds.enable = false;
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generationsDir.enable = false;
|
||||
system.boot.loader.kernelFile = "vmlinux";
|
||||
|
@ -165,7 +165,6 @@ in
|
||||
# not be started by default on the installation CD because the
|
||||
# default root password is empty.
|
||||
services.openssh.enable = true;
|
||||
services.ttyBackgrounds.enable = false;
|
||||
jobs.openssh.startOn = pkgs.lib.mkOverrideTemplate 50 {} "";
|
||||
|
||||
# cpufrequtils fails to build on non-pc
|
||||
|
@ -268,7 +268,6 @@
|
||||
./tasks/network-interfaces.nix
|
||||
./tasks/scsi-link-power-management.nix
|
||||
./tasks/swraid.nix
|
||||
./tasks/tty-backgrounds.nix
|
||||
./virtualisation/libvirtd.nix
|
||||
./virtualisation/nova.nix
|
||||
./virtualisation/virtualbox-guest.nix
|
||||
|
@ -9,7 +9,6 @@ with pkgs.lib;
|
||||
sound.enable = false;
|
||||
boot.vesa = false;
|
||||
boot.initrd.enableSplashScreen = false;
|
||||
services.ttyBackgrounds.enable = false;
|
||||
|
||||
# Don't start a tty on the serial consoles.
|
||||
systemd.services."serial-getty@ttyS0".enable = false;
|
||||
|
@ -108,12 +108,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services.ttyBackgrounds.specificThemes = mkIf cfg.showManual
|
||||
[ { tty = "tty${cfg.ttyNumber}";
|
||||
theme = pkgs.themes "green";
|
||||
}
|
||||
];
|
||||
|
||||
services.mingetty.helpLine = mkIf cfg.showManual
|
||||
"\nPress <Alt-F${toString cfg.ttyNumber}> for the NixOS manual.";
|
||||
|
||||
|
@ -54,11 +54,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services.ttyBackgrounds.specificThemes = singleton
|
||||
{ tty = cfg.tty;
|
||||
theme = pkgs.themes "theme-gnu";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -65,8 +65,7 @@ in
|
||||
};
|
||||
|
||||
boot.vesa = mkOption {
|
||||
default = config.boot.kernelPackages.splashutils != null;
|
||||
example = false;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to activate VESA video mode on boot.
|
||||
'';
|
||||
@ -160,7 +159,7 @@ in
|
||||
# (so you don't need to reboot to have changes take effect).
|
||||
boot.kernelParams =
|
||||
[ "loglevel=${toString config.boot.consoleLogLevel}" ] ++
|
||||
optionals config.boot.vesa [ "splash=verbose" "vga=0x317" ];
|
||||
optionals config.boot.vesa [ "vga=0x317" ];
|
||||
|
||||
boot.kernel.sysctl."kernel.printk" = config.boot.consoleLogLevel;
|
||||
|
||||
|
@ -23,9 +23,6 @@ let
|
||||
};
|
||||
|
||||
|
||||
enableSplashScreen =
|
||||
config.boot.vesa && config.boot.initrd.enableSplashScreen && kernelPackages.splashutils != null;
|
||||
|
||||
needsCifsUtils = kernelPackages.kernel ? features
|
||||
&& kernelPackages.kernel.features ? needsCifsUtils
|
||||
&& kernelPackages.kernel.features.needsCifsUtils
|
||||
@ -94,11 +91,6 @@ let
|
||||
cp -v ${pkgs.kmod}/bin/kmod $out/bin/
|
||||
ln -s kmod $out/bin/modprobe
|
||||
|
||||
# Maybe copy splashutils.
|
||||
${optionalString enableSplashScreen ''
|
||||
cp ${kernelPackages.splashutils}/${kernelPackages.splashutils.helperName} $out/bin/splash_helper
|
||||
''}
|
||||
|
||||
# Maybe copy cifs utils
|
||||
${optionalString needsCifsUtils ''
|
||||
cp -v ${pkgs.cifs_utils}/sbin/mount.cifs $out/bin
|
||||
@ -228,17 +220,6 @@ let
|
||||
{ object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf;
|
||||
symlink = "/etc/mdadm.conf";
|
||||
}
|
||||
] ++ optionals enableSplashScreen
|
||||
[ { object = extraUtils;
|
||||
suffix = "/bin/splash_helper";
|
||||
symlink = "/${kernelPackages.splashutils.helperName}";
|
||||
}
|
||||
{ object = import ../../../lib/unpack-theme.nix {
|
||||
inherit (pkgs) stdenv;
|
||||
theme = config.services.ttyBackgrounds.defaultTheme;
|
||||
};
|
||||
symlink = "/etc/splash";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
@ -256,13 +237,6 @@ in
|
||||
";
|
||||
};
|
||||
|
||||
boot.initrd.enableSplashScreen = mkOption {
|
||||
default = true;
|
||||
description = "
|
||||
Whether to show a nice splash screen while booting.
|
||||
";
|
||||
};
|
||||
|
||||
boot.initrd.checkJournalingFS = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
|
@ -4,19 +4,10 @@ with pkgs.lib;
|
||||
|
||||
let
|
||||
|
||||
# think about where to put this chunk of code!
|
||||
# required by other pieces as well
|
||||
requiredTTYs = config.services.mingetty.ttys
|
||||
++ config.boot.extraTTYs
|
||||
++ [ config.services.syslogd.tty ];
|
||||
ttys = map (dev: "/dev/${dev}") requiredTTYs;
|
||||
consoleFont = config.i18n.consoleFont;
|
||||
consoleKeyMap = config.i18n.consoleKeyMap;
|
||||
|
||||
vconsoleConf = pkgs.writeText "vconsole.conf"
|
||||
''
|
||||
KEYMAP=${consoleKeyMap}
|
||||
FONT=${consoleFont}
|
||||
KEYMAP=${config.i18n.consoleKeyMap}
|
||||
FONT=${config.i18n.consoleFont}
|
||||
'';
|
||||
|
||||
in
|
||||
@ -42,15 +33,6 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
# dummy option so that requiredTTYs can be passed
|
||||
requiredTTYs = mkOption {
|
||||
default = [];
|
||||
description = "
|
||||
FIXME: find another place for this option.
|
||||
FIXME: find a good description.
|
||||
";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -58,8 +40,6 @@ in
|
||||
|
||||
config = {
|
||||
|
||||
inherit requiredTTYs; # pass it to ./modules/tasks/tty-backgrounds.nix
|
||||
|
||||
environment.systemPackages = [ pkgs.kbd ];
|
||||
|
||||
# Let systemd-vconsole-setup.service do the work of setting up the
|
||||
|
@ -1,148 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
|
||||
inherit (pkgs) stdenv;
|
||||
|
||||
kernelPackages = config.boot.kernelPackages;
|
||||
splashutils = kernelPackages.splashutils;
|
||||
requiredTTYs = config.requiredTTYs;
|
||||
|
||||
backgrounds =
|
||||
let
|
||||
|
||||
specificThemes = config.services.ttyBackgrounds.specificThemes;
|
||||
|
||||
overriddenTTYs = map (x: x.tty) specificThemes;
|
||||
|
||||
# Use the default theme for all the mingetty ttys and for the
|
||||
# syslog tty, except those for which a specific theme is
|
||||
# specified.
|
||||
defaultTTYs =
|
||||
filter (x: !(elem x overriddenTTYs)) requiredTTYs;
|
||||
|
||||
in
|
||||
(map (tty: { inherit tty; }) defaultTTYs) ++ specificThemes;
|
||||
|
||||
themesUnpacked = stdenv.mkDerivation {
|
||||
name = "splash-themes";
|
||||
builder = ./tty-backgrounds-combine.sh;
|
||||
default = unpackTheme config.services.ttyBackgrounds.defaultTheme;
|
||||
# !!! Should use XML here.
|
||||
ttys = map (x: x.tty) backgrounds;
|
||||
themes = map (x: if x ? theme then unpackTheme x.theme else "default") backgrounds;
|
||||
};
|
||||
|
||||
unpackTheme = theme: import ../../lib/unpack-theme.nix {
|
||||
inherit stdenv theme;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.ttyBackgrounds = {
|
||||
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable graphical backgrounds for the virtual consoles.
|
||||
'';
|
||||
};
|
||||
|
||||
defaultTheme = mkOption {
|
||||
default = pkgs.fetchurl {
|
||||
#url = http://www.bootsplash.de/files/themes/Theme-BabyTux.tar.bz2;
|
||||
url = mirror://gentoo/distfiles/Theme-BabyTux.tar.bz2;
|
||||
md5 = "a6d89d1c1cff3b6a08e2f526f2eab4e0";
|
||||
};
|
||||
description = ''
|
||||
The default theme for the virtual consoles. Themes can be found
|
||||
at <link xlink:href='http://www.bootsplash.de/' />.
|
||||
'';
|
||||
};
|
||||
|
||||
specificThemes = mkOption {
|
||||
default = [ ];
|
||||
description = ''
|
||||
This option overrides the theme for specific virtual consoles.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf (config.boot.vesa && config.services.ttyBackgrounds.enable && splashutils != null) (
|
||||
mkAssert (splashutils != null) ''
|
||||
The kernelPackages does not provide splashutils, as required by ttyBackgrounds.
|
||||
Either provide kernelPackages with splashutils, or disable ttyBackgrounds.
|
||||
'' {
|
||||
|
||||
services.ttyBackgrounds.specificThemes = singleton
|
||||
{ tty = config.services.syslogd.tty;
|
||||
theme = pkgs.themes "theme-gnu";
|
||||
};
|
||||
|
||||
environment.etc = singleton
|
||||
{ source = themesUnpacked;
|
||||
target = "splash";
|
||||
};
|
||||
|
||||
jobs.ttyBackgrounds =
|
||||
{ name = "tty-backgrounds";
|
||||
|
||||
startOn = "started udev";
|
||||
|
||||
# Don't stop tty-backgrounds during shutdown; it's not needed,
|
||||
# and it just causes intrusive blanking of the screen.
|
||||
stopOn = "";
|
||||
|
||||
preStart =
|
||||
''
|
||||
# Critical: tell the kernel where to find splash_helper. It calls
|
||||
# this program every time we switch between consoles.
|
||||
helperProcFile=${splashutils.helperProcFile}
|
||||
if test -e /proc/sys/fbcondecor; then helperProcFile=/proc/sys/fbcondecor; fi
|
||||
echo ${splashutils}/${splashutils.helperName} > $helperProcFile
|
||||
|
||||
# For each console...
|
||||
for tty in ${toString (map (x: x.tty) backgrounds)}; do
|
||||
# Make sure that the console exists.
|
||||
echo -n "" > /dev/$tty
|
||||
|
||||
# Set the theme as determined by tty-backgrounds-combine.sh
|
||||
# above. Note that splashutils needs a TTY number
|
||||
# instead of a device name, hence the ''${tty:3}.
|
||||
theme=$(readlink ${themesUnpacked}/$tty)
|
||||
prevTheme=$(${splashutils}/${splashutils.controlName} --tty ''${tty:3} -c getcfg |
|
||||
sed 's/theme: *\(.*\)/\1/;t;d' || true)
|
||||
if [ "$theme" != "$prevTheme" ]; then
|
||||
${splashutils}/${splashutils.controlName} --tty ''${tty:3} -c setcfg -t $theme || true
|
||||
fi
|
||||
${splashutils}/${splashutils.controlName} --tty ''${tty:3} -c setpic -t $theme || true
|
||||
${splashutils}/${splashutils.controlName} --tty ''${tty:3} -c on || true
|
||||
done
|
||||
'';
|
||||
|
||||
postStop =
|
||||
''
|
||||
# Disable the theme on each console.
|
||||
for tty in ${toString (map (x: x.tty) backgrounds)}; do
|
||||
${splashutils}/${splashutils.controlName} --tty ''${tty:3} -c off || true
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
}
|
@ -11,9 +11,6 @@
|
||||
|
||||
boot.initrd.kernelModules = [ "xen-blkfront" ];
|
||||
|
||||
# Backgrounds don't work, so don't bother.
|
||||
services.ttyBackgrounds.enable = false;
|
||||
|
||||
# Send syslog messages to the Xen console.
|
||||
services.syslogd.tty = "hvc0";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user