Regenerated
This commit is contained in:
+124
@@ -0,0 +1,124 @@
|
||||
Rewrite my ./** =generated/modules/traveldroid/system/login-tuigreet.nix to integrate nicely with my existing flake.nix en host.nix
|
||||
Read ./assets/traveldroid/conf/greeter.toml as a source for ~/.config/greeter.toml
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
hyprlandSession = "${pkgs.hyprland}/bin/Hyprland";
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ pkgs.tuigreet ];
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
|
||||
# Use tuigreet as the greeter
|
||||
settings.default_session = {
|
||||
# This is how greetd calls the greeter
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --remember --time --time-format '%I:%M %p | %a • %h | %F' --session ${hyprlandSession}";
|
||||
};
|
||||
};
|
||||
}
|
||||
------------------------------------------------------------------------
|
||||
|
||||
flake.nix
|
||||
|
||||
{
|
||||
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";
|
||||
};
|
||||
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
|
||||
stylix = {
|
||||
url = "github:nix-community/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
zen-browser = {
|
||||
url = "github:youwen5/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, import-tree, stylix, hyprland, zen-browser, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
flakeRoot = self;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
traveldroid = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
modules = [
|
||||
./generated/hosts/traveldroid/host.nix
|
||||
];
|
||||
|
||||
specialArgs = {
|
||||
inherit flakeRoot;
|
||||
inherit home-manager import-tree stylix hyprland zen-browser;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
host.nix
|
||||
|
||||
{ lib, config, pkgs, flakeRoot, import-tree, home-manager, ... }:
|
||||
|
||||
let
|
||||
hostname = "traveldroid";
|
||||
|
||||
modulesPath = "${flakeRoot}/generated/modules/${hostname}";
|
||||
usersPath = "${flakeRoot}/generated/users";
|
||||
|
||||
hostModules = import-tree modulesPath;
|
||||
globalUsers = import-tree usersPath;
|
||||
|
||||
allModules = hostModules.imports ++ globalUsers.imports;
|
||||
|
||||
in
|
||||
{
|
||||
#################################
|
||||
# Core system config
|
||||
#################################
|
||||
|
||||
networking.hostName = hostname;
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
#################################
|
||||
# Imports
|
||||
#################################
|
||||
|
||||
imports =
|
||||
[
|
||||
./boot.nix
|
||||
./hardware-configuration.nix
|
||||
|
||||
# REQUIRED for Home Manager
|
||||
home-manager.nixosModules.home-manager
|
||||
]
|
||||
++ allModules;
|
||||
|
||||
#################################
|
||||
# Home Manager integration
|
||||
#################################
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user