From d9538c3bcd226224371c126e40f07838259cb502 Mon Sep 17 00:00:00 2001 From: baduhai Date: Sat, 3 Dec 2022 09:48:11 -0300 Subject: [PATCH] Updated flake and added some server imports --- flake.lock | 52 +++++++++++++++++++++++------------- flake.nix | 5 +--- hosts/servers/alexandria.nix | 3 +++ hosts/servers/common/nix.nix | 13 +++++++++ 4 files changed, 50 insertions(+), 23 deletions(-) create mode 100644 hosts/servers/common/nix.nix diff --git a/flake.lock b/flake.lock index a2a03f8..04e5135 100644 --- a/flake.lock +++ b/flake.lock @@ -3,9 +3,7 @@ "deploy-rs": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs", "utils": "utils" }, "locked": { @@ -46,11 +44,11 @@ "utils": "utils_2" }, "locked": { - "lastModified": 1669825171, - "narHash": "sha256-HxlZHSiRGXnWAFbIJMeujqBe2KgACYx5XDRY0EA9P+4=", + "lastModified": 1670058827, + "narHash": "sha256-T+yyncPpZWeIkFrG/Cgj21iopULY3BZGWIhcT5ZmCgM=", "owner": "nix-community", "repo": "home-manager", - "rev": "478610aa37c8339eacabfa03f07dacf5574edd47", + "rev": "eb3598cf44aa10f2a16fe38488a102c0f474d766", "type": "github" }, "original": { @@ -68,11 +66,11 @@ "utils": "utils_3" }, "locked": { - "lastModified": 1669724862, - "narHash": "sha256-GwLonjmyhnTGQRNfKcUCgMSKYj49ZehjjJulaM/yH18=", + "lastModified": 1670059602, + "narHash": "sha256-mtgVnAjlYYjJr2wDnfz94kIefLl61Ww7cjCpLVhN/6Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "e891b060e7d11bb8f7dedb86a41d804891a6f5a9", + "rev": "6b71989c0dc1c8d386086334290c094240d51798", "type": "github" }, "original": { @@ -106,27 +104,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1669542132, - "narHash": "sha256-DRlg++NJAwPh8io3ExBJdNW7Djs3plVI5jgYQ+iXAZQ=", - "owner": "nixos", + "lastModified": 1648219316, + "narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "a115bb9bd56831941be3776c8a94005867f316a7", + "rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-unstable", + "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1669834992, - "narHash": "sha256-YnhZGHgb4C3Q7DSGisO/stc50jFb9F/MzHeKS4giotg=", + "lastModified": 1670009809, + "narHash": "sha256-yt/dQ32Vz4WenDLu4XeHbnXFxiHbTcnU0WwiLW5Ce6c=", "owner": "nixos", "repo": "nixpkgs", - "rev": "596a8e828c5dfa504f91918d0fa4152db3ab5502", + "rev": "660e7737851506374da39c0fa550c202c824a17c", "type": "github" }, "original": { @@ -136,6 +134,22 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1669791787, + "narHash": "sha256-KBfoA2fOI5+wCrm7PR+j7jHqXeTkVRPQ0m5fcKchyuU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e76c78d20685a043d23f5f9e0ccd2203997f1fb1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "locked": { "lastModified": 1669805596, @@ -157,7 +171,7 @@ "home-manager": "home-manager", "home-manager-stable": "home-manager-stable", "kmonad": "kmonad", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable", "nur": "nur" } diff --git a/flake.nix b/flake.nix index fe9211d..99c600b 100644 --- a/flake.nix +++ b/flake.nix @@ -23,10 +23,7 @@ inputs.nixpkgs.follows = "nixpkgs-stable"; }; - deploy-rs = { - url = "github:serokell/deploy-rs"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + deploy-rs.url = "github:serokell/deploy-rs"; }; outputs = inputs @ { self, nixpkgs, home-manager, nur, kmonad, nixpkgs-stable, home-manager-stable, deploy-rs, ... }: { diff --git a/hosts/servers/alexandria.nix b/hosts/servers/alexandria.nix index 21a2c13..ea53688 100644 --- a/hosts/servers/alexandria.nix +++ b/hosts/servers/alexandria.nix @@ -13,6 +13,9 @@ ../common/users.nix ../common/boot.nix ../common/nix.nix + # Server-common imports + ./common/boot.nix + ./common/nix.nix ]; users.users.user.extraGroups = [ "docker" ]; diff --git a/hosts/servers/common/nix.nix b/hosts/servers/common/nix.nix new file mode 100644 index 0000000..1c4acdd --- /dev/null +++ b/hosts/servers/common/nix.nix @@ -0,0 +1,13 @@ +{ inputs, config, pkgs, lib, ... }: + +{ + environment.etc."channels/nixpkgs".source = inputs.nixpkgs-stable.outPath; + + nix = { + registry.nixpkgs.flake = inputs.nixpkgs-stable; + nixPath = [ + "nixpkgs=/etc/channels/nixpkgs" + "/nix/var/nix/profiles/per-user/root/channels" + ]; + }; +}