From afe391ef8ee3fd2173239fa777eddb96169bd954 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:38:18 -0600 Subject: [PATCH] WIP --- configuration.nix | 2 +- flake.nix | 16 ++++++++-------- home.nix | 2 +- nixosModules/default.nix | 19 +++++++++++++++++++ 4 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 nixosModules/default.nix diff --git a/configuration.nix b/configuration.nix index 7d25ed7..2dad2f0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -32,5 +32,5 @@ }; time.timeZone = "${systemSettings.timeZone}"; - networking.hostName = systemSettings.hostname; + networking.hostName = systemSettings.hostName; } diff --git a/flake.nix b/flake.nix index 721edef..b87790c 100644 --- a/flake.nix +++ b/flake.nix @@ -26,12 +26,12 @@ userSettings = rec { username = "panoptes"; gitUserName = "John Lancaster"; - # gitUserEmail = "32917998+jsl12@users.noreply.github.com"; - gitUserEmail = "asdfasdf@asdf.com"; + gitUserEmail = "32917998+jsl12@users.noreply.github.com"; + # gitUserEmail = "asdfasdf@asdf.com"; }; systemSettings = rec { - hostname = "panoptes-nix"; + hostName = "panoptes-nix"; system = "x86_64-linux"; timeZone = "America/Chicago"; locale = "en_US.UTF-8"; @@ -43,7 +43,7 @@ in { nixosConfigurations = { - "${systemSettings.hostname}" = nixosSystem { + "${systemSettings.hostName}" = nixosSystem { system = systemSettings.system; specialArgs = { inherit inputs; @@ -65,8 +65,8 @@ homeConfigurations = { useGlobalPkgs = true; - "${userSettings.username}" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + "panoptes@panoptes-nix" = home-manager.lib.homeManagerConfiguration { + inherit pkgs stateVersion; specialArgs = { inherit inputs; inherit outputs; @@ -74,8 +74,8 @@ inherit systemSettings; }; modules = [ - ./homeManagerModules/home.nix - ({...}: {home.stateVersion = "${stateVersion}";}) + ./home.nix + # ({...}: {home.stateVersion = "${stateVersion}";}) ]; }; }; diff --git a/home.nix b/home.nix index dea55bd..333a53e 100644 --- a/home.nix +++ b/home.nix @@ -28,7 +28,7 @@ in homeDirectory = "${homePath}"; packages = [ (pkgs.writeShellScriptBin "nfs" '' - sudo nixos-rebuild switch --flake ${homePath}#${hostname} --impure + sudo nixos-rebuild switch --flake ${homePath}#${hostName} --impure '') (pkgs.writeShellScriptBin "init-panoptes" '' sudo -u git clone -b ${repoBranch} ${repoURL} /srv/panoptes diff --git a/nixosModules/default.nix b/nixosModules/default.nix new file mode 100644 index 0000000..e3352e8 --- /dev/null +++ b/nixosModules/default.nix @@ -0,0 +1,19 @@ +{ + pkgs, + config, + lib, + inputs, + outputs, + ... +}: { + imports = + [ + ./services/loki.nix + ]; + + config = { + nix.settings.experimental-features = ["nix-command" "flakes"]; + programs.nix-ld.enable = true; + nixpkgs.config.allowUnfree = true; + }; +} \ No newline at end of file