- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我启动我的机器时,它会在列表中显示所有代,但将它们命名为“第 49 代”、“第 50 代”等。
有没有办法为世代添加标签,以便我以后可以轻松查看更改的内容?我想要一些类似于可选提交消息的内容,因此它可能类似于“第 49 代 - 切换到 KDE5”、“第 50 代 - 切换回 gnome3”。
最佳答案
/boot/grub/grub.conf 当前构建于:
nixos/modules/system/boot/loader/grub/install-grub.pl
# Emit submenus for all system profiles.
sub addProfile {
my ($profile, $description) = @_;
# Add entries for all generations of this profile.
$conf .= "submenu \"$description\" {\n" if $grubVersion == 2;
sub nrFromGen { my ($x) = @_; $x =~ /\/\w+-(\d+)-link/; return $1; }
my @links = sort
{ nrFromGen($b) <=> nrFromGen($a) }
(glob "$profile-*-link");
my $curEntry = 0;
foreach my $link (@links) {
last if $curEntry++ >= $configurationLimit;
my $date = strftime("%F", localtime(lstat($link)->mtime));
my $version =
-e "$link/nixos-version"
? readFile("$link/nixos-version")
: basename((glob(dirname(Cwd::abs_path("$link/kernel")) . "/lib/modules/*"))[0]);
addEntry("NixOS - Configuration " . nrFromGen($link) . " ($date - $version)", $link);
}
$conf .= "}\n" if $grubVersion == 2;
}
menuentry "NixOS - Configuration 38 (2016-01-29 - 16.03pre75806.77f8f35)" {
search --set=drive1 --fs-uuid d931bd85-8f35-4ae9-a36b-c1ac51ad7b57
linux ($drive1)//kernels/56fkcbxnwzi0kh6vg677a4cd4zcabm55-linux-4.1.15-bzImage systemConfig=/nix/store/2sybsl278s5a8kzhplwcz5jbhbsqwdci-nixos-system-lenovo-t530-16.03pre75806.77f8f35 init=/nix/store/2sybsl278s5a8kzhplwcz5jbhbsqwdci-nixos-system-lenovo-t530-16.03pre75806.77f8f35/init loglevel=4
initrd ($drive1)//kernels/r33fajk0kaxlfmg922c2hy4rak5cj90z-initrd-initrd
}
--profile-name, -p
Instead of using the Nix profile /nix/var/nix/profiles/system to keep track of
the current and previous system configurations, use
/nix/var/nix/profiles/system-profiles/name. When you use GRUB 2, for every
system profile created with this flag, NixOS will create a submenu named “NixOS
- Profile 'name'” in GRUB’s boot menu, containing the current and previous
configurations of this profile.
For instance, if you want to test a configuration file named test.nix without
affecting the default system profile, you would do:
$ nixos-rebuild switch -p test -I nixos-config=./test.nix
The new configuration will appear in the GRUB 2 submenu “NixOS - Profile
'test'”.
关于nixos - 如何为 NixOS 世代添加标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35075383/
当我启动我的机器时,它会在列表中显示所有代,但将它们命名为“第 49 代”、“第 50 代”等。 有没有办法为世代添加标签,以便我以后可以轻松查看更改的内容?我想要一些类似于可选提交消息的内容,因此它
这几天我读了一些关于 NixOS 的文章并尝试了它,因为我的印象是它可以让我只用一个文件来配置 Linux。 我用的时候用nix-env装了一堆包,所以他们没有进入 configuration.nix
我开始尝试 NixOS 部署。为此,我有一个定义了一些包的存储库,以及一个用于服务器的 configuration.nix。 看来我应该能够在本地测试此配置(我也在运行 NixOS)。我认为将我的 g
我想找到一个可用字体列表,我可以在如下表达式中使用这些字体: { i18n = { consoleFont = "font-name-here"; }; } 在我的 configura
我一直在玩 NixOs,想知道如何修改配置文件。例如,我试图修改 ssh 配置文件 /etc/ssh/ssh_config (以允许 root )但是我无法保存文件,因为它只是一个链接。我明白手动修改
我正在尝试在 nixos 中配置一个容器 containers例如: containers.abc123 = { config = { config, pkgs, ... }: {
我真的很喜欢 nixos/nix 的确定性,但我很难理解为我的使用定制包的最佳方法。我使用 nixpkgs.config.packageOverrides 属性取得的成功有限,但它很痛苦,我发现它失败
我真的很喜欢 nixos/nix 的确定性,但我很难理解为我的使用定制包的最佳方法。我使用 nixpkgs.config.packageOverrides 属性取得的成功有限,但它很痛苦,我发现它失败
我正在尝试安装 vim-now-haskell在 NixOS 17.09 上。 安装失败,出现异常 *** Installer requires 'curl-config'. Please insta
我正在尝试在haskell中设置一个用于代码开发的NixOS VM,并且在xmonad和emacs的基本安装方面遇到了麻烦。我的相关部分/etc/nixos/configuration.nix是 en
我最近安装了 NixOS,最终得到了 3 个配置文件: bruno(用户个人资料), 默认(由 root 使用)和 系统(由 NixOS 使用)。 我发现为系统配置文件使用稳定 channel 和为我
几天前我开始使用 NixOS。似乎所有东西都有一个配置选项,例如hardware.opengl.driSupport32Bit或 system.copySystemConfiguration . 但问
我想要的是 https://nixos.org/nixpkgs/manual/#sec-pkg-overrideAttrs文件 overrideAttrs它可以与 top-level/all-pack
假设我有我的 NixOS configuration.nix设置如下: {config, pkgs, ...}: { services.openssh.enable = true; } 我现在想要
如何确定我在系统nixos安装上安装的所有软件包(即/etc/nixos/configuration.nix中列出的软件包,我使用sudo nixos-rebuild switch安装的软件包)都使用
我要求的是GCC 8,但我却得到了GCC 7。 $ nix-shell -p gcc8 [nix-shell:~]$ gcc --version gcc (GCC) 7.3.0 到底是怎么回事? 最佳
我使用带有 XMonad 的 NixOS 作为窗口管理器,它是通过 configurations.nix 启用的。这很好用。 启动后,初始登录是通过 NixOS 登录 gui 完成的。 在 Debia
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
今天,我在使用 NixOS 发行版时遇到了一个非常有趣的问题。我只是想创建一个静态编译的 OCaml 程序,但做不到。然后我尝试使用 ANSI C 规范玩具“hello world!”来做到这一点。应
这是一个初学者的问题。所以有一个包vscode-with-extensions . package说: A set of vscode extensions to be installed along
我是一名优秀的程序员,十分优秀!