Compare commits
2 commits
8679ede69b
...
b63400e00b
Author | SHA1 | Date | |
---|---|---|---|
|
b63400e00b | ||
|
a8687e89f1 |
2 changed files with 56 additions and 75 deletions
|
@ -1,18 +1,8 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
{ pkgs, ... }:
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ’nixos-help’).
|
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
# Additional configuration from github/jeremiehuchet/nixos-macbookpro
|
|
||||||
boot.kernelParams = [
|
|
||||||
"hid_apple.fnmode=1"
|
|
||||||
"hid_apple.swap_fn_leftctrl=1"
|
|
||||||
"hid_apple.iso_layout=0"
|
|
||||||
];
|
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"vm.swappiness" = 10;
|
"vm.swappiness" = 10;
|
||||||
};
|
};
|
||||||
|
@ -21,9 +11,9 @@
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.systemd-boot.consoleMode = "0";
|
boot.loader.systemd-boot.consoleMode = "0";
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
boot.loader.efi.efiSysMountPoint = "/boot";
|
||||||
|
|
||||||
networking.hostName = "luffy"; # Define your hostname.
|
networking.hostName = "sabo";
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
127.0.0.1 yeswiki.test hedgedoc.nixin.local
|
127.0.0.1 yeswiki.test hedgedoc.nixin.local
|
||||||
192.168.36.206 chmok.net
|
192.168.36.206 chmok.net
|
||||||
|
@ -93,12 +83,5 @@
|
||||||
decode = true; # for http access via https://127.0.0.1:8080/uri-res/N2R?urn:eris:...
|
decode = true; # for http access via https://127.0.0.1:8080/uri-res/N2R?urn:eris:...
|
||||||
package = pkgs.eris-go; # default package
|
package = pkgs.eris-go; # default package
|
||||||
};
|
};
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It's perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
# Local developpement
|
# Local developpement
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
@ -17,60 +15,60 @@
|
||||||
#waydroid.enable = true
|
#waydroid.enable = true
|
||||||
};
|
};
|
||||||
#programs.virt-manager.enable = true;
|
#programs.virt-manager.enable = true;
|
||||||
systemd.services.yeswikidev = {
|
#systemd.services.yeswikidev = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
script = ''
|
# script = ''
|
||||||
${pkgs.systemd}/bin/systemctl start mysql
|
# ${pkgs.systemd}/bin/systemctl start mysql
|
||||||
# etc
|
# # etc
|
||||||
'';
|
# '';
|
||||||
serviceConfig =
|
# serviceConfig =
|
||||||
let
|
# let
|
||||||
startstop =
|
# startstop =
|
||||||
command:
|
# command:
|
||||||
(pkgs.writeShellApplication {
|
# (pkgs.writeShellApplication {
|
||||||
name = "yeswikidev";
|
# name = "yeswikidev";
|
||||||
runtimeInputs = with pkgs; [ systemd ];
|
# runtimeInputs = with pkgs; [ systemd ];
|
||||||
text = ''
|
# text = ''
|
||||||
systemctl ${command} mysql.service
|
# systemctl ${command} mysql.service
|
||||||
'';
|
# '';
|
||||||
});
|
# });
|
||||||
#startstopFullShell = pkgs.writeShellApplication {
|
#startstopFullShell = pkgs.writeShellApplication {
|
||||||
# name = "yeswikidev";
|
# name = "yeswikidev";
|
||||||
# runtimeInputs = with pkgs; [ systemd ];
|
# runtimeInputs = with pkgs; [ systemd ];
|
||||||
# text = ''
|
# text = ''
|
||||||
# systemctl "$1" mysql.service
|
# systemctl "$1" mysql.service
|
||||||
# '';
|
# '';
|
||||||
#});
|
#});
|
||||||
#commands = [ "start" "stop" ];
|
#commands = [ "start" "stop" ];
|
||||||
#scripts = map (command: (pkgs.writeShellApplication {
|
#scripts = map (command: (pkgs.writeShellApplication {
|
||||||
# name = "yeswikidev";
|
# name = "yeswikidev";
|
||||||
# runtimeInputs = with pkgs; [ systemd ];
|
# runtimeInputs = with pkgs; [ systemd ];
|
||||||
# text = ''
|
# text = ''
|
||||||
# systemctl ${command} mysql.service
|
# systemctl ${command} mysql.service
|
||||||
# '';
|
# '';
|
||||||
#})) commands;
|
#})) commands;
|
||||||
|
|
||||||
in
|
# in
|
||||||
#execs = {
|
#execs = {
|
||||||
# ExecStart = "start";
|
# ExecStart = "start";
|
||||||
# ExecStop = "stop";
|
# ExecStop = "stop";
|
||||||
#};
|
#};
|
||||||
# https://nixos.org/manual/nix/stable/language/builtins
|
# https://nixos.org/manual/nix/stable/language/builtins
|
||||||
# https://nixos.org/manual/nix/stable/language/builtins#builtins-mapAttrs
|
# https://nixos.org/manual/nix/stable/language/builtins#builtins-mapAttrs
|
||||||
#execAttrs = attrNames execs; # ["Start" "Stop"];
|
#execAttrs = attrNames execs; # ["Start" "Stop"];
|
||||||
#execs2 = mapAttrs (k: v: ()) execs;
|
#execs2 = mapAttrs (k: v: ()) execs;
|
||||||
{
|
# {
|
||||||
# pkgs.writeScript, pkgs.writeScriptBin
|
# pkgs.writeScript, pkgs.writeScriptBin
|
||||||
#ExecStart = startstop "start";
|
#ExecStart = startstop "start";
|
||||||
#ExecStop = startstop "stop";
|
#ExecStop = startstop "stop";
|
||||||
# OR
|
# OR
|
||||||
# ExecStart = "${startstopFullShell} start";
|
# ExecStart = "${startstopFullShell} start";
|
||||||
# ExecStop = "${startstopFullShell} stop";
|
# ExecStop = "${startstopFullShell} stop";
|
||||||
# OR
|
# OR
|
||||||
# ExecStart = "${scripts[0]}";
|
# ExecStart = "${scripts[0]}";
|
||||||
# ExecStop = "${scripts[1]}";
|
# ExecStop = "${scripts[1]}";
|
||||||
};
|
# };
|
||||||
};
|
#};
|
||||||
|
|
||||||
services.mysql = {
|
services.mysql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue