Use lix from nixpkgs

This commit is contained in:
Victor Mignot 2024-10-10 20:16:42 +02:00
parent 725cf0f865
commit 611ad23d0b
Signed by: dala
GPG key ID: 5E7F2CE1BEAFED3D
2 changed files with 22 additions and 106 deletions

View file

@ -140,24 +140,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": { "flakey-profile": {
"locked": { "locked": {
"lastModified": 1712898590, "lastModified": 1712898590,
@ -173,21 +155,6 @@
"type": "github" "type": "github"
} }
}, },
"flakey-profile_2": {
"locked": {
"lastModified": 1712898590,
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
"owner": "lf-",
"repo": "flakey-profile",
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
"type": "github"
},
"original": {
"owner": "lf-",
"repo": "flakey-profile",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -256,48 +223,11 @@
} }
}, },
"lix": { "lix": {
"flake": false,
"locked": {
"lastModified": 1723503926,
"narHash": "sha256-Rosl9iA9MybF5Bud4BTAQ9adbY81aGmPfV8dDBGl34s=",
"rev": "bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2.tar.gz?rev=bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/lix/archive/2.91.0.tar.gz"
}
},
"lix-module-stable": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"flakey-profile": "flakey-profile", "flakey-profile": "flakey-profile",
"lix": "lix",
"nixpkgs": [
"nixpkgs-stable"
]
},
"locked": {
"lastModified": 1723510904,
"narHash": "sha256-zNW/rqNJwhq2lYmQf19wJerRuNimjhxHKmzrWWFJYts=",
"rev": "622a2253a071a1fb97a4d3c8103a91114acc1140",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/622a2253a071a1fb97a4d3c8103a91114acc1140.tar.gz?rev=622a2253a071a1fb97a4d3c8103a91114acc1140"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz"
}
},
"lix-module-unstable": {
"inputs": {
"flake-utils": "flake-utils_4",
"flakey-profile": "flakey-profile_2",
"lix": "lix_2", "lix": "lix_2",
"nixpkgs": [ "nixpkgs": "nixpkgs_2"
"nixpkgs-unstable"
]
}, },
"locked": { "locked": {
"lastModified": 1723510904, "lastModified": 1723510904,
@ -405,6 +335,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1723175592,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks-nix": { "pre-commit-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@ -439,8 +385,7 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"lix-module-stable": "lix-module-stable", "lix": "lix",
"lix-module-unstable": "lix-module-unstable",
"nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-stable": "nixpkgs-stable_2",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
@ -536,21 +481,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -21,15 +21,7 @@
}; };
# Use Lix instead of Nix # Use Lix instead of Nix
lix-module-unstable = { lix.url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
lix-module-stable = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.1"; lanzaboote.url = "github:nix-community/lanzaboote/v0.4.1";
@ -47,18 +39,14 @@
sops-nix, sops-nix,
flake-utils, flake-utils,
extra-config, extra-config,
lix-module-unstable, lix,
lix-module-stable,
lanzaboote, lanzaboote,
dalaran-fr, dalaran-fr,
}: }:
let let
machines = import ./machines.nix; machines = import ./machines.nix;
my = import ./modules; my = import ./modules;
lixModules = { lixModule = lix.nixosModules.lixFromNixpkgs;
stable = lix-module-stable;
unstable = lix-module-unstable;
};
nixpkgsVersions = { nixpkgsVersions = {
stable = nixpkgs-stable; stable = nixpkgs-stable;
unstable = nixpkgs-unstable; unstable = nixpkgs-unstable;
@ -68,9 +56,7 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
( lixModule
if (config.system == "x86_64-linux") then lixModules.${config.nixpkgs}.nixosModules.default else { }
)
./configurations/${name} ./configurations/${name}
(if config.enableHomeManager then home-manager.nixosModules.home-manager else { }) (if config.enableHomeManager then home-manager.nixosModules.home-manager else { })
(if (config.system == "x86_64-linux") then lanzaboote.nixosModules.lanzaboote else { }) (if (config.system == "x86_64-linux") then lanzaboote.nixosModules.lanzaboote else { })