aboutsummaryrefslogtreecommitdiff
path: root/nix/users
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--nix/users/fcuny/darwin.nix9
-rw-r--r--nix/users/fcuny/dev.nix130
-rw-r--r--nix/users/fcuny/home-manager.nix28
-rw-r--r--nix/users/fcuny/personal.nix8
-rw-r--r--nix/users/modules/userinfo.nix15
-rw-r--r--nix/users/profiles/1password.nix (renamed from nix/users/fcuny/1password.nix)0
-rw-r--r--nix/users/profiles/dev.nix47
-rw-r--r--nix/users/profiles/emacs.nix (renamed from nix/users/fcuny/emacs.nix)0
-rw-r--r--nix/users/profiles/git.nix (renamed from nix/users/fcuny/git.nix)16
-rw-r--r--nix/users/profiles/k8s.nix (renamed from nix/users/fcuny/k8s.nix)0
-rw-r--r--nix/users/profiles/llm.nix (renamed from nix/users/fcuny/llm.nix)0
-rw-r--r--nix/users/profiles/mac.nix15
-rw-r--r--nix/users/profiles/media.nix (renamed from nix/users/fcuny/media.nix)0
-rw-r--r--nix/users/profiles/nixos.nix (renamed from nix/users/fcuny/nixos.nix)0
-rw-r--r--nix/users/profiles/secrets.nix (renamed from nix/users/fcuny/secrets.nix)0
-rw-r--r--nix/users/profiles/shell.nix (renamed from nix/users/fcuny/shell.nix)0
-rw-r--r--nix/users/profiles/ssh.nix (renamed from nix/users/fcuny/ssh.nix)0
-rw-r--r--nix/users/profiles/work.nix (renamed from nix/users/fcuny/work.nix)0
18 files changed, 89 insertions, 179 deletions
diff --git a/nix/users/fcuny/darwin.nix b/nix/users/fcuny/darwin.nix
deleted file mode 100644
index fc412c9..0000000
--- a/nix/users/fcuny/darwin.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ pkgs, ... }:
-{
- # The user should already exist, but we need to set this up so Nix knows
- # what our home directory is (https://github.com/LnL7/nix-darwin/issues/423).
- users.users.fcuny = {
- home = "/Users/fcuny";
- shell = pkgs.fish;
- };
-}
diff --git a/nix/users/fcuny/dev.nix b/nix/users/fcuny/dev.nix
deleted file mode 100644
index 7fb8f93..0000000
--- a/nix/users/fcuny/dev.nix
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- config,
- pkgs,
- ...
-}:
-{
- home.packages = with pkgs; [
- aider-chat
- basedpyright
- customPackages.llmPython.llm # llm and claude support
- delve
- dive # explore layers in docker images
- docker
- docker-credential-helpers
- go-tools # collection of tools, https://github.com/dominikh/go-tools
- golangci-lint
- gopls
- nil # nix lsp
- nix-direnv # integration with direnv
- nixfmt-rfc-style # new formatter
- python3
- ruff
- # ruff-lsp
- rustup
- uv
- wireshark
- ];
-
- # https://wezterm.org/config/lua/general.html
- programs.wezterm = {
- enable = true;
- extraConfig = ''
- local config = {}
- if wezterm.config_builder then
- config = wezterm.config_builder()
- end
-
- config.color_scheme = 'Catppuccin Macchiato'
-
- config.scrollback_lines = 10000
-
- config.font = wezterm.font("Source Code Pro")
- config.font_size = 14.0
- config.line_height = 1.0
-
- config.window_frame = {
- font = wezterm.font({ family = 'Source Code Pro', weight = 'Bold' }),
- font_size = 11.0,
- }
-
- config.bold_brightens_ansi_colors = true
- config.window_decorations = 'RESIZE|INTEGRATED_BUTTONS'
- config.window_padding = { left = '0.5cell', right = '0.5cell', top = '0.5cell', bottom = '0.5cell' }
- config.window_background_opacity = 0.97
- config.macos_window_background_blur = 30
- config.default_cursor_style = 'BlinkingBar'
-
- local act = wezterm.action
- config.keys = {
- -- Override CMD+t to always start new tabs in the home directory.
- { key = 't', mods = 'SUPER', action = act.SpawnCommandInNewTab { cwd = wezterm.home_dir } },
- }
-
- config.audible_bell = "Disabled"
- config.visual_bell = {
- fade_in_duration_ms = 75,
- fade_out_duration_ms = 75,
- target = 'CursorColor',
- };
-
- config.term = "xterm-256color"
-
- config.front_end = "WebGpu"
-
- -- in order to access menu bar when in fullscreen
- config.native_macos_fullscreen_mode = true
-
- -- select the pane with the mouse
- config.pane_focus_follows_mouse = true
-
- -- Set initial size
- config.initial_cols = 120
- config.initial_rows = 36
-
- -- Since we're managing the binary with nix, no need for this
- config.check_for_updates = false
-
- wezterm.on('update-status', function(window)
- -- Grab the utf8 character for the "powerline" left facing
- -- solid arrow.
- local SOLID_LEFT_ARROW = utf8.char(0xe0b2)
-
- -- Grab the current window's configuration, and from it the
- -- palette (this is the combination of your chosen colour scheme
- -- including any overrides).
- local color_scheme = window:effective_config().resolved_palette
- local bg = color_scheme.background
- local fg = color_scheme.foreground
-
- window:set_right_status(wezterm.format({
- -- First, we draw the arrow...
- { Background = { Color = 'none' } },
- { Foreground = { Color = bg } },
- { Text = SOLID_LEFT_ARROW },
- -- Then we draw our text
- { Background = { Color = bg } },
- { Foreground = { Color = fg } },
- { Text = ' ' .. wezterm.hostname() .. ' ' },
- }))
- end)
-
- return config
- '';
- };
-
- programs.go = {
- enable = true;
- goPath = ".local/share/pkg.go";
- goBin = ".local/bin.go";
- goPrivate = [
- "github.rbx.com/*"
- "github.com/fcuny/*"
- ];
- };
-
- home.sessionPath = [
- config.home.sessionVariables.GOBIN
- "${config.home.homeDirectory}/.local/bin"
- ];
-}
diff --git a/nix/users/fcuny/home-manager.nix b/nix/users/fcuny/home-manager.nix
deleted file mode 100644
index 987a6a2..0000000
--- a/nix/users/fcuny/home-manager.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ darwin, systemName, ... }:
-
-{ lib, ... }:
-let
- machineUtils = import ../../lib/machine-utils.nix { inherit lib; };
-in
-{
- home.stateVersion = "23.05";
-
- xdg.enable = true;
-
- imports =
- [
- ./shell.nix
- ./ssh.nix
- ./git.nix
- ]
- ++ lib.optionals darwin [
- ./emacs.nix
- ./1password.nix
- ./dev.nix
- ./media.nix
- ./secrets.nix
- ./llm.nix
- ]
- ++ lib.optionals (machineUtils.isMachineType "work" systemName) [ ./work.nix ]
- ++ lib.optionals (machineUtils.isMachineType "personal" systemName) [ ./personal.nix ];
-}
diff --git a/nix/users/fcuny/personal.nix b/nix/users/fcuny/personal.nix
deleted file mode 100644
index b57dbf8..0000000
--- a/nix/users/fcuny/personal.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ pkgs, ... }:
-{
- home.packages = with pkgs; [
- element-desktop
- vlc-bin
- zoom-us
- ];
-}
diff --git a/nix/users/modules/userinfo.nix b/nix/users/modules/userinfo.nix
new file mode 100644
index 0000000..46afc73
--- /dev/null
+++ b/nix/users/modules/userinfo.nix
@@ -0,0 +1,15 @@
+{ lib, ... }:
+{
+ options = with lib; {
+ userinfo = {
+ fullName = mkOption {
+ type = types.str;
+ example = "Someone Someonesson";
+ };
+ email = mkOption {
+ type = types.str;
+ example = "some@email.com";
+ };
+ };
+ };
+}
diff --git a/nix/users/fcuny/1password.nix b/nix/users/profiles/1password.nix
index 63892c7..63892c7 100644
--- a/nix/users/fcuny/1password.nix
+++ b/nix/users/profiles/1password.nix
diff --git a/nix/users/profiles/dev.nix b/nix/users/profiles/dev.nix
new file mode 100644
index 0000000..c996aeb
--- /dev/null
+++ b/nix/users/profiles/dev.nix
@@ -0,0 +1,47 @@
+{
+ config,
+ pkgs,
+ ...
+}:
+{
+ home.packages = with pkgs; [
+ aider-chat
+ basedpyright
+ llmPython.llm # llm and claude support
+ delve
+ dive # explore layers in docker images
+ docker
+ go-tools # collection of tools, https://github.com/dominikh/go-tools
+ golangci-lint
+ gopls
+ nil # nix lsp
+ nix-direnv # integration with direnv
+ nixfmt-rfc-style # new formatter
+ python3
+ ruff
+ # ruff-lsp
+ rustup
+ uv
+ wireshark
+ ];
+
+ programs.direnv = {
+ enable = true;
+ nix-direnv.enable = true;
+ };
+
+ programs.go = {
+ enable = true;
+ goPath = ".local/share/pkg.go";
+ goBin = ".local/bin.go";
+ goPrivate = [
+ "github.rbx.com/*"
+ "github.com/fcuny/*"
+ ];
+ };
+
+ home.sessionPath = [
+ config.home.sessionVariables.GOBIN
+ "${config.home.homeDirectory}/.local/bin"
+ ];
+}
diff --git a/nix/users/fcuny/emacs.nix b/nix/users/profiles/emacs.nix
index fcf1b8f..fcf1b8f 100644
--- a/nix/users/fcuny/emacs.nix
+++ b/nix/users/profiles/emacs.nix
diff --git a/nix/users/fcuny/git.nix b/nix/users/profiles/git.nix
index ad96bfb..de066e2 100644
--- a/nix/users/fcuny/git.nix
+++ b/nix/users/profiles/git.nix
@@ -1,4 +1,12 @@
-{ lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+let
+ inherit (config) userinfo;
+in
{
home.packages = with pkgs; [
gitAndTools.pre-commit
@@ -27,8 +35,8 @@
options.features = "decorations side-by-side line-numbers";
};
- userName = "Franck Cuny";
- userEmail = "franck@fcuny.net";
+ userName = lib.mkDefault userinfo.fullName;
+ userEmail = lib.mkDefault userinfo.email;
aliases = {
amend = "commit --amend";
@@ -68,7 +76,7 @@
ignores = [
".DS_Store"
- ".aider.chat.history.md"
+ ".aider.*"
".direnv"
".envrc"
];
diff --git a/nix/users/fcuny/k8s.nix b/nix/users/profiles/k8s.nix
index ec59228..ec59228 100644
--- a/nix/users/fcuny/k8s.nix
+++ b/nix/users/profiles/k8s.nix
diff --git a/nix/users/fcuny/llm.nix b/nix/users/profiles/llm.nix
index 2793373..2793373 100644
--- a/nix/users/fcuny/llm.nix
+++ b/nix/users/profiles/llm.nix
diff --git a/nix/users/profiles/mac.nix b/nix/users/profiles/mac.nix
new file mode 100644
index 0000000..f27bcf3
--- /dev/null
+++ b/nix/users/profiles/mac.nix
@@ -0,0 +1,15 @@
+{ ... }:
+{
+ imports = [
+ ./1password.nix
+ ./dev.nix
+ ./emacs.nix
+ ./git.nix
+ ./llm.nix
+ ./secrets.nix
+ ./shell.nix
+ ./ssh.nix
+ ];
+
+ xdg.enable = true;
+}
diff --git a/nix/users/fcuny/media.nix b/nix/users/profiles/media.nix
index f0919a3..f0919a3 100644
--- a/nix/users/fcuny/media.nix
+++ b/nix/users/profiles/media.nix
diff --git a/nix/users/fcuny/nixos.nix b/nix/users/profiles/nixos.nix
index a6c302f..a6c302f 100644
--- a/nix/users/fcuny/nixos.nix
+++ b/nix/users/profiles/nixos.nix
diff --git a/nix/users/fcuny/secrets.nix b/nix/users/profiles/secrets.nix
index 65131df..65131df 100644
--- a/nix/users/fcuny/secrets.nix
+++ b/nix/users/profiles/secrets.nix
diff --git a/nix/users/fcuny/shell.nix b/nix/users/profiles/shell.nix
index 269c617..269c617 100644
--- a/nix/users/fcuny/shell.nix
+++ b/nix/users/profiles/shell.nix
diff --git a/nix/users/fcuny/ssh.nix b/nix/users/profiles/ssh.nix
index 322a8bc..322a8bc 100644
--- a/nix/users/fcuny/ssh.nix
+++ b/nix/users/profiles/ssh.nix
diff --git a/nix/users/fcuny/work.nix b/nix/users/profiles/work.nix
index f502b6a..f502b6a 100644
--- a/nix/users/fcuny/work.nix
+++ b/nix/users/profiles/work.nix