more darwin cleanup

This commit is contained in:
Noah Masur
2022-06-19 23:44:29 -04:00
parent a8f497e226
commit e22a4f3df2
18 changed files with 116 additions and 103 deletions

View File

@ -3,10 +3,33 @@
imports = [ ../modules/shell ../modules/editor ../modules/mail/himalaya.nix ];
options = with lib; {
user = mkOption {
type = types.str;
description = "Primary user of the system";
};
userDirs = {
# Required to prevent infinite recursion when referenced by himalaya
download = lib.mkOption {
type = lib.types.str;
description = "XDG directory for downloads";
default =
if pkgs.stdenv.isDarwin then "$HOME/Downloads" else "$HOME/downloads";
};
};
gui = {
enable = mkEnableOption {
description = "Enable graphics";
default = false;
};
colorscheme = mkOption {
type = types.attrs;
description = "Base16 color scheme";
};
};
dotfilesPath = mkOption {
type = types.path;
description = "Path of dotfiles repository.";
default = builtins.toPath "/home/${config.user}/dev/personal/dotfiles";
default = builtins.toPath "$HOME/dev/personal/dotfiles";
};
dotfilesRepo = mkOption {
type = types.str;
@ -24,9 +47,6 @@
# Enable features in Nix commands
nix.extraOptions = "experimental-features = nix-command flakes";
# Pin a state version to prevent warnings
# system.stateVersion = "22.11";
# Basic common system packages for all devices
environment.systemPackages = with pkgs; [ git vim wget curl ];

View File

@ -1,4 +1,4 @@
{ nixpkgs, home-manager, nur, globals, ... }:
{ nixpkgs, home-manager, nur, globals, wallpapers, ... }:
# System configuration for my desktop
nixpkgs.lib.nixosSystem {
@ -9,13 +9,21 @@ nixpkgs.lib.nixosSystem {
home-manager.nixosModules.home-manager
{
networking.hostName = "desktop";
gui.enable = true;
gui.compositor.enable = true;
nixpkgs.overlays = [ nur.overlay ];
gaming.steam = true;
gaming.leagueoflegends = true;
gaming.legendary = true;
gui = {
enable = true;
compositor.enable = true;
colorscheme = (import ../modules/colorscheme/gruvbox);
wallpaper = "${wallpapers}/gruvbox/road.jpg";
gtk.theme = { name = "Adwaita-dark"; };
};
passwordHash =
"$6$PZYiMGmJIIHAepTM$Wx5EqTQ5GApzXx58nvi8azh16pdxrN6Qrv1wunDlzveOgawitWzcIxuj76X9V868fsPi/NOIEO8yVXqwzS9UF.";
}
./hardware-configuration.nix
../common.nix
../../modules/hardware

View File

@ -5,24 +5,17 @@ darwin.lib.darwinSystem {
system = "x86_64-darwin";
specialArgs = { };
modules = [
globals
home-manager.darwinModules.home-manager
{
user = "Noah.Masur";
fullName = globals.fullName;
gitEmail = globals.gitEmail;
mailServer = globals.mailServer;
dotfilesRepo = globals.dotfilesRepo;
dotfilesPath = "/Users/Noah.Masur/dev/dotfiles";
gui = {
enable = true;
colorscheme = globals.gui.colorscheme;
};
gui.enable = true;
gui.colorscheme = (import ../modules/colorscheme/gruvbox);
nixpkgs.overlays = [ nur.overlay ];
}
../common.nix
../../modules/darwin
../../modules/applications/alacritty.nix
../../modules/applications/discord.nix
../../modules/applications/obsidian.nix
];
}