nixos

NixOS server files. Mirror from https://git.nordgedanken.dev/kubernetes/nixos
git clone git://archive.git.mtrnord.blog/MTRNord/nixos.git
Log | Files | Refs | README

commit 03a9688d22b0f3390c7d56daa0faf41f1d2ac46d
parent 692e25676a787fcd61ab151aa84acfd4c22928a8
Author: MTRNord <mtrnord1@gmail.com>
Date:   Tue,  8 Aug 2023 18:36:13 +0200

Add nix-fmt and sops-nix

Diffstat:
Mflake.lock | 70+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mflake.nix | 11++++++++---
2 files changed, 77 insertions(+), 4 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -1,5 +1,20 @@ { "nodes": { + "hardware": { + "locked": { + "lastModified": 1691305349, + "narHash": "sha256-0Pig7jnmuRH3c5dOTVTOvTLwo2CRzYTyvJRQ82HWRSo=", + "owner": "nixos", + "repo": "nixos-hardware", + "rev": "5426a95071d0b9782b3209b3995cde1f5689616e", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixos-hardware", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -37,6 +52,22 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1690066826, + "narHash": "sha256-6L2qb+Zc0BFkh72OS9uuX637gniOjzU6qCDBpjB2LGY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ce45b591975d070044ca24e3003c830d26fea1c8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { "lastModified": 1686501370, @@ -53,11 +84,48 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1690026219, + "narHash": "sha256-oOduRk/kzQxOBknZXTLSEYd7tk+GoKvr8wV6Ab+t4AU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f465da166263bc0d4b39dfd4ca28b777c92d4b73", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { + "hardware": "hardware", "home-manager": "home-manager", "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs-unstable": "nixpkgs-unstable", + "sops-nix": "sops-nix" + } + }, + "sops-nix": { + "inputs": { + "nixpkgs": "nixpkgs_2", + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1690199016, + "narHash": "sha256-yTLL72q6aqGmzHq+C3rDp3rIjno7EJZkFLof6Ika7cE=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "c36df4fe4bf4bb87759b1891cab21e7a05219500", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "sops-nix", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix @@ -14,14 +14,14 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; # TODO: Add any other flake you might need - # hardware.url = "github:nixos/nixos-hardware"; - + hardware.url = "github:nixos/nixos-hardware"; + sops-nix.url = "github:Mic92/sops-nix"; # Shameless plug: looking for a way to nixify your themes and make # everything match nicely? Try nix-colors! # nix-colors.url = "github:misterio77/nix-colors"; }; - outputs = { self, nixpkgs, home-manager, ... }@inputs: + outputs = { self, nixpkgs, home-manager, sops-nix, ... }@inputs: let inherit (self) outputs; forAllSystems = nixpkgs.lib.genAttrs [ @@ -46,6 +46,10 @@ in import ./shell.nix { inherit pkgs; } ); + formatter = forAllSystems (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in pkgs.nixpkgs-fmt); + # Your custom packages and modifications, exported as overlays overlays = import ./overlays { inherit inputs; }; # Reusable nixos modules you might want to export @@ -64,6 +68,7 @@ modules = [ # > Our main nixos configuration file < ./nixos/worker-1/configuration.nix + sops-nix.nixosModules.sops ]; }; };