Compare commits

...

6 Commits

Author SHA1 Message Date
6b6556cd80 refactor(home/work): improve configuration structure
- Add nixpkgs.config.allowUnfree setting
- Fix nixGL configuration path to targets.genericLinux.nixGL
- Remove redundant anki program import (now in modules)
- Enable gh and kubecolor programs
- Pass inputs to packages.nix for flake package access

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 15:41:33 +01:00
2e9c500892 feat(home): add GNOME desktop configuration
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 15:41:33 +01:00
4cabbcca5d chore(home): add commented experimental anki sync config
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 15:41:33 +01:00
1f326544d6 refactor(work): set up 'packages.local.nix' approach 2025-12-03 15:41:33 +01:00
69599c8e3d feat(home): add git config with example configuration for non-NixOS 2025-12-03 15:41:33 +01:00
7f3a7c5543 refactor: move common hosts config into 'modules/common.nix' 2025-12-03 15:41:33 +01:00
17 changed files with 211 additions and 46 deletions

2
.gitignore vendored
View File

@@ -4,3 +4,5 @@ result
result-*
nixos-efi-vars.fd
home/hosts/work/packages.local.nix

View File

@@ -1,9 +1,11 @@
[include]
path = ~/.gitconfig.email
[core]
editor = nvim
excludesfile = ~/.gitignore
[user]
email = hektor.misplon@pm.me
name = Hektor Misplon
username = hektor
signingKey = AEB98353B8D72E465C4236435151AF79E723F21C
@@ -76,8 +78,6 @@
[merge]
tool = nvimdiff
conflictstyle = diff3
[pull]
rebase = true
[diff]
colorMoved = zebra
[commit]
@@ -85,3 +85,11 @@
[interactive]
singleKey = true
[pull]
rebase = true
[rerere]
enabled = true
[includeIf "gitdir:~/work/"]
path = ~/.gitconfig.work

View File

@@ -0,0 +1,2 @@
[user]
email = your.email@example.com

13
dots/.gitconfig.work Normal file
View File

@@ -0,0 +1,13 @@
[include]
path = ~/.gitconfig.work.email
[core]
longpaths = true
[user]
name = Hektor Misplon
username = hektor.misplon
signingKey = 1C88BE828184CEE6
[commit]
gpgsign = false

View File

@@ -0,0 +1,2 @@
[user]
email = your.work.email@example.com

View File

@@ -12,6 +12,7 @@ in
imports = [
../../modules/dconf.nix # TODO: Only enable when on Gnome?
../../modules/git.nix
../../modules/k9s.nix
(import ../../modules/taskwarrior.nix {
inherit config;
inherit pkgs;

View File

@@ -10,38 +10,37 @@ let
in
{
imports = [
../../modules/dconf.nix # TODO: Only enable when on Gnome?
../../modules/dconf.nix
../../modules/git.nix
../../modules/k9s.nix
];
nixpkgs.config.allowUnfree = true;
home.stateVersion = "25.05";
home.username = username;
home.homeDirectory = "/home/${username}";
sops = {
defaultSopsFile = "${builtins.toString inputs.nix-secrets}/secrets.yaml";
defaultSopsFormat = "yaml";
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
secrets."test" = { };
};
nixGL = {
targets.genericLinux.nixGL = {
packages = inputs.nixgl.packages;
defaultWrapper = "mesa";
};
programs = {
anki = import ../../modules/anki.nix;
# editorconfig.enable = true;
firefox = import ../../modules/firefox.nix {
inherit inputs;
inherit pkgs;
inherit config;
};
git = import ../../modules/git.nix;
gh.enable = true;
keepassxc = import ../../modules/keepassxc.nix;
kubecolor.enable = true;
};
home.packages = import ./packages.nix {
inherit pkgs;
inherit inputs;
inherit config;
inherit pkgs;
};
}

View File

@@ -1,4 +1,19 @@
{ pkgs, config, ... }:
{
inputs,
config,
pkgs,
...
}:
with pkgs;
[ ]
let
localPackages =
if builtins.pathExists ./packages.local.nix then
import ./packages.local.nix { inherit inputs config pkgs; }
else
[ ];
in
(with pkgs; [
inputs.nvim.packages.x86_64-linux.nvim
])
++ localPackages

View File

@@ -1,3 +1,6 @@
{
enable = true;
# sync = {
# username = config.sops.secrets."email/personal".path;
# };
}

View File

@@ -7,5 +7,107 @@
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
"org/gnome/desktop/applications/terminal" = {
exec = "kitty";
exec-arg = "";
};
"org/gnome/desktop/background" = {
color-shading-type = "solid";
picture-opacity = 100;
picture-options = "zoom";
picture-uri = "none";
picture-uri-dark = "none";
primary-color = "#555555";
secondary-color = "#555555";
show-desktop-icons = false;
};
# "org/gnome/desktop/input-sources" = {
# sources = [
# (mkTuple [
# "xkb"
# "us"
# ])
# ];
# xkb-options = [ "caps:none" ];
# };
"org/gnome/desktop/wm/keybindings" = {
close = [ "<Shift><Super>Delete" ];
cycle-group = [ ];
cycle-group-backward = [ ];
cycle-panels = [ ];
cycle-panels-backward = [ ];
cycle-windows = [ ];
cycle-windows-backward = [ ];
maximize = [ "<Super> " ];
minimize = [ ];
move-to-workspace-1 = [ "<Super><Shift>a" ];
move-to-workspace-2 = [ "<Super><Shift>s" ];
move-to-workspace-3 = [ "<Super><Shift>d" ];
move-to-workspace-4 = [ "<Super><Shift>f" ];
move-to-workspace-5 = [ "<Super><Shift>g" ];
move-to-workspace-last = [ ];
move-to-workspace-left = [ "<Super><Shift>h" ];
move-to-workspace-right = [ "<Super><Shift>l" ];
panel-run-dialog = [ ];
switch-applications = [ "<Super>j" ];
switch-applications-backward = [ "<Super>k" ];
switch-group = [ ];
switch-group-backward = [ ];
switch-input-source = [ ];
switch-input-source-backward = [ ];
switch-panels = [ ];
switch-panels-backward = [ ];
switch-to-workspace-1 = [ "<Super>a" ];
switch-to-workspace-2 = [ "<Super>s" ];
switch-to-workspace-3 = [ "<Super>d" ];
switch-to-workspace-4 = [ "<Super>f" ];
switch-to-workspace-5 = [ "<Super>g" ];
switch-to-workspace-last = [ ];
switch-to-workspace-left = [ "<Super>h" ];
switch-to-workspace-right = [ "<Super>l" ];
switch-windows = [ ];
switch-windows-backward = [ ];
toggle-maximized = [ "<Super>space" ];
unmaximize = [ ];
};
"org/gnome/desktop/wm/preferences" = {
num-workspaces = 5;
workspace-names = [
"sh"
"www"
"dev"
"info"
"etc"
];
};
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "Print";
command = "flameshot gui";
name = "flameshot";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Super>Return";
command = "kitty";
name = "Kitty";
};
"org/gnome/shell/keybindings" = {
screenshot = [ "Print" ];
toggle-application-view = [ "<Super>p" ];
toggle-quick-settings = [ ];
};
};
}

View File

@@ -2,6 +2,7 @@
programs.git.enable = true;
home.file = {
".gitconfig".source = ../../dots/.gitconfig;
".gitconfig.work".source = ../../dots/.gitconfig.work;
".gitignore".source = ../../dots/.gitignore;
};
}

