10 current 2024-08-31 13:59:25 24.11.20240828.71e91c4 6.6.47 *
This commit is contained in:
parent
07c912a7f0
commit
c9203dde23
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1724819573,
|
||||||
|
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
22
flake.nix
Normal file
22
flake.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
description = "Nixos config flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
# home-manager = {
|
||||||
|
# url = "github:nix-community/home-manager";
|
||||||
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, ... }@inputs: {
|
||||||
|
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {inherit inputs;};
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
# inputs.home-manager.nixosModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -35,7 +35,11 @@ git diff -U0 '*.nix'
|
|||||||
echo "NixOS Rebuilding..."
|
echo "NixOS Rebuilding..."
|
||||||
|
|
||||||
# Rebuild, output simplified errors, log trackebacks
|
# Rebuild, output simplified errors, log trackebacks
|
||||||
sudo nixos-rebuild switch &>nixos-switch.log || (cat nixos-switch.log | grep --color error && exit 1)
|
if [ -f ./flake.nix ]; then
|
||||||
|
nixos-rebuild switch --flake /etc/nixos#default &>nixos-switch.log || (cat nixos-switch.log | grep --color error && exit 1)
|
||||||
|
else
|
||||||
|
nixos-rebuild switch &>nixos-switch.log || (cat nixos-switch.log | grep --color error && exit 1)
|
||||||
|
fi
|
||||||
|
|
||||||
# Get current generation metadata
|
# Get current generation metadata
|
||||||
current=$(nixos-rebuild list-generations | grep current)
|
current=$(nixos-rebuild list-generations | grep current)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user