mirror of
https://github.com/foo-dogsquared/website.git
synced 2025-02-07 09:19:00 +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": {
|
"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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1699099776,
|
"lastModified": 1699099776,
|
||||||
@ -50,6 +70,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
|
43
flake.nix
43
flake.nix
@ -5,27 +5,42 @@
|
|||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05";
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
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 {
|
nixosConfigurations.desktop = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
({ config, lib, pkgs, ... }: {
|
nixSettings
|
||||||
# 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;
|
|
||||||
})
|
|
||||||
./hosts/desktop
|
./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