change how tree and user profiles works.

This commit is contained in:
ChaotiCryptidz 2021-12-26 13:29:24 +00:00
parent ec9057a3dc
commit a98539b9cc
7 changed files with 25 additions and 35 deletions

View file

@ -1,7 +1,7 @@
{ ... }: { { ... }: {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
oh-my-zsh = { ohMyZsh = {
enable = true; enable = true;
theme = "afowler"; theme = "afowler";
plugins = [ ]; plugins = [ ];

View file

@ -1,18 +0,0 @@
{ lib, tree, ... }: with lib; let
wrapImports = imports: mapAttrs
(_: paths: { config, ... }: {
config.home-manager.users.chaoticryptidz = {
imports = singleton paths;
};
})
imports;
dirImports = wrapImports tree.prev;
in
dirImports // {
base = {
imports = [
dirImports.base
tree.prev.nixos
];
};
}

View file

@ -5,7 +5,7 @@
enable = true; enable = true;
extensions = with pkgs; [ extensions = with pkgs; [
vscode-extensions.bbenoist.nix vscode-extensions.bbenoist.nix
vscode-extensions.b4dm4n.vscode-nixpkgs-fmt vscode-extensions.brettm12345.nixfmt-vscode
vscode-extensions.tiehuis.zig vscode-extensions.tiehuis.zig
vscode-extensions.golang.go vscode-extensions.golang.go
]; ];
@ -19,6 +19,7 @@
"markdown.preview.fontFamily" = "'Comic Code'"; "markdown.preview.fontFamily" = "'Comic Code'";
"terminal.integrated.fontFamily" = "'Comic Code'"; "terminal.integrated.fontFamily" = "'Comic Code'";
"files.autoSave" = "afterDelay"; "files.autoSave" = "afterDelay";
"[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; };
}; };
}; };
} }

View file

@ -2,6 +2,8 @@
{ {
imports = with tree; [ imports = with tree; [
users.chaoticryptidz
profiles.dev profiles.dev
profiles.gui profiles.gui
profiles.laptop profiles.laptop
@ -11,20 +13,25 @@
profiles.sway profiles.sway
profiles.dnscrypt profiles.dnscrypt
profiles.gaming profiles.gaming
home.gui
home.dev
home.dev
home.network_manager
home.sway
home.vscode
]; ];
networking.hostName = "lappy"; config.home-manager.users.chaoticryptidz = {
time.timeZone = "Europe/London"; imports = with tree; [
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; home.gui
home.dev
home.dev
home.network_manager
home.sway
home.vscode
];
};
boot = {
config.networking.hostName = "lappy";
config.time.timeZone = "Europe/London";
config.powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
config.boot = {
loader = { loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
@ -33,7 +40,7 @@
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
}; };
fileSystems = { config.fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-uuid/491ec94c-5e6a-4d23-a2a6-bcf4971a6e7b"; device = "/dev/disk/by-uuid/491ec94c-5e6a-4d23-a2a6-bcf4971a6e7b";
fsType = "ext4"; fsType = "ext4";
@ -44,6 +51,6 @@
}; };
}; };
system.stateVersion = "21.11"; config.system.stateVersion = "21.11";
} }

View file

@ -6,7 +6,7 @@ let
folder = ./.; folder = ./.;
config = { config = {
"profiles/*".functor.enable = true; "profiles/*".functor.enable = true;
"home".evaluateDefault = true; "users/*".functor.enable = true;
"home/*".functor.enable = true; "home/*".functor.enable = true;
}; };
}; };

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { { pkgs, ... }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Nix # Nix
nixpkgs-fmt nixfmt
# Go # Go
go go
gopls gopls