Skip to content

Commit

Permalink
feat(flake)!: common home-manager settings
Browse files Browse the repository at this point in the history
Automatically add the flake's overlays to `home-manager`'s `nixpkgs.overlays`
Split up `reo101-shell`
Upgdate `cheetah` to `23.05`
Some formatting
  • Loading branch information
reo101 committed Jul 26, 2023
1 parent de43011 commit 2183c6c
Show file tree
Hide file tree
Showing 10 changed files with 447 additions and 325 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Nix on Droid
nix-on-droid = {
url = "github:t184256/nix-on-droid/release-22.11";
url = "github:t184256/nix-on-droid/release-23.05";
# url = "github:t184256/nix-on-droid/master";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
Expand Down
57 changes: 13 additions & 44 deletions machines/nix-darwin/x86_64-darwin/limontozu/home/pavelatanasov.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,21 @@
stateVersion = "23.05";
};

# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Add custom overlays
nixpkgs = {
overlays = [
inputs.neovim-nightly-overlay.overlay
inputs.zig-overlay.overlays.default
];
};

# Use this flake's version of nixpkgs
# Set env vars
home.sessionVariables = {
# NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
NIX_PATH =
builtins.concatStringsSep
":"
(lib.mapAttrsToList
(name: input:
"${name}=${input.sourceInfo.outPath}")
inputs);
EDITOR = "nvim";
};

# {
# _type = "flake";
# inputs = <CODE>;
# lastModified = 1686838567;
# lastModifiedDate = "20230615141607";
# narHash = "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU=";
# nixosModules = <CODE>;
# outPath = "/nix/store/mf3nazm479fkbh9n3v7n73yrcvr8avi6-source";
# outputs = {
# nixosModules = <CODE>;
# };
# rev = "429f232fe1dc398c5afea19a51aad6931ee0fb89";
# shortRev = "429f232";
# sourceInfo = {
# lastModified = 1686838567;
# lastModifiedDate = "20230615141607";
# narHash = "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU=";
# outPath = "/nix/store/mf3nazm479fkbh9n3v7n73yrcvr8avi6-source";
# rev = "429f232fe1dc398c5afea19a51aad6931ee0fb89";
# shortRev = "429f232";
# };
# }
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;

home.packages = with pkgs; [
# WM
Expand Down Expand Up @@ -76,7 +54,7 @@
gnupg
pinentry_mac
(pass.withExtensions (extensions: with extensions; [
pass-otp
pass-otp
]))

# FMI
Expand Down Expand Up @@ -107,15 +85,6 @@
};
};

nixpkgs = {
overlays = lib.attrValues outputs.overlays ++ [
inputs.neovim-nightly-overlay.overlay
inputs.zig-overlay.overlays.default
];

config.allowUnfree = true;
};

programs.git = {
enable = true;
userName = "reo101";
Expand All @@ -139,7 +108,7 @@
};

home.file.".gnupg/sshcontrol" = {
text =''
text = ''
CFDE97EDC2FDB2FD27020A084F1E3F40221BAFE7
'';
};
Expand Down
21 changes: 10 additions & 11 deletions machines/nix-on-droid/aarch64-linux/cheetah/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@
username = "nix-on-droid";
# username = "reo101";
homeDirectory = "/data/data/com.termux.nix/files/home";
stateVersion = "22.11";
stateVersion = "23.05";
};

# Add custom overlays
nixpkgs = {
overlays = [
inputs.neovim-nightly-overlay.overlay
inputs.zig-overlay.overlays.default
# inputs.zls-overlay.???
];
};

# Let Home Manager install and manage itself.
Expand Down Expand Up @@ -65,16 +74,6 @@
j
];

nixpkgs = {
overlays = [
inputs.neovim-nightly-overlay.overlay
inputs.zig-overlay.overlays.default
# inputs.zls-overlay.???
];

config.allowUnfree = true;
};

programs.neovim = {
enable = true;
package = pkgs.neovim-nightly;
Expand Down
28 changes: 28 additions & 0 deletions modules/home-manager/nix-general/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ inputs, outputs, ... }:
{ lib, pkgs, config, ... }:

{
imports = [ ];

options = { };

config = {
# Add flake inputs to $NIX_PATH
home.sessionVariables = {
NIX_PATH =
builtins.concatStringsSep
":"
(lib.mapAttrsToList
(name: input:
"${name}=${input.sourceInfo.outPath}")
inputs);
};

# Use flake overlays by default
nixpkgs = {
overlays = lib.attrValues outputs.overlays;

config.allowUnfree = true;
};
};
}
79 changes: 79 additions & 0 deletions modules/home-manager/reo101-shell/atuin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{ keyPath, ... }:

''
## where to store your database, default is your system data directory
## mac: ~/Library/Application Support/com.elliehuxtable.atuin/history.db
## linux: ~/.local/share/atuin/history.db
# db_path = "~/.history.db"
## where to store your encryption key, default is your system data directory
key_path = "${keyPath}"
## where to store your auth session token, default is your system data directory
# session_path = "~/.key"
## date format used, either "us" or "uk"
# dialect = "us"
## enable or disable automatic sync
auto_sync = true
## enable or disable automatic update checks
update_check = false
## address of the sync server
sync_address = "https://naboo.qtrp.org/atuin"
## how often to sync history. note that this is only triggered when a command
## is ran, so sync intervals may well be longer
## set it to 0 to sync after every command
sync_frequency = "1m"
## which search mode to use
## possible values: prefix, fulltext, fuzzy, skim
# search_mode = "fuzzy"
## which filter mode to use
## possible values: global, host, session, directory
filter_mode = "global"
# ## which filter mode to use when atuin is invoked from a shell up-key binding
# ## the accepted values are identical to those of "filter_mode"
# ## leave unspecified to use same mode set in "filter_mode"
# filter_mode_shell_up_keybinding = "session"
## which style to use
## possible values: auto, full, compact
# style = "auto"
## the maximum number of lines the interface should take up
## set it to 0 to always go full screen
# inline_height = 0
## enable or disable showing a preview of the selected command
## useful when the command is longer than the terminal width and is cut off
# show_preview = false
## what to do when the escape key is pressed when searching
## possible values: return-original, return-query
# exit_mode = "return-original"
## possible values: emacs, subl
# word_jump_mode = "emacs"
## characters that count as a part of a word
# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
## number of context lines to show when scrolling by pages
# scroll_context_lines = 1
## prevent commands matching any of these regexes from being written to history.
## Note that these regular expressions are unanchored, i.e. if they don't start
## with ^ or end with $, they'll match anywhere in the command.
## For details on the supported regular expression syntax, see
## https://docs.rs/regex/latest/regex/#syntax
# history_filter = [
# "^secret-cmd",
# "^innocuous-cmd .*--secret=.+"
# ]
''
Loading

0 comments on commit 2183c6c

Please sign in to comment.