Hallucinate some kinda flake business

This commit is contained in:
Sparky
2025-10-29 12:52:59 +01:00
parent 02b5b0779c
commit b25ab16bd7
3 changed files with 26 additions and 2 deletions

View File

@@ -2,11 +2,11 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running 'nixos-help'). # and in the NixOS manual (accessible by running 'nixos-help').
{ config, lib, pkgs, ... }: { config, lib, pkgs, inputs, ... }:
with lib; with lib;
let let
unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz") { config = { allowUnfree = true; }; }; unstable = import inputs.nixpkgs-unstable { inherit (config.nixpkgs) config; };
in in
{ {
@@ -257,4 +257,7 @@ in
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment? system.stateVersion = "25.05"; # Did you read the comment?
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
} }

18
flake.nix Normal file
View File

@@ -0,0 +1,18 @@
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix
];
};
};
}

View File

@@ -15,6 +15,9 @@
- source: configuration.nix - source: configuration.nix
target: /etc/nixos/configuration.nix target: /etc/nixos/configuration.nix
delete: true delete: true
- source: flake.nix
target: /etc/nixos/flake.nix
delete: true
- source: sparky.gitconfig - source: sparky.gitconfig
target: /home/dave/.gitconfig target: /home/dave/.gitconfig