Migrate to flakes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ config, inputs, pkgs, lib, ... }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
@@ -30,7 +30,13 @@ with pkgs;
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [ libraspberrypi htop vim ];
|
||||
environment.systemPackages = [
|
||||
libraspberrypi
|
||||
htop
|
||||
neovim
|
||||
git
|
||||
inputs.agenix.defaultPackage.aarch64-linux
|
||||
];
|
||||
|
||||
# Load PWM hardware timers
|
||||
boot.kernelModules = [ "pwm_bcm2835" "w1-gpio" "w1-therm" ];
|
||||
@@ -103,7 +109,7 @@ with pkgs;
|
||||
allowReboot = true;
|
||||
};
|
||||
|
||||
# Run Nix garbage collector, while avoiding recompilation
|
||||
# Run Nix garbage collector, while avoiding recompilation and enable flakes
|
||||
nix = {
|
||||
settings.auto-optimise-store = true;
|
||||
gc = {
|
||||
@@ -114,9 +120,15 @@ with pkgs;
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
gc-keep-outputs = true
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
package = nixFlakes;
|
||||
};
|
||||
|
||||
# Use same version of nixpkgs for nix-shell
|
||||
nix.nixPath = let path = toString ./.;
|
||||
in [ "nixpkgs=${inputs.nixpkgs}" "nixos-config=${path}/configuration.nix" ];
|
||||
|
||||
# Configure fish shell
|
||||
programs.fish.enable = true;
|
||||
users.users.root = {
|
||||
@@ -138,6 +150,25 @@ with pkgs;
|
||||
# NixOS version
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
# Specify secrets
|
||||
age = {
|
||||
secrets.wireguard.file = secrets/wireguard.age;
|
||||
secrets.syncthing.file = secrets/syncthing.age;
|
||||
secrets.msmtp.file = secrets/msmtp.age;
|
||||
secrets.gitea = {
|
||||
file = secrets/gitea.age;
|
||||
owner = "gitea";
|
||||
group = "gitea";
|
||||
};
|
||||
secrets.ddclient.file = secrets/ddclient.age;
|
||||
secrets.miniflux = {
|
||||
file = secrets/miniflux.age;
|
||||
owner = "miniflux";
|
||||
group = "miniflux";
|
||||
};
|
||||
identityPaths = [ "/etc/ssh/id_ed25519" ];
|
||||
};
|
||||
|
||||
# Import other configuration modules
|
||||
imports = [
|
||||
./modules/hardware-configuration.nix
|
||||
|
||||
Reference in New Issue
Block a user