110 lines
2.7 KiB
Nix
110 lines
2.7 KiB
Nix
{ inputs, self, ... }: {
|
|
flake.nixosModules.global = { pkgs, config, lib, ... }: {
|
|
imports = [ self.nixosModules.globalOptions ];
|
|
|
|
system.stateVersion = config.info.stateVersion;
|
|
|
|
nix = {
|
|
settings.experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
|
|
gc = lib.mkIf (!config.features.applications.cli.nh.enable) {
|
|
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" ];
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
fzf
|
|
jq
|
|
busybox
|
|
ethtool
|
|
hyperfine
|
|
] ++ config.features.applications.extraPackages;
|
|
|
|
programs = {
|
|
git = {
|
|
enable = true;
|
|
lfs.enable = true;
|
|
};
|
|
|
|
nano = {
|
|
enable = true;
|
|
nanorc = ''
|
|
set nowrap
|
|
set tabstospaces
|
|
set tabsize 2
|
|
'';
|
|
};
|
|
|
|
gnupg.agent = {
|
|
enable = true;
|
|
};
|
|
};
|
|
|
|
hardware.bluetooth = {
|
|
enable = true;
|
|
powerOnBoot = false;
|
|
};
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
|
|
info = {
|
|
inherit (config.info) rootPath userName hostName stateVersion;
|
|
# hostPlatform = config.nixpkgs.hostPlatform.system;
|
|
isStandalone = false;
|
|
};
|
|
};
|
|
|
|
xdg.portal = {
|
|
enable = true;
|
|
xdgOpenUsePortal = true;
|
|
config.common.default = "*";
|
|
extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-gnome ];
|
|
};
|
|
|
|
services.gnome.gnome-keyring.enable = true;
|
|
|
|
environment.pathsToLink = [ "/share/xdg-desktop-portal" "/share/applications" ]; # from description of this home-manager option: https://search.nixos.org/options?channel=26.05&query=xdg.portal.enable&source=home_manager&type=options
|
|
};
|
|
} |