storage-refactor #9
10 changed files with 43 additions and 210 deletions
|
|
@ -8,6 +8,5 @@
|
|||
in {
|
||||
leyla = lib.mkIf users.leyla.isNormalUser (import ./leyla);
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -254,8 +254,6 @@
|
|||
enable = true;
|
||||
exposePort = true;
|
||||
|
||||
acceleration = false;
|
||||
|
||||
environmentVariables = {
|
||||
OLLAMA_KEEP_ALIVE = "24h";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
isPrincipleUser = true;
|
||||
};
|
||||
eve.isDesktopUser = true;
|
||||
ivy.isDesktopUser = true;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
|
|
|
|||
76
flake.lock
generated
76
flake.lock
generated
|
|
@ -25,11 +25,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764350888,
|
||||
"narHash": "sha256-6Rp18zavTlnlZzcoLoBTJMBahL2FycVkw2rAEs3cQvo=",
|
||||
"lastModified": 1765326679,
|
||||
"narHash": "sha256-fTLX9kDwLr9Y0rH/nG+h1XG5UU+jBcy0PFYn5eneRX8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "2055a08fd0e2fd41318279a5355eb8a161accf26",
|
||||
"rev": "d64e5cdca35b5fad7c504f615357a7afe6d9c49e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -46,11 +46,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"lastModified": 1764332086,
|
||||
"narHash": "sha256-sQTS3T4nNU/he+X62q5aflqSLx2zs4A8/cx3QsLc0Vw=",
|
||||
"lastModified": 1765253041,
|
||||
"narHash": "sha256-D4/vwhvX26KW3gux9CCiJ87zc5UOiLTFlfG3+5h0VRI=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "fdc5a0a8a7cf1eb4d134ee42f62c56f293781a0e",
|
||||
"rev": "687d6eb2a8503afdeaaf9e230fb72f880daa7252",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -62,11 +62,11 @@
|
|||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1761588595,
|
||||
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
|
||||
"lastModified": 1765121682,
|
||||
"narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
|
||||
"rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -133,11 +133,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764361670,
|
||||
"narHash": "sha256-jgWzgpIaHbL3USIq0gihZeuy1lLf2YSfwvWEwnfAJUw=",
|
||||
"lastModified": 1765217760,
|
||||
"narHash": "sha256-BVVyAodLcAD8KOtR3yCStBHSE0WAH/xQWH9f0qsxbmk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "780be8ef503a28939cf9dc7996b48ffb1a3e04c6",
|
||||
"rev": "e5b1f87841810fc24772bf4389f9793702000c9b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -194,11 +194,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763435414,
|
||||
"narHash": "sha256-i2467FddWfd19q5Qoj+1/BAeg6LZmM5m4mYGRSQn/as=",
|
||||
"lastModified": 1764519849,
|
||||
"narHash": "sha256-XnNABKfIYKSimQVvKc9FnlC2H0LurOhd9MS6l0Z67lE=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "192c92b603731fbc1bade6c1b18c8d8a0086f703",
|
||||
"revCount": 169,
|
||||
"rev": "6c95c0b6f73f831226453fc6905c216ab634c30f",
|
||||
"revCount": 170,
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module.git"
|
||||
},
|
||||
|
|
@ -236,11 +236,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764161084,
|
||||
"narHash": "sha256-HN84sByg9FhJnojkGGDSrcjcbeioFWoNXfuyYfJ1kBE=",
|
||||
"lastModified": 1765065051,
|
||||
"narHash": "sha256-b7W9WsvyMOkUScNxbzS45KEJp0iiqRPyJ1I3JBE+oEE=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "e95de00a471d07435e0527ff4db092c84998698e",
|
||||
"rev": "7e22bf538aa3e0937effcb1cee73d5f1bcc26f79",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -277,11 +277,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764294946,
|
||||
"narHash": "sha256-8BObMeUmCAZW1BTMUQGRGiz9tpNkVt/6/+blpS9Xxgk=",
|
||||
"lastModified": 1765245651,
|
||||
"narHash": "sha256-/+ahII8MXi59KnRmzz+OgPXScr2Oyygin/XJWP7GvdU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-vscode-extensions",
|
||||
"rev": "134c052c3213dc69ed881e41383b8ed29c5ffe72",
|
||||
"rev": "32a0d010099f0b982498b11cc04d5335b0fc1556",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -292,11 +292,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1764328224,
|
||||
"narHash": "sha256-hFyF1XQd+XrRx7WZCrGJp544dykexD8Q5SrJJZpEQYg=",
|
||||
"lastModified": 1764440730,
|
||||
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "d62603a997438e19182af69d3ce7be07565ecad4",
|
||||
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -324,11 +324,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1764242076,
|
||||
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
|
||||
"lastModified": 1765186076,
|
||||
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
|
||||
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -361,11 +361,11 @@
|
|||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764349553,
|
||||
"narHash": "sha256-ZOWEZK/pZLri/jEK1J8TEbjtwpIjXwCTH9F4gbor9qQ=",
|
||||
"lastModified": 1765312847,
|
||||
"narHash": "sha256-8yHfYUiFYQQrtmHl/5jBcrDLgOM8s5vPkAAVu2fiAk0=",
|
||||
"owner": "IntQuant",
|
||||
"repo": "noita_entangled_worlds",
|
||||
"rev": "01aac406df2c6d0a10faa19083d608bdf90cf3a9",
|
||||
"rev": "2957cdaa49117a613c46739e3c65bf28f0662b20",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -418,11 +418,11 @@
|
|||
"secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1759945215,
|
||||
"narHash": "sha256-xmUzOuhJl6FtTjR5++OQvSoAnXe7/VA5QFCZDyFwBXo=",
|
||||
"lastModified": 1765740994,
|
||||
"narHash": "sha256-aBs7m69yuiixzGzhUlWAAN+zBziBNII+BFEC/5mPcSI=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "444229a105445339fb028d15a8d866063c5f8141",
|
||||
"revCount": 21,
|
||||
"rev": "6e90a73ed2e1e81ba37628fc5e5494a80d22b526",
|
||||
"revCount": 22,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.jan-leila.com/jan-leila/nix-config-secrets.git"
|
||||
},
|
||||
|
|
@ -438,11 +438,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764021963,
|
||||
"narHash": "sha256-1m84V2ROwNEbqeS9t37/mkry23GBhfMt8qb6aHHmjuc=",
|
||||
"lastModified": 1765231718,
|
||||
"narHash": "sha256-qdBzo6puTgG4G2RHG0PkADg22ZnQo1JmSVFRxrD4QM4=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "c482a1c1bbe030be6688ed7dc84f7213f304f1ec",
|
||||
"rev": "7fd1416aba1865eddcdec5bb11339b7222c2363e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
config,
|
||||
...
|
||||
}: {
|
||||
options.programs.calibre = {
|
||||
enable = lib.mkEnableOption "enable calibre";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.programs.calibre.enable (lib.mkMerge [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
uids = {
|
||||
leyla = 1000;
|
||||
eve = 1002;
|
||||
ivy = 1004;
|
||||
# ester = 1003;
|
||||
# ivy = 1004;
|
||||
jellyfin = 2000;
|
||||
forgejo = 2002;
|
||||
hass = 2004;
|
||||
|
|
@ -36,7 +37,8 @@
|
|||
gids = {
|
||||
leyla = 1000;
|
||||
eve = 1002;
|
||||
ivy = 1004;
|
||||
# ester = 1003
|
||||
# ivy = 1004;
|
||||
users = 100;
|
||||
jellyfin_media = 2001;
|
||||
jellyfin = 2000;
|
||||
|
|
@ -59,7 +61,6 @@
|
|||
users = config.users.users;
|
||||
leyla = users.leyla.name;
|
||||
eve = users.eve.name;
|
||||
ivy = users.ivy.name;
|
||||
in {
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
|
|
@ -97,10 +98,6 @@ in {
|
|||
neededForUsers = true;
|
||||
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;
|
||||
};
|
||||
|
||||
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 = {
|
||||
uid = lib.mkForce uids.jellyfin;
|
||||
isSystemUser = true;
|
||||
|
|
@ -254,19 +238,11 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
ivy = {
|
||||
gid = lib.mkForce gids.ivy;
|
||||
members = [
|
||||
ivy
|
||||
];
|
||||
};
|
||||
|
||||
users = {
|
||||
gid = lib.mkForce gids.users;
|
||||
members = [
|
||||
leyla
|
||||
eve
|
||||
ivy
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -280,7 +256,6 @@ in {
|
|||
users.lidarr.name
|
||||
leyla
|
||||
eve
|
||||
ivy
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -314,7 +289,6 @@ in {
|
|||
users.syncthing.name
|
||||
leyla
|
||||
eve
|
||||
ivy
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -89,11 +89,6 @@ in {
|
|||
isDesktopUser = lib.mkDefault false;
|
||||
isTerminalUser = lib.mkDefault false;
|
||||
};
|
||||
ivy = {
|
||||
isPrincipleUser = lib.mkDefault false;
|
||||
isDesktopUser = lib.mkDefault false;
|
||||
isTerminalUser = lib.mkDefault false;
|
||||
};
|
||||
};
|
||||
|
||||
assertions =
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 444229a105445339fb028d15a8d866063c5f8141
|
||||
Subproject commit 6e90a73ed2e1e81ba37628fc5e5494a80d22b526
|
||||
Loading…
Add table
Add a link
Reference in a new issue