11
home/modules/k9s.nix Normal file
View File

@@ -0,0 +1,11 @@
{
programs.k9s = {
enable = true;
settings.k9s = {
ui = {
logoless = true;
reactive = true;
};
};
};
}

View File

@@ -10,9 +10,8 @@ let
username = "h";
in
{
system.stateVersion = "25.05";
imports = [
../../modules/common.nix
inputs.disko.nixosModules.disko
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.default
@@ -77,13 +76,6 @@ in
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;

View File

@@ -11,9 +11,8 @@ let
hostName = "astyanax";
in
{
system.stateVersion = "25.05";
imports = [
../../modules/common.nix
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel
inputs.disko.nixosModules.disko
inputs.sops-nix.nixosModules.sops
@@ -46,13 +45,6 @@ in
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;

View File

@@ -10,9 +10,8 @@ let
username = "h";
in
{
system.stateVersion = "25.05";
imports = [
../../modules/common.nix
inputs.disko.nixosModules.disko
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.default
@@ -38,13 +37,6 @@ in
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true;
disko = {
devices.disk.main.device = "/dev/vda";
devices.disk.main.imageName = "nixos-vm";

10
modules/common.nix Normal file
View File

@@ -0,0 +1,10 @@
{
system.stateVersion = "25.05";
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true;
}

View File

@@ -25,6 +25,8 @@ in
"taskwarrior_sync_server_url".owner = config.users.users.${cfg.username}.name;
"taskwarrior_sync_server_client_id".owner = config.users.users.${cfg.username}.name;
"taskwarrior_sync_encryption_secret".owner = config.users.users.${cfg.username}.name;
"email_personal".owner = config.users.users.${cfg.username}.name;
"email_work".owner = config.users.users.${cfg.username}.name;
};
templates."taskrc.d/sync" = {
@@ -35,6 +37,24 @@ in
sync.encryption_secret=${config.sops.placeholder."taskwarrior_sync_encryption_secret"}
'';
};
templates.".gitconfig.email" = {
owner = config.users.users.${cfg.username}.name;
path = "/home/${cfg.username}/.gitconfig.email";
content = ''
[user]
email = ${config.sops.placeholder."email_personal"}
'';
};
templates.".gitconfig.work.email" = {
owner = config.users.users.${cfg.username}.name;
path = "/home/${cfg.username}/.gitconfig.work.email";
content = ''
[user]
email = ${config.sops.placeholder."email_work"}
'';
};
};
};
}