diff --git a/flake.lock b/flake.lock index b38e475..a98cfb1 100755 --- a/flake.lock +++ b/flake.lock @@ -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" diff --git a/flake.nix b/flake.nix index 107aea0..3520210 100755 --- a/flake.nix +++ b/flake.nix @@ -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 = { diff --git a/helpers.nix b/helpers.nix index 6808817..d82aa9c 100644 --- a/helpers.nix +++ b/helpers.nix @@ -11,37 +11,54 @@ in { suite, user ? "fern", extraModules ? [], - }: { - nixosConfigurations.${hostname} = nixosSystem rec { - system = platform; + }: let + system = platform; - pkgs = import nixpkgs { - inherit system; - config = { - allowUnfree = true; - permittedInsecurePackages = [ - "dotnet-sdk-6.0.428" - "dotnet-runtime-6.0.36" - ]; - }; + secrets = builtins.toString inputs.secrets; + + pkgs = import nixpkgs { + inherit system; + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "dotnet-sdk-6.0.428" + "dotnet-runtime-6.0.36" + ]; }; + }; + + 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; + }; + }) + ]; + }; + + 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 - hostname nixpkgs - suite + hostname platform + suite user + secrets + userPackages ; # Inherit variables. - - userPackages = { - fluffychat = fluffychat-2_0_0.legacyPackages.${system}.fluffychat; - feishin = feishin-0_17_0.legacyPackages.${system}.feishin; - webone = pkgs.callPackage ./packages/webone {}; - }; - - secrets = builtins.toString inputs.secrets; # Secrets directory. }; 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}; }; }; }; diff --git a/suites/common.nix b/suites/common.nix index ccc900d..09fcf46 100644 --- a/suites/common.nix +++ b/suites/common.nix @@ -237,6 +237,7 @@ with lib; { clipboard.providers.wl-copy.enable = true; plugins = { + auto-session.enable = true; colorizer.enable = true; comment.enable = true; gitsigns.enable = true;