init
This commit is contained in:
commit
132a109da8
15 changed files with 436 additions and 0 deletions
59
default.nix
Executable file
59
default.nix
Executable file
|
@ -0,0 +1,59 @@
|
|||
{ config, inputs, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (builtins) toString;
|
||||
inherit (lib.modules) mkDefault mkIf;
|
||||
inherit (lib.my) mapModulesRec';
|
||||
in {
|
||||
imports =
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
(mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name])
|
||||
]
|
||||
++ (mapModulesRec' (toString ./modules) import);
|
||||
|
||||
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"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# set our git revision inside `nixos-version`
|
||||
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
|
||||
|
||||
# set home stateversion to system stateversion. Just Makes Sense
|
||||
hm.home.stateVersion = config.system.stateVersion;
|
||||
|
||||
time.timeZone = mkDefault "America/Los_Angeles";
|
||||
|
||||
i18n.defaultLocale = mkDefault "en_US.UTF-8";
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
unrar unzip
|
||||
micro
|
||||
curl wget
|
||||
# im pretty sure removing this breaks nixos-rebuild
|
||||
# have fun
|
||||
git
|
||||
];
|
||||
|
||||
system.stateVersion = mkDefault "23.11";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue