♻️ backwards compatibility for non-flake systems
This commit is contained in:
parent
ea5ba53e3c
commit
ef245c59a7
13
default.nix
Normal file
13
default.nix
Normal file
@ -0,0 +1,13 @@
|
||||
(import
|
||||
(
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}
|
||||
)
|
||||
{
|
||||
src = ./.;
|
||||
}).defaultNix
|
35
flake.lock
generated
35
flake.lock
generated
@ -28,11 +28,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1651201720,
|
||||
"narHash": "sha256-nx4UKikzjZLunB1VUf5I8jFurn0rfc3y1xceb6deDmI=",
|
||||
"lastModified": 1651881376,
|
||||
"narHash": "sha256-JEG/G/ILu01/rrrDlCG27dToDUKB/C7nw2N0Pfk11w4=",
|
||||
"owner": "walkah",
|
||||
"repo": "dotfiles",
|
||||
"rev": "a9529560bffd9d1093e957b9b5d7bdcedaa39f8e",
|
||||
"rev": "8009def87838bc2b7b4fd9d48e89f83bb2cbe134",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -57,6 +57,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1650374568,
|
||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1649676176,
|
||||
@ -98,11 +114,11 @@
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1651800560,
|
||||
"narHash": "sha256-LUfR0/Fv8DA0uu8Uex2S1QcLiE4B5ylplbXmMs6/YoM=",
|
||||
"lastModified": 1651886851,
|
||||
"narHash": "sha256-kbXOJSf1uho0/7P54nZkJdJY3oAelIjyc6tfiRhaXJI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "538343be863cb0b9e9f1471e6dc09e0e140c7b3d",
|
||||
"rev": "882bd8118bdbff3a6e53e5ced393932b351ce2f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -129,11 +145,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1651804312,
|
||||
"narHash": "sha256-DJxOGlxwQccuuwXUS0oRRkcNJbW5UP4fpsL5ga9ZwYw=",
|
||||
"lastModified": 1651981559,
|
||||
"narHash": "sha256-vOcCFzuBbYsDyAahnd8PcxcRAAMeDL/fefvIRPyuOi0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d59dd43e49f24b58fe8d5ded38cbdf00c3da4dc2",
|
||||
"rev": "0f949eb7f11e0f7fbe5bb863a900104227969bf7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -161,6 +177,7 @@
|
||||
"inputs": {
|
||||
"deploy-rs": "deploy-rs",
|
||||
"dotfiles": "dotfiles",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
|
@ -7,6 +7,11 @@
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
|
||||
flake-compat = {
|
||||
url = "github:edolstra/flake-compat";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# My stuff
|
||||
dotfiles = {
|
||||
url = "github:walkah/dotfiles";
|
||||
@ -22,7 +27,7 @@
|
||||
, home-manager
|
||||
, dotfiles
|
||||
, ...
|
||||
}@attrs:
|
||||
}:
|
||||
let
|
||||
mkSystem = hostName: system: modules:
|
||||
|
||||
|
26
shell.nix
26
shell.nix
@ -1,19 +1,13 @@
|
||||
(import
|
||||
(
|
||||
let
|
||||
sources = import ./nix/sources.nix;
|
||||
pkgs = import sources.nixpkgs {
|
||||
overlays = [ (import ./overlays) ];
|
||||
config = { };
|
||||
};
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
pkgs.mkShell {
|
||||
name = "athens";
|
||||
buildInputs = [
|
||||
pkgs.age
|
||||
pkgs.morph
|
||||
pkgs.sops
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export NIX_PATH="nixpkgs=${sources.nixpkgs}:home-manager=${sources.home-manager}:."
|
||||
'';
|
||||
fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}
|
||||
)
|
||||
{
|
||||
src = ./.;
|
||||
}).shellNix
|
||||
|
Loading…
Reference in New Issue
Block a user