nixos-configs/common/default.nix

104 lines
1.8 KiB
Nix
Raw Normal View History

2023-11-22 15:33:16 -05:00
{
config,
lib,
nixpkgs,
nh,
nix-melt,
nur,
2023-11-22 15:33:16 -05:00
nurl,
pkgs,
...
}: {
2023-10-15 14:43:23 -04:00
imports = [
./vars.nix
./modules
./overlays
./pkgs
nur.nixosModules.nur
nh.nixosModules.default
2023-10-15 14:43:23 -04:00
];
nixpkgs.config.allowUnfree = true;
nix = {
# Edit nix.conf
settings = {
2023-11-22 15:33:16 -05:00
experimental-features = ["nix-command" "flakes"];
keep-outputs = true;
keep-derivations = true;
auto-optimise-store = true;
warn-dirty = false;
};
# Minimize dowloads of indirect nixpkgs flakes
registry.nixpkgs = {
flake = nixpkgs;
exact = false;
};
};
2023-11-19 15:32:28 -05:00
nh = {
enable = true;
# weekly cleanup
clean = {
enable = true;
extraArgs = "--keep-since 30d";
};
2023-11-19 15:32:28 -05:00
};
environment.variables.FLAKE = "/home/matt/.nix";
2023-11-30 17:01:46 -05:00
services = {
fwupd.enable = true;
xserver = {
layout = "ca";
xkbVariant = "multix";
};
};
2023-10-15 14:30:30 -04:00
home-manager.users = let
default = {
imports = [
2023-10-15 14:43:23 -04:00
nur.hmModules.nur
2023-11-22 14:36:42 -05:00
./home
# Make the vars be the same on Nix and HM
./vars.nix
({osConfig, ...}: {vars = osConfig.vars;})
2023-10-15 14:30:30 -04:00
];
2023-11-22 15:33:16 -05:00
home.packages =
[
nix-melt.packages.x86_64-linux.default
nurl.packages.x86_64-linux.default
]
++ (with config.nur.repos.rycee; [
mozilla-addons-to-nix
])
++ (with pkgs.nodePackages; [
undollar
])
++ (with pkgs; [
dracula-theme
neofetch
progress
wget
tree
mosh
rsync
killall
imagemagick
usbutils
]);
2023-10-15 14:30:30 -04:00
home.stateVersion = lib.mkDefault "23.05";
};
in {
root = default;
# TODO: make user an array?
${config.vars.user} = default;
2023-10-15 14:30:30 -04:00
};
2023-10-15 14:43:23 -04:00
}