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