parent
96bdbbfb7a
commit
132bc369a0
2 changed files with 25 additions and 10 deletions
|
@ -10,6 +10,7 @@
|
||||||
./hardening
|
./hardening
|
||||||
./networking
|
./networking
|
||||||
./nix
|
./nix
|
||||||
|
./fun.nix
|
||||||
]
|
]
|
||||||
++ (with inputs; [
|
++ (with inputs; [
|
||||||
aagl.nixosModules.default
|
aagl.nixosModules.default
|
||||||
|
@ -62,16 +63,6 @@
|
||||||
settings.PasswordAuthentication = false;
|
settings.PasswordAuthentication = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.getty.greetingLine = let
|
|
||||||
inherit (config.system) nixos;
|
|
||||||
in ''
|
|
||||||
NixOS ${nixos.label} ${nixos.codeName} (\m) - \l
|
|
||||||
${lib.strings.optionalString (builtins.elem "nvidia" config.services.xserver.videoDrivers)
|
|
||||||
"--my-next-gpu-wont-be-nvidia"}
|
|
||||||
${lib.strings.optionalString (builtins.elem "amdgpu" config.boot.initrd.kernelModules)
|
|
||||||
"[ 5.996722] amdgpu 0000:67:00.0: Fatal error during GPU init"}
|
|
||||||
'';
|
|
||||||
|
|
||||||
users.users = rec {
|
users.users = rec {
|
||||||
"guanranwang" = {
|
"guanranwang" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
24
nixos/profiles/common/core/fun.nix
Normal file
24
nixos/profiles/common/core/fun.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
options = {
|
||||||
|
system.nixos.codeName = lib.mkOption {readOnly = false;};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/315574
|
||||||
|
system.nixos.codeName = "骆马";
|
||||||
|
|
||||||
|
services.getty.greetingLine = let
|
||||||
|
inherit (config.system) nixos;
|
||||||
|
in ''
|
||||||
|
NixOS ${nixos.label} ${nixos.codeName} (\m) - \l
|
||||||
|
${lib.strings.optionalString (builtins.elem "nvidia" config.services.xserver.videoDrivers)
|
||||||
|
"--my-next-gpu-wont-be-nvidia"}
|
||||||
|
${lib.strings.optionalString (builtins.elem "amdgpu" config.boot.initrd.kernelModules)
|
||||||
|
"[ 5.996722] amdgpu 0000:67:00.0: Fatal error during GPU init"}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue