From efb8a6efe5458c7b347dae3b7426473e659d6627 Mon Sep 17 00:00:00 2001 From: Lily Anderson Date: Fri, 13 Feb 2026 13:35:01 -0600 Subject: [PATCH] spun out user config and home config. --- flake.lock | 21 ++++++++++++++++++ flake.nix | 21 +++++++++++------- modules/hosts/desktop/configuration.nix | 24 ++++++-------------- modules/hosts/desktop/desktop.nix | 1 + modules/users/lily/home.nix | 29 +++++++++++++++++++++++++ modules/users/lily/lily.nix | 11 ++++++++++ 6 files changed, 82 insertions(+), 25 deletions(-) create mode 100644 modules/users/lily/home.nix create mode 100644 modules/users/lily/lily.nix diff --git a/flake.lock b/flake.lock index 42d7547..3c54115 100644 --- a/flake.lock +++ b/flake.lock @@ -18,6 +18,26 @@ "type": "github" } }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1771010766, + "narHash": "sha256-lRS6BWZZ3+Du+67VS0G+9dNRfk/ok9TqDEiNCGnbE74=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "54ab8bc155888f3894327bfb67b821e21723a5c4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "import-tree": { "locked": { "lastModified": 1763762820, @@ -83,6 +103,7 @@ "root": { "inputs": { "flake-parts": "flake-parts", + "home-manager": "home-manager", "import-tree": "import-tree", "nixpkgs": "nixpkgs", "wrappers": "wrappers" diff --git a/flake.nix b/flake.nix index 93a708d..0e135fe 100644 --- a/flake.nix +++ b/flake.nix @@ -1,12 +1,17 @@ { - description = "A very basic flake"; + description = "Lily's NixOS, LiNix"; - inputs = { - nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; - wrappers.url = "github:Lassulus/wrappers"; - flake-parts.url = "github:hercules-ci/flake-parts"; - import-tree.url = "github:vic/import-tree"; - }; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + wrappers.url = "github:Lassulus/wrappers"; + flake-parts.url = "github:hercules-ci/flake-parts"; + import-tree.url = "github:vic/import-tree"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; - outputs = inputs: inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules); + }; + + outputs = inputs: inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules); } diff --git a/modules/hosts/desktop/configuration.nix b/modules/hosts/desktop/configuration.nix index f80cba1..ca5aef7 100644 --- a/modules/hosts/desktop/configuration.nix +++ b/modules/hosts/desktop/configuration.nix @@ -5,8 +5,6 @@ { inputs, lib, pkgs, self, ... }: { flake.nixosModules.lily-desktop = { pkgs, ... }: { - imports = [ ]; - # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -62,25 +60,17 @@ flake.nixosModules.lily-desktop = { pkgs, ... }: { # Enable touchpad support (enabled default in most desktopManager). # services.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.lily = { - isNormalUser = true; - extraGroups = [ "wheel" "lily" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - tree -git - vim - ]; - }; -users.groups.lily = { }; programs.firefox.enable = true; # List packages installed in system profile. # You can use https://search.nixos.org/ to find more packages (and options). - # environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget - # ]; + environment.systemPackages = with pkgs; [ + tree + git + vim + wget + home-manager + ]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. diff --git a/modules/hosts/desktop/desktop.nix b/modules/hosts/desktop/desktop.nix index bf295e1..4b170b2 100644 --- a/modules/hosts/desktop/desktop.nix +++ b/modules/hosts/desktop/desktop.nix @@ -3,6 +3,7 @@ flake.nixosConfigurations.lily-desktop = inputs.nixpkgs.lib.nixosSystem { modules = [ self.nixosModules.lily-desktop + self.nixosModules.lily ]; }; } diff --git a/modules/users/lily/home.nix b/modules/users/lily/home.nix new file mode 100644 index 0000000..a19f852 --- /dev/null +++ b/modules/users/lily/home.nix @@ -0,0 +1,29 @@ +{inputs, self, ...}:{ + flake.homeConfigurations."lily" = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; + modules = [ self.homeModules.lily ]; + extraSpecialArgs = { inherit inputs; }; + }; + flake.homeModules.lily = { pkgs, ... }:{ + home = { + username = "lily"; + homeDirectory = "/home/lily"; + stateVersion = "25.05"; + packages = [ ]; + file = { }; + sessionVariables = { }; + }; + programs = { + home-manager.enable = true; + bash.enable = true; + git = { + enable = true; + settings.user = { + name = "Lily Anderson"; + email = "lilylanderson@zoho.com"; + }; + lfs.enable = true; + }; + }; + }; +} diff --git a/modules/users/lily/lily.nix b/modules/users/lily/lily.nix new file mode 100644 index 0000000..c43fcd3 --- /dev/null +++ b/modules/users/lily/lily.nix @@ -0,0 +1,11 @@ +{ + flake.nixosModules.lily = { pkgs, ... }: { + users.users.lily = { + isNormalUser = true; + description = "Lily Luna Anderson"; + extraGroups = [ "wheel" "lily" ]; + packages = with pkgs; [ ]; + }; + users.groups.lily = { }; + }; +}