reference modules with self
This commit is contained in:
parent
28bb7a9c4b
commit
bac8bd0c1e
|
@ -41,7 +41,7 @@
|
|||
};
|
||||
mkComputer = configurationNix: homeManagerRole: extraModules: nixpkgs.lib.nixosSystem {
|
||||
inherit system pkgs;
|
||||
specialArgs = { inherit system inputs; };
|
||||
specialArgs = { inherit self system inputs; };
|
||||
modules = (
|
||||
[
|
||||
# System configuration for this host
|
||||
|
@ -54,7 +54,9 @@
|
|||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${username}.imports = [ homeManagerRole ];
|
||||
home-manager.users.${username}.imports = [
|
||||
(import homeManagerRole { inherit self pkgs; })
|
||||
];
|
||||
}
|
||||
] ++ extraModules
|
||||
);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{ self, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./common
|
||||
(import ./common { inherit self; })
|
||||
./software/work-desktop
|
||||
./software/autorandr
|
||||
./software/czkawka
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
services.code-server = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
virtualisation.docker =
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
programs.droidcam.enable = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
services.espanso.enable = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
nix.extraOptions = ''
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{ self, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
services.restic.backups.${username} = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{ self, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
programs.steam.enable = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
let
|
||||
username = import ../../username.nix;
|
||||
username = import "${self}/username.nix";
|
||||
in
|
||||
{
|
||||
programs.xonsh = {
|
||||
|
|
Loading…
Reference in New Issue