2023-11-22 15:33:16 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
nixpkgs,
|
2023-12-03 04:50:17 -05:00
|
|
|
home-manager,
|
2023-11-22 15:33:16 -05:00
|
|
|
nh,
|
|
|
|
nix-melt,
|
2023-12-01 14:12:33 -05:00
|
|
|
nur,
|
2023-11-22 15:33:16 -05:00
|
|
|
nurl,
|
|
|
|
pkgs,
|
|
|
|
...
|
2023-10-18 13:50:00 -04:00
|
|
|
}: {
|
2023-10-15 14:43:23 -04:00
|
|
|
imports = [
|
2023-12-01 14:12:33 -05:00
|
|
|
./vars.nix
|
2023-10-28 18:20:09 -04:00
|
|
|
|
2023-12-01 03:07:17 -05:00
|
|
|
./modules
|
|
|
|
./overlays
|
2023-12-01 03:42:56 -05:00
|
|
|
./pkgs
|
2023-10-28 18:20:09 -04:00
|
|
|
|
2023-12-01 03:07:17 -05:00
|
|
|
nur.nixosModules.nur
|
|
|
|
nh.nixosModules.default
|
2023-12-03 04:50:17 -05:00
|
|
|
home-manager.nixosModules.home-manager
|
2023-10-15 14:43:23 -04:00
|
|
|
];
|
|
|
|
|
2023-10-15 13:30:21 -04:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
2023-12-03 02:22:38 -05:00
|
|
|
boot.tmp.cleanOnBoot = true;
|
2023-10-15 13:30:21 -04:00
|
|
|
|
|
|
|
nix = {
|
|
|
|
# Edit nix.conf
|
|
|
|
settings = {
|
2023-11-22 15:33:16 -05:00
|
|
|
experimental-features = ["nix-command" "flakes"];
|
2023-10-15 13:30:21 -04:00
|
|
|
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 = {
|
2023-10-20 12:12:37 -04:00
|
|
|
enable = true;
|
|
|
|
# weekly cleanup
|
|
|
|
clean = {
|
|
|
|
enable = true;
|
|
|
|
extraArgs = "--keep-since 30d";
|
|
|
|
};
|
2023-11-19 15:32:28 -05:00
|
|
|
};
|
2023-10-20 12:12:37 -04: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-17 17:53:10 -04:00
|
|
|
};
|
|
|
|
|
2023-12-03 04:50:17 -05:00
|
|
|
# Global hm settings
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
|
2023-10-15 14:30:30 -04:00
|
|
|
home-manager.users = let
|
|
|
|
default = {
|
|
|
|
imports = [
|
2023-12-08 12:48:48 -05:00
|
|
|
# Make the vars be the same on Nix and HM
|
|
|
|
./vars.nix
|
|
|
|
({osConfig, ...}: {vars = osConfig.vars;})
|
|
|
|
|
2023-10-15 14:43:23 -04:00
|
|
|
nur.hmModules.nur
|
2023-11-22 14:36:42 -05:00
|
|
|
|
2023-12-01 03:07:17 -05:00
|
|
|
./home
|
2023-12-01 16:53:51 -05:00
|
|
|
./pkgs
|
2023-10-15 14:30:30 -04:00
|
|
|
];
|
2023-10-15 15:31:49 -04:00
|
|
|
|
2023-11-22 15:33:16 -05:00
|
|
|
home.packages =
|
|
|
|
[
|
2023-12-02 14:33:22 -05:00
|
|
|
config.customPkgs.repl
|
2023-12-08 12:48:48 -05:00
|
|
|
nix-melt.packages.${pkgs.system}.default
|
|
|
|
nurl.packages.${pkgs.system}.default
|
2023-11-22 15:33:16 -05:00
|
|
|
]
|
|
|
|
++ (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;
|
2023-12-01 03:07:17 -05:00
|
|
|
# TODO: make user an array?
|
2023-12-01 14:12:33 -05:00
|
|
|
${config.vars.user} = default;
|
2023-10-15 14:30:30 -04:00
|
|
|
};
|
2023-10-15 14:43:23 -04:00
|
|
|
}
|