Change to new home-manager installation scheme
This commit is contained in:
parent
f4f1f8d72d
commit
e376f462d0
10
home.nix
10
home.nix
|
@ -93,5 +93,13 @@ in {
|
||||||
(setStartpage "https://stats.maralorn.de/d/health-status")
|
(setStartpage "https://stats.maralorn.de/d/health-status")
|
||||||
];
|
];
|
||||||
|
|
||||||
hera = { };
|
hera = makeConfig "hera" [
|
||||||
|
./home
|
||||||
|
home/on-my-machine.nix
|
||||||
|
hosts/hera/weechat
|
||||||
|
hosts/hera/secret
|
||||||
|
home/kassandra.nix
|
||||||
|
home/headless-mpd.nix
|
||||||
|
home/mail.nix
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
21
home/headless-mpd.nix
Normal file
21
home/headless-mpd.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ ... }: {
|
||||||
|
services = {
|
||||||
|
mpd = {
|
||||||
|
enable = true;
|
||||||
|
network.listenAddress = "::1";
|
||||||
|
musicDirectory = "/media/audio";
|
||||||
|
extraConfig = ''
|
||||||
|
audio_output {
|
||||||
|
type "httpd"
|
||||||
|
name "HTTP Stream"
|
||||||
|
encoder "vorbis"
|
||||||
|
port "8666"
|
||||||
|
bitrate "192"
|
||||||
|
format "44100:16:1"
|
||||||
|
always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped.
|
||||||
|
tags "yes" # httpd supports sending tags to listening streams.
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
12
home/kassandra.nix
Normal file
12
home/kassandra.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
systemd.user.services.kassandra = {
|
||||||
|
Unit = { Description = "Kassandra Server"; };
|
||||||
|
Service = {
|
||||||
|
WorkingDirectory = "/var/www/kassandra";
|
||||||
|
ExecStart = "/var/www/kassandra/backend -b '::1' ";
|
||||||
|
Restart = "always";
|
||||||
|
Environment = "PATH=${pkgs.coreutils}/bin/:${pkgs.taskwarrior}/bin";
|
||||||
|
};
|
||||||
|
Install = { WantedBy = [ "default.target" ]; };
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,46 +0,0 @@
|
||||||
{ pkgs, config, ... }: {
|
|
||||||
|
|
||||||
imports = [ ../../home ../../home/on-my-machine.nix ./weechat ./secret ];
|
|
||||||
|
|
||||||
m-0 = {
|
|
||||||
hostName = "hera";
|
|
||||||
mail = {
|
|
||||||
enable = true;
|
|
||||||
accounts = config.m-0.private.mail_accounts;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
mpd = {
|
|
||||||
enable = true;
|
|
||||||
network.listenAddress = "::1";
|
|
||||||
musicDirectory = "/media/audio";
|
|
||||||
extraConfig = ''
|
|
||||||
audio_output {
|
|
||||||
type "httpd"
|
|
||||||
name "HTTP Stream"
|
|
||||||
encoder "vorbis"
|
|
||||||
port "8666"
|
|
||||||
bitrate "192"
|
|
||||||
format "44100:16:1"
|
|
||||||
always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped.
|
|
||||||
tags "yes" # httpd supports sending tags to listening streams.
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.user = {
|
|
||||||
services = {
|
|
||||||
kassandra = {
|
|
||||||
Unit = { Description = "Kassandra Server"; };
|
|
||||||
Service = {
|
|
||||||
WorkingDirectory = "/var/www/kassandra";
|
|
||||||
ExecStart = "/var/www/kassandra/backend -b '::1' ";
|
|
||||||
Restart = "always";
|
|
||||||
Environment = "PATH=${pkgs.coreutils}/bin/:${pkgs.taskwarrior}/bin";
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "default.target" ]; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
11
lib/test.nix
11
lib/test.nix
|
@ -27,13 +27,20 @@ in rec {
|
||||||
name = "test-home-config";
|
name = "test-home-config";
|
||||||
inherit bins;
|
inherit bins;
|
||||||
} (haskellBody "home" ''
|
} (haskellBody "home" ''
|
||||||
nix $ ["build", "-f", "<home-manager/home-manager/home-manager.nix>"] ++ paths ++ ["--argstr", "confPath", [i|#{configDir}/hosts/#{hostname}/home.nix|], "--argstr", "confAttr", "", "--out-link", [i|result-home-manager-#{hostname}|], "activationPackage"] ++ fmap toString args
|
nix $ ["build", "-f", "<home-manager/home-manager/home-manager.nix>"] ++ paths ++ ["--argstr", "confPath", [i|#{configDir}/home.nix|], "--argstr", "confAttr", hostname, "--out-link", [i|result-home-manager-#{hostname}|], "activationPackage"] ++ fmap toString args
|
||||||
'');
|
'');
|
||||||
|
|
||||||
repoSrc = "git@hera.m-0.eu:nixos-config";
|
repoSrc = "git@hera.m-0.eu:nixos-config";
|
||||||
configPath = "/etc/nixos";
|
configPath = "/etc/nixos";
|
||||||
systems = [ "apollo" "hera" ];
|
systems = [ "apollo" "hera" ];
|
||||||
homes = [ "apollo" "hera" "hephaistos" ];
|
homes = [
|
||||||
|
"apollo-tinkering"
|
||||||
|
"apollo-leisure"
|
||||||
|
"apollo-orga"
|
||||||
|
"apollo-research"
|
||||||
|
"hera"
|
||||||
|
"hephaistos"
|
||||||
|
];
|
||||||
keys = [ "default" "apollo" "hera" ];
|
keys = [ "default" "apollo" "hera" ];
|
||||||
test-config = writeHaskellScript {
|
test-config = writeHaskellScript {
|
||||||
name = "test-config";
|
name = "test-config";
|
||||||
|
|
|
@ -22,7 +22,7 @@ in {
|
||||||
${test-config}/bin/test-config
|
${test-config}/bin/test-config
|
||||||
/run/wrappers/bin/sudo -u ${user} git -C /etc/nixos pull
|
/run/wrappers/bin/sudo -u ${user} git -C /etc/nixos pull
|
||||||
${update-system}/bin/update-system
|
${update-system}/bin/update-system
|
||||||
/run/wrappers/bin/sudo -u ${user} ${update-home}/bin/update-home
|
/run/wrappers/bin/sudo -u ${user} ${update-home}/bin/update-home -A hera
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue