mirror of
https://github.com/foo-dogsquared/website.git
synced 2025-01-30 22:57:59 +00:00
project: add home-manager config
This commit is contained in:
parent
8938c60ce7
commit
d862b90209
21
flake.lock
generated
21
flake.lock
generated
@ -1,5 +1,25 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1699368917,
|
||||
"narHash": "sha256-nUtGIWf86BOkUbtksWtfglvCZ/otP0FTZlQH8Rzc7PA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "6a8444467c83c961e2f5ff64fb4f422e303c98d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1699099776,
|
||||
@ -50,6 +70,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
|
43
flake.nix
43
flake.nix
@ -5,27 +5,42 @@
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@{ nixpkgs, ... }: {
|
||||
outputs = inputs@{ nixpkgs, home-manager, ... }: let
|
||||
system = "x86_64-linux";
|
||||
nixSettings = { config, lib, pkgs, ... }: {
|
||||
# Setting each of the flake inputs as part of the system registry
|
||||
# including our own flake which is just renamed from "self" to
|
||||
# "config".
|
||||
nix.registry =
|
||||
lib.mapAttrs'
|
||||
(name: flake:
|
||||
let
|
||||
name' = if (name == "self") then "config" else name;
|
||||
in
|
||||
lib.nameValuePair name' { inherit flake; })
|
||||
inputs;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations.desktop = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
({ config, lib, pkgs, ... }: {
|
||||
# Setting each of the flake inputs as part of the system registry
|
||||
# including our own flake which is just renamed from "self" to
|
||||
# "config".
|
||||
nix.registry =
|
||||
lib.mapAttrs'
|
||||
(name: flake:
|
||||
let
|
||||
name' = if (name == "self") then "config" else name;
|
||||
in
|
||||
lib.nameValuePair name' { inherit flake; })
|
||||
inputs;
|
||||
})
|
||||
nixSettings
|
||||
./hosts/desktop
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.foodogsquared = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
modules = [
|
||||
nixSettings
|
||||
./users/foodogsquared
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
6
users/foodogsquared/default.nix
Normal file
6
users/foodogsquared/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.home-manager.enable = true;
|
||||
home.stateVersion = "23.11";
|
||||
}
|
Loading…
Reference in New Issue
Block a user