Rename pr nixpkg inputs. deploy-rs overlay.

This commit is contained in:
Fern Garden 2025-07-11 17:25:25 +08:00
parent fe4b86c320
commit 09f05fccfd
3 changed files with 78 additions and 62 deletions

68
flake.lock generated
View file

@ -35,22 +35,6 @@
"type": "github"
}
},
"feishin-0_17_0": {
"locked": {
"lastModified": 1751534869,
"narHash": "sha256-kUYk/jPyX5Lnhv7vUUfNVSHUDA8k28xi2H5bt6a1EHg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2ee9ef97da93af5e84cc07ee07ba79b869d162ea",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "pull/414929/head",
"repo": "nixpkgs",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -143,22 +127,6 @@
"type": "github"
}
},
"fluffychat-2_0_0": {
"locked": {
"lastModified": 1751127166,
"narHash": "sha256-dX9VUpl3YM9XexkU+QGj1UfptYy/jIOeB3tSMtJSRgE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b5aec1f9cd51c508ee7488113bc2f192cc1143f8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "pull/419632/head",
"repo": "nixpkgs",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@ -263,6 +231,38 @@
"type": "github"
}
},
"nixpkgs-pr-feishin": {
"locked": {
"lastModified": 1751534869,
"narHash": "sha256-kUYk/jPyX5Lnhv7vUUfNVSHUDA8k28xi2H5bt6a1EHg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2ee9ef97da93af5e84cc07ee07ba79b869d162ea",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "pull/414929/head",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-pr-fluffychat": {
"locked": {
"lastModified": 1751127166,
"narHash": "sha256-dX9VUpl3YM9XexkU+QGj1UfptYy/jIOeB3tSMtJSRgE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b5aec1f9cd51c508ee7488113bc2f192cc1143f8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "pull/419632/head",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1751203939,
@ -400,11 +400,11 @@
"root": {
"inputs": {
"deploy-rs": "deploy-rs",
"feishin-0_17_0": "feishin-0_17_0",
"fluffychat-2_0_0": "fluffychat-2_0_0",
"lanzaboote": "lanzaboote",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3",
"nixpkgs-pr-feishin": "nixpkgs-pr-feishin",
"nixpkgs-pr-fluffychat": "nixpkgs-pr-fluffychat",
"nixvim": "nixvim",
"secrets": "secrets",
"sops-nix": "sops-nix"

View file

@ -3,7 +3,10 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; # Stable nixpkgs.
deploy-rs.url = "github:serokell/deploy-rs";
nixpkgs-pr-fluffychat.url = "github:NixOS/nixpkgs?ref=pull/419632/head"; # FluffyChat 2.0.0
nixpkgs-pr-feishin.url = "github:NixOS/nixpkgs?ref=pull/414929/head"; # Feishin 0.17.0
deploy-rs.url = "github:serokell/deploy-rs"; # Remote deployment
lanzaboote.url = "github:nix-community/lanzaboote"; # Secure boot.
nixos-hardware.url = "github:NixOS/nixos-hardware"; # Hardware specific config.
sops-nix.url = "github:Mic92/sops-nix"; # Secrets management.
@ -14,10 +17,6 @@
url = "git+ssh://git@docker.local:222/fern/secrets?ref=main";
flake = false;
};
# Packages.
fluffychat-2_0_0.url = "github:NixOS/nixpkgs?ref=pull/419632/head"; # FluffyChat 2.0.0
feishin-0_17_0.url = "github:NixOS/nixpkgs?ref=pull/414929/head"; # Feishin 0.17.0
};
outputs = {

View file

@ -11,10 +11,11 @@ in {
suite,
user ? "fern",
extraModules ? [],
}: {
nixosConfigurations.${hostname} = nixosSystem rec {
}: let
system = platform;
secrets = builtins.toString inputs.secrets;
pkgs = import nixpkgs {
inherit system;
config = {
@ -26,22 +27,38 @@ in {
};
};
specialArgs = {
inherit
hostname
nixpkgs
suite
platform
user
; # Inherit variables.
userPackages = {
fluffychat = fluffychat-2_0_0.legacyPackages.${system}.fluffychat;
feishin = feishin-0_17_0.legacyPackages.${system}.feishin;
webone = pkgs.callPackage ./packages/webone {};
pkgs-deploy-rs = import nixpkgs {
inherit system;
overlays = [
deploy-rs.overlays.default
(self: super: {
deploy-rs = {
inherit (pkgs) deploy-rs;
lib = super.deploy-rs.lib;
};
})
];
};
secrets = builtins.toString inputs.secrets; # Secrets directory.
userPackages = {
fluffychat = (import nixpkgs-pr-fluffychat {inherit system;}).fluffychat;
feishin = (import nixpkgs-pr-feishin {inherit system;}).feishin;
webone = pkgs.callPackage ./packages/webone {};
};
in {
nixosConfigurations.${hostname} = nixosSystem rec {
inherit system pkgs;
specialArgs = {
inherit
nixpkgs
hostname
platform
suite
user
secrets
userPackages
; # Inherit variables.
};
modules =
@ -60,7 +77,7 @@ in {
profiles.system = {
user = "root";
sshUser = user;
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${hostname};
path = pkgs-deploy-rs.deploy-rs.lib.activate.nixos self.nixosConfigurations.${hostname};
};
};
};