summaryrefslogtreecommitdiff
path: root/profiles/core
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2024-07-14 06:40:52 +0200
committerMike Vink <mike@pionative.com>2024-07-14 06:40:52 +0200
commit98c31cac3e931023b5afeb209af6b6eed2a025c7 (patch)
tree4f78891affa3ce2cfbb7f0b1b3efc31d68c87ab7 /profiles/core
parentf56f38fc344a80244266e0b69f909775599ba5b2 (diff)
wip
Diffstat (limited to 'profiles/core')
-rw-r--r--profiles/core/configuration.nix52
-rw-r--r--profiles/core/git.nix6
-rw-r--r--profiles/core/hm.nix2
-rw-r--r--profiles/core/home.nix21
-rw-r--r--profiles/core/meta.nix2
-rw-r--r--profiles/core/packages.nix53
-rw-r--r--profiles/core/secrets.nix8
-rw-r--r--profiles/core/syncthing.nix16
8 files changed, 84 insertions, 76 deletions
diff --git a/profiles/core/configuration.nix b/profiles/core/configuration.nix
index 87b3d97..31a622b 100644
--- a/profiles/core/configuration.nix
+++ b/profiles/core/configuration.nix
@@ -5,7 +5,7 @@
lib,
...
}: with lib; {
- imports = [ (mkAliasOptionModule [ "ivi" ] [ "users" "users" ivi.username ]) ];
+ imports = [ (mkAliasOptionModule [ "my" ] [ "users" "users" my.username ]) ];
services = {
resolved.fallbackDns = [
@@ -28,60 +28,18 @@
time.timeZone = "Europe/Amsterdam";
users.users = {
- ${ivi.username} = {
+ ${my.username} = {
uid = mkIf (!machine.isDarwin) 1000;
- description = ivi.realName;
- openssh.authorizedKeys.keys = ivi.sshKeys;
+ description = my.realName;
+ openssh.authorizedKeys.keys = my.sshKeys;
extraGroups = ["wheel" "networkmanager" "docker" "transmission" "dialout" "test"];
isNormalUser = true;
};
root = {
- openssh.authorizedKeys.keys = config.ivi.openssh.authorizedKeys.keys;
+ openssh.authorizedKeys.keys = config.my.openssh.authorizedKeys.keys;
};
};
- environment.systemPackages = with pkgs; [
- vim
- wget
- git
- subversion
- htop
- jq
- yq-go
- curl
- fd
- lf
- fzf
- ripgrep
- parallel
- pinentry-curses
- gnused
- gnutls
- zoxide
- binwalk
- unzip
- gcc
- gnumake
- file
- pstree
- bc
- mediainfo
- bat
- openpomodoro-cli
- coreutils
- killall
- ] ++ (optionals (!machine.isDarwin) [
- man-pages
- man-pages-posix
- # pkgsi686Linux.glibc
- gdb
- pciutils
- dnsutils
- iputils
- inetutils
- usbutils
- ]);
-
nix.package = pkgs.nixVersions.latest;
nix.extraOptions = ''
experimental-features = nix-command flakes configurable-impure-env
diff --git a/profiles/core/git.nix b/profiles/core/git.nix
index b1d3ea6..44cadf7 100644
--- a/profiles/core/git.nix
+++ b/profiles/core/git.nix
@@ -3,14 +3,14 @@
hm = {
programs.git = {
enable = true;
- userName = ivi.realName;
- userEmail = if config.networking.hostName == "work" then "mike@pionative.com" else ivi.email;
+ userName = my.realName;
+ userEmail = if config.networking.hostName == "work" then "mike@pionative.com" else my.email;
extraConfig = {
worktree.guessRemote = true;
mergetool.fugitive.cmd = "vim -f -c \"Gdiff\" \"$MERGED\"";
merge.tool = "fugitive";
gpg.format = "ssh";
- user.signingKey = "${config.ivi.home}/.ssh/id_ed25519_sk.pub";
+ user.signingKey = "${config.my.home}/.ssh/id_ed25519_sk.pub";
commit.gpgsign = true;
};
diff --git a/profiles/core/hm.nix b/profiles/core/hm.nix
index efa83af..57c7d0f 100644
--- a/profiles/core/hm.nix
+++ b/profiles/core/hm.nix
@@ -1,6 +1,6 @@
{inputs, config, lib, pkgs, ...}: with lib; {
imports = [
- (mkAliasOptionModule [ "hm" ] [ "home-manager" "users" ivi.username ])
+ (mkAliasOptionModule [ "hm" ] [ "home-manager" "users" my.username ])
];
home-manager = {
diff --git a/profiles/core/home.nix b/profiles/core/home.nix
index ed86a55..032d954 100644
--- a/profiles/core/home.nix
+++ b/profiles/core/home.nix
@@ -8,7 +8,7 @@
programs.tmux = {
enable = true;
extraConfig = ''
- set-option -g default-shell ${config.ivi.shell}/bin/zsh
+ set-option -g default-shell ${config.my.shell}/bin/zsh
set -g status off
set -s set-clipboard on
setw -g mouse on
@@ -42,7 +42,14 @@
};
hm = {
- fonts.fontconfig.enable = true;
+ programs.password-store = {
+ enable = true;
+ settings = {
+ PASSWORD_STORE_DIR = config.synced.password-store.path;
+ };
+ };
+
+ # fonts.fontconfig.enable = true;
# https://github.com/nix-community/home-manager/issues/4692
# home.file.".local/bin".source = config.lib.meta.mkMutableSymlink /mut/bin;
xdg = {
@@ -86,7 +93,7 @@
# enable = true;
# matchBlocks = {
# "*" = {
- # identityFile = "${config.ivi.home}/.ssh/id_ed25519_sk";
+ # identityFile = "${config.my.home}/.ssh/id_ed25519_sk";
# };
# };
# };
@@ -114,8 +121,6 @@
'';
};
- programs.alacritty.enable = true;
-
programs = {
zsh = {
enable = true;
@@ -226,7 +231,7 @@
k = "kubectl ";
d = "docker ";
ls = "ls --color=auto";
- s = "${if machine.isDarwin then "darwin-rebuild" else "sudo nixos-rebuild"} switch --flake ${config.ivi.home}/flake#${config.networking.hostName}";
+ s = "${if machine.isDarwin then "darwin-rebuild" else "sudo nixos-rebuild"} switch --flake ${config.my.home}/flake#${config.networking.hostName}";
b = "/run/current-system/bin/switch-to-configuration boot";
v = "vremote";
lf = "lfub";
@@ -252,7 +257,7 @@
( command -v docker ) &>/dev/null && eval "$(docker completion bash)"
( command -v kubectl ) &>/dev/null && eval "$(kubectl completion bash)"
( command -v zoxide ) &>/dev/null && eval "$(zoxide init bash)"
- export PATH="$PATH:$HOME/.local/bin:/opt/homebrew/bin:${config.ivi.home}/.krew/bin:${config.ivi.home}/.cargo/bin:${pkgs.ncurses}/bin"
+ export PATH="$PATH:$HOME/.local/bin:/opt/homebrew/bin:${config.my.home}/.krew/bin:${config.my.home}/.cargo/bin:${pkgs.ncurses}/bin"
[[ -f ~/.cache/wal/sequences ]] && (cat ~/.cache/wal/sequences &)
unset LD_PRELOAD
# include nix.sh if it exists
@@ -273,7 +278,7 @@
k = "kubectl ";
d = "docker ";
ls = "ls --color=auto";
- s = "${if machine.isDarwin then "darwin-rebuild" else "sudo nixos-rebuild"} switch --flake ${config.ivi.home}/flake#${config.networking.hostName}";
+ s = "${if machine.isDarwin then "darwin-rebuild" else "sudo nixos-rebuild"} switch --flake ${config.my.home}/flake#${config.networking.hostName}";
b = "/run/current-system/bin/switch-to-configuration boot";
v = "nvim";
M = "xrandr --output HDMI1 --auto --output eDP1 --off";
diff --git a/profiles/core/meta.nix b/profiles/core/meta.nix
index f813b56..add9b34 100644
--- a/profiles/core/meta.nix
+++ b/profiles/core/meta.nix
@@ -1,6 +1,6 @@
{inputs,lib,config, ...}: with lib; {
lib.meta = {
- configPath = "${config.ivi.home}/flake";
+ configPath = "${config.my.home}/flake";
mkMutableSymlink = path:
config.hm.lib.file.mkOutOfStoreSymlink
(config.lib.meta.configPath + removePrefix (toString inputs.self) (toString path));
diff --git a/profiles/core/packages.nix b/profiles/core/packages.nix
new file mode 100644
index 0000000..1d8e737
--- /dev/null
+++ b/profiles/core/packages.nix
@@ -0,0 +1,53 @@
+{
+ machine,
+ config,
+ pkgs,
+ lib,
+ ...
+}:
+
+with lib;
+
+{
+ environment.systemPackages = with pkgs; [
+ vim
+ wget
+ git
+ subversion
+ htop
+ jq
+ yq-go
+ curl
+ fd
+ lf
+ fzf
+ ripgrep
+ parallel
+ pinentry-curses
+ gnused
+ gnutls
+ zoxide
+ binwalk
+ unzip
+ # gcc
+ gnumake
+ file
+ pstree
+ bc
+ mediainfo
+ bat
+ openpomodoro-cli
+ coreutils
+ killall
+ ] ++ (optionals (!machine.isDarwin) [
+ man-pages
+ man-pages-posix
+ # pkgsi686Linux.glibc
+ gdb
+ pciutils
+ dnsutils
+ iputils
+ inetutils
+ usbutils
+ ]);
+}
diff --git a/profiles/core/secrets.nix b/profiles/core/secrets.nix
index 7361123..192bacf 100644
--- a/profiles/core/secrets.nix
+++ b/profiles/core/secrets.nix
@@ -35,13 +35,5 @@ in
];
};
- hm = {
- programs.password-store = {
- enable = true;
- settings = {
- PASSWORD_STORE_DIR = config.synced.password-store.path;
- };
- };
- };
};
}
diff --git a/profiles/core/syncthing.nix b/profiles/core/syncthing.nix
index f8d6ee2..796a3d7 100644
--- a/profiles/core/syncthing.nix
+++ b/profiles/core/syncthing.nix
@@ -1,5 +1,5 @@
-{machine, config, lib,...}: with lib; let
- group = if machine.isDarwin then (builtins.toString config.ivi.gid) else config.ivi.group;
+{machines, machine, config, lib,...}: with lib; let
+ group = if machine.isDarwin then (builtins.toString config.my.gid) else config.my.group;
in {
imports = [
(mkAliasOptionModule [ "synced" ] [ "services" "syncthing" "settings" "folders" ])
@@ -7,16 +7,16 @@ in {
services.syncthing = {
enable = machine.syncthing.enable;
- user = ivi.username;
+ user = my.username;
inherit group;
- dataDir = config.ivi.home;
+ dataDir = config.my.home;
overrideDevices = true;
overrideFolders = true;
key = config.secrets.syncthing.path;
settings = let
- allDevices = (filterAttrs (_: m: m.syncthing.id != "") ivi.machines);
+ allDevices = (filterAttrs (_: m: m.syncthing.id != "") machines);
in {
gui = {
theme = "default";
@@ -43,17 +43,17 @@ in {
allNames = attrNames allDevices;
in {
my = {
- path = "${config.ivi.home}/sync/my";
+ path = "${config.my.home}/sync/my";
devices = allNames;
versioning = simple;
};
pictures = {
- path = "${config.ivi.home}/sync/pictures";
+ path = "${config.my.home}/sync/pictures";
devices = allNames;
versioning = trashcan;
};
password-store = {
- path = "${config.ivi.home}/sync/password-store";
+ path = "${config.my.home}/sync/password-store";
devices = allNames;
versioning = trashcan;
};