From 69dd25c57961a4febd942e07756927b0865717f4 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 30 Dec 2024 18:06:16 -0500 Subject: [PATCH] titan doesn't need a home --- flake.nix | 8 -------- home/yt/titan.nix | 32 -------------------------------- hosts/chunk/default.nix | 4 ++-- hosts/common.nix | 10 ++-------- hosts/titan/default.nix | 20 +++----------------- hosts/yt.nix | 11 +++++++++++ hosts/ytnix/default.nix | 14 ++++++-------- 7 files changed, 24 insertions(+), 75 deletions(-) delete mode 100644 home/yt/titan.nix create mode 100644 hosts/yt.nix diff --git a/flake.nix b/flake.nix index 3fd2f13..e317f4c 100644 --- a/flake.nix +++ b/flake.nix @@ -145,14 +145,6 @@ ./home/yt/chunk.nix ]; }; - - "yt@titan" = home-manager.lib.homeManagerConfiguration { - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs; }; - modules = [ - ./home/yt/titan.nix - ]; - }; }; }; } diff --git a/home/yt/titan.nix b/home/yt/titan.nix deleted file mode 100644 index 5da924e..0000000 --- a/home/yt/titan.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - pkgs, - ... -}: -{ - imports = [ - ./common.nix - ]; - home = { - username = "yt"; - homeDirectory = "/home/yt"; - stateVersion = "24.05"; - }; - programs.home-manager.enable = true; - - systemd.user.startServices = "sd-switch"; - - home.packages = with pkgs; [ - lua-language-server - vim-language-server - python312Packages.python-lsp-server - nixd - gopls - bash-language-server - llvmPackages_19.clang-tools - rust-analyzer - yt-dlp - gnumake - btop - foot.terminfo - ]; -} diff --git a/hosts/chunk/default.nix b/hosts/chunk/default.nix index de77934..f1449c2 100644 --- a/hosts/chunk/default.nix +++ b/hosts/chunk/default.nix @@ -7,8 +7,9 @@ }: { imports = [ - ./hardware-configuration.nix ../common.nix + ../yt.nix + ./hardware-configuration.nix ./gitlab.nix ./borg.nix ./rclone.nix @@ -150,7 +151,6 @@ }; users.users.yt = { - isNormalUser = true; extraGroups = [ "wheel" "networkmanager" diff --git a/hosts/common.nix b/hosts/common.nix index c31c747..24c4556 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ ... }: { nix = { settings = { @@ -24,13 +24,7 @@ # this is true by default and mutually exclusive with # programs.nix-index programs.command-not-found.enable = false; - programs.nix-index.enable = false; - - users.users.yt.shell = pkgs.zsh; - programs.zsh.enable = true; - - # needed for zsh.enableCompletion to work - environment.pathsToLink = [ "/share/zsh" ]; + programs.nix-index.enable = false; # set above to false to use this # see journald.conf(5) services.journald.extraConfig = "MaxRetentionSec=2d"; diff --git a/hosts/titan/default.nix b/hosts/titan/default.nix index 52d5629..6e23afe 100644 --- a/hosts/titan/default.nix +++ b/hosts/titan/default.nix @@ -44,25 +44,11 @@ system.stateVersion = "24.05"; - environment.systemPackages = map lib.lowPrio [ - pkgs.curl - pkgs.gitMinimal + environment.systemPackages = with pkgs; [ + curl + git ]; - users.users.yt = { - isNormalUser = true; - extraGroups = [ - "wheel" - "networkmanager" - ]; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdhAQYy0+vS+QmyCd0MAbqbgzyMGcsuuFyf6kg2yKge yt@ytlinux" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINyn2+OoRN4nExti+vFQ1NHEZip0slAoCH9C5/FzvgZD yt@ytnix" - ]; - }; - security.sudo.enable = true; - security.sudo.wheelNeedsPassword = false; - # network stuff networking.hostName = "titan"; networking.networkmanager.enable = true; diff --git a/hosts/yt.nix b/hosts/yt.nix new file mode 100644 index 0000000..af6a1eb --- /dev/null +++ b/hosts/yt.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: +{ + users.users.yt = { + isNormalUser = true; + shell = pkgs.zsh; + }; + programs.zsh.enable = true; + + # needed for zsh.enableCompletion to work + environment.pathsToLink = [ "/share/zsh" ]; +} diff --git a/hosts/ytnix/default.nix b/hosts/ytnix/default.nix index 6dc3ac3..81dcc27 100644 --- a/hosts/ytnix/default.nix +++ b/hosts/ytnix/default.nix @@ -8,6 +8,7 @@ imports = [ ./hardware-configuration.nix ../common.nix + ../yt.nix { disabledModules = [ "services/backup/borgbackup.nix" @@ -121,14 +122,11 @@ services.libinput.enable = true; - users.users.yt = { - isNormalUser = true; - extraGroups = [ - "wheel" - "libvirtd" - "docker" - ]; - }; + users.users.yt.extraGroups = [ + "wheel" + "libvirtd" + "docker" + ]; environment.systemPackages = with pkgs; [ tmux