Factor out base configuration

This commit is contained in:
Nathan McCarty 2024-11-27 23:59:57 +00:00
parent 9dee45480d
commit 133bd3e673
4 changed files with 42 additions and 3 deletions

View file

@ -169,6 +169,22 @@
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1732014248,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1732350895,
@ -190,7 +206,8 @@
"flake-parts": "flake-parts",
"lix-module": "lix-module",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
"systems": {

View file

@ -4,6 +4,7 @@
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz";

View file

@ -27,9 +27,10 @@
{
imports = [
# include NixOS-WSL modules
# WSL support
inputs.nixos-wsl.nixosModules.default
lix-module.nixosModules.default
# Our modules
(import ../../modules/base.nix {inherit inputs;})
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

20
nixos/modules/base.nix Normal file
View file

@ -0,0 +1,20 @@
{ inputs }:
{
config,
lib,
pkgs,
...
}:
{
imports = [
inputs.lix-module.nixosModules.default
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
system.stateVersion = "24.11";
}