Recreated flake files
This commit is contained in:
@@ -1,4 +1,12 @@
|
|||||||
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
user,
|
||||||
|
inputs,
|
||||||
|
flakeRoot,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -22,7 +30,10 @@
|
|||||||
# User configuration
|
# User configuration
|
||||||
users.users.${user.username} = {
|
users.users.${user.username} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
hashedPassword = user.hashedPassword;
|
hashedPassword = user.hashedPassword;
|
||||||
home = user.homeDirectory;
|
home = user.homeDirectory;
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-180
@@ -49,35 +49,13 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
# Import machine-specific configurations
|
# Import machine-specific configurations
|
||||||
./assets/flake/machines/${machine}/top.nix
|
./machine.nix
|
||||||
|
|
||||||
# Home Manager module
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit user inputs;
|
|
||||||
flakeRoot = ./.;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
# Catppuccin theme module
|
# Catppuccin theme module
|
||||||
inputs.catppuccin.nixosModules.catppuccin
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
|
|
||||||
# Anchoring all the other nixes
|
# Anchoring all the other nixes
|
||||||
./generated/top.nix
|
./generated/top.nix
|
||||||
|
|
||||||
# Enable Home Manager for the user
|
|
||||||
(
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
home-manager.users.${user.username} = {
|
|
||||||
enable = true;
|
|
||||||
homeDirectory = "/home/${user.username}";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit user inputs;
|
inherit user inputs;
|
||||||
@@ -96,163 +74,7 @@
|
|||||||
in
|
in
|
||||||
home-manager.lib.homeManagerConfiguration {
|
home-manager.lib.homeManagerConfiguration {
|
||||||
inherit system;
|
inherit system;
|
||||||
configuration = import ./assets/flake/users/${username}/home.nix {
|
configuration = import ./user.nix {
|
||||||
inherit inputs user;
|
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
};
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit user inputs;
|
|
||||||
flakeRoot = ./.;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix {
|
|
||||||
inherit (nixpkgs.legacyPackages.${system}) mkShell;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./boot.nix
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options = {
|
|
||||||
wm = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "hyprland";
|
|
||||||
description = "Type of window manager to use";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# Minimal settings that must be defined here
|
|
||||||
networking.hostName = "traveldroid";
|
|
||||||
wm.type = "hyprland";
|
|
||||||
|
|
||||||
# User configuration
|
|
||||||
users.users.${user.username} = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
|
||||||
hashedPassword = user.hashedPassword;
|
|
||||||
home = user.homeDirectory;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Optional: Enable auto-login for testing
|
|
||||||
services.getty.autologinUser = user.username;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
username = "henrov";
|
|
||||||
hashedPassword = "$6$ISAmsPLyFi7idYXr$VmZsq.zMsyh1irSkyDNqtorNXG0oEHbbMVqTii1t8bymvrQ5ZQmbdi4OiBNeNYe/huHGrojXM.3TST2fTLz0T.";
|
|
||||||
homeDirectory = "/home/henrov";
|
|
||||||
stateVersion = "25.11";
|
|
||||||
locale = "nl_NL.UTF-8";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
description = "Droidnix: A dendritic NixOS + Home Manager configuration";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
emacs-overlay = {
|
|
||||||
url = "github:nix-community/emacs-overlay";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
catppuccin = {
|
|
||||||
url = "github:catppuccin/nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
zen-browser = {
|
|
||||||
url = "github:youwen5/zen-browser-flake";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs =
|
|
||||||
inputs@{
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
home-manager,
|
|
||||||
emacs-overlay,
|
|
||||||
catppuccin,
|
|
||||||
zen-browser,
|
|
||||||
hyprland,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
lib = nixpkgs.lib;
|
|
||||||
system = "x86_64-linux";
|
|
||||||
user = import ./assets/flake/users/henrov.nix;
|
|
||||||
machines = [
|
|
||||||
"traveldroid"
|
|
||||||
"maindroid"
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
nixosConfigurations = lib.genAttrs machines (
|
|
||||||
machine:
|
|
||||||
lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = [
|
|
||||||
# Import machine-specific configurations
|
|
||||||
./assets/flake/machines/${machine}/top.nix
|
|
||||||
|
|
||||||
# Home Manager module
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit user inputs;
|
|
||||||
flakeRoot = ./.;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
# Catppuccin theme module
|
|
||||||
inputs.catppuccin.nixosModules.catppuccin
|
|
||||||
|
|
||||||
# Anchoring all the other nixes
|
|
||||||
./generated/top.nix
|
|
||||||
|
|
||||||
# Enable Home Manager for the user
|
|
||||||
(
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
home-manager.users.${user.username} = {
|
|
||||||
enable = true;
|
|
||||||
homeDirectory = "/home/${user.username}";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
|
||||||
specialArgs = {
|
|
||||||
inherit user inputs;
|
|
||||||
flakeRoot = ./.;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
# Home Manager configurations for each user/machine
|
|
||||||
homeConfigurations = lib.genAttrs (map (machine: user.username + "@" + machine) machines) (
|
|
||||||
userMachine:
|
|
||||||
let
|
|
||||||
parts = lib.splitString "@" userMachine;
|
|
||||||
username = builtins.elemAt parts 0;
|
|
||||||
machine = builtins.elemAt parts 1;
|
|
||||||
in
|
|
||||||
home-manager.lib.homeManagerConfiguration {
|
|
||||||
inherit system;
|
|
||||||
configuration = import ./assets/flake/users/${username}/home.nix {
|
|
||||||
inherit inputs user;
|
inherit inputs user;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user