From 24aeab75056ec4056a95af4d62ee7a9027c8e4a8 Mon Sep 17 00:00:00 2001 From: Random936 Date: Thu, 4 Jul 2024 18:42:22 -0700 Subject: [PATCH] Formatting changes and added dynamic home-manager username --- config/shared.nix | 3 +-- flake.nix | 7 ++++--- home/headful-nixos.nix | 6 +++--- home/headless-nixos.nix | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config/shared.nix b/config/shared.nix index 2a02189..ab45c83 100644 --- a/config/shared.nix +++ b/config/shared.nix @@ -1,6 +1,5 @@ -{ config, pkgs, inputs, ... }: +{ config, pkgs, inputs, ... }: { -{ # Enable experimental nix features. nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/flake.nix b/flake.nix index ca4e222..55e1bc8 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,7 @@ ./config/omen.nix home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages."x86_64-linux"; + extraSpecialArgs.user = "random"; modules = [ ./home/headful-nixos.nix ]; @@ -30,14 +31,14 @@ ]; }; - nixosConfigurations.default = nixpkgs.lib.nixosSystem { + nixosConfigurations.media = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ./config/shared.nix - ./config/headless.nix + ./config/media.nix home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages."x86_64-linux"; + extraSpecialArgs.user = "media"; modules = [ ./home/headless-nixos.nix ]; diff --git a/home/headful-nixos.nix b/home/headful-nixos.nix index 711f046..8d4265d 100644 --- a/home/headful-nixos.nix +++ b/home/headful-nixos.nix @@ -1,8 +1,8 @@ -{ inputs, config, pkgs, ... }: { +{ inputs, config, pkgs, user, ... }: { home = { - username = "random"; - homeDirectory = "/home/random"; + username = "${user}"; + homeDirectory = "/home/${user}"; }; imports = [ diff --git a/home/headless-nixos.nix b/home/headless-nixos.nix index 35191b5..49642e6 100644 --- a/home/headless-nixos.nix +++ b/home/headless-nixos.nix @@ -1,8 +1,8 @@ -{ inputs, config, pkgs, ... }: { +{ inputs, config, pkgs, user, ... }: { home = { - username = "random"; - homeDirectory = "/home/random"; + username = "${user}"; + homeDirectory = "/home/${user}"; }; imports = [