Migrate to flakes

This commit is contained in:
coolneng 2021-08-08 19:56:16 +01:00
parent 71d8daf782
commit bd3396bfa9
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 32 additions and 1 deletions

View File

@ -36,7 +36,7 @@
timeout = 3;
};
# Run Nix garbage collector, while avoiding compiling
# Run Nix garbage collector and enable flakes
nix = {
autoOptimiseStore = true;
gc = {
@ -48,7 +48,9 @@
keep-outputs = true
keep-derivations = true
gc-keep-outputs = true
experimental-features = nix-command flakes
'';
package = pkgs.nixUnstable;
};
# Clean tmp directory on shutdown

29
flake.nix Normal file
View File

@ -0,0 +1,29 @@
{
description = "System configuration for panacea";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.url = "github:nix-community/emacs-overlay";
rnix-lsp.url = "github:nix-community/rnix-lsp";
};
outputs = inputs@{ self, nixpkgs, agenix, ... }:
let
system = "x86_64-linux";
pkgs = import pkgs {
inherit system;
config.allowUnfree = true;
};
lib = nixpkgs.lib;
in {
nixosConfigurations.panacea = lib.nixosSystem {
inherit system;
modules = [ (import ./configuration.nix) agenix.nixosModules.age ];
};
};
}