unified all nixos configurations

This commit is contained in:
Fabian Montero 2024-11-20 17:52:37 -06:00
parent 001642dc94
commit 42530f5cfc
Signed by untrusted user: fabian
GPG key ID: 1FFAC35E1798174F
32 changed files with 1054 additions and 56 deletions

View file

@ -1,4 +1,3 @@
#TODO: keys will not be shared in all platforms
{
flakes,
config,
@ -7,56 +6,7 @@
...
}:
with lib; {
imports = [
./modules
];
xdg.enable = true;
programs = {
zsh = {
enable = true;
syntaxHighlighting.enable = true;
initExtra = import ./zshrc.nix pkgs;
};
git = {
enable = true;
userEmail = "fabian@posixlycorrect.com";
userName = "Fabian Montero";
signing = {
key = "7AA277E604A4173916BBB4E91FFAC35E1798174F";
signByDefault = true;
};
};
gpg = {
enable = true;
settings = {
default-key = "7AA277E604A4173916BBB4E91FFAC35E1798174F";
};
};
};
services.gpg-agent = {
enable = true;
enableZshIntegration = true;
pinentryPackage = pkgs.pinentry-emacs;
};
accounts.email.accounts = {
"fabian@posixlycorrect.com" = {
address = "fabian@posixlycorrect.com";
userName = "fabianmontero@fastmail.com";
realName = "fabian";
primary = true;
flavor = "fastmail.com";
gpg = {
encryptByDefault = true;
signByDefault = true;
key = "7AA277E604A4173916BBB4E91FFAC35E1798174F";
};
};
};
}

16
home/modules/baseline.nix Normal file
View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.baseline;
in {
options.local.baseline = {
enable = mkEnableOption "Basic settings";
};
config = mkIf cfg.enable {
xdg.enable = true;
};
}

View file

@ -7,5 +7,6 @@
imports = [
./terminal
./neovim.nix
./baseline.nix
];
}

View file

@ -3,7 +3,7 @@
lib,
pkgs,
...
}:
}:
with lib; let
cfg = config.local.apps.neovim;
in {
@ -19,10 +19,10 @@ in {
extraConfig = ''
set nobackup
set showmatch " show matching
set hlsearch " highlight search
set showmatch " show matching
set hlsearch " highlight search
set incsearch " incremental search
set tabstop=4 " number of columns occupied by a tab
set tabstop=4 " number of columns occupied by a tab
set softtabstop=4 " see multiple spaces as tabstops so <BS> does the right thing
set shiftwidth=4 " width for autoindents
set autoindent " indent a new line the same amount as the line just typed

View file

@ -33,5 +33,50 @@ in {
'';
};
};
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
initExtra = import ./zshrc.nix pkgs;
};
programs.git = {
enable = true;
userEmail = "fabian@posixlycorrect.com";
userName = "Fabian Montero";
#signing = {
# key = "7AA277E604A4173916BBB4E91FFAC35E1798174F";
# signByDefault = true;
#};
};
programs.gpg = {
enable = true;
#settings = {
# default-key = "7AA277E604A4173916BBB4E91FFAC35E1798174F";
#};
};
services.gpg-agent = {
enable = true;
enableZshIntegration = true;
pinentryPackage = pkgs.pinentry-emacs;
};
accounts.email.accounts = {
"fabian@posixlycorrect.com" = {
address = "fabian@posixlycorrect.com";
userName = "fabianmontero@fastmail.com";
realName = "fabian";
primary = true;
flavor = "fastmail.com";
gpg = {
encryptByDefault = true;
signByDefault = true;
key = "7AA277E604A4173916BBB4E91FFAC35E1798174F";
};
};
};
};
}

View file

@ -12,6 +12,7 @@
./isolation.nix
];
local.baseline = true;
local.apps.terminal.enable = true;
local.apps.neovim.enable = true;

View file

@ -0,0 +1,29 @@
{
lib,
pkgs,
...
}:
with lib; {
programs = {
zsh = {
enable = true;
syntaxHighlighting.enable = true;
};
git = {
enable = true;
userEmail = "fabian@posixlycorrect.com";
userName = "fabian";
};
neovim.enable = true;
};
home.packages = with pkgs; [
file
htop
killall
man-pages
man-pages-posix
tree
zip
unzip
];
}

View file

@ -0,0 +1,33 @@
{
config,
pkgs,
lib,
flakes,
...
}:
with lib; {
imports = [
./cli.nix
];
home = {
stateVersion = "24.05"; # No tocar esto
username = "fabian";
homeDirectory = "/home/fabian";
sessionVariables = {
"EDITOR" = "nvim";
};
};
xdg.enable = true;
nix.registry = {
"system".to = {
type = "path";
path = "/home/fabian/nix";
};
"nixpkgs".flake = flakes.nixpkgs;
"unstable".flake = flakes.unstable;
};
}