nix changes
This commit is contained in:
		
							parent
							
								
									1c98aef8a0
								
							
						
					
					
						commit
						b7394a55d3
					
				
					 5 changed files with 114 additions and 15 deletions
				
			
		
							
								
								
									
										97
									
								
								flake.lock
									
									
									
									
									
								
							
							
						
						
									
										97
									
								
								flake.lock
									
									
									
									
									
								
							| 
						 | 
					@ -18,6 +18,24 @@
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "flake-utils_2": {
 | 
				
			||||||
 | 
					      "inputs": {
 | 
				
			||||||
 | 
					        "systems": "systems_2"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "locked": {
 | 
				
			||||||
 | 
					        "lastModified": 1687709756,
 | 
				
			||||||
 | 
					        "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
 | 
				
			||||||
 | 
					        "owner": "numtide",
 | 
				
			||||||
 | 
					        "repo": "flake-utils",
 | 
				
			||||||
 | 
					        "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "original": {
 | 
				
			||||||
 | 
					        "owner": "numtide",
 | 
				
			||||||
 | 
					        "repo": "flake-utils",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "home-manager": {
 | 
					    "home-manager": {
 | 
				
			||||||
      "inputs": {
 | 
					      "inputs": {
 | 
				
			||||||
        "nixpkgs": [
 | 
					        "nixpkgs": [
 | 
				
			||||||
| 
						 | 
					@ -61,7 +79,43 @@
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "nil": {
 | 
				
			||||||
 | 
					      "inputs": {
 | 
				
			||||||
 | 
					        "flake-utils": "flake-utils_2",
 | 
				
			||||||
 | 
					        "nixpkgs": "nixpkgs",
 | 
				
			||||||
 | 
					        "rust-overlay": "rust-overlay"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "locked": {
 | 
				
			||||||
 | 
					        "lastModified": 1695485017,
 | 
				
			||||||
 | 
					        "narHash": "sha256-aQyRBJnT4tftexM/Y3etfOk8tfMFZzt+vSVtL2J0KLY=",
 | 
				
			||||||
 | 
					        "owner": "oxalica",
 | 
				
			||||||
 | 
					        "repo": "nil",
 | 
				
			||||||
 | 
					        "rev": "510bc6e9b41d39c81b9c815065cb5b7e23a2428c",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "original": {
 | 
				
			||||||
 | 
					        "owner": "oxalica",
 | 
				
			||||||
 | 
					        "repo": "nil",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "nixpkgs": {
 | 
					    "nixpkgs": {
 | 
				
			||||||
 | 
					      "locked": {
 | 
				
			||||||
 | 
					        "lastModified": 1690441914,
 | 
				
			||||||
 | 
					        "narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=",
 | 
				
			||||||
 | 
					        "owner": "nixos",
 | 
				
			||||||
 | 
					        "repo": "nixpkgs",
 | 
				
			||||||
 | 
					        "rev": "db8672b8d0a2593c2405aed0c1dfa64b2a2f428f",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "original": {
 | 
				
			||||||
 | 
					        "owner": "nixos",
 | 
				
			||||||
 | 
					        "ref": "nixpkgs-unstable",
 | 
				
			||||||
 | 
					        "repo": "nixpkgs",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "nixpkgs_2": {
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1695360818,
 | 
					        "lastModified": 1695360818,
 | 
				
			||||||
        "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=",
 | 
					        "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=",
 | 
				
			||||||
| 
						 | 
					@ -81,7 +135,33 @@
 | 
				
			||||||
      "inputs": {
 | 
					      "inputs": {
 | 
				
			||||||
        "home-manager": "home-manager",
 | 
					        "home-manager": "home-manager",
 | 
				
			||||||
        "neovim": "neovim",
 | 
					        "neovim": "neovim",
 | 
				
			||||||
        "nixpkgs": "nixpkgs"
 | 
					        "nil": "nil",
 | 
				
			||||||
 | 
					        "nixpkgs": "nixpkgs_2"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rust-overlay": {
 | 
				
			||||||
 | 
					      "inputs": {
 | 
				
			||||||
 | 
					        "flake-utils": [
 | 
				
			||||||
 | 
					          "nil",
 | 
				
			||||||
 | 
					          "flake-utils"
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        "nixpkgs": [
 | 
				
			||||||
 | 
					          "nil",
 | 
				
			||||||
 | 
					          "nixpkgs"
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "locked": {
 | 
				
			||||||
 | 
					        "lastModified": 1688783586,
 | 
				
			||||||
 | 
					        "narHash": "sha256-HHaM2hk2azslv1kH8zmQxXo2e7i5cKgzNIuK4yftzB0=",
 | 
				
			||||||
 | 
					        "owner": "oxalica",
 | 
				
			||||||
 | 
					        "repo": "rust-overlay",
 | 
				
			||||||
 | 
					        "rev": "7a29283cc242c2486fc67f60b431ef708046d176",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "original": {
 | 
				
			||||||
 | 
					        "owner": "oxalica",
 | 
				
			||||||
 | 
					        "repo": "rust-overlay",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "systems": {
 | 
					    "systems": {
 | 
				
			||||||
| 
						 | 
					@ -98,6 +178,21 @@
 | 
				
			||||||
        "repo": "default",
 | 
					        "repo": "default",
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "systems_2": {
 | 
				
			||||||
 | 
					      "locked": {
 | 
				
			||||||
 | 
					        "lastModified": 1681028828,
 | 
				
			||||||
 | 
					        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
 | 
				
			||||||
 | 
					        "owner": "nix-systems",
 | 
				
			||||||
 | 
					        "repo": "default",
 | 
				
			||||||
 | 
					        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "original": {
 | 
				
			||||||
 | 
					        "owner": "nix-systems",
 | 
				
			||||||
 | 
					        "repo": "default",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "root": "root",
 | 
					  "root": "root",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,12 +11,14 @@
 | 
				
			||||||
      url = "github:neovim/neovim?dir=contrib";
 | 
					      url = "github:neovim/neovim?dir=contrib";
 | 
				
			||||||
      inputs.nixpkgs.follows = "nixpkgs";
 | 
					      inputs.nixpkgs.follows = "nixpkgs";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					    nil.url = "github:oxalica/nil";
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  outputs = { nixpkgs, home-manager, neovim, ... }:
 | 
					  outputs = { nixpkgs, home-manager, neovim, ... }:
 | 
				
			||||||
    let
 | 
					    let
 | 
				
			||||||
      system = "x86_64-linux"; # change your system type here
 | 
					      system = "x86_64-linux";                # change your system type here
 | 
				
			||||||
      user = "nikos";          # change your user here
 | 
					      user = "nikos";                         # change your user here
 | 
				
			||||||
 | 
					      dotfilesHome = "/home/nikos/.dotfiles"; # specify your dotfiles path
 | 
				
			||||||
      pkgs = nixpkgs.legacyPackages.${system};
 | 
					      pkgs = nixpkgs.legacyPackages.${system};
 | 
				
			||||||
    in
 | 
					    in
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
| 
						 | 
					@ -36,6 +38,8 @@
 | 
				
			||||||
            ];
 | 
					            ];
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        extraSpecialArgs = { extra = { inherit user dotfilesHome; }; };
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										21
									
								
								home.nix
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								home.nix
									
									
									
									
									
								
							| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
{ config, pkgs, lib, ... }:
 | 
					{ config, pkgs, lib, extra, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  home.username = "nikos";
 | 
					  home.username = "${extra.user}";
 | 
				
			||||||
  home.homeDirectory = "/home/nikos";
 | 
					  home.homeDirectory = "/home/${extra.user}";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # This value determines the Home Manager release that your configuration is
 | 
					  # This value determines the Home Manager release that your configuration is
 | 
				
			||||||
  # compatible with. This helps avoid breakage when a new Home Manager release
 | 
					  # compatible with. This helps avoid breakage when a new Home Manager release
 | 
				
			||||||
| 
						 | 
					@ -22,7 +22,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  xdg.dataFile = {
 | 
					  xdg.dataFile = {
 | 
				
			||||||
    "nvim/lazy-lock.json".source =
 | 
					    "nvim/lazy-lock.json".source =
 | 
				
			||||||
      config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.dotfiles/lazy-lock.json";
 | 
					      config.lib.file.mkOutOfStoreSymlink "${extra.dotfilesHome}/lazy-lock.json";
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # The home.packages option allows you to install Nix packages into your
 | 
					  # The home.packages option allows you to install Nix packages into your
 | 
				
			||||||
| 
						 | 
					@ -49,15 +49,14 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  programs.fish = {
 | 
					  programs.fish = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    shellInit = builtins.readFile ./fish/config.fish;
 | 
					    shellInit = lib.strings.concatStringsSep "\n" ([
 | 
				
			||||||
    functions = lib.attrsets.mapAttrs'
 | 
					      (builtins.readFile ./fish/config.fish)
 | 
				
			||||||
 | 
					    ] ++ lib.attrsets.mapAttrsToList
 | 
				
			||||||
      (
 | 
					      (
 | 
				
			||||||
        name: value: {
 | 
					        name: value: builtins.readFile (./fish/functions + ("/" + name))
 | 
				
			||||||
          name = builtins.replaceStrings [ ".fish" ] [ "" ] name;
 | 
					 | 
				
			||||||
          value = builtins.readFile (./fish/functions + ("/" + name));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
      (builtins.readDir ./fish/functions);
 | 
					      (builtins.readDir ./fish/functions)
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Let Home Manager install and manage itself.
 | 
					  # Let Home Manager install and manage itself.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -125,7 +125,7 @@ local servers = {
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    gopls = {},
 | 
					    gopls = {},
 | 
				
			||||||
    rnix = {},
 | 
					    nil_ls = {},
 | 
				
			||||||
    jedi_language_server = {}, -- python lsp
 | 
					    jedi_language_server = {}, -- python lsp
 | 
				
			||||||
    ruff_lsp = {},             -- python linter
 | 
					    ruff_lsp = {},             -- python linter
 | 
				
			||||||
    rust_analyzer = {
 | 
					    rust_analyzer = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,5 +3,6 @@ pkgs: with pkgs; [
 | 
				
			||||||
  ripgrep # "rg" cli, alternative to grep, used by nvim
 | 
					  ripgrep # "rg" cli, alternative to grep, used by nvim
 | 
				
			||||||
  fd # find alternative, used by nvim
 | 
					  fd # find alternative, used by nvim
 | 
				
			||||||
  lsd # "ls" alternative
 | 
					  lsd # "ls" alternative
 | 
				
			||||||
 | 
					  nil # Nix LSP
 | 
				
			||||||
  (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) # nerdfonts jetbrains mono
 | 
					  (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) # nerdfonts jetbrains mono
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue