forked from jan-leila/nix-config
feat: removed ivy user
This commit is contained in:
parent
8cd453844a
commit
fa0f7b0765
8 changed files with 9 additions and 170 deletions
|
|
@ -8,6 +8,5 @@
|
||||||
in {
|
in {
|
||||||
leyla = lib.mkIf users.leyla.isNormalUser (import ./leyla);
|
leyla = lib.mkIf users.leyla.isNormalUser (import ./leyla);
|
||||||
eve = lib.mkIf users.eve.isNormalUser (import ./eve);
|
eve = lib.mkIf users.eve.isNormalUser (import ./eve);
|
||||||
ivy = lib.mkIf users.ivy.isNormalUser (import ./ivy);
|
|
||||||
git = lib.mkIf (osConfig.services.forgejo.enable or false) (import ./git);
|
git = lib.mkIf (osConfig.services.forgejo.enable or false) (import ./git);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
{osConfig, ...}: let
|
|
||||||
userConfig = osConfig.host.users.ivy;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
./packages.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home = {
|
|
||||||
username = userConfig.name;
|
|
||||||
homeDirectory = osConfig.users.users.ivy.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 should not change this value, even if you update Home Manager. If you do
|
|
||||||
# want to update the value, then make sure to first check the Home Manager
|
|
||||||
# release notes.
|
|
||||||
stateVersion = "23.11"; # Please read the comment before changing.
|
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
|
||||||
# plain files is through 'home.file'.
|
|
||||||
file = {
|
|
||||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
|
||||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
|
||||||
# # symlink to the Nix store copy.
|
|
||||||
# ".screenrc".source = dotfiles/screenrc;
|
|
||||||
|
|
||||||
# # You can also set the file content immediately.
|
|
||||||
# ".gradle/gradle.properties".text = ''
|
|
||||||
# org.gradle.console=verbose
|
|
||||||
# org.gradle.daemon.idletimeout=3600000
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Home Manager can also manage your environment variables through
|
|
||||||
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
|
||||||
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
|
||||||
# either
|
|
||||||
#
|
|
||||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
|
||||||
# or
|
|
||||||
#
|
|
||||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
|
||||||
# or
|
|
||||||
#
|
|
||||||
# /etc/profiles/per-user/ivy/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
|
||||||
sessionVariables = {
|
|
||||||
# EDITOR = "emacs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = {
|
|
||||||
nixpkgs.config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Programs that need to be installed with some extra configuration
|
|
||||||
programs = lib.mkMerge [
|
|
||||||
{
|
|
||||||
# Let Home Manager install and manage itself.
|
|
||||||
home-manager.enable = true;
|
|
||||||
}
|
|
||||||
(lib.mkIf (config.user.isDesktopUser || config.user.isTerminalUser) {
|
|
||||||
# git = {
|
|
||||||
# enable = true;
|
|
||||||
# userName = "Ivy";
|
|
||||||
# userEmail = "ivy@example.com"; # Update this with actual email
|
|
||||||
# extraConfig.init.defaultBranch = "main";
|
|
||||||
# };
|
|
||||||
|
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
hostKeys = [
|
|
||||||
{
|
|
||||||
type = "ed25519";
|
|
||||||
path = "${config.home.username}_${osConfig.networking.hostName}_ed25519";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(lib.mkIf config.user.isDesktopUser {
|
|
||||||
vscode = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.vscodium;
|
|
||||||
mutableExtensionsDir = false;
|
|
||||||
|
|
||||||
profiles.default = {
|
|
||||||
enableUpdateCheck = false;
|
|
||||||
enableExtensionUpdateCheck = false;
|
|
||||||
|
|
||||||
extraExtensions = {
|
|
||||||
# Cline extension (Claude AI assistant)
|
|
||||||
claudeDev.enable = true;
|
|
||||||
# Auto Rename Tag
|
|
||||||
autoRenameTag.enable = true;
|
|
||||||
# Live Server
|
|
||||||
liveServer.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
extensions = let
|
|
||||||
extension-pkgs = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
in (
|
|
||||||
with extension-pkgs.open-vsx; [
|
|
||||||
streetsidesoftware.code-spell-checker
|
|
||||||
]
|
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
firefox.enable = true;
|
|
||||||
discord.enable = true;
|
|
||||||
signal-desktop-bin.enable = true;
|
|
||||||
claude-code.enable = true;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -32,7 +32,6 @@
|
||||||
isPrincipleUser = true;
|
isPrincipleUser = true;
|
||||||
};
|
};
|
||||||
eve.isDesktopUser = true;
|
eve.isDesktopUser = true;
|
||||||
ivy.isDesktopUser = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
|
|
|
||||||
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -409,11 +409,11 @@
|
||||||
"secrets": {
|
"secrets": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759945215,
|
"lastModified": 1765740994,
|
||||||
"narHash": "sha256-xmUzOuhJl6FtTjR5++OQvSoAnXe7/VA5QFCZDyFwBXo=",
|
"narHash": "sha256-aBs7m69yuiixzGzhUlWAAN+zBziBNII+BFEC/5mPcSI=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "444229a105445339fb028d15a8d866063c5f8141",
|
"rev": "6e90a73ed2e1e81ba37628fc5e5494a80d22b526",
|
||||||
"revCount": 21,
|
"revCount": 22,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@git.jan-leila.com/jan-leila/nix-config-secrets.git"
|
"url": "ssh://git@git.jan-leila.com/jan-leila/nix-config-secrets.git"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@
|
||||||
uids = {
|
uids = {
|
||||||
leyla = 1000;
|
leyla = 1000;
|
||||||
eve = 1002;
|
eve = 1002;
|
||||||
ivy = 1004;
|
# ester = 1003;
|
||||||
|
# ivy = 1004;
|
||||||
jellyfin = 2000;
|
jellyfin = 2000;
|
||||||
forgejo = 2002;
|
forgejo = 2002;
|
||||||
hass = 2004;
|
hass = 2004;
|
||||||
|
|
@ -36,7 +37,8 @@
|
||||||
gids = {
|
gids = {
|
||||||
leyla = 1000;
|
leyla = 1000;
|
||||||
eve = 1002;
|
eve = 1002;
|
||||||
ivy = 1004;
|
# ester = 1003
|
||||||
|
# ivy = 1004;
|
||||||
users = 100;
|
users = 100;
|
||||||
jellyfin_media = 2001;
|
jellyfin_media = 2001;
|
||||||
jellyfin = 2000;
|
jellyfin = 2000;
|
||||||
|
|
@ -59,7 +61,6 @@
|
||||||
users = config.users.users;
|
users = config.users.users;
|
||||||
leyla = users.leyla.name;
|
leyla = users.leyla.name;
|
||||||
eve = users.eve.name;
|
eve = users.eve.name;
|
||||||
ivy = users.ivy.name;
|
|
||||||
in {
|
in {
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
|
|
@ -97,10 +98,6 @@ in {
|
||||||
neededForUsers = true;
|
neededForUsers = true;
|
||||||
sopsFile = "${inputs.secrets}/user-passwords.yaml";
|
sopsFile = "${inputs.secrets}/user-passwords.yaml";
|
||||||
};
|
};
|
||||||
"passwords/ivy" = {
|
|
||||||
neededForUsers = true;
|
|
||||||
sopsFile = "${inputs.secrets}/user-passwords.yaml";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -134,19 +131,6 @@ in {
|
||||||
group = config.users.users.eve.name;
|
group = config.users.users.eve.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
ivy = {
|
|
||||||
uid = lib.mkForce uids.ivy;
|
|
||||||
name = lib.mkForce host.users.ivy.name;
|
|
||||||
description = "Ivy";
|
|
||||||
extraGroups =
|
|
||||||
lib.optionals host.users.ivy.isNormalUser ["networkmanager"]
|
|
||||||
++ (lib.lists.optionals host.users.ivy.isPrincipleUser ["wheel"]);
|
|
||||||
hashedPasswordFile = config.sops.secrets."passwords/ivy".path;
|
|
||||||
isNormalUser = host.users.ivy.isNormalUser;
|
|
||||||
isSystemUser = !host.users.ivy.isNormalUser;
|
|
||||||
group = config.users.users.ivy.name;
|
|
||||||
};
|
|
||||||
|
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
uid = lib.mkForce uids.jellyfin;
|
uid = lib.mkForce uids.jellyfin;
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
|
|
@ -254,19 +238,11 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
ivy = {
|
|
||||||
gid = lib.mkForce gids.ivy;
|
|
||||||
members = [
|
|
||||||
ivy
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
gid = lib.mkForce gids.users;
|
gid = lib.mkForce gids.users;
|
||||||
members = [
|
members = [
|
||||||
leyla
|
leyla
|
||||||
eve
|
eve
|
||||||
ivy
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -280,7 +256,6 @@ in {
|
||||||
users.lidarr.name
|
users.lidarr.name
|
||||||
leyla
|
leyla
|
||||||
eve
|
eve
|
||||||
ivy
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -314,7 +289,6 @@ in {
|
||||||
users.syncthing.name
|
users.syncthing.name
|
||||||
leyla
|
leyla
|
||||||
eve
|
eve
|
||||||
ivy
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,11 +89,6 @@ in {
|
||||||
isDesktopUser = lib.mkDefault false;
|
isDesktopUser = lib.mkDefault false;
|
||||||
isTerminalUser = lib.mkDefault false;
|
isTerminalUser = lib.mkDefault false;
|
||||||
};
|
};
|
||||||
ivy = {
|
|
||||||
isPrincipleUser = lib.mkDefault false;
|
|
||||||
isDesktopUser = lib.mkDefault false;
|
|
||||||
isTerminalUser = lib.mkDefault false;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
assertions =
|
assertions =
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 444229a105445339fb028d15a8d866063c5f8141
|
Subproject commit 6e90a73ed2e1e81ba37628fc5e5494a80d22b526
|
||||||
Loading…
Add table
Add a link
Reference in a new issue