mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
整理一些服务
This commit is contained in:
@@ -239,12 +239,16 @@
|
||||
impermanence.enable = true;
|
||||
snapper = { enable = true; configs.persistent = "/nix/persistent"; };
|
||||
fontconfig.enable = true;
|
||||
u2f.enable = true;
|
||||
};
|
||||
systemd.sleep.extraConfig = localLib.stripeTabs
|
||||
"
|
||||
SuspendState=freeze
|
||||
HibernateMode=shutdown
|
||||
";
|
||||
};
|
||||
boot.kernelParams = [ "i915.force_probe=46a6" ];
|
||||
}; })
|
||||
|
||||
./modules/basic.nix
|
||||
./modules/sops.nix
|
||||
[ ./modules/hardware/nvidia-prime.nix { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; } ]
|
||||
./modules/hardware/chn-PC.nix
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config =
|
||||
{
|
||||
systemd.sleep.extraConfig =
|
||||
"
|
||||
SuspendState=freeze
|
||||
HibernateMode=shutdown
|
||||
";
|
||||
security.pam =
|
||||
{
|
||||
u2f = { enable = true; cue = true; authFile = ./u2f_keys; };
|
||||
services = builtins.listToAttrs (builtins.map (name: { inherit name; value = { u2fAuth = true; }; })
|
||||
[ "login" "sudo" "su" "kde" "polkit-1" ]);
|
||||
};
|
||||
environment.etc."channels/nixpkgs".source = inputs.topInputs.nixpkgs.outPath;
|
||||
# environment.pathsToLink = [ "/include" ];
|
||||
# environment.variables.CPATH = "/run/current-system/sw/include";
|
||||
# environment.variables.LIBRARY_PATH = "/run/current-system/sw/lib";
|
||||
};
|
||||
}
|
||||
@@ -14,6 +14,7 @@ inputs:
|
||||
};
|
||||
kmscon.enable = mkOption { type = types.bool; default = false; };
|
||||
fontconfig.enable = mkOption { type = types.bool; default = false; };
|
||||
u2f.enable = mkOption { type = types.bool; default = false; };
|
||||
};
|
||||
config = let inherit (inputs.lib) mkMerge mkIf; inherit (inputs.localLib) stripeTabs attrsToList; in mkMerge
|
||||
[
|
||||
@@ -94,5 +95,16 @@ inputs:
|
||||
};
|
||||
}
|
||||
)
|
||||
(
|
||||
mkIf inputs.config.nixos.services.u2f.enable
|
||||
{
|
||||
security.pam =
|
||||
{
|
||||
u2f = { enable = true; cue = true; authFile = ./u2f_keys; };
|
||||
services = builtins.listToAttrs (builtins.map (name: { inherit name; value = { u2fAuth = true; }; })
|
||||
[ "login" "sudo" "su" "kde" "polkit-1" ]);
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
@@ -88,18 +88,26 @@ inputs:
|
||||
};
|
||||
timers.systemd-tmpfiles-clean.enable = false;
|
||||
};
|
||||
environment.sessionVariables =
|
||||
environment =
|
||||
{
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
XDG_STATE_HOME = "$HOME/.local/state";
|
||||
etc."channels/nixpkgs".source = inputs.topInputs.nixpkgs.outPath;
|
||||
etc."nixos".source = inputs.topInputs.self.outPath;
|
||||
sessionVariables =
|
||||
{
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
XDG_STATE_HOME = "$HOME/.local/state";
|
||||
};
|
||||
};
|
||||
i18n =
|
||||
{
|
||||
defaultLocale = "zh_CN.UTF-8";
|
||||
supportedLocales = ["zh_CN.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "C.UTF-8/UTF-8"];
|
||||
};
|
||||
# environment.pathsToLink = [ "/include" ];
|
||||
# environment.variables.CPATH = "/run/current-system/sw/include";
|
||||
# environment.variables.LIBRARY_PATH = "/run/current-system/sw/lib";
|
||||
}
|
||||
# hostname
|
||||
{ networking.hostName = inputs.config.nixos.system.hostname; }
|
||||
|
||||
Reference in New Issue
Block a user