From dd9c9846655068e0dc7f2c9865972101ddd95c55 Mon Sep 17 00:00:00 2001
From: Mikael Voss <mvs@nyantec.com>
Date: Wed, 24 Jul 2024 10:24:37 +0200
Subject: Add rudimentary Nix flake

---
 flake.nix | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 flake.nix

diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..a712b3e
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,18 @@
+{
+  description = "Custom locale";
+  outputs = { self, ... }: {
+    overlays.default = final: prev: {
+      glibcLocales = prev.glibcLocales.overrideAttrs (base: {
+        postPatch = base.postPatch + ''
+          cp ${prev.lib.escapeShellArg ./en_EU} localedata/locales/en_EU
+          echo 'en_EU.UTF-8/UTF-8 \' >>localedata/SUPPORTED
+        '';
+      });
+    };
+
+    nixosModules.default = { lib, ... }: {
+      nixpkgs.overlays = [ self.overlays.default ];
+      i18n.defaultLocale = lib.mkDefault "en_EU.UTF-8";
+    };
+  };
+}
-- 
cgit 1.4.1