Flake for my NixOS devices
1{...}: {
2 pkgs,
3 lib,
4 config,
5 ...
6}: {
7 options.cow.bean = {
8 enable = lib.mkEnableOption "Bean user presets";
9 pubkey = lib.mkOption {
10 type = lib.types.nullOr lib.types.str;
11 description = "Public key to accept for bean";
12 default = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsVzdJra+x5aEuwTjL1FBOiMh9bftvs8QwsM1xyEbdd";
13 };
14 };
15
16 config = lib.mkIf config.cow.bean.enable {
17 # My Personal config using most of my HM modules
18
19 home = {
20 file.".ssh/authorized_keys".text = lib.mkIf (config.cow.bean.pubkey != null) ''
21 ${config.cow.bean.pubkey} bean
22 '';
23 username = lib.mkDefault "bean";
24 homeDirectory = lib.mkDefault "/home/bean";
25 };
26
27 programs.git = {
28 signing = lib.mkIf (config.cow.bean.pubkey != null) {
29 format = "ssh";
30 signByDefault = true;
31 };
32 settings = {
33 user = {
34 email = "bwc9876@gmail.com";
35 name = "Ben C";
36 signingKey = lib.mkIf (config.cow.bean.pubkey != null) config.cow.bean.pubkey;
37 };
38 };
39 };
40
41 home.packages = lib.mkIf config.cow.gdi.enable (with pkgs; [
42 libreoffice-qt6
43 obs-studio
44 loupe
45 inkscape
46 lorien
47 zoom-us
48 tuxpaint
49 ]);
50
51 home.sessionVariables = {
52 "EDITOR" = "nvim";
53 };
54
55 xdg.mimeApps.defaultApplications = lib.mkIf config.cow.gdi.enable {
56 "image/svg+xml" = "org.inkscape.Inkscape.desktop";
57 "image/*" = "org.gnome.Loupe.desktop";
58 };
59
60 cow = {
61 libraries.enable = true;
62 imperm.keepLibraries = true;
63 pictures = {
64 enable = true;
65 pfp = ../res/pictures/cow.png;
66 bg = ../res/pictures/background.png;
67 };
68 nushell = {
69 enable = true;
70 commandNotFound = true;
71 };
72 neovim.enable = true;
73 htop.enable = true;
74 starship.enable = true;
75 dev.enable = true;
76 comma.enable = true;
77 cat.enable = true;
78
79 keepassxc = {
80 enable = true;
81 dbPath = lib.mkDefault "${config.xdg.userDirs.documents}/Keepass/DB/Database.kdbx";
82 };
83 };
84 };
85}