Merge pull request 'deploy-rs working with cube' (#2) from deploy into devos
Reviewed-on: aynish/nix-garden#2
This commit is contained in:
		
						commit
						605fa0bad7
					
				
							
								
								
									
										103
									
								
								flake.lock
									
									
									
									
									
								
							
							
						
						
									
										103
									
								
								flake.lock
									
									
									
									
									
								
							|  | @ -20,6 +20,31 @@ | ||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "basant": { | ||||||
|  |       "inputs": { | ||||||
|  |         "flake-utils": "flake-utils", | ||||||
|  |         "nixpkgs": [ | ||||||
|  |           "nixos" | ||||||
|  |         ], | ||||||
|  |         "poonam": [ | ||||||
|  |           "poonam" | ||||||
|  |         ] | ||||||
|  |       }, | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1650354421, | ||||||
|  |         "narHash": "sha256-Jr6OvDFQ6gUugH4qWeoitkVtNqsE/HZECDAjqhCRnjc=", | ||||||
|  |         "ref": "main", | ||||||
|  |         "rev": "8ae61a25c1debb788204afe1964ec429f8defc83", | ||||||
|  |         "revCount": 60, | ||||||
|  |         "type": "git", | ||||||
|  |         "url": "ssh://gitea@git.sealight.xyz/aynish/basant" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "ref": "main", | ||||||
|  |         "type": "git", | ||||||
|  |         "url": "ssh://gitea@git.sealight.xyz/aynish/basant" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "blank": { |     "blank": { | ||||||
|       "locked": { |       "locked": { | ||||||
|         "lastModified": 1625557891, |         "lastModified": 1625557891, | ||||||
|  | @ -35,26 +60,6 @@ | ||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "darwin": { |  | ||||||
|       "inputs": { |  | ||||||
|         "nixpkgs": [ |  | ||||||
|           "nixos" |  | ||||||
|         ] |  | ||||||
|       }, |  | ||||||
|       "locked": { |  | ||||||
|         "lastModified": 1645007752, |  | ||||||
|         "narHash": "sha256-FQZMiVP/1vgR7x+TWonMf0NZczrZ4ZjhSTj3rM+kglY=", |  | ||||||
|         "owner": "LnL7", |  | ||||||
|         "repo": "nix-darwin", |  | ||||||
|         "rev": "c944b5ee82a829ddf7fa6bd9300bc2fe3d005fa1", |  | ||||||
|         "type": "github" |  | ||||||
|       }, |  | ||||||
|       "original": { |  | ||||||
|         "owner": "LnL7", |  | ||||||
|         "repo": "nix-darwin", |  | ||||||
|         "type": "github" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "deploy": { |     "deploy": { | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "flake-compat": "flake-compat", |         "flake-compat": "flake-compat", | ||||||
|  | @ -175,7 +180,7 @@ | ||||||
|     }, |     }, | ||||||
|     "flake-utils-plus": { |     "flake-utils-plus": { | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "flake-utils": "flake-utils" |         "flake-utils": "flake-utils_2" | ||||||
|       }, |       }, | ||||||
|       "locked": { |       "locked": { | ||||||
|         "lastModified": 1639385028, |         "lastModified": 1639385028, | ||||||
|  | @ -206,6 +211,21 @@ | ||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "flake-utils_3": { | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1638122382, | ||||||
|  |         "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", | ||||||
|  |         "owner": "numtide", | ||||||
|  |         "repo": "flake-utils", | ||||||
|  |         "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", | ||||||
|  |         "type": "github" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "owner": "numtide", | ||||||
|  |         "repo": "flake-utils", | ||||||
|  |         "type": "github" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "home": { |     "home": { | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "nixpkgs": [ |         "nixpkgs": [ | ||||||
|  | @ -360,6 +380,21 @@ | ||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "nixpkgs_2": { | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1649667661, | ||||||
|  |         "narHash": "sha256-9cbstidkXdAC3ZzokV6clgCoeLSbbs2tis9KFsqCzTM=", | ||||||
|  |         "owner": "nixos", | ||||||
|  |         "repo": "nixpkgs", | ||||||
|  |         "rev": "a48aeae76ad50bb15ad9bda2cf51d7ae5c621853", | ||||||
|  |         "type": "github" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "owner": "nixos", | ||||||
|  |         "repo": "nixpkgs", | ||||||
|  |         "type": "github" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "nur": { |     "nur": { | ||||||
|       "locked": { |       "locked": { | ||||||
|         "lastModified": 1626378135, |         "lastModified": 1626378135, | ||||||
|  | @ -376,7 +411,7 @@ | ||||||
|     "nvfetcher": { |     "nvfetcher": { | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "flake-compat": "flake-compat_2", |         "flake-compat": "flake-compat_2", | ||||||
|         "flake-utils": "flake-utils_2", |         "flake-utils": "flake-utils_3", | ||||||
|         "nixpkgs": [ |         "nixpkgs": [ | ||||||
|           "nixos" |           "nixos" | ||||||
|         ] |         ] | ||||||
|  | @ -395,10 +430,29 @@ | ||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "poonam": { | ||||||
|  |       "inputs": { | ||||||
|  |         "nixpkgs": "nixpkgs_2" | ||||||
|  |       }, | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1650620898, | ||||||
|  |         "narHash": "sha256-QuwHuGEF+BhIXC4YmFtaw++DEOgDdvWxvY5BFso4j20=", | ||||||
|  |         "ref": "main", | ||||||
|  |         "rev": "a1ea4bffc99d58e182ff646069a072f56fe1f031", | ||||||
|  |         "revCount": 326, | ||||||
|  |         "type": "git", | ||||||
|  |         "url": "ssh://gitea@git.sealight.xyz/aynish/kitaab" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "ref": "main", | ||||||
|  |         "type": "git", | ||||||
|  |         "url": "ssh://gitea@git.sealight.xyz/aynish/kitaab" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "root": { |     "root": { | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "agenix": "agenix", |         "agenix": "agenix", | ||||||
|         "darwin": "darwin", |         "basant": "basant", | ||||||
|         "deploy": "deploy", |         "deploy": "deploy", | ||||||
|         "digga": "digga", |         "digga": "digga", | ||||||
|         "home": "home", |         "home": "home", | ||||||
|  | @ -407,7 +461,8 @@ | ||||||
|         "nixos": "nixos", |         "nixos": "nixos", | ||||||
|         "nixos-hardware": "nixos-hardware", |         "nixos-hardware": "nixos-hardware", | ||||||
|         "nur": "nur", |         "nur": "nur", | ||||||
|         "nvfetcher": "nvfetcher" |         "nvfetcher": "nvfetcher", | ||||||
|  |         "poonam": "poonam" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "utils": { |     "utils": { | ||||||
|  |  | ||||||
							
								
								
									
										83
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										83
									
								
								flake.nix
									
									
									
									
									
								
							|  | @ -7,34 +7,33 @@ | ||||||
| 
 | 
 | ||||||
|   inputs = |   inputs = | ||||||
|     { |     { | ||||||
|  |       # Nix | ||||||
|       nixos.url = "github:nixos/nixpkgs/release-21.11"; |       nixos.url = "github:nixos/nixpkgs/release-21.11"; | ||||||
|       latest.url = "github:nixos/nixpkgs/nixos-unstable"; |       latest.url = "github:nixos/nixpkgs/nixos-unstable"; | ||||||
| 
 |       # Community | ||||||
|  |       home.url = "github:nix-community/home-manager/release-21.11"; | ||||||
|  |       home.inputs.nixpkgs.follows = "nixos"; | ||||||
|  |       nixos-hardware.url = "github:nixos/nixos-hardware"; | ||||||
|  |       # Lib | ||||||
|       digga.url = "github:divnix/digga"; |       digga.url = "github:divnix/digga"; | ||||||
|       digga.inputs.nixpkgs.follows = "nixos"; |       digga.inputs.nixpkgs.follows = "nixos"; | ||||||
|       digga.inputs.nixlib.follows = "nixos"; |       digga.inputs.nixlib.follows = "nixos"; | ||||||
|       digga.inputs.home-manager.follows = "home"; |       digga.inputs.home-manager.follows = "home"; | ||||||
|       digga.inputs.deploy.follows = "deploy"; |       digga.inputs.deploy.follows = "deploy"; | ||||||
| 
 |  | ||||||
|       home.url = "github:nix-community/home-manager/release-21.11"; |  | ||||||
|       home.inputs.nixpkgs.follows = "nixos"; |  | ||||||
| 
 |  | ||||||
|       darwin.url = "github:LnL7/nix-darwin"; |  | ||||||
|       darwin.inputs.nixpkgs.follows = "nixos"; |  | ||||||
| 
 |  | ||||||
|       deploy.url = "github:serokell/deploy-rs"; |  | ||||||
|       deploy.inputs.nixpkgs.follows = "nixos"; |  | ||||||
| 
 |  | ||||||
|       agenix.url = "github:ryantm/agenix"; |  | ||||||
|       agenix.inputs.nixpkgs.follows = "nixos"; |  | ||||||
| 
 |  | ||||||
|       nvfetcher.url = "github:berberman/nvfetcher"; |       nvfetcher.url = "github:berberman/nvfetcher"; | ||||||
|       nvfetcher.inputs.nixpkgs.follows = "nixos"; |       nvfetcher.inputs.nixpkgs.follows = "nixos"; | ||||||
| 
 |  | ||||||
|       naersk.url = "github:nmattia/naersk"; |       naersk.url = "github:nmattia/naersk"; | ||||||
|       naersk.inputs.nixpkgs.follows = "nixos"; |       naersk.inputs.nixpkgs.follows = "nixos"; | ||||||
| 
 |       # Tools | ||||||
|       nixos-hardware.url = "github:nixos/nixos-hardware"; |       agenix.url = "github:ryantm/agenix"; | ||||||
|  |       agenix.inputs.nixpkgs.follows = "nixos"; | ||||||
|  |       deploy.url = "github:serokell/deploy-rs"; | ||||||
|  |       deploy.inputs.nixpkgs.follows = "nixos"; | ||||||
|  |       # Packages | ||||||
|  |       poonam.url = "git+ssh://gitea@git.sealight.xyz/aynish/kitaab?ref=main"; | ||||||
|  |       basant.url = "git+ssh://gitea@git.sealight.xyz/aynish/basant?ref=main"; | ||||||
|  |       basant.inputs.nixpkgs.follows = "nixos"; | ||||||
|  |       basant.inputs.poonam.follows = "poonam"; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|   outputs = |   outputs = | ||||||
|  | @ -47,11 +46,15 @@ | ||||||
|     , agenix |     , agenix | ||||||
|     , nvfetcher |     , nvfetcher | ||||||
|     , deploy |     , deploy | ||||||
|  |     , basant | ||||||
|     , ... |     , ... | ||||||
|     } @ inputs: |     } @ inputs: | ||||||
|     digga.lib.mkFlake |     digga.lib.mkFlake | ||||||
|       { |       { | ||||||
|         inherit self inputs; |         inherit self inputs; | ||||||
|  |         supportedSystems = [ | ||||||
|  |           "x86_64-linux" | ||||||
|  |         ]; | ||||||
| 
 | 
 | ||||||
|         channelsConfig = { allowUnfree = true; }; |         channelsConfig = { allowUnfree = true; }; | ||||||
| 
 | 
 | ||||||
|  | @ -85,9 +88,8 @@ | ||||||
|             system = "x86_64-linux"; |             system = "x86_64-linux"; | ||||||
|             channelName = "nixos"; |             channelName = "nixos"; | ||||||
|             imports = [ (digga.lib.importExportableModules ./modules) ]; |             imports = [ (digga.lib.importExportableModules ./modules) ]; | ||||||
|             exportedModules = [ |             modules = [ | ||||||
|               { lib.our = self.lib; } |               { lib.our = self.lib; } | ||||||
|               digga.nixosModules.bootstrapIso |  | ||||||
|               digga.nixosModules.nixConfig |               digga.nixosModules.nixConfig | ||||||
|               home.nixosModules.home-manager |               home.nixosModules.home-manager | ||||||
|               agenix.nixosModules.age |               agenix.nixosModules.age | ||||||
|  | @ -97,13 +99,14 @@ | ||||||
|           imports = [ (digga.lib.importHosts ./hosts) ]; |           imports = [ (digga.lib.importHosts ./hosts) ]; | ||||||
|           hosts = { |           hosts = { | ||||||
|             /* set host specific properties here */ |             /* set host specific properties here */ | ||||||
|             NixOS = { }; |  | ||||||
|             curve = { |             curve = { | ||||||
|               channelName = "nixos"; |               channelName = "nixos"; | ||||||
|               #modules = [ ]; # nixos-hardware.nixosModules.lenovo-thinkpad |               #modules = [ ]; # nixos-hardware.nixosModules.lenovo-thinkpad | ||||||
|               # Yubikey |               # Yubikey | ||||||
|             }; |             }; | ||||||
|             cube = { }; |             cube = { | ||||||
|  |               modules = [ basant.nixosModule ]; | ||||||
|  |             }; | ||||||
|             # box = { }; |             # box = { }; | ||||||
|             # hypercube = { }; |             # hypercube = { }; | ||||||
|             # work = { }; |             # work = { }; | ||||||
|  | @ -113,30 +116,32 @@ | ||||||
|               users = digga.lib.rakeLeaves ./users; |               users = digga.lib.rakeLeaves ./users; | ||||||
|             }; |             }; | ||||||
|             suites = with profiles; rec { |             suites = with profiles; rec { | ||||||
|               base = [ core users.root users.anish ]; # TODO make anish non gui |               base = [ core users.root users.anish ]; | ||||||
|               sealight = [ base ]; # matrix rsshub backup wireguard website |               sealight = [ base server ]; # matrix rsshub backup wireguard | ||||||
|               mossnet = [ base ]; # shaarli wallabag nextcloud taskwarrior headphones  |               mossnet = [ base server ]; # shaarli wallabag nextcloud taskwarrior headphones  | ||||||
|               home-manager = [ users.profiles.firefox users.profiles.desktop users.profiles.nvim ]; |               cube = [ base site server ]; | ||||||
|               graphical = [ base home-manager bluetooth music sync wireguard wifi ]; |               graphical = [ base bluetooth music sync wireguard wifi desktop ]; | ||||||
|               curve = [ graphical users.profiles.email users.profiles.cal ]; |               curve = [ graphical secrets ]; | ||||||
|               work = [ base home-manager ]; |               work = [ base ]; | ||||||
|             }; |             }; | ||||||
|           }; |           }; | ||||||
|         }; |         }; | ||||||
| 
 | 
 | ||||||
|         home = { |         home = { | ||||||
|           imports = [ (digga.lib.importExportableModules ./users/modules) ]; |           imports = [ (digga.lib.importExportableModules ./users/modules) ]; | ||||||
|           exportedModules = [ ]; |           # exportedModules = [ ]; | ||||||
|  |           # modules = [ ]; | ||||||
|           importables = rec { |           importables = rec { | ||||||
|             profiles = digga.lib.rakeLeaves ./users/profiles; |             profiles = digga.lib.rakeLeaves ./users/profiles; | ||||||
|             suites = with profiles; rec { |             suites = with profiles; rec { | ||||||
|               hmBase = [ direnv git ]; |               hmBase = [ direnv git nvim ]; | ||||||
|               gui = [ hmBase profiles.firefox profiles.desktop ]; |               gui = [ hmBase firefox desktop email cal ]; | ||||||
|  |               work = [ hmBase firefox ]; | ||||||
|             }; |             }; | ||||||
|           }; |           }; | ||||||
|           users = { |           users = { | ||||||
|             nixos = { suites, ... }: { imports = suites.hmBase; }; |             nixos = { suites, ... }: { imports = suites.hmBase; }; | ||||||
|             curve = { suites, ... }: { imports = suites.gui; }; |             anish = { suites, ... }: { imports = suites.gui; }; | ||||||
|           }; # digga.lib.importers.rakeLeaves ./users/hm; |           }; # digga.lib.importers.rakeLeaves ./users/hm; | ||||||
|         }; |         }; | ||||||
| 
 | 
 | ||||||
|  | @ -144,18 +149,6 @@ | ||||||
| 
 | 
 | ||||||
|         homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; |         homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; | ||||||
| 
 | 
 | ||||||
|         deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations |         deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { }; | ||||||
|           { |  | ||||||
|             curve = { |  | ||||||
|               profilesOrder = [ "system" "curve" ]; |  | ||||||
|               profiles.anish = { |  | ||||||
|                 user = "anish"; |  | ||||||
|                 path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.anish; |  | ||||||
|       }; |       }; | ||||||
|             }; |  | ||||||
|           }; |  | ||||||
| 
 |  | ||||||
|         # checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy.lib; |  | ||||||
|       } |  | ||||||
|   ; |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,12 +0,0 @@ | ||||||
| { suites, ... }: |  | ||||||
| { |  | ||||||
|   ### root password is empty by default ### |  | ||||||
|   imports = suites.base; |  | ||||||
| 
 |  | ||||||
|   boot.loader.systemd-boot.enable = true; |  | ||||||
|   boot.loader.efi.canTouchEfiVariables = true; |  | ||||||
| 
 |  | ||||||
|   networking.networkmanager.enable = true; |  | ||||||
| 
 |  | ||||||
|   fileSystems."/" = { device = "/dev/disk/by-label/nixos"; }; |  | ||||||
| } |  | ||||||
|  | @ -1,3 +0,0 @@ | ||||||
| { |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
|  | @ -7,52 +7,29 @@ | ||||||
|       ./hardware-configuration.nix |       ./hardware-configuration.nix | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|   # Use the GRUB 2 boot loader. |  | ||||||
|   boot.loader.grub.enable = true; |   boot.loader.grub.enable = true; | ||||||
|   boot.loader.grub.version = 2; |   boot.loader.grub.version = 2; | ||||||
|   boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only |   boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only | ||||||
| 
 | 
 | ||||||
|   networking.hostName = "cube"; # Define your hostname. |   networking.hostName = "cube"; # Define your hostname. | ||||||
| 
 |  | ||||||
|   # Set your time zone. |  | ||||||
|   time.timeZone = "Australia/Brisbane"; |   time.timeZone = "Australia/Brisbane"; | ||||||
| 
 | 
 | ||||||
|   # Use flakes |  | ||||||
|   nix = { |  | ||||||
|     package = pkgs.nixFlakes; # or versioned attributes like nix_2_7 |  | ||||||
|     extraOptions = '' |  | ||||||
|       experimental-features = nix-command flakes |  | ||||||
|     ''; |  | ||||||
|   }; |  | ||||||
| 
 |  | ||||||
|   # 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. |  | ||||||
|   networking.useDHCP = false; |   networking.useDHCP = false; | ||||||
|   networking.interfaces.ens3.useDHCP = true; |   networking.interfaces.ens3.useDHCP = true; | ||||||
|  |   i18n.defaultLocale = "en_US.UTF-8"; | ||||||
| 
 | 
 | ||||||
|   # Define a user account. Don't forget to set a password with ‘passwd’. |  | ||||||
|   users.users.anish = { |  | ||||||
|     isNormalUser = true; |  | ||||||
|     extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. |  | ||||||
|     openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve" ]; |  | ||||||
|   }; |  | ||||||
| 
 |  | ||||||
|   # List packages installed in system profile. To search, run: |  | ||||||
|   # $ nix search wget |  | ||||||
|   environment.systemPackages = with pkgs; [ |   environment.systemPackages = with pkgs; [ | ||||||
|     vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. |     vim | ||||||
|  |     gitAndTools.gitFull | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   services.openssh.enable = true; |   # This value determines the NixOS release from which the default | ||||||
| 
 |   # settings for stateful data, like file locations and database versions | ||||||
|   # THIS VALUE DETERMINES THE nixOS RELEASE FROM WHICH THE DEFAULT |   # on your system were taken. It‘s perfectly fine and recommended to leave | ||||||
|   # SETTINGS FOR STATEFUL DATA, LIKE FILE LOCATIONS AND DATABASE VERSIONS |   # this value at the release version of the first install of this system. | ||||||
|   # ON YOUR SYSTEM WERE TAKEN. iT‘S PERFECTLY FINE AND RECOMMENDED TO LEAVE |   # Before changing this value read the documentation for this option | ||||||
|   # THIS VALUE AT THE RELEASE VERSION OF THE FIRST INSTALL OF THIS SYSTEM. |   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||||||
|   # BEFORE CHANGING THIS VALUE READ THE DOCUMENTATION FOR THIS OPTION |   system.stateVersion = "21.11"; # Did you read the comment? | ||||||
|   # (E.G. MAN CONFIGURATION.NIX OR ON HTTPS://NIXOS.ORG/NIXOS/OPTIONS.HTML). |  | ||||||
|   system.stateVersion = "21.11"; # DID YOU READ THE COMMENT? |  | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -2,9 +2,9 @@ | ||||||
| { | { | ||||||
|   imports = [ |   imports = [ | ||||||
|     ./configuration.nix |     ./configuration.nix | ||||||
|   ]; # ++ [suites.cube]; |   ] ++ suites.cube; | ||||||
| 
 | 
 | ||||||
|   #home-manager.users.anish = { self, suites, ... }: { |   home-manager.users.anish = { self, suites, ... }: { | ||||||
|   #  imports = [ ] ++ suites.hmBase; |     imports = [ ] ++ suites.hmBase; | ||||||
|   #}; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -2,14 +2,14 @@ | ||||||
| { | { | ||||||
|   imports = [ |   imports = [ | ||||||
|     ./configuration.nix |     ./configuration.nix | ||||||
|     profiles.users.anish |  | ||||||
|     profiles.mossnet-hosts |     profiles.mossnet-hosts | ||||||
|   ] ++ suites.curve; |   ] ++ suites.curve; | ||||||
| 
 | 
 | ||||||
|   home-manager.users.anish = { self, suites, ... }: { |   home-manager.users.anish = { suites, ... }: { | ||||||
|     imports = [ ] ++ suites.hmBase; |     imports = suites.gui; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|   fileSystems."/mnt/ftp" = { |   fileSystems."/mnt/ftp" = { | ||||||
|     device = "192.168.1.240:/home/ftp"; |     device = "192.168.1.240:/home/ftp"; | ||||||
|     fsType = "nfs"; |     fsType = "nfs"; | ||||||
|  |  | ||||||
|  | @ -1,3 +0,0 @@ | ||||||
| { |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
							
								
								
									
										62
									
								
								install-simple.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								install-simple.sh
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,62 @@ | ||||||
|  | #!/usr/bin/env bash | ||||||
|  | 
 | ||||||
|  | # partition the files yourself sorry | ||||||
|  | 
 | ||||||
|  | sudo fatlabel /dev/vda1 NIXBOOT | ||||||
|  | sudo mkfs.ext4 /dev/vda2 -L NIXROOT | ||||||
|  | sudo mount /dev/disk/by-label/NIXROOT /mnt | ||||||
|  | sudo mkdir -p /mnt/boot | ||||||
|  | sudo mount /dev/disk/by-label/NIXBOOT /mnt/boot | ||||||
|  | 
 | ||||||
|  | sudo nixos-generate-config --root /mnt | ||||||
|  | cat > /mnt/etc/nixos/configuration.nix <<'endmsg' | ||||||
|  | { config, pkgs, ... }: | ||||||
|  | 
 | ||||||
|  | { | ||||||
|  |   imports = | ||||||
|  |     [ # Include the results of the hardware scan. | ||||||
|  |       ./hardware-configuration.nix | ||||||
|  |     ]; | ||||||
|  | 
 | ||||||
|  |   boot.loader.grub.enable = true; | ||||||
|  |   boot.loader.grub.version = 2; | ||||||
|  |   # Define on which hard drive you want to install Grub. | ||||||
|  |   boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only | ||||||
|  |    | ||||||
|  |   # Enable Flakes | ||||||
|  |   nix = { | ||||||
|  |     package = pkgs.nixUnstable; | ||||||
|  |     extraOptions = '' | ||||||
|  |       experimental-features = nix-command flakes | ||||||
|  |     ''; | ||||||
|  |    }; | ||||||
|  | 
 | ||||||
|  |   time.timeZone = "Australia/Brisbane"; | ||||||
|  | 
 | ||||||
|  |   networking.useDHCP = false; | ||||||
|  |   networking.interfaces.ens3.useDHCP = true; # TODO you probably want to change this | ||||||
|  | 
 | ||||||
|  |   i18n.defaultLocale = "en_US.UTF-8"; | ||||||
|  | 
 | ||||||
|  |   users.users.anish = { | ||||||
|  |     isNormalUser = true; | ||||||
|  |     hashedPassword = "MVHHpy9gbe3ow"; | ||||||
|  |     extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. | ||||||
|  |     openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve" ]; | ||||||
|  |   }; | ||||||
|  |   security.sudo.wheelNeedsPassword = false; # needed for deploy-rs | ||||||
|  | 
 | ||||||
|  |   services.openssh.enable = true; | ||||||
|  | 
 | ||||||
|  |   # This value determines the NixOS release from which the default | ||||||
|  |   # settings for stateful data, like file locations and database versions | ||||||
|  |   # on your system were taken. It‘s perfectly fine and recommended to leave | ||||||
|  |   # this value at the release version of the first install of this system. | ||||||
|  |   # Before changing this value read the documentation for this option | ||||||
|  |   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||||||
|  |   system.stateVersion = "21.11"; # Did you read the comment? | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | endmsg | ||||||
|  | 
 | ||||||
|  | sudo nixos-install | ||||||
|  | @ -166,3 +166,7 @@ cat > /mnt/etc/nixos/configuration.nix <<'endmsg' | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| endmsg | endmsg | ||||||
|  | 
 | ||||||
|  | cd /mnt | ||||||
|  | nixos-install --root /mnt | ||||||
|  | passwd | ||||||
|  |  | ||||||
|  | @ -1,54 +1,181 @@ | ||||||
| { config, pkgs, ... }: | { config, pkgs, lib, ... }: | ||||||
| 
 | let | ||||||
|  |   dracula-gtk = pkgs.fetchFromGitHub { | ||||||
|  |     owner = "dracula"; | ||||||
|  |     repo = "gtk"; | ||||||
|  |     rev = "502f212d83bc67e8f0499574546b99ec6c8e16f9"; | ||||||
|  |     sha256 = "1wx9nzq7cqyvpaq4j60bs8g7gh4jk8qg4016yi4c331l4iw1ymsa"; | ||||||
|  |   }; | ||||||
|  | in | ||||||
| { | { | ||||||
|   #imports = [ ./music.nix ] |   # TODO modularize | ||||||
|   #environment.systemPackages = with pkgs; [ |   #imports = [ ./xdg.nix ]; | ||||||
|   #  nheko | 
 | ||||||
|   #  newsflash |   services = { | ||||||
|   #  sublime-music |     gnome.gnome-keyring.enable = true; | ||||||
|   #  tdesktop |     upower.enable = true; | ||||||
|   #  obs-studio | 
 | ||||||
|   #]; |     dbus = { | ||||||
|   #environment.systemPackages = with pkgs; [ |       enable = true; | ||||||
|   #   lightdm |       packages = [ pkgs.gnome3.dconf ]; | ||||||
|   #   dunst |     }; | ||||||
|   #   libnotify |   }; | ||||||
|   #   (polybar.override { | 
 | ||||||
|   #     pulseSupport = true; |   security.pam.services.sddm.enableGnomeKeyring = true; | ||||||
|   #     nlSupport = true; | 
 | ||||||
|   #   }) |   environment.sessionVariables = rec { | ||||||
|   #]; |     XDG_CACHE_HOME = "\${HOME}/.cache"; | ||||||
|   # |     XDG_CONFIG_HOME = "\${HOME}/.config"; | ||||||
|   #services = { |     XDG_BIN_HOME = "\${HOME}/.local/bin"; | ||||||
|   #  picom.enable = true; |     XDG_DATA_HOME = "\${HOME}/.local/share"; | ||||||
|   #  #redshift.enable = true; | 
 | ||||||
|   #  xserver = { |     PATH = [ | ||||||
|   #    enable = true; |       "\${XDG_BIN_HOME}" | ||||||
|   #    displayManager = { |     ]; | ||||||
|   #      defaultSession = "none+bspwm"; |   }; | ||||||
|   #      lightdm.enable = true; | 
 | ||||||
|   #      lightdm.greeters.mini.enable = true; |   nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ | ||||||
|   #      lightdm.greeters.mini.user = "anish"; # TODO hardcoded |     "ripcord" | ||||||
|   #    }; |     "vcv-rack" | ||||||
|   #    windowManager.bspwm.enable = true; |   ]; | ||||||
|   #    windowManager.bspwm.configFile = "/home/anish/.bspwm/bspwmrc"; | 
 | ||||||
|   #    windowManager.bspwm.sxhkd.configFile = "/home/anish/sxhkdrc"; |   environment.systemPackages = with pkgs; [ | ||||||
|   #    #windowManager.default = "bspwm"; |     # TODO move somewhere meaningful | ||||||
|   #  }; |     signal-desktop # bridge to sealight? | ||||||
|   #}; |     scrot | ||||||
|   # |     ripcord | ||||||
|   #systemd.user.services."dunst" = { |     feh | ||||||
|   #  enable = true; |     xkblayout-state | ||||||
|   #  description = ""; |     sublime-music | ||||||
|   #  wantedBy = [ "default.target" ]; |     vcv-rack | ||||||
|   #  serviceConfig.Restart = "always"; |     zathura | ||||||
|   #  serviceConfig.RestartSec = 2; |     calibre | ||||||
|   #  serviceConfig.ExecStart = "${pkgs.dunst}/bin/dunst"; |     nheko | ||||||
|   #}; |     mpv | ||||||
|   #services.xserver.displayManager.lightdm.greeters.mini.extraConfig = ''                        |     scrot | ||||||
|   #    text-color = "#ff79c6" |     newsflash | ||||||
|   #    password-background-color = "#1E2029" |     zeal | ||||||
|   #    window-color = "#181a23" |     xclip | ||||||
|   #    border-color = "#181a23" |     xdotool | ||||||
|   #''; |     rofi | ||||||
|  |     rofimoji | ||||||
|  |     obs-studio | ||||||
|  |     lightdm | ||||||
|  |     dunst | ||||||
|  |     libnotify | ||||||
|  |     (polybar.override { | ||||||
|  |       pulseSupport = true; | ||||||
|  |       nlSupport = true; | ||||||
|  |     }) | ||||||
|  |     papirus-icon-theme | ||||||
|  |     calendar-cli | ||||||
|  |     wyrd | ||||||
|  |   ]; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |   location.provider = "geoclue2"; | ||||||
|  |   services = { | ||||||
|  |     redshift = { | ||||||
|  |       enable = true; | ||||||
|  |       temperature = { | ||||||
|  |         day = 5500; | ||||||
|  |         night = 3700; | ||||||
|  |       }; | ||||||
|  |     }; | ||||||
|  |     xserver = { | ||||||
|  |       enable = true; | ||||||
|  |       layout = "us,dvorak"; | ||||||
|  |       desktopManager.wallpaper.mode = "fill"; | ||||||
|  |       displayManager = { | ||||||
|  |         defaultSession = "none+bspwm"; | ||||||
|  |         sessionCommands = '' | ||||||
|  |           ${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF | ||||||
|  |           #define blk  #1F2430 | ||||||
|  |           #define bblk #F28779 | ||||||
|  |           #define red  #A6CC70 | ||||||
|  |           #define bred #FFCC66 | ||||||
|  |           #define grn  #5CCFE6 | ||||||
|  |           #define bgrn #F29E74 | ||||||
|  |           #define ylw  #77A8D9 | ||||||
|  |           #define bylw #5C6773 | ||||||
|  |           #define blu  #707A8C | ||||||
|  |           #define bblu #F27983 | ||||||
|  |           #define mag  #BAE67E | ||||||
|  |           #define bmag #FFD580 | ||||||
|  |           #define cyn  #73D0FF | ||||||
|  |           #define bcyn #FFA759 | ||||||
|  |           #define wht  #95E6CB | ||||||
|  |           #define bwht #CBCCC6 | ||||||
|  |           #define bg blk | ||||||
|  |           #define fg wht | ||||||
|  |            | ||||||
|  |           *.foreground:  fg | ||||||
|  |           *.background:  bg | ||||||
|  |           *.cursorColor: mag | ||||||
|  |            | ||||||
|  |           *.color0:  blk | ||||||
|  |           *.color8:  bblk | ||||||
|  |           *.color1:  red | ||||||
|  |           *.color9:  bred | ||||||
|  |           *.color2:  grn | ||||||
|  |           *.color10: bgrn | ||||||
|  |           *.color3:  ylw | ||||||
|  |           *.color11: bylw | ||||||
|  |           *.color4:  blu | ||||||
|  |           *.color12: bblu | ||||||
|  |           *.color5:  mag | ||||||
|  |           *.color13: bmag | ||||||
|  |           *.color6:  cyn | ||||||
|  |           *.color14: bcyn | ||||||
|  |           *.color7:  wht | ||||||
|  |           *.color15: bwht | ||||||
|  |            | ||||||
|  |           ! greys | ||||||
|  |           *.color234: #1E2029 | ||||||
|  |           *.color235: #282a36 | ||||||
|  |           *.color236: #373844 | ||||||
|  |           *.color237: #44475a | ||||||
|  |           *.color239: #565761 | ||||||
|  |           *.color240: #6272a4 | ||||||
|  |           *.color241: #b6b6b2 | ||||||
|  |           EOF | ||||||
|  | 
 | ||||||
|  |           # hotplug | ||||||
|  |           connect() { | ||||||
|  |               xrandr --output HDMI-2 --same-as eDP-1 | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |           disconnect() { | ||||||
|  |               xrandr --output HDMI-2 --off | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |           xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect | ||||||
|  |         ''; | ||||||
|  |         lightdm.enable = true; | ||||||
|  |         lightdm.greeters.mini.enable = true; | ||||||
|  |         lightdm.greeters.mini.user = "anish"; # TODO hardcoded | ||||||
|  |         lightdm.background = "/etc/nixos/users/profiles/desktop/background.jpg"; | ||||||
|  |         lightdm.greeters.mini.extraConfig = '' | ||||||
|  |           text-color = "#ff79c6" | ||||||
|  |           password-background-color = "#1E2029" | ||||||
|  |           window-color = "#181a23" | ||||||
|  |           border-color = "#181a23" | ||||||
|  |         ''; | ||||||
|  |       }; | ||||||
|  |       windowManager.bspwm.enable = true; | ||||||
|  |       #windowManager.bspwm.configFile = "/home/anish/.bspwm/bspwmrc"; | ||||||
|  |       windowManager.bspwm.sxhkd.configFile = "/home/anish/.config/sxhkdrc"; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   fonts.fonts = with pkgs; [ | ||||||
|  |     fira-code | ||||||
|  |     fira-code-symbols | ||||||
|  |     hermit | ||||||
|  |     #hack | ||||||
|  |     siji | ||||||
|  |     font-awesome-ttf | ||||||
|  |     proggyfonts | ||||||
|  |     (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Iosevka" ]; }) | ||||||
|  |   ]; | ||||||
| } | } | ||||||
|  |  | ||||||
							
								
								
									
										9
									
								
								profiles/secrets/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								profiles/secrets/default.nix
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | ||||||
|  | { pkgs, config, lib, ... }: | ||||||
|  | { | ||||||
|  |   # Secrets used by home-manager modules  | ||||||
|  |   age.secrets.fastmail.file = "/etc/nixos/secrets/fastmail.age"; | ||||||
|  |   age.secrets.fastmail.owner = "anish"; | ||||||
|  | 
 | ||||||
|  |   age.secrets.mossnet.file = "/etc/nixos/secrets/mossnet.age"; | ||||||
|  |   age.secrets.mossnet.owner = "anish"; | ||||||
|  | } | ||||||
							
								
								
									
										6
									
								
								profiles/server/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								profiles/server/default.nix
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | ||||||
|  | { config, ... }: | ||||||
|  | { | ||||||
|  |   services.openssh.enable = true; | ||||||
|  |   networking.firewall.allowedTCPPorts = [ 22 ]; | ||||||
|  |   security.sudo.wheelNeedsPassword = false; # needed for deploy-rs | ||||||
|  | } | ||||||
							
								
								
									
										6
									
								
								profiles/site/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								profiles/site/default.nix
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | ||||||
|  | { self, pkgs, ... }: | ||||||
|  | { | ||||||
|  |   services."anish.lakhwara.com".enable = true; | ||||||
|  |   security.acme.email = "anish+acme@lakhwara.com"; | ||||||
|  |   security.acme.acceptTerms = true; | ||||||
|  | } | ||||||
|  | @ -8,6 +8,7 @@ | ||||||
|     hashedPassword = "MVHHpy9gbe3ow"; |     hashedPassword = "MVHHpy9gbe3ow"; | ||||||
|     isNormalUser = true; |     isNormalUser = true; | ||||||
|     extraGroups = [ "wheel" "audio" ]; |     extraGroups = [ "wheel" "audio" ]; | ||||||
|  |     openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve" ]; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   home-manager.users.anish.programs.git = { |   home-manager.users.anish.programs.git = { | ||||||
|  |  | ||||||
|  | @ -1,9 +1,6 @@ | ||||||
| {pkgs, config, ...}: | { pkgs, config, age, ... }: | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   age.secrets.mossnet.file = "/etc/nixos/secrets/mossnet.age"; |  | ||||||
|   age.secrets.mossnet.owner = "anish"; |  | ||||||
|   home-manager.users.anish = { |  | ||||||
|   home.packages = with pkgs; [ |   home.packages = with pkgs; [ | ||||||
|     khal |     khal | ||||||
|     khard |     khard | ||||||
|  | @ -98,5 +95,4 @@ | ||||||
|       skip_unparsable = no |       skip_unparsable = no | ||||||
|     ''; |     ''; | ||||||
|   }; |   }; | ||||||
|   }; |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -8,186 +8,6 @@ let | ||||||
|   }; |   }; | ||||||
| in | in | ||||||
| { | { | ||||||
|   # TODO modularize |  | ||||||
|   #imports = [ ./xdg.nix ]; |  | ||||||
| 
 |  | ||||||
|   services = { |  | ||||||
|     gnome.gnome-keyring.enable = true; |  | ||||||
|     upower.enable = true; |  | ||||||
| 
 |  | ||||||
|     dbus = { |  | ||||||
|       enable = true; |  | ||||||
|       packages = [ pkgs.gnome3.dconf ]; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
| 
 |  | ||||||
|   security.pam.services.sddm.enableGnomeKeyring = true; |  | ||||||
| 
 |  | ||||||
|   home-manager.users.anish.xdg.enable = true; # This doesn't seem to do anything so we have below |  | ||||||
|   home-manager.users.anish.xdg.configHome = "/home/anish/.config"; # TODO bad hard coded |  | ||||||
|   home-manager.users.anish.xdg.configFile = { |  | ||||||
|     "Kvantum/Dracula/Dracula.kvconfig".source = "${dracula-gtk}/kde/kvantum/Dracula-purple-solid/Dracula-purple-solid.kvconfig"; |  | ||||||
|     "Kvantum/Dracula/Dracula.svg".source = "${dracula-gtk}/kde/kvantum/Dracula-purple-solid/Dracula-purple-solid.svg"; |  | ||||||
|     "Kvantum/kvantum.kvconfig".text = "[General]\ntheme=Dracula"; |  | ||||||
|   }; |  | ||||||
|   environment.sessionVariables = rec { |  | ||||||
|     XDG_CACHE_HOME = "\${HOME}/.cache"; |  | ||||||
|     XDG_CONFIG_HOME = "\${HOME}/.config"; |  | ||||||
|     XDG_BIN_HOME = "\${HOME}/.local/bin"; |  | ||||||
|     XDG_DATA_HOME = "\${HOME}/.local/share"; |  | ||||||
| 
 |  | ||||||
|     PATH = [ |  | ||||||
|       "\${XDG_BIN_HOME}" |  | ||||||
|     ]; |  | ||||||
|   }; |  | ||||||
| 
 |  | ||||||
|   nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ |  | ||||||
|     "ripcord" |  | ||||||
|     "vcv-rack" |  | ||||||
|   ]; |  | ||||||
| 
 |  | ||||||
|   environment.systemPackages = with pkgs; [ |  | ||||||
|     # TODO move somewhere meaningful |  | ||||||
|     signal-desktop # bridge to sealight? |  | ||||||
|     scrot |  | ||||||
|     ripcord |  | ||||||
|     feh |  | ||||||
|     xkblayout-state |  | ||||||
|     sublime-music |  | ||||||
|     vcv-rack |  | ||||||
|     zathura |  | ||||||
|     calibre |  | ||||||
|     nheko |  | ||||||
|     mpv |  | ||||||
|     scrot |  | ||||||
|     newsflash |  | ||||||
|     zeal |  | ||||||
|     xclip |  | ||||||
|     xdotool |  | ||||||
|     rofi |  | ||||||
|     rofimoji |  | ||||||
|     obs-studio |  | ||||||
|     lightdm |  | ||||||
|     dunst |  | ||||||
|     libnotify |  | ||||||
|     (polybar.override { |  | ||||||
|       pulseSupport = true; |  | ||||||
|       nlSupport = true; |  | ||||||
|     }) |  | ||||||
|     papirus-icon-theme |  | ||||||
|     calendar-cli |  | ||||||
|     wyrd |  | ||||||
|   ]; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   location.provider = "geoclue2"; |  | ||||||
|   services = { |  | ||||||
|     redshift = { |  | ||||||
|       enable = true; |  | ||||||
|       temperature = { |  | ||||||
|         day = 5500; |  | ||||||
|         night = 3700; |  | ||||||
|       }; |  | ||||||
|     }; |  | ||||||
|     xserver = { |  | ||||||
|       enable = true; |  | ||||||
|       layout = "us,dvorak"; |  | ||||||
|       desktopManager.wallpaper.mode = "fill"; |  | ||||||
|       displayManager = { |  | ||||||
|         defaultSession = "none+bspwm"; |  | ||||||
|         sessionCommands = '' |  | ||||||
|           ${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF |  | ||||||
|           #define blk  #1F2430 |  | ||||||
|           #define bblk #F28779 |  | ||||||
|           #define red  #A6CC70 |  | ||||||
|           #define bred #FFCC66 |  | ||||||
|           #define grn  #5CCFE6 |  | ||||||
|           #define bgrn #F29E74 |  | ||||||
|           #define ylw  #77A8D9 |  | ||||||
|           #define bylw #5C6773 |  | ||||||
|           #define blu  #707A8C |  | ||||||
|           #define bblu #F27983 |  | ||||||
|           #define mag  #BAE67E |  | ||||||
|           #define bmag #FFD580 |  | ||||||
|           #define cyn  #73D0FF |  | ||||||
|           #define bcyn #FFA759 |  | ||||||
|           #define wht  #95E6CB |  | ||||||
|           #define bwht #CBCCC6 |  | ||||||
|           #define bg blk |  | ||||||
|           #define fg wht |  | ||||||
|            |  | ||||||
|           *.foreground:  fg |  | ||||||
|           *.background:  bg |  | ||||||
|           *.cursorColor: mag |  | ||||||
|            |  | ||||||
|           *.color0:  blk |  | ||||||
|           *.color8:  bblk |  | ||||||
|           *.color1:  red |  | ||||||
|           *.color9:  bred |  | ||||||
|           *.color2:  grn |  | ||||||
|           *.color10: bgrn |  | ||||||
|           *.color3:  ylw |  | ||||||
|           *.color11: bylw |  | ||||||
|           *.color4:  blu |  | ||||||
|           *.color12: bblu |  | ||||||
|           *.color5:  mag |  | ||||||
|           *.color13: bmag |  | ||||||
|           *.color6:  cyn |  | ||||||
|           *.color14: bcyn |  | ||||||
|           *.color7:  wht |  | ||||||
|           *.color15: bwht |  | ||||||
|            |  | ||||||
|           ! greys |  | ||||||
|           *.color234: #1E2029 |  | ||||||
|           *.color235: #282a36 |  | ||||||
|           *.color236: #373844 |  | ||||||
|           *.color237: #44475a |  | ||||||
|           *.color239: #565761 |  | ||||||
|           *.color240: #6272a4 |  | ||||||
|           *.color241: #b6b6b2 |  | ||||||
|           EOF |  | ||||||
| 
 |  | ||||||
|           # hotplug |  | ||||||
|           connect() { |  | ||||||
|               xrandr --output HDMI-2 --same-as eDP-1 |  | ||||||
|           } |  | ||||||
| 
 |  | ||||||
|           disconnect() { |  | ||||||
|               xrandr --output HDMI-2 --off |  | ||||||
|           } |  | ||||||
| 
 |  | ||||||
|           xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect |  | ||||||
|         ''; |  | ||||||
|         lightdm.enable = true; |  | ||||||
|         lightdm.greeters.mini.enable = true; |  | ||||||
|         lightdm.greeters.mini.user = "anish"; # TODO hardcoded |  | ||||||
|         lightdm.background = "/etc/nixos/users/profiles/desktop/background.jpg"; |  | ||||||
|         lightdm.greeters.mini.extraConfig = '' |  | ||||||
|           text-color = "#ff79c6" |  | ||||||
|           password-background-color = "#1E2029" |  | ||||||
|           window-color = "#181a23" |  | ||||||
|           border-color = "#181a23" |  | ||||||
|           active-monitor=1 |  | ||||||
|         ''; |  | ||||||
|       }; |  | ||||||
|       windowManager.bspwm.enable = true; |  | ||||||
|       #windowManager.bspwm.configFile = "/home/anish/.bspwm/bspwmrc"; |  | ||||||
|       windowManager.bspwm.sxhkd.configFile = "/home/anish/.config/sxhkdrc"; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
| 
 |  | ||||||
|   fonts.fonts = with pkgs; [ |  | ||||||
|     fira-code |  | ||||||
|     fira-code-symbols |  | ||||||
|     hermit |  | ||||||
|     #hack |  | ||||||
|     siji |  | ||||||
|     font-awesome-ttf |  | ||||||
|     proggyfonts |  | ||||||
|     (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Iosevka" ]; }) |  | ||||||
|   ]; |  | ||||||
| 
 |  | ||||||
|   home-manager.users.anish = { |  | ||||||
|   xsession = { |   xsession = { | ||||||
|     enable = true; |     enable = true; | ||||||
|     pointerCursor = { |     pointerCursor = { | ||||||
|  | @ -241,6 +61,13 @@ in | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   # Move required config files around |   # Move required config files around | ||||||
|  |   xdg.enable = true; # This doesn't seem to do anything so we have below | ||||||
|  |   xdg.configHome = "/home/anish/.config"; # TODO bad hardcode | ||||||
|  |   xdg.configFile = { | ||||||
|  |     "Kvantum/Dracula/Dracula.kvconfig".source = "${dracula-gtk}/kde/kvantum/Dracula-purple-solid/Dracula-purple-solid.kvconfig"; | ||||||
|  |     "Kvantum/Dracula/Dracula.svg".source = "${dracula-gtk}/kde/kvantum/Dracula-purple-solid/Dracula-purple-solid.svg"; | ||||||
|  |     "Kvantum/kvantum.kvconfig".text = "[General]\ntheme=Dracula"; | ||||||
|  |   }; | ||||||
|   home.file = { |   home.file = { | ||||||
|     ".config/bspwm/rc.d/polybar".source = ./run.sh; |     ".config/bspwm/rc.d/polybar".source = ./run.sh; | ||||||
|     ".config/bspwm/bspwmrc".source = ./bspwmrc; |     ".config/bspwm/bspwmrc".source = ./bspwmrc; | ||||||
|  | @ -314,5 +141,4 @@ in | ||||||
|   services.udiskie.automount = true; |   services.udiskie.automount = true; | ||||||
| 
 | 
 | ||||||
|   services.mpris-proxy.enable = true; # bluetooth media control |   services.mpris-proxy.enable = true; # bluetooth media control | ||||||
|   }; |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -397,7 +397,7 @@ ramp-capacity-1 = " " | ||||||
| ramp-capacity-2 = " " | ramp-capacity-2 = " " | ||||||
| ramp-capacity-3 = " " | ramp-capacity-3 = " " | ||||||
| ramp-capacity-4 = " " | ramp-capacity-4 = " " | ||||||
| ramp-capacity-font =3  | ramp-capacity-font = 1  | ||||||
| ramp-capacity-foreground = ${colors.sky} | ramp-capacity-foreground = ${colors.sky} | ||||||
| 
 | 
 | ||||||
| animation-charging-0 = " " | animation-charging-0 = " " | ||||||
|  | @ -405,7 +405,7 @@ animation-charging-1 = " " | ||||||
| animation-charging-2 = " " | animation-charging-2 = " " | ||||||
| animation-charging-3 = " " | animation-charging-3 = " " | ||||||
| animation-charging-4 = " " | animation-charging-4 = " " | ||||||
| animation-charging-font =3  | animation-charging-font = 1  | ||||||
| animation-charging-foreground = ${colors.sky} | animation-charging-foreground = ${colors.sky} | ||||||
| animation-charging-framerate = 750 | animation-charging-framerate = 750 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,9 +1,8 @@ | ||||||
| { pkgs, ... }: | { pkgs, ... }: | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   age.secrets.fastmail.file = "/etc/nixos/secrets/fastmail.age"; |   #age.secrets.fastmail.file = "/etc/nixos/secrets/fastmail.age"; | ||||||
|   age.secrets.fastmail.owner = "anish"; |   #age.secrets.fastmail.owner = "anish"; | ||||||
|   home-manager.users.anish = { |  | ||||||
|   services.mbsync = { |   services.mbsync = { | ||||||
|     enable = true; |     enable = true; | ||||||
|     frequency = "*:0/30"; |     frequency = "*:0/30"; | ||||||
|  | @ -291,5 +290,4 @@ | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
|   }; |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,7 +1,6 @@ | ||||||
| { pkgs, ... }: | { pkgs, ... }: | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   home-manager.users.anish = { |  | ||||||
|   programs.browserpass.enable = true; |   programs.browserpass.enable = true; | ||||||
|   programs.browserpass.browsers = [ "firefox" ]; |   programs.browserpass.browsers = [ "firefox" ]; | ||||||
|   #env.XDG_DEXSTOP_DIR = "$HOME/"; |   #env.XDG_DEXSTOP_DIR = "$HOME/"; | ||||||
|  | @ -99,7 +98,8 @@ | ||||||
|     }) |     }) | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|     home.file = let cfgPath = ".mozilla/firefox"; in { |   home.file = let cfgPath = ".mozilla/firefox"; in | ||||||
|  |     { | ||||||
|       "${cfgPath}/profiles.ini".text = '' |       "${cfgPath}/profiles.ini".text = '' | ||||||
|         [Profile0] |         [Profile0] | ||||||
|         Name=default |         Name=default | ||||||
|  | @ -112,5 +112,4 @@ | ||||||
|       ''; |       ''; | ||||||
|       "${cfgPath}/anish.default/chrome/userChrome.css".source = ./userChrome.css; |       "${cfgPath}/anish.default/chrome/userChrome.css".source = ./userChrome.css; | ||||||
|     }; |     }; | ||||||
|   }; |  | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue