spun out user config and home config.
This commit is contained in:
21
flake.lock
generated
21
flake.lock
generated
@@ -18,6 +18,26 @@
|
|||||||
"type": "github"
|
"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": {
|
"import-tree": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763762820,
|
"lastModified": 1763762820,
|
||||||
@@ -83,6 +103,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
|
"home-manager": "home-manager",
|
||||||
"import-tree": "import-tree",
|
"import-tree": "import-tree",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"wrappers": "wrappers"
|
"wrappers": "wrappers"
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
{
|
{
|
||||||
description = "A very basic flake";
|
description = "Lily's NixOS, LiNix";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
wrappers.url = "github:Lassulus/wrappers";
|
wrappers.url = "github:Lassulus/wrappers";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
import-tree.url = "github:vic/import-tree";
|
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);
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
{ inputs, lib, pkgs, self, ... }:
|
{ inputs, lib, pkgs, self, ... }:
|
||||||
{
|
{
|
||||||
flake.nixosModules.lily-desktop = { pkgs, ... }: {
|
flake.nixosModules.lily-desktop = { pkgs, ... }: {
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
@@ -62,25 +60,17 @@ flake.nixosModules.lily-desktop = { pkgs, ... }: {
|
|||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
# services.libinput.enable = true;
|
# 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;
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
# List packages installed in system profile.
|
# List packages installed in system profile.
|
||||||
# You can use https://search.nixos.org/ to find more packages (and options).
|
# You can use https://search.nixos.org/ to find more packages (and options).
|
||||||
# environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
tree
|
||||||
# wget
|
git
|
||||||
# ];
|
vim
|
||||||
|
wget
|
||||||
|
home-manager
|
||||||
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
flake.nixosConfigurations.lily-desktop = inputs.nixpkgs.lib.nixosSystem {
|
flake.nixosConfigurations.lily-desktop = inputs.nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
self.nixosModules.lily-desktop
|
self.nixosModules.lily-desktop
|
||||||
|
self.nixosModules.lily
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
29
modules/users/lily/home.nix
Normal file
29
modules/users/lily/home.nix
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/users/lily/lily.nix
Normal file
11
modules/users/lily/lily.nix
Normal file
@@ -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 = { };
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user