flake: refactor, bye srid
All checks were successful
Flake checks / Check (pull_request) Successful in 24m21s

Refactor flake to work without nixos-flake and use native NixOS module
system. This is because of recent changes to nixos-flake, like renaming it
to nixos-unified and changing the API without a changelog or guide how
to update.
This commit is contained in:
teutat3s 2024-10-05 13:54:05 +02:00
parent 8c8a757f8f
commit df2f0d4442
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
3 changed files with 64 additions and 31 deletions

View file

@ -318,21 +318,6 @@
"type": "github" "type": "github"
} }
}, },
"nixos-flake": {
"locked": {
"lastModified": 1728073820,
"narHash": "sha256-H6DC2OCW8BKzja+1oHGTjw9EN5w+4Op9PnVjKL8EJbI=",
"owner": "srid",
"repo": "nixos-flake",
"rev": "47a26bc9118d17500bbe0c4adb5ebc26f776cc36",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "nixos-flake",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1728067476, "lastModified": 1728067476,
@ -373,7 +358,6 @@
"keycloak-theme-pub-solar": "keycloak-theme-pub-solar", "keycloak-theme-pub-solar": "keycloak-theme-pub-solar",
"maunium-stickerpicker": "maunium-stickerpicker", "maunium-stickerpicker": "maunium-stickerpicker",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixos-flake": "nixos-flake",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"simple-nixos-mailserver": "simple-nixos-mailserver", "simple-nixos-mailserver": "simple-nixos-mailserver",
"unstable": "unstable" "unstable": "unstable"

View file

@ -11,7 +11,6 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
nixos-flake.url = "github:srid/nixos-flake";
deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs"; deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
@ -51,7 +50,6 @@
]; ];
imports = [ imports = [
inputs.nixos-flake.flakeModule
./logins ./logins
./lib ./lib
./overlays ./overlays

View file

@ -1,9 +1,35 @@
{ self, ... }: {
self,
inputs,
config,
...
}:
{ {
flake = { flake = {
nixosConfigurations = { nixosModules = {
nachtigall = self.nixos-flake.lib.mkLinuxSystem { home-manager = {
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager
({
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
flake = {
inherit self inputs config;
};
};
})
];
};
};
nixosConfigurations = {
nachtigall = self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
self.inputs.agenix.nixosModules.default self.inputs.agenix.nixosModules.default
self.nixosModules.home-manager self.nixosModules.home-manager
./nachtigall ./nachtigall
@ -43,8 +69,13 @@
]; ];
}; };
metronom = self.nixos-flake.lib.mkLinuxSystem { metronom = self.inputs.nixpkgs.lib.nixosSystem {
imports = [ specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
self.inputs.agenix.nixosModules.default self.inputs.agenix.nixosModules.default
self.nixosModules.home-manager self.nixosModules.home-manager
./metronom ./metronom
@ -60,8 +91,13 @@
]; ];
}; };
tankstelle = self.nixos-flake.lib.mkLinuxSystem { tankstelle = self.inputs.nixpkgs.lib.nixosSystem {
imports = [ specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
self.inputs.agenix.nixosModules.default self.inputs.agenix.nixosModules.default
self.nixosModules.home-manager self.nixosModules.home-manager
./tankstelle ./tankstelle
@ -73,8 +109,13 @@
]; ];
}; };
trinkgenossin = self.nixos-flake.lib.mkLinuxSystem { trinkgenossin = self.inputs.nixpkgs.lib.nixosSystem {
imports = [ specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
self.inputs.agenix.nixosModules.default self.inputs.agenix.nixosModules.default
self.nixosModules.home-manager self.nixosModules.home-manager
./trinkgenossin ./trinkgenossin
@ -94,8 +135,13 @@
]; ];
}; };
delite = self.nixos-flake.lib.mkLinuxSystem { delite = self.inputs.nixpkgs.lib.nixosSystem {
imports = [ specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
self.inputs.agenix.nixosModules.default self.inputs.agenix.nixosModules.default
self.inputs.disko.nixosModules.disko self.inputs.disko.nixosModules.disko
self.nixosModules.home-manager self.nixosModules.home-manager
@ -111,8 +157,13 @@
]; ];
}; };
blue-shell = self.nixos-flake.lib.mkLinuxSystem { blue-shell = self.inputs.nixpkgs.lib.nixosSystem {
imports = [ specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
self.inputs.agenix.nixosModules.default self.inputs.agenix.nixosModules.default
self.inputs.disko.nixosModules.disko self.inputs.disko.nixosModules.disko
self.nixosModules.home-manager self.nixosModules.home-manager