diff --git a/README.md b/README.md index f660ec1..cbe0d9d 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,6 @@ Laureηt's Infrastructure
- - - diff --git a/flake.nix b/flake.nix index 03035b7..d5c002b 100644 --- a/flake.nix +++ b/flake.nix @@ -26,13 +26,11 @@ outputs = { nixpkgs, flake-utils, lanzaboote, agenix, home-manager, ... }: - # Provide colmena (flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in { devShells.default = pkgs.mkShell { packages = [ - pkgs.colmena # remote deployment pkgs.nixfmt # formatting pkgs.git # version control pkgs.update-nix-fetchgit # auto update fetchs @@ -42,45 +40,26 @@ }; })) // { - # colmena - colmena = { - meta = { - nixpkgs = import nixpkgs { - system = "x86_64-linux"; - overlays = [ ]; - }; - }; + # neodymium laptop + nixosConfigurations.neodymium = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/neodymium/configuration.nix + home-manager.nixosModules.home-manager + agenix.nixosModules.default + lanzaboote.nixosModules.lanzaboote + ]; + }; - # default config - defaults = { name, ... }: { - imports = [ - ./hosts/${name}/configuration.nix - home-manager.nixosModules.home-manager - agenix.nixosModules.default - lanzaboote.nixosModules.lanzaboote - ]; - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - }; - }; - - # personnal laptop - neodymium = { ... }: { - deployment = { - allowLocalDeployment = true; - targetHost = null; - }; - }; - - # ovh vps - hydrogen = { ... }: { - deployment = { - targetHost = "178.62.253.235"; - targetUser = "root"; - }; - }; + # hydrogen vps + nixosConfigurations.hydrogen = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/hydrogen/configuration.nix + home-manager.nixosModules.home-manager + agenix.nixosModules.default + lanzaboote.nixosModules.lanzaboote + ]; }; }; - } diff --git a/hosts/hydrogen/configuration.nix b/hosts/hydrogen/configuration.nix index b884e8d..0807f1e 100644 --- a/hosts/hydrogen/configuration.nix +++ b/hosts/hydrogen/configuration.nix @@ -1,4 +1,4 @@ -{ modulesPath, pkgs, lib, name, ... }: { +{ modulesPath, pkgs, lib, ... }: { imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [ (modulesPath + "/virtualisation/digital-ocean-config.nix") @@ -7,7 +7,7 @@ ]; networking = { - hostName = name; + hostName = "hydrogen"; domain = "fainsin.bzh"; firewall = { allowedTCPPorts = [ diff --git a/hosts/neodymium/configuration.nix b/hosts/neodymium/configuration.nix index b7e75f6..48c6ea2 100644 --- a/hosts/neodymium/configuration.nix +++ b/hosts/neodymium/configuration.nix @@ -30,7 +30,11 @@ }; programs.zsh.enable = true; - home-manager = { users.laurent = ./home; }; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.laurent = ./home; + }; # enable gnome virtual file system services.gvfs.enable = true; diff --git a/hosts/neodymium/home/packages.nix b/hosts/neodymium/home/packages.nix index f16fd3e..564dc8e 100644 --- a/hosts/neodymium/home/packages.nix +++ b/hosts/neodymium/home/packages.nix @@ -1,6 +1,13 @@ -{ pkgs, ... }: { - nixpkgs.config.allowUnfree = false; - services.mpris-proxy.enable = true; +{ pkgs, lib, ... }: { + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "vscode-insiders" + "vscode-extension-github-copilot" + "vscode-extension-ms-vsliveshare-vsliveshare" + ]; + + services.mpris-proxy.enable = true; # media keys + home.packages = with pkgs; [ baobab # disk utils borgbackup # backup diff --git a/hosts/neodymium/home/vscode/default.nix b/hosts/neodymium/home/vscode/default.nix index 03cd1f6..6881934 100644 --- a/hosts/neodymium/home/vscode/default.nix +++ b/hosts/neodymium/home/vscode/default.nix @@ -5,7 +5,7 @@ (oldAttrs: { src = (builtins.fetchTarball { url = - "https://code.visualstudio.com/sha/download?build=insider&os=linux-x64#2023-05-26"; + "https://code.visualstudio.com/sha/download?build=insider&os=linux-x64"; sha256 = "1cgrn4n6y348x0c7ndmn5vssvpj1sdk27bp91cayr27fb59lgmv9"; }); pname = "vscode-insiders";