mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
optimize etc persistence
This commit is contained in:
parent
dd8faf730d
commit
e0bc47520c
5 changed files with 18 additions and 18 deletions
|
@ -12,9 +12,9 @@
|
||||||
nixos-hardware.nixosModules //
|
nixos-hardware.nixosModules //
|
||||||
import lib/hardware.nix "${nixpkgs}/nixos/modules";
|
import lib/hardware.nix "${nixpkgs}/nixos/modules";
|
||||||
|
|
||||||
forAllSystems = f: builtins.listToAttrs (map
|
forAllSystems = f: nixpkgs.lib.genAttrs
|
||||||
(name: { inherit name; value = f name; })
|
[ "x86_64-linux" "aarch64-linux" ]
|
||||||
[ "x86_64-linux" "aarch64-linux" ]);
|
(system: f system);
|
||||||
|
|
||||||
pins = {
|
pins = {
|
||||||
nix.registry.nixpkgs.to = {
|
nix.registry.nixpkgs.to = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
networking.hostName = "cube";
|
networking.hostName = "cube";
|
||||||
|
|
||||||
|
@ -12,13 +12,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc =
|
environment.etc =
|
||||||
builtins.listToAttrs (map
|
lib.genAttrs
|
||||||
(name: { inherit name; value.source = "/nix/persist/etc/${name}"; })
|
|
||||||
[
|
[
|
||||||
"machine-id"
|
"machine-id"
|
||||||
"ssh/ssh_host_ed25519_key"
|
"ssh/ssh_host_ed25519_key"
|
||||||
"ssh/ssh_host_rsa_key"
|
"ssh/ssh_host_rsa_key"
|
||||||
]);
|
]
|
||||||
|
(name: { source = "/nix/persist/etc/${name}"; });
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
networking.hostName = "hp";
|
networking.hostName = "hp";
|
||||||
|
|
||||||
|
@ -11,14 +11,14 @@
|
||||||
users.users.sean.passwordFile = "/nix/persist/shadow_sean";
|
users.users.sean.passwordFile = "/nix/persist/shadow_sean";
|
||||||
|
|
||||||
environment.etc =
|
environment.etc =
|
||||||
builtins.listToAttrs (map
|
lib.genAttrs
|
||||||
(name: { inherit name; value.source = "/nix/persist/etc/${name}"; })
|
|
||||||
[
|
[
|
||||||
"machine-id"
|
"machine-id"
|
||||||
"NetworkManager/system-connections"
|
"NetworkManager/system-connections"
|
||||||
"ssh/ssh_host_ed25519_key"
|
"ssh/ssh_host_ed25519_key"
|
||||||
"ssh/ssh_host_rsa_key"
|
"ssh/ssh_host_rsa_key"
|
||||||
]);
|
]
|
||||||
|
(name: { source = "/nix/persist/etc/${name}"; });
|
||||||
|
|
||||||
sconfig = {
|
sconfig = {
|
||||||
gnome = true;
|
gnome = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
networking.hostName = "lenny";
|
networking.hostName = "lenny";
|
||||||
|
|
||||||
|
@ -11,14 +11,14 @@
|
||||||
users.users.sean.passwordFile = "/nix/persist/shadow_sean";
|
users.users.sean.passwordFile = "/nix/persist/shadow_sean";
|
||||||
|
|
||||||
environment.etc =
|
environment.etc =
|
||||||
builtins.listToAttrs (map
|
lib.genAttrs
|
||||||
(name: { inherit name; value.source = "/nix/persist/etc/${name}"; })
|
|
||||||
[
|
[
|
||||||
"machine-id"
|
"machine-id"
|
||||||
"NetworkManager/system-connections"
|
"NetworkManager/system-connections"
|
||||||
"ssh/ssh_host_ed25519_key"
|
"ssh/ssh_host_ed25519_key"
|
||||||
"ssh/ssh_host_rsa_key"
|
"ssh/ssh_host_rsa_key"
|
||||||
]);
|
]
|
||||||
|
(name: { source = "/nix/persist/etc/${name}"; });
|
||||||
|
|
||||||
sconfig = {
|
sconfig = {
|
||||||
gnome = true;
|
gnome = true;
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
users.users.sean.passwordFile = "/nix/persist/shadow_sean";
|
users.users.sean.passwordFile = "/nix/persist/shadow_sean";
|
||||||
|
|
||||||
environment.etc =
|
environment.etc =
|
||||||
builtins.listToAttrs (map
|
lib.genAttrs
|
||||||
(name: { inherit name; value.source = "/nix/persist/etc/${name}"; })
|
|
||||||
[
|
[
|
||||||
"machine-id"
|
"machine-id"
|
||||||
"ssh/ssh_host_ed25519_key"
|
"ssh/ssh_host_ed25519_key"
|
||||||
"ssh/ssh_host_rsa_key"
|
"ssh/ssh_host_rsa_key"
|
||||||
]);
|
]
|
||||||
|
(name: { source = "/nix/persist/etc/${name}"; });
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue