moved ester and eve over to home manager

This commit is contained in:
Leyla Becker 2024-10-04 01:01:41 +02:00
parent dec1ef1d96
commit 04871258ee
15 changed files with 233 additions and 119 deletions

View file

@ -9,7 +9,7 @@ in {
config = {
nixpkgs.config.allowUnfree = true;
sops.secrets = lib.mkIf (cfg.isFullUser || cfg.isThinUser) {
sops.secrets = lib.mkIf (cfg.isDesktopUser || cfg.isTerminalUser) {
"passwords/leyla" = {
neededForUsers = true;
sopsFile = "${inputs.secrets}/user-passwords.yaml";
@ -17,15 +17,13 @@ in {
};
users.users.leyla = (
if (cfg.isFullUser || cfg.isThinUser)
if (cfg.isDesktopUser || cfg.isTerminalUser)
then {
isNormalUser = true;
extraGroups = lib.mkMerge [
extraGroups = (
["networkmanager" "wheel"]
(
lib.mkUnless cfg.isThinUser ["adbusers"]
)
];
++ lib.lists.optional (!cfg.isTerminalUser) "adbusers"
);
hashedPasswordFile = config.sops.secrets."passwords/leyla".path;
@ -43,8 +41,8 @@ in {
services = {
ollama = {
enable = true;
acceleration = lib.mkIf cfg.hasGPU "cuda";
enable = cfg.hasGPU;
acceleration = "cuda";
};
# TODO: this should reference the home directory from the user config
@ -59,16 +57,16 @@ in {
};
programs = {
steam = lib.mkIf cfg.isFullUser {
steam = lib.mkIf cfg.isDesktopUser {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated ServerServer
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
noisetorch.enable = cfg.isFullUser;
noisetorch.enable = cfg.isDesktopUser;
adb.enable = cfg.isFullUser;
adb.enable = cfg.isDesktopUser;
};
};
}

View file

@ -9,8 +9,8 @@
];
options = {
isFullUser = lib.mkEnableOption "create usable leyla user";
isThinUser = lib.mkEnableOption "create usable user but witohut user applications";
isDesktopUser = lib.mkEnableOption "install applications intended for desktop use";
isTerminalUser = lib.mkEnableOption "install applications intended for terminal use";
hasGPU = lib.mkEnableOption "installs gpu intensive programs";
};
@ -30,27 +30,6 @@
# release notes.
stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
file = {
@ -101,10 +80,10 @@
# add direnv to auto load flakes for development
direnv = {
enable = true;
enableBashIntegration = true; # see note on other shells below
enableBashIntegration = true;
nix-direnv.enable = true;
};
bash.enable = true; # see note on other shells below
bash.enable = true;
# firefox = {
# enable = true;

View file

@ -11,7 +11,7 @@
];
home = {
packages = lib.mkIf (config.isFullUser || config.isThinUser) (
packages = lib.mkIf (config.isDesktopUser || config.isTerminalUser) (
lib.mkMerge [
(
with pkgs; [
@ -22,7 +22,7 @@
]
)
(
lib.mkIf (!config.isThinUser) (
lib.mkIf (!config.isTerminalUser) (
with pkgs; [
#foss platforms
signal-desktop

View file

@ -12,7 +12,7 @@
};
programs = {
bash.shellAliases = lib.mkIf config.isFullUser {
bash.shellAliases = lib.mkIf config.isDesktopUser {
code = "codium";
};
@ -36,42 +36,45 @@
];
};
extensions = with extensions.open-vsx;
[
# vs code feel extensions
ms-vscode.atom-keybindings
akamud.vscode-theme-onedark
streetsidesoftware.code-spell-checker
streetsidesoftware.code-spell-checker-german
streetsidesoftware.code-spell-checker-italian
jeanp413.open-remote-ssh
extensions = (
with extensions.open-vsx;
[
# vs code feel extensions
ms-vscode.atom-keybindings
akamud.vscode-theme-onedark
streetsidesoftware.code-spell-checker
streetsidesoftware.code-spell-checker-german
streetsidesoftware.code-spell-checker-italian
jeanp413.open-remote-ssh
# nix extensions
pinage404.nix-extension-pack
jnoortheen.nix-ide
# nix extensions
pinage404.nix-extension-pack
jnoortheen.nix-ide
# html extensions
formulahendry.auto-rename-tag
ms-vscode.live-server
# html extensions
formulahendry.auto-rename-tag
ms-vscode.live-server
# js extensions
dsznajder.es7-react-js-snippets
dbaeumer.vscode-eslint
standard.vscode-standard
firsttris.vscode-jest-runner
stylelint.vscode-stylelint
tauri-apps.tauri-vscode
# js extensions
dsznajder.es7-react-js-snippets
dbaeumer.vscode-eslint
standard.vscode-standard
firsttris.vscode-jest-runner
stylelint.vscode-stylelint
tauri-apps.tauri-vscode
# misc extensions
bungcip.better-toml
# misc extensions
bungcip.better-toml
# the number at the start of the name here doesnt resolve nicely so we have to refernce it as a part of open-vsx directly instead of though with
open-vsx."10nates".ollama-autocoder
]
++ (with extensions.vscode-marketplace; [
# js extensions
karyfoundation.nearley
]);
open-vsx."10nates".ollama-autocoder
]
++ (
with extensions.vscode-marketplace; [
# js extensions
karyfoundation.nearley
]
)
);
};
};
}