From 52365bc4f2e088c2c5d0414798f58b06073c4ee8 Mon Sep 17 00:00:00 2001 From: glenn Date: Sun, 23 Jun 2024 12:28:28 +0200 Subject: [PATCH] init sondell home --- flake.nix | 38 +++++++++++++++++++++++++++++--------- home/sondell.nix | 25 +++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 home/sondell.nix diff --git a/flake.nix b/flake.nix index aa86fed..3d37b82 100644 --- a/flake.nix +++ b/flake.nix @@ -1,17 +1,37 @@ { - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - inputs.home.url = "git+https://git.sondell.org/glennwso/home.git"; - inputs.home.inputs.nixpkgs.follows = "nixpkgs"; - inputs.nixos-mailserver = { - url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + home = { + url = "git+https://git.sondell.org/glennwso/home.git"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixos-mailserver = { + url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; + inputs.nixpkgs.follows = "nixpkgs"; + }; +}; - outputs = { self, nixpkgs, home, nixos-mailserver}@attrs: + outputs = { self, nixpkgs, home, nixos-mailserver, home-manager}@attrs: let system = "x86_64-linux"; homepage = home.packages.${system}.default; mailserver = nixos-mailserver.nixosModules.default; + + homeSettings = { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.sondell = import ./home/sondell.nix; + }; + }; + homeModules = [ + home-manager.nixosModules.home-manager + homeSettings + ]; in { # replace 'joes-desktop' with your hostname here. @@ -33,7 +53,7 @@ ./vaultwarden.nix (import ./mail.nix {inherit mailserver;}) (import ./homepage.nix {inherit homepage;}) - ]; + ] ++ homeModules; }; }; diff --git a/home/sondell.nix b/home/sondell.nix new file mode 100644 index 0000000..584375f --- /dev/null +++ b/home/sondell.nix @@ -0,0 +1,25 @@ +{ + # pkgs, + # config, + # lib, + ... +}: +{ + # Home Manager needs a bit of information about you and the + # paths it should manage. + home.username = "sondell"; + home.homeDirectory = "/home/sondell"; + + # This value determines the Home Manager release that your + # configuration is compatible with. This helps avoid breakage + # when a new Home Manager release introduces backwards + # incompatible changes. + # + # You can update Home Manager without changing this value. See + # the Home Manager release notes for a list of state version + # changes in each release. + home.stateVersion = "24.05"; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +}