refactor: restructure project to remove profiles, users, ...

This commit is contained in:
Kat Inskip 2022-07-10 12:59:40 -07:00
parent cb3ae5f434
commit 53655a05fc
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
177 changed files with 544 additions and 2877 deletions

6
darwin/base/access.nix Normal file
View file

@ -0,0 +1,6 @@
{ meta, config, ... }: {
imports = with meta; [
home.base
];
}

17
darwin/base/home.nix Normal file
View file

@ -0,0 +1,17 @@
{ meta, config, inputs, tf, lib, ... }: with lib; {
options.home-manager.users = mkOption {
type = types.attrsOf (types.submoduleWith {
modules = singleton meta.modules.home;
specialArgs = {
inherit inputs tf meta;
nixos = config;
};
});
};
config = {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
};
};
}

5
darwin/base/homebrew.nix Normal file
View file

@ -0,0 +1,5 @@
{ config, ... }: {
homebrew = {
enable = true;
};
}

17
darwin/base/nix.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, pkgs, inputs, ... }: {
services.nix-daemon.enable = true;
nix = {
registry = {
nixpkgs.flake = inputs.nixpkgs;
nur.flake = inputs.nur;
arc.flake = inputs.arcexprs;
ci.flake = inputs.ci;
};
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
keep-derivations = true
keep-outputs = true
'';
};
}

5
darwin/base/shell.nix Normal file
View file

@ -0,0 +1,5 @@
{ config, ... }: {
programs.zsh = {
enable = true;
};
}

14
darwin/kat.nix Normal file
View file

@ -0,0 +1,14 @@
{ config, pkgs, ... }: {
users.users.kat = {
name = "kat";
home = "/Users/kat";
shell = pkgs.zsh;
uid = 501;
};
users.knownUsers = [
"kat"
];
home-manager.users.kat.programs.zsh.initExtraFirst = ''
source /etc/static/zshrc
'';
}

View file

@ -0,0 +1,27 @@
{ config, pkgs, lib, inputs, meta, ... }: {
imports = with meta; [
hardware.aarch64-darwin
darwin.base
darwin.kat
];
security.pam.enableSudoTouchIdAuth = true;
homebrew = {
brewPrefix = "/opt/homebrew/bin";
casks = [
"element"
"visual-studio-code"
"firefox"
"telegram"
"discord"
];
};
environment.systemPackages = with pkgs; [
awscli
jq
];
system.stateVersion = 4;
}