mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-02-24 12:30:51 +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.url = "github:nix-community/home-manager/release-23.11";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
hostname = "hyprnix";
|
|
||||||
username = "zaney";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ nixpkgs, home-manager, ... }:
|
outputs = inputs@{ nixpkgs, home-manager, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
hostname = "hyprnix";
|
||||||
|
username = "zaney";
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config = {
|
config = {
|
||||||
@ -22,12 +22,12 @@
|
|||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
laptop = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit system; inherit inputs; };
|
specialArgs = { inherit system; inherit inputs; inherit username; inherit hostname };
|
||||||
modules = [ ./laptop/configuration.nix
|
modules = [ ./laptop/configuration.nix
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = 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};
|
home.username = ${username};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ inputs, config, pkgs, ... }:
|
{ inputs, config, pkgs, username, hostname, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
@ -16,7 +16,7 @@
|
|||||||
boot.kernelModules = [ "v4l2loopback" ];
|
boot.kernelModules = [ "v4l2loopback" ];
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
||||||
|
|
||||||
networking.hostName = "hyprnix"; # Define your hostname.
|
networking.hostName = ${hostname}; # Define your hostname.
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user