104 lines
2.8 KiB
Nix
Executable file
104 lines
2.8 KiB
Nix
Executable file
{ config, inputs, lib, pkgs, ... }:
|
|
|
|
let
|
|
inherit (builtins) toString;
|
|
inherit (lib.modules) mkDefault mkIf mkAliasOptionModule;
|
|
inherit (lib.my) mapModulesRec';
|
|
in {
|
|
imports =
|
|
[
|
|
inputs.home-manager.nixosModules.home-manager
|
|
(mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name])
|
|
inputs.nix-colors.homeManagerModules.default
|
|
inputs.hyprland.nixosModules.default
|
|
]
|
|
++ (mapModulesRec' (toString ./modules) import);
|
|
|
|
hm.imports = [
|
|
inputs.hyprland.homeManagerModules.default
|
|
];
|
|
|
|
environment.variables = {
|
|
NIXPKGS_ALLOW_UNFREE = "1";
|
|
};
|
|
|
|
nix = {
|
|
package = pkgs.nix;
|
|
|
|
# flake registry and nix path pinning
|
|
# might not be needed? see: https://github.com/NixOS/nixpkgs/commit/e456032addae76701eb17e6c03fc515fd78ad74f
|
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
registry.nixpkgs.flake = inputs.nixpkgs;
|
|
|
|
settings = {
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
auto-optimise-store = true;
|
|
keep-outputs = true;
|
|
keep-derivations = true;
|
|
substituters = [
|
|
"https://nix-community.cachix.org"
|
|
"https://nixpkgs-wayland.cachix.org"
|
|
"https://hyprland.cachix.org"
|
|
"https://cache.soopy.moe"
|
|
];
|
|
trusted-public-keys = [
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
"cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo="
|
|
];
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "23.11";
|
|
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
|
|
hm.home.stateVersion = config.system.stateVersion;
|
|
|
|
boot = {
|
|
kernelPackages = mkDefault pkgs.linuxPackages_latest;
|
|
kernelParams = [ "pci_aspm.policy=performance" ];
|
|
};
|
|
|
|
# configure keymap in x11
|
|
services.xserver.xkb = {
|
|
layout = "us";
|
|
variant = "qwerty";
|
|
};
|
|
console = {
|
|
useXkbConfig = mkDefault true;
|
|
};
|
|
|
|
# set the time zone
|
|
services.automatic-timezoned.enable = mkDefault true;
|
|
time.timeZone = mkDefault null; # handled by automatic-timezoned
|
|
|
|
i18n = mkDefault {
|
|
defaultLocale = "en_US.UTF-8";
|
|
supportedLocales = [ "en_US.UTF-8/UTF-8" ];
|
|
};
|
|
|
|
# set the location
|
|
location.provider = mkDefault "geoclue2";
|
|
services.geoclue2 = {
|
|
enable = mkDefault true;
|
|
|
|
# the default provider is Geeked
|
|
geoProviderUrl = "https://beacondb.net/v1/geolocate";
|
|
submissionUrl = "https://beacondb.net/v2/geosubmit";
|
|
submissionNick = "geoclue";
|
|
};
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
openssh mosh
|
|
unrar unzip
|
|
micro
|
|
curl wget
|
|
desktop-file-utils
|
|
shared-mime-info
|
|
xdg-user-dirs
|
|
xdg-utils
|
|
git
|
|
];
|
|
}
|