summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-12-03 21:19:39 -0600
committerAlejandro Soto <alejandro@34project.org>2024-12-03 21:49:54 -0600
commit61f3db56410f41d5249c88e44db60d9713dae26d (patch)
tree49c2d5d5e4da331d139cfdc6034c0dba5980271b
parent854f5ee287eb66db5a0713e2f4fac56794e3d735 (diff)
home: big refactor
-rw-r--r--flake.nix22
-rw-r--r--home/baseline/default.nix63
-rw-r--r--home/baseline/git.nix13
-rw-r--r--home/baseline/graphics.nix52
-rw-r--r--home/baseline/nvim.nix26
-rw-r--r--home/baseline/zsh.nix14
-rw-r--r--home/baseline/zshrc.nix (renamed from home/zshrc.nix)0
-rw-r--r--home/default.nix67
-rw-r--r--home/desktop/default.nix14
-rw-r--r--home/desktop/firefox.nix30
-rw-r--r--home/desktop/sway.nix (renamed from home/desktop.nix)70
-rw-r--r--home/environ.nix73
-rw-r--r--home/environ/default.nix17
-rw-r--r--home/environ/gpg.nix (renamed from home/gpg.nix)7
-rw-r--r--home/environ/pass.nix26
-rw-r--r--home/environ/path.nix (renamed from home/path.nix)24
-rw-r--r--home/environ/source.nix23
-rw-r--r--home/environ/ssh-match.nix1
-rw-r--r--home/environ/ssh.nix (renamed from home/ssh/default.nix)11
-rw-r--r--home/environ/tmux.nix41
-rw-r--r--home/environ/units.nix33
-rw-r--r--home/environ/vtmp.nix20
-rw-r--r--home/git.nix14
-rw-r--r--home/graphics.nix30
-rw-r--r--home/isolation.nix19
-rw-r--r--home/isolation/default.nix34
-rw-r--r--home/mail/default.nix9
-rw-r--r--home/pass.nix21
-rw-r--r--home/ssh/match.nix82
29 files changed, 453 insertions, 403 deletions
diff --git a/flake.nix b/flake.nix
index 258901f..ed8ea1f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -104,32 +104,24 @@
let
registry = { ... }: {
config.nix.registry = mapAttrs
- (_: value: {
- flake = value;
- })
+ (_: value: { flake = value; })
flakes;
};
- home = platform: home-manager.lib.homeManagerConfiguration {
+ home = name: platform: home-manager.lib.homeManagerConfiguration {
inherit pkgs;
+ extraSpecialArgs = {
+ inherit flakes;
+ };
+
modules = [
./home
platform
registry
- hm-isolation.homeManagerModule
];
};
-
- platformHome = platform:
- let
- value = home platform;
- in
- {
- inherit value;
- name = "${value.config.home.username}@${value.config.local.hostname}";
- };
in
- mapAttrs' (_: platformHome) (importAll { root = ./home/platform; });
+ mapAttrs home (importAll { root = ./home/platform; });
};
}
diff --git a/home/baseline/default.nix b/home/baseline/default.nix
new file mode 100644
index 0000000..a859fb7
--- /dev/null
+++ b/home/baseline/default.nix
@@ -0,0 +1,63 @@
+{ config, lib, pkgs, ... }:
+with lib; let
+ cfg = config.local.baseline;
+in
+{
+ imports = [
+ ./git.nix
+ ./graphics.nix
+ ./nvim.nix
+ ./zsh.nix
+ ];
+
+ options.local = {
+ hostname = mkOption {
+ type = types.str;
+ };
+
+ uid = mkOption {
+ type = types.int;
+ };
+
+ gecos = mkOption {
+ type = types.str;
+ };
+
+ email = mkOption {
+ type = types.str;
+ };
+ };
+
+ config = {
+ home = {
+ # This value determines the Home Manager release that your
+ # configuration is compatible with. This helps avoid breakage
+ # when a new Home Manager release introduces backwards
+ # incompatible changes.
+ #
+ # You can update Home Manager without changing this value. See
+ # the Home Manager release notes for a list of state version
+ # changes in each release.
+ stateVersion = "21.11";
+
+ homeDirectory = "/home/${config.home.username}";
+
+ packages = [
+ pkgs.file
+ pkgs.killall
+ pkgs.man-pages
+ pkgs.man-pages-posix
+ pkgs.tree
+ pkgs.unzip
+ pkgs.wget
+ pkgs.zip
+ ];
+
+ sessionVariables = {
+ LESSHISTFILE = "/dev/null";
+ };
+ };
+
+ xdg.enable = true;
+ };
+}
diff --git a/home/baseline/git.nix b/home/baseline/git.nix
new file mode 100644
index 0000000..faad082
--- /dev/null
+++ b/home/baseline/git.nix
@@ -0,0 +1,13 @@
+{ config, lib, ... }:
+with lib; let
+ cfg = config.local;
+in
+{
+ config = {
+ programs.git = {
+ enable = true;
+ userName = cfg.gecos;
+ userEmail = cfg.email;
+ };
+ };
+}
diff --git a/home/baseline/graphics.nix b/home/baseline/graphics.nix
new file mode 100644
index 0000000..072acb7
--- /dev/null
+++ b/home/baseline/graphics.nix
@@ -0,0 +1,52 @@
+{ config, lib, pkgs, ... }:
+with lib; {
+ config = {
+ fonts.fontconfig.enable = true;
+
+ gtk = {
+ enable = true;
+
+ gtk2.extraConfig = ''
+ gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
+ gtk-menu-images=1
+ gtk-button-images=1
+ '';
+
+ font = {
+ package = pkgs.noto-fonts;
+ name = "Noto Sans Regular";
+ #size = 14; <- caga layout de páginas
+ };
+
+ theme = {
+ package = pkgs.materia-theme;
+ name = "Materia-dark";
+ };
+ };
+
+ home = {
+ pointerCursor = {
+ name = "Adwaita";
+ package = pkgs.adwaita-icon-theme;
+
+ gtk.enable = true;
+ x11.enable = true;
+ };
+
+ sessionVariables = {
+ # Usar gtk en aplicaciones de jvm
+ _JAVA_OPTIONS = concatStringsSep " " [
+ "-Dawt.useSystemAAFontSettings=on"
+ "-Dswing.aatext=true"
+ "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
+ "-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
+ ];
+ };
+ };
+
+ qt = {
+ enable = true;
+ platformTheme.name = "gtk";
+ };
+ };
+}
diff --git a/home/baseline/nvim.nix b/home/baseline/nvim.nix
new file mode 100644
index 0000000..882788d
--- /dev/null
+++ b/home/baseline/nvim.nix
@@ -0,0 +1,26 @@
+{ config, lib, ... }:
+with lib; let
+ cfg = config.local.baseline;
+in
+{
+ config = {
+ home.sessionVariables.EDITOR = "nvim";
+
+ programs.neovim = {
+ enable = true;
+
+ viAlias = true;
+ vimAlias = true;
+ withRuby = false;
+ withPython3 = false;
+
+ extraConfig = ''
+ set number " Enable line numbering
+ set relativenumber " Enable relative line numbering
+ set tabstop=4 " Set tap stop to 4
+ set shiftwidth=4 " Set shift width to 4 (same as tabstop)
+ set viminfo= " No tracking
+ '';
+ };
+ };
+}
diff --git a/home/baseline/zsh.nix b/home/baseline/zsh.nix
new file mode 100644
index 0000000..8dd169c
--- /dev/null
+++ b/home/baseline/zsh.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, ... }:
+with lib; let
+ cfg = config.local.baseline;
+in
+{
+ config = {
+ programs.zsh = {
+ enable = true;
+ autosuggestion.enable = true;
+ syntaxHighlighting.enable = true;
+ initExtra = import ./zshrc.nix pkgs;
+ };
+ };
+}
diff --git a/home/zshrc.nix b/home/baseline/zshrc.nix
index a82ab7a..a82ab7a 100644
--- a/home/zshrc.nix
+++ b/home/baseline/zshrc.nix
diff --git a/home/default.nix b/home/default.nix
index 96d6b3f..254cde2 100644
--- a/home/default.nix
+++ b/home/default.nix
@@ -1,66 +1,11 @@
-{ lib, config, pkgs, ... }:
-with lib; {
+{ flakes, ... }: {
imports = [
+ flakes.hm-isolation.homeManagerModule
../pki
- ./desktop.nix
- ./environ.nix
- ./git.nix
- ./gpg.nix
- ./graphics.nix
- ./isolation.nix
+ ./baseline
+ ./desktop
+ ./environ
+ ./isolation
./mail
- ./path.nix
- ./pass.nix
- ./ssh
];
-
- options.local = with lib.types; {
- hostname = mkOption {
- type = str;
- };
-
- uid = mkOption {
- type = int;
- };
-
- workstation = mkOption {
- type = bool;
- };
- };
-
- config = {
- nix.registry."system".to = {
- type = "path";
- path = "${config.home.homeDirectory}/nix";
- };
-
- home = {
- # This value determines the Home Manager release that your
- # configuration is compatible with. This helps avoid breakage
- # when a new Home Manager release introduces backwards
- # incompatible changes.
- #
- # You can update Home Manager without changing this value. See
- # the Home Manager release notes for a list of state version
- # changes in each release.
- stateVersion = "21.11";
-
- homeDirectory = "/home/${config.home.username}";
-
- sessionVariables = {
- EDITOR = "nvim";
- LESSHISTFILE = "/dev/null";
-
- # Usar gtk en aplicaciones de jvm
- _JAVA_OPTIONS = concatStringsSep " " [
- "-Dawt.useSystemAAFontSettings=on"
- "-Dswing.aatext=true"
- "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
- "-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
- ];
- };
- };
-
- programs.home-manager.enable = true;
- };
}
diff --git a/home/desktop/default.nix b/home/desktop/default.nix
new file mode 100644
index 0000000..1608693
--- /dev/null
+++ b/home/desktop/default.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, ... }:
+with lib; let
+ cfg = config.local.desktop;
+in
+{
+ imports = [
+ ./firefox.nix
+ ./sway.nix
+ ];
+
+ options.local.desktop = {
+ enable = mkEnableOption "desktop";
+ };
+}
diff --git a/home/desktop/firefox.nix b/home/desktop/firefox.nix
new file mode 100644
index 0000000..4a7bbac
--- /dev/null
+++ b/home/desktop/firefox.nix
@@ -0,0 +1,30 @@
+{ config, lib, pkgs, ... }:
+with lib; let
+ cfg = config.local.desktop;
+in
+{
+ config = mkIf cfg.enable {
+ programs.firefox = {
+ enable = true;
+
+ package = pkgs.firefox.override {
+ nativeMessagingHosts = [ pkgs.passff-host ];
+ };
+
+ profiles."main.profile" = {
+ id = 0;
+ name = "default";
+
+ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
+ decentraleyes
+ darkreader
+ old-reddit-redirect
+ passff
+ privacy-badger
+ ublock-origin
+ umatrix
+ ];
+ };
+ };
+ };
+}
diff --git a/home/desktop.nix b/home/desktop/sway.nix
index fea1f35..1162e87 100644
--- a/home/desktop.nix
+++ b/home/desktop/sway.nix
@@ -1,38 +1,10 @@
{ config, lib, pkgs, ... }:
-with lib; {
- config = mkIf (!config.home.isolation.active) {
- home.pointerCursor = {
- package = pkgs.adwaita-icon-theme;
-
- gtk.enable = true;
- name = "Adwaita";
- x11.enable = true;
- };
-
+with lib; let
+ cfg = config.local.desktop;
+in
+{
+ config = mkIf cfg.enable {
programs = {
- firefox = {
- enable = true;
-
- package = pkgs.firefox.override {
- nativeMessagingHosts = [ pkgs.passff-host ];
- };
-
- profiles."main.profile" = {
- id = 0;
- name = "default";
-
- extensions = with pkgs.nur.repos.rycee.firefox-addons; [
- decentraleyes
- darkreader
- old-reddit-redirect
- passff
- privacy-badger
- ublock-origin
- umatrix
- ];
- };
- };
-
swaylock = {
enable = true;
@@ -43,38 +15,6 @@ with lib; {
};
};
- tmux = {
- enable = true;
- aggressiveResize = true;
- clock24 = true;
- escapeTime = 10;
- terminal = "xterm-256color";
- keyMode = "vi";
-
- plugins = [
- {
- plugin = pkgs.local.tmux-pass;
- extraConfig = ''
- set -g @pass-key BSpace
- set -g @pass-copy-to-clipboard on
- set -g @pass-window-size 15
- set -g @pass-hide-pw-from-preview 'on'
- set -g @pass-hide-preview on
- '';
- }
- ];
-
- extraConfig = ''
- set -g mouse on
- set -ga update-environment " LIFT_PID"
- set -g set-titles on
- set -g renumber-windows on
- set -sa terminal-overrides ',xterm-termite:RGB'
- set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,} %H:%M %d-%b-%y"
- bind-key X set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
- '';
- };
-
waybar.enable = true;
wofi.enable = true;
diff --git a/home/environ.nix b/home/environ.nix
deleted file mode 100644
index 60d618a..0000000
--- a/home/environ.nix
+++ /dev/null
@@ -1,73 +0,0 @@
-{ config, lib, pkgs, ... }:
-with lib; let
- symlink = config.lib.file.mkOutOfStoreSymlink;
-
- #TODO: No sirve, creo que por readline
- devNull = symlink "/dev/null";
-in
-{
- config = {
- xdg.enable = true;
-
- systemd.user = {
- tmpfiles.rules = [
- "d %t/vtmp 0700"
- ];
-
- timers = {
- units-cur = {
- Install.WantedBy = [ "timers.target" ];
- Timer.OnCalendar = "daily";
- Unit.Description = "Update currency information for 'units'";
- };
- };
-
- services = {
- units-cur = {
- Unit.Description = "Update currency information for 'units'";
-
- Service = {
- Type = "exec";
- ExecStart = "${pkgs.units}/bin/units_cur .units";
- };
- };
- };
- };
-
- home.file = {
- #TODO: .calc_history
- "vtmp".source = symlink "/run/user/${toString config.local.uid}/vtmp";
- ".units_history".source = devNull;
- };
-
- programs = {
- zsh = {
- enable = true;
- autosuggestion.enable = true;
- syntaxHighlighting.enable = true;
- initExtra = import ./zshrc.nix pkgs;
- };
-
- neovim = {
- enable = true;
-
- viAlias = true;
- vimAlias = true;
- withRuby = false;
- withPython3 = false;
-
- extraConfig = ''
- set number " Enable line numbering
- set relativenumber " Enable relative line numbering
- set tabstop=4 " Set tap stop to 4
- set shiftwidth=4 " Set shift width to 4 (same as tabstop)
- set viminfo= " No tracking
- '';
- };
- };
-
- xdg.configFile."home-manager" = mkIf (!config.home.isolation.active) {
- source = symlink "${config.home.homeDirectory}/nix";
- };
- };
-}
diff --git a/home/environ/default.nix b/home/environ/default.nix
new file mode 100644
index 0000000..53841f1
--- /dev/null
+++ b/home/environ/default.nix
@@ -0,0 +1,17 @@
+{ lib, ... }:
+with lib; {
+ imports = [
+ ./gpg.nix
+ ./pass.nix
+ ./path.nix
+ ./source.nix
+ ./ssh.nix
+ ./tmux.nix
+ ./units.nix
+ ./vtmp.nix
+ ];
+
+ options.local.environ = {
+ enable = mkEnableOption "local environment";
+ };
+}
diff --git a/home/gpg.nix b/home/environ/gpg.nix
index 9117c1f..dd58181 100644
--- a/home/gpg.nix
+++ b/home/environ/gpg.nix
@@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
-with lib; {
- config = mkIf (!config.home.isolation.active) {
+with lib; let
+ cfg = config.local.environ;
+in
+{
+ config = mkIf cfg.enable {
programs.gpg = {
enable = true;
scdaemonSettings.disable-ccid = true;
diff --git a/home/environ/pass.nix b/home/environ/pass.nix
new file mode 100644
index 0000000..69947a7
--- /dev/null
+++ b/home/environ/pass.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+with lib; let
+ cfg = config.local.environ;
+in
+{
+ config = mkIf cfg.enable {
+ programs.password-store = {
+ enable = true;
+ package = pkgs.pass.withExtensions (exts: (with exts; [
+ pass-audit
+ pass-genphrase
+ pass-otp
+ pass-tomb
+ pass-update
+ ]) ++ [
+ pkgs.local.pass-bcr
+ ]);
+
+ settings = {
+ PASSWORD_STORE_DIR = "${config.home.homeDirectory}/pass";
+ PASSWORD_STORE_TOMB_KEY = "${config.home.homeDirectory}/tomb/pass.key.gpg";
+ PASSWORD_STORE_TOMB_FILE = "${config.home.homeDirectory}/tomb/pass.tomb";
+ };
+ };
+ };
+}
diff --git a/home/path.nix b/home/environ/path.nix
index acacdbe..3d7d455 100644
--- a/home/path.nix
+++ b/home/environ/path.nix
@@ -1,19 +1,12 @@
{ config, lib, pkgs, ... }:
-with lib; {
- home.packages =
- let
- py = pkgs.python3Packages;
- in
- [
- pkgs.file
- pkgs.killall
- pkgs.man-pages
- pkgs.man-pages-posix
- pkgs.tree
- pkgs.unzip
- pkgs.wget
- pkgs.zip
- ] ++ optionals (!config.home.isolation.active) [
+with lib; let
+ cfg = config.local.environ;
+
+ py = pkgs.python3Packages;
+in
+{
+ config = mkIf cfg.enable {
+ home.packages = [
pkgs.calc
pkgs.cloc
pkgs.gcc
@@ -48,4 +41,5 @@ with lib; {
pkgs.yubikey-manager
pkgs.zoom-us
];
+ };
}
diff --git a/home/environ/source.nix b/home/environ/source.nix
new file mode 100644
index 0000000..ed9f53c
--- /dev/null
+++ b/home/environ/source.nix
@@ -0,0 +1,23 @@
+{ config, lib, pkgs, ... }:
+with lib; let
+ cfg = config.local.environ;
+
+ py = pkgs.python3Packages;
+in
+{
+ config = mkIf cfg.enable {
+ nix.registry."system".to = {
+ type = "path";
+ path = "${config.home.homeDirectory}/nix";
+ };
+
+ programs = {
+ git.signing.signByDefault = true;
+ home-manager.enable = true;
+ };
+
+ xdg.configFile."home-manager" = {
+ source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nix";
+ };
+ };
+}
diff --git a/home/environ/ssh-match.nix b/home/environ/ssh-match.nix
new file mode 100644
index 0000000..1bb3788
--- /dev/null
+++ b/home/environ/ssh-match.nix
@@ -0,0 +1 @@
+# This file has been lustrated.
diff --git a/home/ssh/default.nix b/home/environ/ssh.nix
index 220d18d..29829be 100644
--- a/home/ssh/default.nix
+++ b/home/environ/ssh.nix
@@ -1,7 +1,10 @@
{ config, lib, pkgs, ... }:
-with lib; {
- config = {
- programs.ssh = mkIf (!config.home.isolation.active) {
+with lib; let
+ cfg = config.local.environ;
+in
+{
+ config = mkIf cfg.enable {
+ programs.ssh = {
enable = true;
compression = true;
@@ -10,7 +13,7 @@ with lib; {
extraOptionOverrides.AddKeysToAgent = "true";
- matchBlocks = import ./match.nix;
+ matchBlocks = import ./ssh-match.nix;
};
systemd.user.tmpfiles.rules = [
diff --git a/home/environ/tmux.nix b/home/environ/tmux.nix
new file mode 100644
index 0000000..223851d
--- /dev/null
+++ b/home/environ/tmux.nix
@@ -0,0 +1,41 @@
+{ config, lib, pkgs, ... }:
+with lib; let
+ cfg = config.local.environ;
+in
+{
+ options.local.environ.tmuxPass = {
+ enable = mkEnableOption "tmux-pass plugin";
+ };
+
+ config = mkIf cfg.enable {
+ programs.tmux = {
+ enable = true;
+ aggressiveResize = true;
+ clock24 = true;
+ escapeTime = 10;
+ terminal = "xterm-256color";
+ keyMode = "vi";
+
+ plugins = optional cfg.tmuxPass.enable {
+ plugin = pkgs.local.tmux-pass;
+ extraConfig = ''
+ set -g @pass-key BSpace
+ set -g @pass-copy-to-clipboard on
+ set -g @pass-window-size 15
+ set -g @pass-hide-pw-from-preview 'on'
+ set -g @pass-hide-preview on
+ '';
+ };
+
+ extraConfig = ''
+ set -g mouse on
+ set -ga update-environment " LIFT_PID"
+ set -g set-titles on
+ set -g renumber-windows on
+ set -sa terminal-overrides ',xterm-termite:RGB'
+ set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,} %H:%M %d-%b-%y"
+ bind-key X set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
+ '';
+ };
+ };
+}
diff --git a/home/environ/units.nix b/home/environ/units.nix
new file mode 100644
index 0000000..bb039b7
--- /dev/null
+++ b/home/environ/units.nix
@@ -0,0 +1,33 @@
+{ config, lib, pkgs, ... }:
+with lib; let
+ cfg = config.local.environ;
+in
+{
+ config = mkIf cfg.enable {
+ systemd.user = {
+ timers = {
+ units-cur = {
+ Install.WantedBy = [ "timers.target" ];
+ Timer.OnCalendar = "daily";
+ Unit.Description = "Update currency information for 'units'";
+ };
+ };
+
+ services = {
+ units-cur = {
+ Unit.Description = "Update currency information for 'units'";
+
+ Service = {
+ Type = "exec";
+ ExecStart = "${pkgs.units}/bin/units_cur .units";
+ };
+ };
+ };
+ };
+
+ home.file = {
+ #TODO: .calc_history
+ ".units_history".source = config.lib.file.mkOutOfStoreSymlink "/dev/null";
+ };
+ };
+}
diff --git a/home/environ/vtmp.nix b/home/environ/vtmp.nix
new file mode 100644
index 0000000..9481b6f
--- /dev/null
+++ b/home/environ/vtmp.nix
@@ -0,0 +1,20 @@
+{ config, lib, ... }:
+with lib; let
+ cfg = config.local.environ;
+in
+{
+ config = mkIf cfg.enable {
+ systemd.user.tmpfiles.rules = [
+ "d %t/vtmp 0700"
+ ];
+
+ home.file = {
+ "vtmp".source = config.lib.file.mkOutOfStoreSymlink "/run/user/${toString config.local.uid}/vtmp";
+ };
+
+ gtk.gtk3.bookmarks = [
+ "file://${config.home.homeDirectory}/vtmp"
+ "file://${config.home.homeDirectory}/tmp"
+ ];
+ };
+}
diff --git a/home/git.nix b/home/git.nix
deleted file mode 100644
index de108ed..0000000
--- a/home/git.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ config, lib, pkgs, ... }:
-with lib; {
- config = {
- programs.git = {
- enable = true;
- userName = "Alejandro Soto";
- userEmail = "alejandro@34project.org";
-
- signing = mkIf (!config.home.isolation.active) {
- signByDefault = true;
- };
- };
- };
-}
diff --git a/home/graphics.nix b/home/graphics.nix
deleted file mode 100644
index f964a7b..0000000
--- a/home/graphics.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ config, lib, pkgs, ... }:
-with lib; {
- config = {
- fonts.fontconfig.enable = true;
-
- gtk = {
- enable = true;
- gtk3.bookmarks = [ "file:///home/ale/vtmp" "file:///home/ale/tmp" ];
-
- gtk2.extraConfig = ''
- gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
- gtk-menu-images=1
- gtk-button-images=1
- '';
-
- font = {
- package = pkgs.noto-fonts;
- name = "Noto Sans Regular";
- #size = 14; <- caga layout de páginas
- };
-
- theme = {
- package = pkgs.materia-theme;
- name = "Materia-dark";
- };
- };
-
- qt.enable = true;
- };
-}
diff --git a/home/isolation.nix b/home/isolation.nix
deleted file mode 100644
index 5a15468..0000000
--- a/home/isolation.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ lib, ... }:
-with lib; {
- home.isolation = {
- enable = true;
- btrfsSupport = true;
-
- defaults = {
- static = false;
- bindHome = "home";
-
- persist = {
- base = "shenvs";
- btrfs = true;
- };
- };
-
- modulesUnder = ./shenvs;
- };
-}
diff --git a/home/isolation/default.nix b/home/isolation/default.nix
new file mode 100644
index 0000000..d5d2979
--- /dev/null
+++ b/home/isolation/default.nix
@@ -0,0 +1,34 @@
+{ config, lib, ... }:
+with lib; let
+ cfg = config.local.shenvs;
+in
+{
+ options.local.shenvs = {
+ enable = mkEnableOption "hm-isolation shenvs";
+ };
+
+ config = mkIf cfg.enable {
+ home.isolation = {
+ enable = true;
+ btrfsSupport = true;
+
+ defaults = {
+ static = false;
+ bindHome = "home";
+
+ persist = {
+ base = "shenvs";
+ btrfs = true;
+ };
+ };
+
+ modulesUnder = ../shenvs;
+ };
+
+ local = mkIf config.home.isolation.active {
+ desktop.enable = mkForce false;
+ environ.enable = mkForce false;
+ mail.enable = mkForce false;
+ };
+ };
+}
diff --git a/home/mail/default.nix b/home/mail/default.nix
index 06d1225..f070b2f 100644
--- a/home/mail/default.nix
+++ b/home/mail/default.nix
@@ -1,6 +1,11 @@
{ config, lib, pkgs, ... }:
-with lib; {
+with lib; let
+ cfg = config.local.mail;
+in
+{
options.local.mail = with types; {
+ enable = mkEnableOption "mail";
+
address = mkOption {
type = str;
};
@@ -12,7 +17,7 @@ with lib; {
sieve.enable = mkEnableOption "sieve filter";
};
- config = mkIf (!config.home.isolation.active) {
+ config = mkIf cfg.enable {
accounts.email = {
maildirBasePath = "mail";
diff --git a/home/pass.nix b/home/pass.nix
deleted file mode 100644
index cc05869..0000000
--- a/home/pass.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ config, lib, pkgs, ... }:
-with lib; {
- config.programs.password-store = mkIf (!config.home.isolation.active) {
- enable = true;
- package = pkgs.pass.withExtensions (exts: (with exts; [
- pass-audit
- pass-genphrase
- pass-otp
- pass-tomb
- pass-update
- ]) ++ [
- pkgs.local.pass-bcr
- ]);
-
- settings = {
- PASSWORD_STORE_DIR = "${config.home.homeDirectory}/pass";
- PASSWORD_STORE_TOMB_KEY = "${config.home.homeDirectory}/tomb/pass.key.gpg";
- PASSWORD_STORE_TOMB_FILE = "${config.home.homeDirectory}/tomb/pass.tomb";
- };
- };
-}
diff --git a/home/ssh/match.nix b/home/ssh/match.nix
deleted file mode 100644
index 4209e9b..0000000
--- a/home/ssh/match.nix
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "34" = {
- hostname = "34project.org";
- port = 2234;
- serverAliveInterval = 30;
- };
-
- "gate.34project.org" = {
- serverAliveInterval = 30;
- };
-
- "hv" = {
- port = 2242;
- hostname = "::1";
-
- user = "root";
- identityFile = "~/.ssh/id_hv_sk";
- identitiesOnly = true;
- };
-
- "olger.dev" = {
- hostname = "201.205.177.184";
- port = 1025;
- };
-
- "ramips" = {
- hostname = "10.34.42.1";
- user = "root";
- };
-
- "eric-8100" = {
- hostname = "10.34.42.43";
- user = "admin";
- };
-
- "hackintosh" = {
- hostname = "10.34.42.44";
- user = "ileana";
- };
-
- "ramips-lan" = {
- hostname = "192.168.34.1";
- user = "root";
- };
-
- "xiaomi-lan" = {
- hostname = "192.168.42.6";
- user = "u0_a89";
- port = 8022;
- };
-
- "eric-8100-lan" = {
- hostname = "192.168.42.18";
- user = "admin";
- };
-
- "github.com" = {
- identitiesOnly = true;
- identityFile = "~/.ssh/id_rsa";
- user = "git";
- };
-
- # Cambiar esto por "itcr3442@github.com" (matchBlocks.*.match aparecerá en 23.05)
- "github-itcr" = {
- identitiesOnly = true;
- identityFile = "~/.ssh/id_klein";
- user = "git";
- hostname = "github.com";
- };
-
- "kiev" = {
- user = "u0_a177";
- port = 8022;
- hostname = "10.34.42.2";
- };
-
- "kiev-lan" = {
- user = "u0_a177";
- port = 8022;
- hostname = "192.168.34.211";
- };
-}