renamed home-manager module for import
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, lib, userSettings, systemSettings, ... }:
|
{ pkgs, lib, userSettings, systemSettings, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(import ./home-manager/home.nix {inherit systemSettings userSettings lib pkgs;})
|
(import ./home-manager {inherit systemSettings userSettings lib pkgs;})
|
||||||
./nixos
|
./nixos
|
||||||
./scripts
|
./scripts
|
||||||
];
|
];
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
nix.settings.trusted-users = [ "root" "@wheel" ];
|
nix.settings.trusted-users = [ "root" "@wheel" ];
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
nix.settings.download-buffer-size = 524288000; # 500MB
|
||||||
|
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
|
|
||||||
@@ -40,10 +41,33 @@
|
|||||||
services.cron = {
|
services.cron = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemCronJobs = [
|
systemCronJobs = [
|
||||||
"30 2 * * * /run/current-system/sw/bin/nfs > /etc/nixos/auto_update.log 2>&1"
|
"30 2 * * * /run/current-system/sw/bin/nfsu > /etc/nixos/auto_update.log 2>&1"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# systemd.timers."auto-update" = {
|
||||||
|
# wantedBy = [ "timers.target" ];
|
||||||
|
# timerConfig = {
|
||||||
|
# OnCalendar="*-*-* 4:00:00";
|
||||||
|
# Unit = "auto-update.service";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
# systemd.services."auto-update" = {
|
||||||
|
# script = ''
|
||||||
|
# ${pkgs.coreutils}/bin/echo "Running auto-update"
|
||||||
|
# FLAKE=$(${pkgs.coreutils}/bin/readlink -f /etc/nixos)
|
||||||
|
# ${pkgs.coreutils}/bin/echo "FLAKE: $FLAKE"
|
||||||
|
# ${pkgs.nix}/bin/nix flake update --flake $FLAKE --impure
|
||||||
|
# ${pkgs.git}/bin/git -C $FLAKE add "$FLAKE/flake.lock" > /dev/null 2>&1
|
||||||
|
# ${pkgs.sudo}/bin/sudo ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --flake $FLAKE#${systemSettings.hostName} --impure
|
||||||
|
# '';
|
||||||
|
# serviceConfig = {
|
||||||
|
# Type = "oneshot";
|
||||||
|
# User = "${userSettings.userName}";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/Storage_optimization
|
# https://nixos.wiki/wiki/Storage_optimization
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, userSettings, ... }:
|
||||||
{
|
{
|
||||||
sops.secrets."restic_password" = { };
|
|
||||||
|
sops.secrets.restic_password = {
|
||||||
|
owner = config.users.users.${userSettings.userName}.name;
|
||||||
|
mode = "0440";
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
restic
|
restic
|
||||||
|
|||||||
Reference in New Issue
Block a user