switch to flakes

This commit is contained in:
jaina heartles 2024-02-25 12:51:45 -08:00
parent 878f8db8da
commit f6914db01b
3 changed files with 76 additions and 0 deletions

View File

@ -1,6 +1,11 @@
{ pkgs, ... }: {
imports = [ ./hardware-configuration.nix ];
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
environment.systemPackages = with pkgs; [
kitty.terminfo
kakoune

44
flake.lock Normal file
View File

@ -0,0 +1,44 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1708831307,
"narHash": "sha256-0iL/DuGjiUeck1zEaL+aIe2WvA3/cVhp/SlmTcOZXH4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5bf1cadb72ab4e77cb0b700dab76bcdaf88f706b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-23.05": {
"locked": {
"lastModified": 1704290814,
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"nixpkgs-23.05": "nixpkgs-23.05"
}
}
},
"root": "root",
"version": 7
}

27
flake.nix Normal file
View File

@ -0,0 +1,27 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
"nixpkgs-23.05".url = "github:NixOS/nixpkgs/nixos-23.05";
};
outputs = { self, nixpkgs }@attrs: {
nixosConfigurations."egirls.gay" = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
pkgs = let
cfg = {
inherit system;
config.allowUnfree = true;
};
in import nixpkgs cfg;
modules = [
./configuration.nix
# set nix shell nixpkgs to flake nixpkgs
({ config, pkgs, options, ... }: {
nix.registry.nixpkgs.flake = nixpkgs;
})
];
};
};
}