feat: added flakes
This commit is contained in:
		
					parent
					
						
							
								b0ecc41e8f
							
						
					
				
			
			
				commit
				
					
						2341f96389
					
				
			
		
					 10 changed files with 64 additions and 40 deletions
				
			
		|  | @ -91,7 +91,8 @@ in { | ||||||
|   #   Install.WantedBy = [ "default.target" ]; |   #   Install.WantedBy = [ "default.target" ]; | ||||||
|   # }; |   # }; | ||||||
| 
 | 
 | ||||||
|   system.stateVersion = "21.05"; |   system.stateVersion = "21.11"; | ||||||
| 
 | 
 | ||||||
|  |   nixpkgs.config.allowUnfree = true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
							
								
								
									
										8
									
								
								flake.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								flake.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | ||||||
|  | { | ||||||
|  |   outputs = { self, nixpkgs }: { | ||||||
|  |     nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { | ||||||
|  |       system = "x86_64-linux"; | ||||||
|  |       modules = [ /etc/nixos/hardware-configuration.nix ./configuration.nix ]; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | } | ||||||
|  | @ -39,7 +39,6 @@ | ||||||
| 
 | 
 | ||||||
|     # chat apps |     # chat apps | ||||||
|     discord |     discord | ||||||
|     # discord-canary |  | ||||||
|     # deluge |     # deluge | ||||||
|     # slack |     # slack | ||||||
|     # tdesktop # telegram for the desktop |     # tdesktop # telegram for the desktop | ||||||
|  |  | ||||||
|  | @ -3,10 +3,11 @@ | ||||||
|     ./dev |     ./dev | ||||||
|     ./applications |     ./applications | ||||||
|     ./theme |     ./theme | ||||||
|  |     ./overlays | ||||||
| 
 | 
 | ||||||
|     ./network.nix |     ./network.nix | ||||||
|     ./xserver.nix |     ./xserver.nix | ||||||
|     ./users.nix |     ./users.nix | ||||||
|     ./overlay.nix |     ./nix.nix | ||||||
|   ]; |   ]; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -3,9 +3,6 @@ | ||||||
|     networkmanager.enable = true; |     networkmanager.enable = true; | ||||||
|     hostName = "nixos"; |     hostName = "nixos"; | ||||||
| 
 | 
 | ||||||
|     # The global useDHCP flag is deprecated, therefore explicitly set to false here. |  | ||||||
|     # Per-interface useDHCP will be mandatory in the future, so this generated config |  | ||||||
|     # replicates the default behaviour. |  | ||||||
|     useDHCP = false; |     useDHCP = false; | ||||||
|     interfaces.enp1s0.useDHCP = true; |     interfaces.enp1s0.useDHCP = true; | ||||||
|     interfaces.wlp0s20f3.useDHCP = true; |     interfaces.wlp0s20f3.useDHCP = true; | ||||||
|  |  | ||||||
							
								
								
									
										19
									
								
								modules/nix.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								modules/nix.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | { pkgs, ... }: { | ||||||
|  |   nix = { | ||||||
|  |     trustedUsers = [ "root" "adrielus" "@wheel" ]; | ||||||
|  |     autoOptimiseStore = true; | ||||||
|  |     gc.automatic = true; | ||||||
|  |     optimise.automatic = true; | ||||||
|  |     binaryCaches = [ "https://cache.nixos.org" "https://all-hies.cachix.org" ]; | ||||||
|  |     binaryCachePublicKeys = [ | ||||||
|  |       "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" | ||||||
|  |       "all-hies.cachix.org-1:JjrzAOEUsD9ZMt8fdFbzo3jNAyEWlPAwdVuHw4RD43k=" | ||||||
|  |     ]; | ||||||
|  | 
 | ||||||
|  |     # Emanble nix flakes | ||||||
|  |     package = pkgs.nixFlakes; | ||||||
|  |     extraOptions = '' | ||||||
|  |       experimental-features = nix-command flakes | ||||||
|  |     ''; | ||||||
|  |   }; | ||||||
|  | } | ||||||
							
								
								
									
										4
									
								
								modules/overlays/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								modules/overlays/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | ||||||
|  | { ... }: { | ||||||
|  |   #    nixpkgs.overlays = [ import ./discord ]; | ||||||
|  |   imports = [ ./legacy.nix ]; | ||||||
|  | } | ||||||
							
								
								
									
										12
									
								
								modules/overlays/discord.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								modules/overlays/discord.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | ||||||
|  | self: super: | ||||||
|  | 
 | ||||||
|  | { | ||||||
|  |   discord = super.discord.overrideAttrs (old: rec { | ||||||
|  |     version = "0.0.15"; | ||||||
|  |     src = builtins.fetchurl { | ||||||
|  |       url = | ||||||
|  |         "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz"; | ||||||
|  |       sha256 = "0pn2qczim79hqk2limgh88fsn93sa8wvana74mpdk5n6x5afkvdd"; | ||||||
|  |     }; | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| { ... }: | { ... }: | ||||||
| let | let | ||||||
|   imports = import ../nix/sources.nix; |   imports = import ../../nix/sources.nix; | ||||||
|   edoproPackage = import ./applications/edopro.nix; |   edoproPackage = import ./../applications/edopro.nix; | ||||||
|   unstable = import imports.nixpkgs-unstable { |   unstable = import imports.nixpkgs-unstable { | ||||||
|     config.allowUnfree = true; |     config.allowUnfree = true; | ||||||
|     config.allowBroken = true; |     config.allowBroken = true; | ||||||
|  | @ -33,25 +33,8 @@ in { | ||||||
|         vscode = unstable.vscode; |         vscode = unstable.vscode; | ||||||
|         docker-compose = unstable.docker-compose; |         docker-compose = unstable.docker-compose; | ||||||
|         deno = unstable.deno; |         deno = unstable.deno; | ||||||
|         # discord = unstable.discord; |  | ||||||
|         discord-canary = unstable.discord-canary; |  | ||||||
|         dotnet-sdk = unstable.dotnet-sdk_5; |         dotnet-sdk = unstable.dotnet-sdk_5; | ||||||
|         elm-repl = unstable.haskellPackages.elm-repl; |         elm-repl = unstable.haskellPackages.elm-repl; | ||||||
|       }) |       }) | ||||||
|   ]; |   ]; | ||||||
| 
 |  | ||||||
|   # allow packages with unfree licenses |  | ||||||
|   nixpkgs.config.allowUnfree = true; |  | ||||||
| 
 |  | ||||||
|   nix = { |  | ||||||
|     trustedUsers = [ "root" "adrielus" "@wheel" ]; |  | ||||||
|     autoOptimiseStore = true; |  | ||||||
|     gc.automatic = true; |  | ||||||
|     optimise.automatic = true; |  | ||||||
|     binaryCaches = [ "https://cache.nixos.org" "https://all-hies.cachix.org" ]; |  | ||||||
|     binaryCachePublicKeys = [ |  | ||||||
|       "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" |  | ||||||
|       "all-hies.cachix.org-1:JjrzAOEUsD9ZMt8fdFbzo3jNAyEWlPAwdVuHw4RD43k=" |  | ||||||
|     ]; |  | ||||||
|   }; |  | ||||||
| } | } | ||||||
|  | @ -5,10 +5,10 @@ | ||||||
|         "homepage": "", |         "homepage": "", | ||||||
|         "owner": "nix-community", |         "owner": "nix-community", | ||||||
|         "repo": "NUR", |         "repo": "NUR", | ||||||
|         "rev": "a6d41ad68b659457e0dea467479ea5e617f83786", |         "rev": "b94538af2a15e0b1f139c72bb40ad0cfcfffb869", | ||||||
|         "sha256": "1j12bccakyz00vlac7qjpl0bd7il6rgw48yzc014pji03alhh4y7", |         "sha256": "07mkli320qzfzv7hafkwhc1xg78d8hc2b31ny4yary52sni2bkhs", | ||||||
|         "type": "tarball", |         "type": "tarball", | ||||||
|         "url": "https://github.com/nix-community/NUR/archive/a6d41ad68b659457e0dea467479ea5e617f83786.tar.gz", |         "url": "https://github.com/nix-community/NUR/archive/b94538af2a15e0b1f139c72bb40ad0cfcfffb869.tar.gz", | ||||||
|         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" |         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||||||
|     }, |     }, | ||||||
|     "agnoster": { |     "agnoster": { | ||||||
|  | @ -41,10 +41,10 @@ | ||||||
|         "homepage": "", |         "homepage": "", | ||||||
|         "owner": "xzfc", |         "owner": "xzfc", | ||||||
|         "repo": "cached-nix-shell", |         "repo": "cached-nix-shell", | ||||||
|         "rev": "8b87dc0047f35fec4f7a132d0e1b67d0526a22f5", |         "rev": "1955b9d0aaaf90337541ab799d5071eeaac2360c", | ||||||
|         "sha256": "1cryshs5w67xg8j3dsy3z4ia6hxzdv6jzz25jwd1m27jci4035qy", |         "sha256": "17v38llx83mp05a0axjxcd2zyafd57syh7xhx5cq6qibcbha0by9", | ||||||
|         "type": "tarball", |         "type": "tarball", | ||||||
|         "url": "https://github.com/xzfc/cached-nix-shell/archive/8b87dc0047f35fec4f7a132d0e1b67d0526a22f5.tar.gz", |         "url": "https://github.com/xzfc/cached-nix-shell/archive/1955b9d0aaaf90337541ab799d5071eeaac2360c.tar.gz", | ||||||
|         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" |         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||||||
|     }, |     }, | ||||||
|     "easy-dhall-nix": { |     "easy-dhall-nix": { | ||||||
|  | @ -65,10 +65,10 @@ | ||||||
|         "homepage": "", |         "homepage": "", | ||||||
|         "owner": "justinwoo", |         "owner": "justinwoo", | ||||||
|         "repo": "easy-purescript-nix", |         "repo": "easy-purescript-nix", | ||||||
|         "rev": "eb64583e3e15749b3ae56573b2aebbaa9cbab4eb", |         "rev": "82f901ce0a2d86327e2d65993a75c2ea74f229f2", | ||||||
|         "sha256": "0hr7smk7avdgc5nm1r3drq91j1hf8wimp7sg747832345c8vq19a", |         "sha256": "0qsq8bj76y3bxdl2iphknjib139z0jw75xlaih7viv9kvfm9b1lx", | ||||||
|         "type": "tarball", |         "type": "tarball", | ||||||
|         "url": "https://github.com/justinwoo/easy-purescript-nix/archive/eb64583e3e15749b3ae56573b2aebbaa9cbab4eb.tar.gz", |         "url": "https://github.com/justinwoo/easy-purescript-nix/archive/82f901ce0a2d86327e2d65993a75c2ea74f229f2.tar.gz", | ||||||
|         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" |         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||||||
|     }, |     }, | ||||||
|     "home-manager": { |     "home-manager": { | ||||||
|  | @ -89,10 +89,10 @@ | ||||||
|         "homepage": "https://github.com/nmattia/niv", |         "homepage": "https://github.com/nmattia/niv", | ||||||
|         "owner": "nmattia", |         "owner": "nmattia", | ||||||
|         "repo": "niv", |         "repo": "niv", | ||||||
|         "rev": "e0ca65c81a2d7a4d82a189f1e23a48d59ad42070", |         "rev": "5830a4dd348d77e39a0f3c4c762ff2663b602d4c", | ||||||
|         "sha256": "1pq9nh1d8nn3xvbdny8fafzw87mj7gsmp6pxkdl65w2g18rmcmzx", |         "sha256": "1d3lsrqvci4qz2hwjrcnd8h5vfkg8aypq3sjd4g3izbc8frwz5sm", | ||||||
|         "type": "tarball", |         "type": "tarball", | ||||||
|         "url": "https://github.com/nmattia/niv/archive/e0ca65c81a2d7a4d82a189f1e23a48d59ad42070.tar.gz", |         "url": "https://github.com/nmattia/niv/archive/5830a4dd348d77e39a0f3c4c762ff2663b602d4c.tar.gz", | ||||||
|         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" |         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||||||
|     }, |     }, | ||||||
|     "nixpkgs": { |     "nixpkgs": { | ||||||
|  | @ -113,10 +113,10 @@ | ||||||
|         "homepage": "", |         "homepage": "", | ||||||
|         "owner": "NixOS", |         "owner": "NixOS", | ||||||
|         "repo": "nixpkgs", |         "repo": "nixpkgs", | ||||||
|         "rev": "fe01052444c1d66ed6ef76df2af798c9769e9e79", |         "rev": "715f63411952c86c8f57ab9e3e3cb866a015b5f2", | ||||||
|         "sha256": "0z99hwxgrvlf0psicwd97kdqqcc3qngfzmcz7k68q6q868y8582y", |         "sha256": "152kxfk11mgwg8gx0s1rgykyydfb7s746yfylvbwk5mk5cv4z9nv", | ||||||
|         "type": "tarball", |         "type": "tarball", | ||||||
|         "url": "https://github.com/NixOS/nixpkgs/archive/fe01052444c1d66ed6ef76df2af798c9769e9e79.tar.gz", |         "url": "https://github.com/NixOS/nixpkgs/archive/715f63411952c86c8f57ab9e3e3cb866a015b5f2.tar.gz", | ||||||
|         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" |         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||||||
|     }, |     }, | ||||||
|     "snack": { |     "snack": { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Matei Adriel
				Matei Adriel