refactor: migrate home-manager configs to flakes
This commit is contained in:
parent
4d2a3f9a60
commit
eadfa1edca
|
@ -0,0 +1 @@
|
|||
*.lock linguist-generated
|
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
"nodes": {
|
||||
"custom-nixpkgs": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1669213025,
|
||||
"narHash": "sha256-4pMMNgRkIiY6bvXIUyANWEOJpkRgUEEwBaGYrX1h/EQ=",
|
||||
"owner": "msfjarvis",
|
||||
"repo": "custom-nixpkgs",
|
||||
"rev": "b8235de54d00a89678d3dd32c5ff5cfee47645e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "msfjarvis",
|
||||
"ref": "main",
|
||||
"repo": "custom-nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1669071065,
|
||||
"narHash": "sha256-KBpgj3JkvlPsJ3duOZqFJe6tgr+wc75t8sFmgRbBSbw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f7641a3ff398ccce952e19a199d775934e518c1d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1669140675,
|
||||
"narHash": "sha256-npzfyfLECsJWgzK/M4gWhykP2DNAJTYjgY2BWkz/oEQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2788904d26dda6cfa1921c5abb7a2466ffe3cb8c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"custom-nixpkgs": "custom-nixpkgs",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
description = "Home Manager configurations of Harsh Shandilya";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
custom-nixpkgs = {
|
||||
url = "github:msfjarvis/custom-nixpkgs/main";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, custom-nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: {
|
||||
custom = import custom-nixpkgs { inherit pkgs; };
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
homeConfigurations.ryzenbox = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [ ./nixos/ryzenbox-configuration.nix ];
|
||||
};
|
||||
homeConfigurations.server = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [ ./nixos/server-configuration.nix ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,15 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
customTarball = fetchTarball
|
||||
"https://github.com/msfjarvis/custom-nixpkgs/archive/e6ce40c3e84d005d723d6aa6c26d841d6f5e677e.tar.gz";
|
||||
in {
|
||||
{
|
||||
home.username = "msfjarvis";
|
||||
home.homeDirectory = "/home/msfjarvis";
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: { custom = import customTarball { }; };
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
customTarball = fetchTarball
|
||||
"https://github.com/msfjarvis/custom-nixpkgs/archive/e6ce40c3e84d005d723d6aa6c26d841d6f5e677e.tar.gz";
|
||||
in {
|
||||
{
|
||||
home.username = "msfjarvis";
|
||||
home.homeDirectory = "/home/msfjarvis";
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: { custom = import customTarball { }; };
|
||||
};
|
||||
|
||||
programs.aria2 = { enable = true; };
|
||||
|
||||
|
|
12
x
12
x
|
@ -47,22 +47,16 @@ case "${1:-nothing}" in
|
|||
set +x
|
||||
;;
|
||||
home-check)
|
||||
nix-channel --update
|
||||
cp nixos/ryzenbox-configuration.nix ~/.config/nixpkgs/home.nix
|
||||
home-manager build --show-trace
|
||||
home-manager build --flake .#ryzenbox
|
||||
;;
|
||||
home-switch)
|
||||
nix-channel --update
|
||||
cp nixos/ryzenbox-configuration.nix ~/.config/nixpkgs/home.nix
|
||||
home-manager switch
|
||||
home-manager switch --flake .#ryzenbox
|
||||
;;
|
||||
install)
|
||||
./install.sh
|
||||
;;
|
||||
server-switch)
|
||||
nix-channel --update
|
||||
cp nixos/server-configuration.nix ~/.config/nixpkgs/home.nix
|
||||
home-manager switch
|
||||
home-manager switch --flake .#server
|
||||
;;
|
||||
test | nothing)
|
||||
shfmt -d -s -i 2 -ci "${SCRIPTS_TO_TEST[@]}"
|
||||
|
|
Loading…
Reference in New Issue