devos/nix: add nix module
This commit is contained in:
parent
c9835984c0
commit
2dd4d9860f
3 changed files with 18 additions and 19 deletions
|
@ -1,5 +1,8 @@
|
||||||
{ config, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
useUserPackages = true;
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
main = config;
|
main = config;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ channel, inputs, ... }: {
|
|
||||||
nix.nixPath = [
|
|
||||||
"nixpkgs=${channel.input}"
|
|
||||||
"nixos-config=${../../lib/compat/nixos}"
|
|
||||||
"home-manager=${inputs.home}"
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,5 +1,6 @@
|
||||||
{ config, pkgs, self, lib, ... }: {
|
{ channel, inputs, pkgs, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixUnstable;
|
package = pkgs.nixUnstable;
|
||||||
|
|
||||||
|
@ -23,13 +24,24 @@
|
||||||
keep-derivations = true
|
keep-derivations = true
|
||||||
fallback = true
|
fallback = true
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
nixPath = [
|
||||||
|
"nixpkgs=${channel.input}"
|
||||||
|
"nixos-config=${../../lib/compat/nixos}"
|
||||||
|
"home-manager=${inputs.home}"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixpkgs.config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [ nix-index nixfmt nixpkgs-fmt ];
|
systemPackages = with pkgs; [ nix-index nixfmt nixpkgs-fmt ];
|
||||||
|
|
||||||
shellAliases =
|
shellAliases =
|
||||||
let ifSudo = lib.mkIf config.security.sudo.enable;
|
let ifSudo = mkIf config.security.sudo.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# nix
|
# nix
|
||||||
|
@ -50,13 +62,4 @@
|
||||||
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
|
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useUserPackages = true;
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue