Use Flakes for home-manager config also

This commit is contained in:
Trevor Vallender 2023-03-09 20:16:16 +00:00
parent da2d0899ce
commit d58ac6109f
5 changed files with 20 additions and 34 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
pushd ~/.my_config pushd ~/.my_config
nix flake update --recreate-lock-file nix flake update
popd popd
pushd ~/.my_config/bin pushd ~/.my_config/bin
./apply-system.bash ./apply-system.bash

View File

@ -2,7 +2,9 @@
"nodes": { "nodes": {
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs", "nixpkgs": [
"nixpkgs"
],
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
@ -14,8 +16,9 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "home-manager", "owner": "nix-community",
"type": "indirect" "repo": "home-manager",
"type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
@ -34,26 +37,10 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1678293141,
"narHash": "sha256-lLlQHaR0y+q6nd6kfpydPTGHhl1rS9nU9OQmztzKOYs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c90c4025bb6e0c4eaf438128a3b2640314b1c58d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs"
} }
}, },
"utils": { "utils": {

View File

@ -3,6 +3,10 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = inputs@{ nixpkgs, home-manager, ... }: { outputs = inputs@{ nixpkgs, home-manager, ... }: {
@ -12,6 +16,14 @@
modules = [ modules = [
./system/configuration.nix ./system/configuration.nix
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.tsv = import users/tsv/home.nix;
};
}
]; ];
}; };
}; };

View File

@ -82,7 +82,6 @@ in
services.openssh.enable = true; services.openssh.enable = true;
system.stateVersion = "22.11"; # Don't change this system.stateVersion = "22.11"; # Don't change this
} }

View File

@ -1,22 +1,11 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "tsv"; home.username = "tsv";
home.homeDirectory = "/home/tsv"; home.homeDirectory = "/home/tsv";
# 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 = "22.11"; home.stateVersion = "22.11";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -55,7 +44,6 @@
slack slack
spotify spotify
thunderbird thunderbird
vimPlugins.packer-nvim
wine wine
winetricks winetricks
zoom-us zoom-us