mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-02-24 04:21:02 +01:00
Added Variables For Username & Hostname in Flake
This commit is contained in:
parent
0eb4e73b50
commit
287974c466
@ -6,13 +6,13 @@
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hostname = "hyprnix";
|
||||
username = "zaney";
|
||||
};
|
||||
|
||||
outputs = inputs@{ nixpkgs, home-manager, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
hostname = "hyprnix";
|
||||
username = "zaney";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
@ -22,12 +22,12 @@
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
laptop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit system; inherit inputs; };
|
||||
specialArgs = { inherit system; inherit inputs; inherit username; inherit hostname };
|
||||
modules = [ ./laptop/configuration.nix
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${username} = import ./home.nix;
|
||||
home-manager.users.zaney = import ./home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
2
home.nix
2
home.nix
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, username, ... }:
|
||||
|
||||
{
|
||||
home.username = ${username};
|
||||
|
@ -2,7 +2,7 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ inputs, config, pkgs, ... }:
|
||||
{ inputs, config, pkgs, username, hostname, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
@ -16,7 +16,7 @@
|
||||
boot.kernelModules = [ "v4l2loopback" ];
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
||||
|
||||
networking.hostName = "hyprnix"; # Define your hostname.
|
||||
networking.hostName = ${hostname}; # Define your hostname.
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
Loading…
Reference in New Issue
Block a user