add new external flake to provide helper functions

This commit is contained in:
greyweather committed 2026-08-29 19:07:48 +01:00
1 parent 50bb736c51
commit 49985ce9a3
18 files changed
+73 -163

No files matched your search

+94
View File
@@ -0,0 +1,94 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
system.stateVersion = config.info.stateVersion;
nix = {
settings.experimental-features = [
"nix-command"
"flakes"
];
gc = {
automatic = true;
persistent = true;
dates = "Sun 05:00";
};
};
boot.loader.efi.canTouchEfiVariables = true;
networking = {
networkmanager.enable = true;
hostName = config.info.hostName;
};
time.timeZone = "Europe/London";
i18n = {
defaultLocale = "en_GB.UTF-8";
extraLocaleSettings = with config.i18n; {
LC_ADDRESS = defaultLocale;
LC_IDENTIFICATION = defaultLocale;
LC_MEASUREMENT = defaultLocale;
LC_MONETARY = defaultLocale;
LC_NAME = defaultLocale;
LC_NUMERIC = defaultLocale;
LC_PAPER = defaultLocale;
LC_TELEPHONE = defaultLocale;
LC_TIME = defaultLocale;
};
};
services.xserver.xkb = {
layout = "gb";
variant = "";
};
console.keyMap = "uk";
users.users."grey" = {
isNormalUser = true;
description = "grey";
extraGroups = [ "networkmanager" "wheel" ];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
git
fzf
jq
busybox
ethtool
hyperfine
] ++ config.features.applications.extraPackages;
programs = {
nano = {
enable = true;
nanorc = ''
set nowrap
set tabstospaces
set tabsize 2
'';
};
gnupg.agent = {
enable = true;
};
};
hardware.bluetooth = {
enable = true;
powerOnBoot = false;
};
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
info = {
rootPath = lib.mkDefault config.info.rootPath;
hostName = lib.mkDefault config.info.hostName;
stateVersion = lib.mkDefault config.info.stateVersion;
isStandalone = lib.mkDefault false;
};
};
};
}