add tdesktop to home; change private config format

This commit is contained in:
chayleaf 2023-01-24 16:05:19 +07:00
parent 51f5b422ec
commit c40456f06e
7 changed files with 19 additions and 18 deletions

View file

@ -11,9 +11,11 @@
};
};
outputs = inputs@{ self, nixpkgs, home-manager, nur }:
outputs = { self, nixpkgs, home-manager, nur }:
let
priv = import ./private.nix inputs;
# IRL-related private config
priv = if builtins.pathExists ./private.nix then (import ./private.nix) else {};
getPriv = (hostname: with builtins; if hasAttr hostname priv then (getAttr hostname priv) else {});
in {
homeConfigurations = {
"user@nixmsi" = home-manager.lib.homeManagerConfiguration {
@ -21,8 +23,7 @@
modules = [
nur.nixosModules.nur
./hosts/nixmsi.nix
# IRL-related private config
priv.nixmsi
(getPriv "nixmsi")
];
};
};

View file

@ -28,6 +28,7 @@
protontricks proton-caller
bottles
gimp krita blender
tdesktop
# waiting until the PR gets merged
(looking-glass-client.overrideAttrs (old: {
version = "B6";

View file

@ -1,6 +0,0 @@
{ ... }:
{
nixmsi = {
# insert config here
};
}

5
home/private.nix.sample Normal file
View file

@ -0,0 +1,5 @@
{
nixmsi = { pkgs, ... }: {
# insert private config here
};
}

View file

@ -11,7 +11,8 @@
let
hw = nixos-hardware.nixosModules;
# IRL-related stuff I'd rather not put into git
priv = import ./private.nix inputs;
priv = if builtins.fileExists ./private.nix then (import ./private.nix inputs) else {};
getPriv = (hostname: with builtins; if hasAttr hostname priv then getAttr hostname priv else {});
in utils.lib.mkFlake {
inherit self inputs;
hostDefaults.modules = [
@ -29,13 +30,13 @@
nixmsi = {
system = "x86_64-linux";
modules = [
priv.nixmsi
./hosts/nixmsi.nix
hw.common-pc-ssd # enables fstrim
hw.common-cpu-amd # microcode
hw.common-cpu-amd-pstate # amd-pstate
hw.common-gpu-amd # configures drivers
hw.common-pc-laptop # enables tlp
(getPriv "nixmsi")
];
};
};

View file

@ -1,6 +0,0 @@
{ ... }:
{
nixmsi = {
# insert config here
};
}

View file

@ -0,0 +1,5 @@
{
nixmsi = { ... }: {
# insert private config here
};
}