Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Instructions on how to setup the flake.nix file #9

Open
Martinius opened this issue Jul 12, 2023 · 1 comment
Open

Better Instructions on how to setup the flake.nix file #9

Martinius opened this issue Jul 12, 2023 · 1 comment

Comments

@Martinius
Copy link

Could you please describe at which point the changes in the flake.nix and home.nix files have to be performed?

My flake.nix looks like this:

  description = "NixOS configuration";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    home-manager.url = "github:nix-community/home-manager";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
    scientific-fhs.url = "github:olynch/scientific-fhs";
  };

  outputs = inputs@{ nixpkgs, home-manager, ... }: {
    nixosConfigurations = {
      Workstation_M270t = nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          ./configuration.nix
          ./home.nix
        ];
      };
    };
  };
}

And my home.nix looks like this

{ config, pkgs, ... }:
  let
    home-manager = builtins.fetchTarball{
    url = "https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz";
    sha256 = "0dfshsgj93ikfkcihf4c5z876h4dwjds998kvgv7sqbfv0z6a4bc";};
  in
  {
    imports = [
      (import "${home-manager}/nixos")
    ];
    # Begin home-manager directives
    home-manager = {
  	useUserPackages = true;
        useGlobalPkgs = true;
        users.martinius = { pkgs, ... }: {
          home.stateVersion = "18.09";
          # Everything inside here is managed by Home Manager!
          programs.home-manager = {
            enable = true;
          };
	  imports = [ inputs.scientific-fhs.nixosModules.default ];

	  programs.scientific-fhs = {
	    enable = true;
	    juliaVersions = [
	      {
	        version = "julia_18";
	        default = true;
   	      }
	      { version = "julia_17"; }
	      { version = "julia_16"; }
	    ];
	    enableNVIDIA = false;
	  };
          home.sessionVariables = {
    	    EDITOR = "gedit";
    	    BROWSER = "firefox";
            TERMINAL = "alacritty";
         }; 
    };
  };
  }
@vereym
Copy link

vereym commented Jan 30, 2024

Have you tried installing other programs through home-manager to see if that works?

I'm quite new to nix so not sure about it, but I thought you need to provide home-manager with a homeConfigurations set, so maybe that's the problem? :S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants