-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Still working on massive update (2) [WIP]
- Loading branch information
1 parent
5a914f4
commit c5dffca
Showing
22 changed files
with
321 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
{ inputs, cell, }@commonArgs: | ||
let | ||
inherit (inputs.home-manager.lib) homeManagerConfiguration; | ||
user = builtins.toString ./.; | ||
user = builtins.baseNameOf (builtins.toString ./.); | ||
in | ||
homeManagerConfiguration { | ||
#pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; | ||
pkgs = inputs.nixpkgs; | ||
modules = [ | ||
inputs.cells.hive.homeSuites.developer-default | ||
(inputs.self + /users/${user}) | ||
#(inputs.self + /users/${user} { inherit inputs cell user; }) | ||
cell.userProfiles.${user} | ||
#(inputs.self + /users/${user}) | ||
]; | ||
extraSpecialArgs = { inherit inputs cell user; }; | ||
extraSpecialArgs = { | ||
inherit inputs cell user; | ||
#inherit (inputs.nixpkgs) lib; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{inputs,cell}: cell.pops.userProfiles.exports.default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ inputs, cell, config, lib, pkgs, osConfig, nixosConfig, ... }: { | ||
imports = [ | ||
#cell.homeSuites.developer-default | ||
cell.homeProfiles.device-fajita | ||
cell.homeProfiles.device-nintendo-switch | ||
cell.homeProfiles.device-pinetime | ||
cell.homeProfiles.device-sawfish | ||
#../../profiles/hm | ||
|
||
cell.userProfiles.sam.gpg | ||
cell.userProfiles.sam.git | ||
#cell.userProfiles.sam.nix | ||
#./git | ||
#./gpg.nix | ||
]; | ||
|
||
home.stateVersion = "23.11"; | ||
|
||
sops.secrets.github-token = { }; | ||
|
||
#programs.gallery-dl.settings = {}; | ||
|
||
#home.file."os-config" = { | ||
# target = ".hm/os-config"; | ||
# #text = lib.generators.toPretty (lib.attrsets.filterAttrs (n: v: lib.elem n [ "meta" "_functor" "_toString" ])) osConfig; | ||
# #text = lib.generators.toPretty | ||
# text = lib.traceIf (osConfig ? users) | ||
# (lib.attrsets.removeAttrs | ||
# osConfig.users.users.${config.home.username}.openssh | ||
# [ "meta" "_functor" "_toString" "toString" "_type" "system" "home" "packages" "home-manager" ] | ||
# ) "true"; | ||
#}; | ||
#home.file."nixos-config" = { | ||
# target = ".hm/nixos-config"; | ||
# #text = lib.generators.toPretty osConfig; | ||
# text = lib.traceIf (osConfig ? users) | ||
#}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ inputs, config, lib, pkgs, ... }: { | ||
programs = { | ||
git = { | ||
includes = [ | ||
# --- Users --- | ||
# TODO: Import all users in ./users/default.nix | ||
(import ./public.nix) | ||
(import ./personal.nix) | ||
(import ./gnome.nix) | ||
(import ./gaming.nix) | ||
#(import ./work.nix) | ||
|
||
# TODO: Extra conditionals | ||
# { path = "~/path/to/config.inc"; } | ||
# { path = "~/path/to/conditional.inc"; | ||
# condition = "gitdir:~/src/dir"; | ||
# } | ||
]; | ||
#userEmail = ""; | ||
#userName = ""; | ||
}; | ||
|
||
mr.settings = { | ||
config = { | ||
checkout = "git clone [email protected]:lehmanator/nix-configs.git"; | ||
update = "git pull"; | ||
}; | ||
nixpkgs = { | ||
checkout = "git clone [email protected]:NixOS/nixpkgs.git"; | ||
update = "git pull --rebase"; | ||
}; | ||
nur = { checkout = "git clone [email protected]:lehmanator/nur-repo.git"; }; | ||
passwords = { | ||
checkout = "git clone [email protected]:lehmanator/keepass.git"; | ||
update = "git pull"; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
#path = "~/.config/git/gaming.inc"; | ||
#condition = "gitdir: ~/Code/gaming"; | ||
condition = "hasconfig:remote.*.url:https://github.com/RedstoneSSB/**"; | ||
contents = { | ||
core.sshCommand = "ssh -i ~/.ssh/id_redstone_ed25519"; | ||
user = { | ||
email = "[email protected]"; | ||
name = "Redstone"; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
#path = "~/.config/git/gnome.inc"; | ||
condition = "hasconfig:remote.*.url:https://gitlab.gnome.org/**"; | ||
contents = { | ||
user = { | ||
email = "[email protected]"; | ||
name = "Sam Lehman"; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
#path = "~/.config/git/personal.inc"; | ||
#condition = "gitdir: ~/Code/personal"; | ||
condition = "hasconfig:remote.*.url:https://github.com/Lehmanator/**"; | ||
contents = { | ||
user = { | ||
email = "[email protected]"; | ||
name = "Sam Lehman"; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
condition = "hasconfig:remote.*.url:https://github.com/publicSam/**"; | ||
#path = "~/.config/git/public.inc"; | ||
#condition = "gitdir: ~"; | ||
contents = { | ||
user = { | ||
email = "[email protected]"; | ||
name = "Sam Lehman"; | ||
#signingKey = ""; | ||
}; | ||
#commit.gpgSign = true; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ inputs, config, lib, pkgs, ... }: | ||
{ | ||
# Good overview of GPG: | ||
# - https://rgoulter.com/blog/posts/programming/2022-06-10-a-visual-explanation-of-gpg-subkeys.html | ||
programs.gpg = { | ||
settings = { | ||
default-key = "DC19 62D6 560F F66B B16F 99E0 C47C 1462 4041 0561"; | ||
}; | ||
# --- External Public Keys --- | ||
# WARN: Entries here will be added to the world-viewable Nix store | ||
#publicKeys = [ | ||
#{ | ||
# source = ./pubkeys.txt; | ||
# text = ""; # Text of OpenPGP public key | ||
# trust = "full"; # unknown | never | marginal | full | ultimate | ||
#} | ||
#]; | ||
}; | ||
|
||
# --- GnuPG Agent --- | ||
# Which GPG keys (by keygrip) to expose as SSH keys | ||
services.gpg-agent.sshKeys = [ | ||
#"" | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
# TODO: Write homeModule with options for fields that cannot be deduced using | ||
# rest of home-manager environment/options & GPG keys. | ||
# TODO: Write script to create first nixpkgs commit. | ||
# This attrset must be added to nixpkgs repo in file: nixpkgs/maintainers/maintainer-list.nix | ||
# TODO: Write lib that automatically generates this data. | ||
# TODO: Write devShell that runs the command to create your first nixpkgs commit. | ||
lehmanator = { | ||
name = "Sam Lehman"; | ||
email = "[email protected]"; | ||
matrix = "@lehmanator:tchncs.de"; | ||
github = "Lehmanator"; | ||
githubId = "lehmanator"; # TODO: Retrieve | ||
keys = [ | ||
{ | ||
# TODO: Set GPG actual key | ||
longkeyid = "rsa4096/0x0123456789ABCDEF"; | ||
fingerprint = "AAAA BBBB CCCC DDDD EEEE FFFF 0000 1111 2222 3333"; | ||
} | ||
]; | ||
}; | ||
} |
Oops, something went wrong.