commit d0c940ca1ea323ec50678ca60d5684a5ace23e92
parent f5f2fe7abf002b909c2921096901a4fbd4f09a23
Author: Vincent Demeester <vincent@sbr.pm>
Date: Thu, 30 Apr 2020 16:54:19 +0200
nixpkgsfmt pass on nix files 😛
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
36 files changed, 771 insertions(+), 717 deletions(-)
diff --git a/machines/fedora-base.nix b/machines/fedora-base.nix
@@ -1,4 +1,4 @@
-{ pkgs, ...}:
+{ pkgs, ... }:
{
imports = [ ./base.nix ];
diff --git a/modules/hardware/sane-extra-config.nixos.nix b/modules/hardware/sane-extra-config.nixos.nix
@@ -1,14 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
-
let
-
cfg = config.hardware.sane;
pkg = if cfg.snapshot
- then pkgs.sane-backends-git
- else pkgs.sane-backends;
+ then pkgs.sane-backends-git
+ else pkgs.sane-backends;
backends = [ pkg ] ++ cfg.extraBackends;
@@ -17,17 +15,17 @@ let
saneExtraConfig = pkgs.runCommand "sane-extra-config" {} ''
cp -Lr '${pkgs.mkSaneConfig { paths = [ pkgs.sane-backends ]; }}'/etc/sane.d $out
chmod +w $out
- ${concatMapStrings (c: ''
+ ${concatMapStrings (
+ c: ''
f="$out/${c.name}.conf"
[ ! -e "$f" ] || chmod +w "$f"
cat ${builtins.toFile "" (c.value + "\n")} >>"$f"
chmod -w "$f"
- '') (mapAttrsToList nameValuePair cfg.extraConfig)}
+ ''
+ ) (mapAttrsToList nameValuePair cfg.extraConfig)}
chmod -w $out
'';
-
in
-
{
options = {
hardware.sane.extraConfig = mkOption {
diff --git a/modules/module-list.nixos.nix b/modules/module-list.nixos.nix
@@ -1,5 +1,3 @@
-{ pkgs, lib, ... }:
-
{
imports = [
./hardware/sane-extra-config.nixos.nix
diff --git a/modules/profiles/audio.nix b/modules/profiles/audio.nix
@@ -18,35 +18,41 @@ in
};
};
};
- config = mkIf cfg.enable (mkMerge [
- {
- services.shairport-sync.enable = cfg.shairport-sync;
- }
- (mkIf cfg.mpd.enable {
- services.mpd = {
- enable = true;
- musicDirectory = cfg.mpd.musicDir;
- network.listenAddress = "any";
- extraConfig = ''
- audio_output {
- type "pulse"
- name "Local MPD"
+ config = mkIf cfg.enable (
+ mkMerge [
+ {
+ services.shairport-sync.enable = cfg.shairport-sync;
+ }
+ (
+ mkIf cfg.mpd.enable {
+ services.mpd = {
+ enable = true;
+ musicDirectory = cfg.mpd.musicDir;
+ network.listenAddress = "any";
+ extraConfig = ''
+ audio_output {
+ type "pulse"
+ name "Local MPD"
+ }
+ '';
+ };
+ services.mpdris2 = {
+ enable = true;
+ mpd.host = "127.0.0.1";
+ };
+ home.packages = with pkgs; [
+ mpc_cli
+ ncmpcpp
+ ];
}
- '';
- };
- services.mpdris2 = {
- enable = true;
- mpd.host = "127.0.0.1";
- };
- home.packages = with pkgs; [
- mpc_cli
- ncmpcpp
- ];
- })
- (mkIf (cfg.mpd.enable && config.profiles.desktop.enable) {
- home.packages = with pkgs; [
- ario
- ];
- })
- ]);
+ )
+ (
+ mkIf (cfg.mpd.enable && config.profiles.desktop.enable) {
+ home.packages = with pkgs; [
+ ario
+ ];
+ }
+ )
+ ]
+ );
}
diff --git a/modules/profiles/base.nixos.nix b/modules/profiles/base.nixos.nix
@@ -36,7 +36,7 @@ in
vim
vrsync
wget
- gnumake
+ gnumake
];
};
systemd.services."status-email-root@" = {
diff --git a/modules/profiles/buildkit.nixos.nix b/modules/profiles/buildkit.nixos.nix
@@ -33,7 +33,7 @@ in
cfg.package
];
virtualisation = {
- buildkitd= {
+ buildkitd = {
enable = true;
package = cfg.package;
packages = [ cfg.runcPackage pkgs.git ];
diff --git a/modules/profiles/containers.nix b/modules/profiles/containers.nix
@@ -28,12 +28,12 @@ in
];
home.file."bin/kontain.me" = {
text = ''
- #!${pkgs.stdenv.shell}
- command -v docker >/dev/null && {
- docker run -ti --rm kontain.me/ko/$@
- } || {
- podman run -ti --rm kontain.me/ko/$@
- }
+ #!${pkgs.stdenv.shell}
+ command -v docker >/dev/null && {
+ docker run -ti --rm kontain.me/ko/$@
+ } || {
+ podman run -ti --rm kontain.me/ko/$@
+ }
'';
executable = true;
};
diff --git a/modules/profiles/dev.java.nix b/modules/profiles/dev.java.nix
@@ -16,16 +16,20 @@ in
idea = mkEnableOption "Install intellij idea";
};
};
- config = mkIf cfg.enable (mkMerge [
- {
- profiles.dev.enable = true;
- home.packages = with pkgs; [
- cfg.javaPackage
- gradle
- ];
- }
- (mkIf cfg.idea {
- home.packages = with pkgs; [ jetbrains.idea-ultimate ];
- })
- ]);
+ config = mkIf cfg.enable (
+ mkMerge [
+ {
+ profiles.dev.enable = true;
+ home.packages = with pkgs; [
+ cfg.javaPackage
+ gradle
+ ];
+ }
+ (
+ mkIf cfg.idea {
+ home.packages = with pkgs; [ jetbrains.idea-ultimate ];
+ }
+ )
+ ]
+ );
}
diff --git a/modules/profiles/dev.js.nix b/modules/profiles/dev.js.nix
@@ -10,20 +10,24 @@ in
enable = mkEnableOption "Enable js development profile";
};
};
- config = mkIf cfg.enable (mkMerge [
- {
- home.file.".npmrc".text = ''
- prefix = ${config.home.homeDirectory}/.local/npm
- '';
- home.packages = with pkgs; [
- nodejs-10_x
- yarn
- ];
- }
- (mkIf config.profiles.fish.enable {
- xdg.configFile."fish/conf.d/js.fish".text = ''
- set -gx PATH ${config.home.homeDirectory}/.local/npm/bin $PATH
- '';
- })
- ]);
+ config = mkIf cfg.enable (
+ mkMerge [
+ {
+ home.file.".npmrc".text = ''
+ prefix = ${config.home.homeDirectory}/.local/npm
+ '';
+ home.packages = with pkgs; [
+ nodejs-10_x
+ yarn
+ ];
+ }
+ (
+ mkIf config.profiles.fish.enable {
+ xdg.configFile."fish/conf.d/js.fish".text = ''
+ set -gx PATH ${config.home.homeDirectory}/.local/npm/bin $PATH
+ '';
+ }
+ )
+ ]
+ );
}
diff --git a/modules/profiles/dev.rust.nix b/modules/profiles/dev.rust.nix
@@ -10,18 +10,22 @@ in
enable = mkEnableOption "Enable rust development profile";
};
};
- config = mkIf cfg.enable (mkMerge [
- {
- profiles.dev.enable = true;
- home.packages = with pkgs; [
- gcc
- rustup
- ];
- }
- (mkIf config.profiles.emacs.enable {
- home.packages = with pkgs; [
- rustracer
- ];
- })
- ]);
+ config = mkIf cfg.enable (
+ mkMerge [
+ {
+ profiles.dev.enable = true;
+ home.packages = with pkgs; [
+ gcc
+ rustup
+ ];
+ }
+ (
+ mkIf config.profiles.emacs.enable {
+ home.packages = with pkgs; [
+ rustracer
+ ];
+ }
+ )
+ ]
+ );
}
diff --git a/modules/profiles/direnv.nix b/modules/profiles/direnv.nix
@@ -14,30 +14,38 @@ in
};
};
};
- config = mkIf cfg.enable (mkMerge [
- {
- programs.direnv = {
- enable = true;
- config = {
- whitelist = {
- prefix = [
- "${config.home.homeDirectory}/src/github.com/knative"
- "${config.home.homeDirectory}/src/github.com/openshift"
- "${config.home.homeDirectory}/src/github.com/tektoncd"
- "${config.home.homeDirectory}/src/github.com/vdemeester"
- ];
+ config = mkIf cfg.enable (
+ mkMerge [
+ {
+ programs.direnv = {
+ enable = true;
+ config = {
+ whitelist = {
+ prefix = [
+ "${config.home.homeDirectory}/src/github.com/knative"
+ "${config.home.homeDirectory}/src/github.com/openshift"
+ "${config.home.homeDirectory}/src/github.com/tektoncd"
+ "${config.home.homeDirectory}/src/github.com/vdemeester"
+ ];
+ };
};
};
- };
- }
- (mkIf config.profiles.fish.enable {
- programs.direnv.enableFishIntegration = true;
- })
- (mkIf config.profiles.zsh.enable {
- programs.direnv.enableZshIntegration = true;
- })
- (mkIf config.profiles.bash.enable {
- programs.direnv.enableBashIntegration = true;
- })
- ]);
+ }
+ (
+ mkIf config.profiles.fish.enable {
+ programs.direnv.enableFishIntegration = true;
+ }
+ )
+ (
+ mkIf config.profiles.zsh.enable {
+ programs.direnv.enableZshIntegration = true;
+ }
+ )
+ (
+ mkIf config.profiles.bash.enable {
+ programs.direnv.enableBashIntegration = true;
+ }
+ )
+ ]
+ );
}
diff --git a/modules/profiles/docker.nix b/modules/profiles/docker.nix
@@ -10,20 +10,24 @@ in
enable = mkEnableOption "Enable docker profile";
};
};
- config = mkIf cfg.enable (mkMerge [
- {
- home.packages = with pkgs; [
- docker
- docker-machine
- docker-machine-kvm
- docker-machine-kvm2
- docker-compose
- ];
- }
- (mkIf config.profiles.fish.enable {
- xdg.configFile."fish/conf.d/docker.fish".text = ''
- # set -gx DOCKER_BUILDKIT 1
- '';
- })
- ]);
+ config = mkIf cfg.enable (
+ mkMerge [
+ {
+ home.packages = with pkgs; [
+ docker
+ docker-machine
+ docker-machine-kvm
+ docker-machine-kvm2
+ docker-compose
+ ];
+ }
+ (
+ mkIf config.profiles.fish.enable {
+ xdg.configFile."fish/conf.d/docker.fish".text = ''
+ # set -gx DOCKER_BUILDKIT 1
+ '';
+ }
+ )
+ ]
+ );
}
diff --git a/modules/profiles/docker.nixos.nix b/modules/profiles/docker.nixos.nix
@@ -36,7 +36,7 @@ in
};
};
environment.etc."docker/daemon.json".text = ''
- {"features":{"buildkit": true}, "insecure-registries": ["172.30.0.0/16", "192.168.12.0/16", "massimo.home:5000", "r.svc.home:5000", "r.svc.home" ]}
+ {"features":{"buildkit": true}, "insecure-registries": ["172.30.0.0/16", "192.168.12.0/16", "massimo.home:5000", "r.svc.home:5000", "r.svc.home" ]}
'';
networking.firewall.trustedInterfaces = [ "docker0" ];
};
diff --git a/modules/profiles/fish.nix b/modules/profiles/fish.nix
@@ -16,18 +16,18 @@ in
};
config = mkIf cfg.enable {
programs.fish = {
- enable = true;
- shellAliases = import ./aliases.shell.nix;
- shellInit = ''
- # emacs ansi-term support
- if test -n "$EMACS"
- set -x TERM eterm-color
+ enable = true;
+ shellAliases = import ./aliases.shell.nix;
+ shellInit = ''
+ # emacs ansi-term support
+ if test -n "$EMACS"
+ set -x TERM eterm-color
- # this function may be required
- function fish_title
- true
+ # this function may be required
+ function fish_title
+ true
+ end
end
- end
'';
};
xdg.configFile."fish/conf.d/sudope.fish".source = ./assets/fish/sudope.fish;
@@ -36,16 +36,20 @@ in
xdg.configFile."fish/functions/fish_right_prompt.fish".source = ./assets/fish/fish_right_prompt.fish;
xdg.configFile."nr/default" = {
text = builtins.toJSON [
- {cmd = "ncdu";} {cmd = "sshfs";} {cmd = "gotop";} {cmd = "pandoc";} { cmd = "nix-review"; }
- {cmd = "lspci"; pkg = "pciutils";}
- {cmd = "lsusb"; pkg = "usbutils";}
- {cmd = "9"; pkg = "plan9port"; }
- {cmd = "wakeonlan"; pkg = "python36Packages.wakeonlan";}
- {cmd = "beet"; pkg = "beets";}
- {cmd = "http"; pkg = "httpie"; }
- {cmd = "nix-prefetch-git"; pkg = "nix-prefetch-scripts";}
- {cmd = "nix-prefetch-hg"; pkg = "nix-prefetch-scripts";}
- {cmd = "op"; pkg = "_1password"; chan = "unstable";}
+ { cmd = "ncdu"; }
+ { cmd = "sshfs"; }
+ { cmd = "gotop"; }
+ { cmd = "pandoc"; }
+ { cmd = "nix-review"; }
+ { cmd = "lspci"; pkg = "pciutils"; }
+ { cmd = "lsusb"; pkg = "usbutils"; }
+ { cmd = "9"; pkg = "plan9port"; }
+ { cmd = "wakeonlan"; pkg = "python36Packages.wakeonlan"; }
+ { cmd = "beet"; pkg = "beets"; }
+ { cmd = "http"; pkg = "httpie"; }
+ { cmd = "nix-prefetch-git"; pkg = "nix-prefetch-scripts"; }
+ { cmd = "nix-prefetch-hg"; pkg = "nix-prefetch-scripts"; }
+ { cmd = "op"; pkg = "_1password"; chan = "unstable"; }
];
onChange = "${pkgs.nur.repos.vdemeester.nr}/bin/nr default";
};
diff --git a/modules/profiles/git.nixos.nix b/modules/profiles/git.nixos.nix
@@ -20,54 +20,55 @@ in
gitAndTools.git-annex
gitAndTools.git-extras
];
- environment.etc."gitconfig" = rec { text = ''
- [alias]
- co = checkout
- st = status
- ci = commit --signoff
- ca = commit --amend
- b = branc --color -v
- br = branch
- unstage = reset HEAD
- lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
- lga = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --branches --remotes
- lol = log --pretty=oneline --abbrev-commit --graph --decorate
- conflicts = !git ls-files --unmerged | cut -c51- | sort -u | xargs $EDITOR
- resolve = !git ls-files --unmerged | cut -c51- | sort -u | xargs git add
- [color]
- branch = auto
- diff = auto
- status = auto
- [color "branch"]
- current = cyan reverse
- local = cyan
- remote = green
- [color "diff"]
- meta = white reverse
- frag = magenta reverse
- old = red
- new = green
- [color "status"]
- added = green
- changed = yellow
- untracked = red
- [core]
- #excludesfile = ~/.gitignore.global
- [push]
- default = matching
- [merge]
- tool = vimdiff
+ environment.etc."gitconfig" = rec {
+ text = ''
+ [alias]
+ co = checkout
+ st = status
+ ci = commit --signoff
+ ca = commit --amend
+ b = branc --color -v
+ br = branch
+ unstage = reset HEAD
+ lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
+ lga = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --branches --remotes
+ lol = log --pretty=oneline --abbrev-commit --graph --decorate
+ conflicts = !git ls-files --unmerged | cut -c51- | sort -u | xargs $EDITOR
+ resolve = !git ls-files --unmerged | cut -c51- | sort -u | xargs git add
+ [color]
+ branch = auto
+ diff = auto
+ status = auto
+ [color "branch"]
+ current = cyan reverse
+ local = cyan
+ remote = green
+ [color "diff"]
+ meta = white reverse
+ frag = magenta reverse
+ old = red
+ new = green
+ [color "status"]
+ added = green
+ changed = yellow
+ untracked = red
+ [core]
+ #excludesfile = ~/.gitignore.global
+ [push]
+ default = matching
+ [merge]
+ tool = vimdiff
- [user]
- name = Vincent Demeester
- email = vincent@sbr.pm
+ [user]
+ name = Vincent Demeester
+ email = vincent@sbr.pm
- [http]
- cookiefile = /home/vincent/.gitcookies
+ [http]
+ cookiefile = /home/vincent/.gitcookies
- [url "git@github.com:"]
- pushInsteadOf = git://github.com/
- '';
+ [url "git@github.com:"]
+ pushInsteadOf = git://github.com/
+ '';
};
};
}
diff --git a/modules/profiles/gpg.nix b/modules/profiles/gpg.nix
@@ -27,7 +27,7 @@ in
enableSshSupport = true;
defaultCacheTtlSsh = 7200;
extraConfig = ''
-pinentry-program ${cfg.pinentry}
+ pinentry-program ${cfg.pinentry}
'';
};
};
diff --git a/modules/profiles/mail.nixos.nix b/modules/profiles/mail.nixos.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ...}:
+{ config, lib, pkgs, ... }:
with lib;
let
diff --git a/modules/profiles/mails.nix b/modules/profiles/mails.nix
@@ -8,201 +8,205 @@ let
in
{
-options = {
- profiles.mails = {
- enable = mkEnableOption "Enable mails configuration";
- sync = mkEnableOption "Enable sync mail service";
- frequency = mkOption {
- default = "*:0/30";
- description = "Frequency at which the mail should be checked";
- type = types.str;
+ options = {
+ profiles.mails = {
+ enable = mkEnableOption "Enable mails configuration";
+ sync = mkEnableOption "Enable sync mail service";
+ frequency = mkOption {
+ default = "*:0/30";
+ description = "Frequency at which the mail should be checked";
+ type = types.str;
+ };
};
};
-};
-
-config = mkIf cfg.enable (mkMerge [
- {
-
-accounts.email = {
- maildirBasePath = "desktop/mails";
- accounts = {
- "redhat" = {
- address = "vdemeest@redhat.com";
- userName = "vdemeest@redhat.com";
- realName = "Vincent Demeester";
- passwordCommand = "${pkgs.gnupg}/bin/gpg -q --for-your-eyes-only --no-tty --exit-on-status-write-error --batch --passphrase-file ${config.home.homeDirectory}/sync/rh.pass -d ${config.home.homeDirectory}/desktop/documents/rh.pass.gpg";
- imap.host = "imap.gmail.com";
- smtp.host = "smtp.gmail.com";
- mbsync = {
- enable = true;
- create = "both";
- expunge = "both";
- patterns = ["*" "![Gmail]*" "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"];
- extraConfig = {
- channel = {
- Sync = "All";
- };
- account = {
- Timeout = 120;
- PipelineDepth = 1;
+
+ config = mkIf cfg.enable (
+ mkMerge [
+ {
+
+ accounts.email = {
+ maildirBasePath = "desktop/mails";
+ accounts = {
+ "redhat" = {
+ address = "vdemeest@redhat.com";
+ userName = "vdemeest@redhat.com";
+ realName = "Vincent Demeester";
+ passwordCommand = "${pkgs.gnupg}/bin/gpg -q --for-your-eyes-only --no-tty --exit-on-status-write-error --batch --passphrase-file ${config.home.homeDirectory}/sync/rh.pass -d ${config.home.homeDirectory}/desktop/documents/rh.pass.gpg";
+ imap.host = "imap.gmail.com";
+ smtp.host = "smtp.gmail.com";
+ mbsync = {
+ enable = true;
+ create = "both";
+ expunge = "both";
+ patterns = [ "*" "![Gmail]*" "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail" ];
+ extraConfig = {
+ channel = {
+ Sync = "All";
+ };
+ account = {
+ Timeout = 120;
+ PipelineDepth = 1;
+ };
+ };
+ };
+ notmuch.enable = cfg.sync;
+ astroid.enable = cfg.sync;
+ msmtp.enable = true;
+ };
+ "perso" = {
+ address = "vinc.demeester@gmail.com";
+ userName = "vinc.demeester@gmail.com";
+ realName = "Vincent Demeester";
+ passwordCommand = "${pkgs.gnupg}/bin/gpg -q --for-your-eyes-only --no-tty --exit-on-status-write-error --batch --passphrase-file ${config.home.homeDirectory}/sync/perso.pass -d ${config.home.homeDirectory}/desktop/documents/perso.pass.gpg";
+ imap.host = "imap.gmail.com";
+ smtp.host = "smtp.gmail.com";
+ mbsync = {
+ enable = true;
+ create = "both";
+ expunge = "both";
+ patterns = [ "*" "![Gmail]*" "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail" ];
+ extraConfig = {
+ channel = {
+ Sync = "All";
+ };
+ account = {
+ Timeout = 120;
+ PipelineDepth = 1;
+ };
+ };
+ };
+ notmuch.enable = cfg.sync;
+ astroid.enable = cfg.sync;
+ msmtp.enable = true;
+ };
+ "prv" = {
+ primary = true;
+ address = "vincent@demeester.fr";
+ userName = "vincent@demeester.fr";
+ realName = "Vincent Demeester";
+ passwordCommand = "${pkgs.gnupg}/bin/gpg -q --for-your-eyes-only --no-tty --exit-on-status-write-error --batch --passphrase-file ${config.home.homeDirectory}/sync/prv.pass -d ${config.home.homeDirectory}/desktop/documents/prv.pass.gpg";
+ imap.host = "mail.gandi.net";
+ smtp.host = "mail.gandi.net";
+ mbsync = {
+ enable = true;
+ create = "both";
+ expunge = "both";
+ patterns = [ "*" ];
+ extraConfig = {
+ channel = {
+ Sync = "All";
+ };
+ account = {
+ Timeout = 120;
+ PipelineDepth = 1;
+ };
+ };
+ };
+ notmuch.enable = cfg.sync;
+ astroid.enable = cfg.sync;
+ msmtp.enable = true;
+ };
};
};
- };
- notmuch.enable = cfg.sync;
- astroid.enable = cfg.sync;
- msmtp.enable = true;
- };
- "perso" = {
- address = "vinc.demeester@gmail.com";
- userName = "vinc.demeester@gmail.com";
- realName = "Vincent Demeester";
- passwordCommand = "${pkgs.gnupg}/bin/gpg -q --for-your-eyes-only --no-tty --exit-on-status-write-error --batch --passphrase-file ${config.home.homeDirectory}/sync/perso.pass -d ${config.home.homeDirectory}/desktop/documents/perso.pass.gpg";
- imap.host = "imap.gmail.com";
- smtp.host = "smtp.gmail.com";
- mbsync = {
- enable = true;
- create = "both";
- expunge = "both";
- patterns = ["*" "![Gmail]*" "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"];
- extraConfig = {
- channel = {
- Sync = "All";
- };
- account = {
- Timeout = 120;
- PipelineDepth = 1;
- };
+
+ home.file."bin/msmtp" = {
+ text = ''
+ #!${pkgs.stdenv.shell}
+ ${pkgs.libnotify}/bin/notify-send "Sending mail ✉️"
+ ${pkgs.msmtp}/bin/msmtp --read-envelope-from $@
+ '';
+ executable = true;
};
- };
- notmuch.enable = cfg.sync;
- astroid.enable = cfg.sync;
- msmtp.enable = true;
- };
- "prv" = {
- primary = true;
- address = "vincent@demeester.fr";
- userName = "vincent@demeester.fr";
- realName = "Vincent Demeester";
- passwordCommand = "${pkgs.gnupg}/bin/gpg -q --for-your-eyes-only --no-tty --exit-on-status-write-error --batch --passphrase-file ${config.home.homeDirectory}/sync/prv.pass -d ${config.home.homeDirectory}/desktop/documents/prv.pass.gpg";
- imap.host = "mail.gandi.net";
- smtp.host = "mail.gandi.net";
- mbsync = {
- enable = true;
- create = "both";
- expunge = "both";
- patterns = ["*"];
- extraConfig = {
- channel = {
- Sync = "All";
+
+ programs.msmtp.enable = true;
+
+ }
+
+ (
+ mkIf cfg.sync {
+
+ services.mbsync = {
+ enable = true;
+ preExec = "${config.xdg.configHome}/mbsync/preExec";
+ postExec = "${config.xdg.configHome}/mbsync/postExec";
+ frequency = cfg.frequency;
};
- account = {
- Timeout = 120;
- PipelineDepth = 1;
+
+ xdg.configFile."mbsync/preExec" = {
+ text = ''
+ #!${pkgs.stdenv.shell}
+
+ export NOTMUCH_CONFIG=${config.xdg.configHome}/notmuch/notmuchrc
+ export NMBGIT=${config.xdg.dataHome}/notmuch/nmbug
+
+ ${pkgs.coreutils}/bin/mkdir -p ${config.home.homeDirectory}/desktop/mails/redhat ${config.home.homeDirectory}/desktop/mails/perso
+ ${pkgs.afew}/bin/afew -C ${config.xdg.configHome}/notmuch/notmuchrc -m -v
+ '';
+ executable = true;
};
- };
- };
- notmuch.enable = cfg.sync;
- astroid.enable = cfg.sync;
- msmtp.enable = true;
- };
- };
-};
-home.file."bin/msmtp" = {
- text = ''
- #!${pkgs.stdenv.shell}
- ${pkgs.libnotify}/bin/notify-send "Sending mail ✉️"
- ${pkgs.msmtp}/bin/msmtp --read-envelope-from $@
- '';
- executable = true;
-};
+ xdg.configFile."mbsync/postExec" = {
+ text = ''
+ #!${pkgs.stdenv.shell}
+
+ export NOTMUCH_CONFIG=${config.xdg.configHome}/notmuch/notmuchrc
+ export NMBGIT=${config.xdg.dataHome}/notmuch/nmbug
+
+ ${pkgs.notmuch}/bin/notmuch new
+ ${pkgs.afew}/bin/afew -C ${config.xdg.configHome}/notmuch/notmuchrc --tag --new -v
+ # Remove inbox (lower-case)
+ ${pkgs.notmuch}/bin/notmuch tag -inbox -- tag:inbox
+ # Remove Inbox tagged message that are not in an Inbox
+ ${pkgs.notmuch}/bin/notmuch tag -Inbox -- not folder:redhat/Inbox and not folder:perso/Inbox and tag:Inbox
+ ${pkgs.libnotify}/bin/notify-send "Mails synced 📬"
+ '';
+ executable = true;
+ };
-programs.msmtp.enable = true;
+ home.file."bin/msync" = {
+ text = ''
+ #!${pkgs.stdenv.shell}
+ ${pkgs.libnotify}/bin/notify-send "Syncing mails 📫️"
+ systemctl --user start mbsync
+ '';
+ executable = true;
+ };
-}
+ programs.mbsync.enable = true;
+ programs.notmuch.enable = true;
+
+ programs.afew = {
+ enable = true;
+ extraConfig = ''
+ [SpamFilter]
+ [KillThreadsFilter]
+ [ListMailsFilter]
+ [ArchiveSentMailsFilter]
+ [FolderNameFilter]
+ maildir_separator = /
+
+ [MailMover]
+ folders = perso/Inbox redhat/Inbox
+ rename = true
+
+ perso/Inbox = 'NOT tag:Inbox':"perso/[Gmail]/All Mail"
+ redhat/Inbox = 'NOT tag:Inbox':"redhat/[Gmail]/All Mail"
+ '';
+ };
-(mkIf cfg.sync {
-
-services.mbsync = {
- enable = true;
- preExec = "${config.xdg.configHome}/mbsync/preExec";
- postExec = "${config.xdg.configHome}/mbsync/postExec";
- frequency = cfg.frequency;
-};
-
-xdg.configFile."mbsync/preExec" = {
- text = ''
- #!${pkgs.stdenv.shell}
-
- export NOTMUCH_CONFIG=${config.xdg.configHome}/notmuch/notmuchrc
- export NMBGIT=${config.xdg.dataHome}/notmuch/nmbug
-
- ${pkgs.coreutils}/bin/mkdir -p ${config.home.homeDirectory}/desktop/mails/redhat ${config.home.homeDirectory}/desktop/mails/perso
- ${pkgs.afew}/bin/afew -C ${config.xdg.configHome}/notmuch/notmuchrc -m -v
- '';
- executable = true;
-};
-
-xdg.configFile."mbsync/postExec" = {
- text = ''
- #!${pkgs.stdenv.shell}
-
- export NOTMUCH_CONFIG=${config.xdg.configHome}/notmuch/notmuchrc
- export NMBGIT=${config.xdg.dataHome}/notmuch/nmbug
-
- ${pkgs.notmuch}/bin/notmuch new
- ${pkgs.afew}/bin/afew -C ${config.xdg.configHome}/notmuch/notmuchrc --tag --new -v
- # Remove inbox (lower-case)
- ${pkgs.notmuch}/bin/notmuch tag -inbox -- tag:inbox
- # Remove Inbox tagged message that are not in an Inbox
- ${pkgs.notmuch}/bin/notmuch tag -Inbox -- not folder:redhat/Inbox and not folder:perso/Inbox and tag:Inbox
- ${pkgs.libnotify}/bin/notify-send "Mails synced 📬"
- '';
- executable = true;
-};
-
-home.file."bin/msync" = {
- text = ''
- #!${pkgs.stdenv.shell}
- ${pkgs.libnotify}/bin/notify-send "Syncing mails 📫️"
- systemctl --user start mbsync
- '';
- executable = true;
-};
-
-programs.mbsync.enable = true;
-programs.notmuch.enable = true;
-
-programs.afew = {
- enable = true;
- extraConfig = ''
- [SpamFilter]
- [KillThreadsFilter]
- [ListMailsFilter]
- [ArchiveSentMailsFilter]
- [FolderNameFilter]
- maildir_separator = /
-
- [MailMover]
- folders = perso/Inbox redhat/Inbox
- rename = true
-
- perso/Inbox = 'NOT tag:Inbox':"perso/[Gmail]/All Mail"
- redhat/Inbox = 'NOT tag:Inbox':"redhat/[Gmail]/All Mail"
- '';
-};
-
-programs.astroid = {
- enable = true;
- externalEditor = "emacsclient -c";
- extraConfig = {
- startup.queries.inbox = "tag:Inbox";
- startup.queries.inbox_perso = "folder:perso/Inbox";
- startup.queries.inbox_redhat = "folder:redhat/Inbox";
- };
-};
+ programs.astroid = {
+ enable = true;
+ externalEditor = "emacsclient -c";
+ extraConfig = {
+ startup.queries.inbox = "tag:Inbox";
+ startup.queries.inbox_perso = "folder:perso/Inbox";
+ startup.queries.inbox_redhat = "folder:redhat/Inbox";
+ };
+ };
-})
+ }
+ )
-]);
+ ]
+ );
}
diff --git a/modules/profiles/media.nix b/modules/profiles/media.nix
@@ -10,12 +10,16 @@ in
enable = mkEnableOption "Enable media configuration";
};
};
- config = mkIf cfg.enable (mkMerge [
- {
- home.packages = with pkgs; [ youtube-dl ];
- }
- (mkIf config.profiles.desktop.enable {
- home.packages = with pkgs; [ spotify ];
- })
- ]);
+ config = mkIf cfg.enable (
+ mkMerge [
+ {
+ home.packages = with pkgs; [ youtube-dl ];
+ }
+ (
+ mkIf config.profiles.desktop.enable {
+ home.packages = with pkgs; [ spotify ];
+ }
+ )
+ ]
+ );
}
diff --git a/modules/profiles/openshift.nix b/modules/profiles/openshift.nix
@@ -23,20 +23,24 @@ in
};
};
};
- config = mkIf cfg.enable (mkMerge [
- {
- profiles.containers.kubernetes.enable = true;
- home.packages = with pkgs; [
- nur.repos.vdemeester.s2i
- cfg.package
- ];
- }
- (mkIf cfg.minishift.enable {
- home.packages = with pkgs; [
- cfg.minishift.package
- docker-machine-kvm
- docker-machine-kvm2
- ];
- })
- ]);
+ config = mkIf cfg.enable (
+ mkMerge [
+ {
+ profiles.containers.kubernetes.enable = true;
+ home.packages = with pkgs; [
+ nur.repos.vdemeester.s2i
+ cfg.package
+ ];
+ }
+ (
+ mkIf cfg.minishift.enable {
+ home.packages = with pkgs; [
+ cfg.minishift.package
+ docker-machine-kvm
+ docker-machine-kvm2
+ ];
+ }
+ )
+ ]
+ );
}
diff --git a/modules/profiles/pulseaudio.nixos.nix b/modules/profiles/pulseaudio.nixos.nix
@@ -39,11 +39,11 @@ in
};
};
sound.mediaKeys.enable = true;
-
+
security.pam.loginLimits = [
{ domain = "@audio"; item = "memlock"; type = "-"; value = "unlimited"; }
- { domain = "@audio"; item = "rtprio"; type = "-"; value = "99"; }
- { domain = "@audio"; item = "nofile"; type = "-"; value = "99999"; }
+ { domain = "@audio"; item = "rtprio"; type = "-"; value = "99"; }
+ { domain = "@audio"; item = "nofile"; type = "-"; value = "99999"; }
];
# spotify & pulseaudio
@@ -52,9 +52,9 @@ in
allowedUDPPorts = [ 57621 57622 ];
};
environment.systemPackages = with pkgs; [
- apulse # allow alsa application to use pulse
- pavucontrol # pulseaudio volume control
- pasystray # systray application
+ apulse # allow alsa application to use pulse
+ pavucontrol # pulseaudio volume control
+ pasystray # systray application
playerctl
];
# We assume xserver runs when pulseaudio does
diff --git a/modules/profiles/qemu.nixos.nix b/modules/profiles/qemu.nixos.nix
@@ -18,7 +18,8 @@ let
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00'';
mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff'';
};
-in {
+in
+{
options = {
profiles.qemu-user = {
arm = mkEnableOption "enable 32bit arm emulation";
@@ -36,11 +37,11 @@ in {
overlays = [ (import ../../overlays/qemu/default.nix) ];
};
boot.binfmt.registrations =
- optionalAttrs cfg.arm { inherit arm; } //
- optionalAttrs cfg.aarch64 { inherit aarch64; } //
- optionalAttrs cfg.riscv64 { inherit riscv64; };
+ optionalAttrs cfg.arm { inherit arm; }
+ // optionalAttrs cfg.aarch64 { inherit aarch64; }
+ // optionalAttrs cfg.riscv64 { inherit riscv64; };
nix.supportedPlatforms = (optionals cfg.arm [ "armv6l-linux" "armv7l-linux" ])
- ++ (optional cfg.aarch64 "aarch64-linux");
+ ++ (optional cfg.aarch64 "aarch64-linux");
nix.extraOptions = ''
extra-platforms = ${toString config.nix.supportedPlatforms} i686-linux
'';
diff --git a/modules/profiles/ssh.nix b/modules/profiles/ssh.nix
@@ -53,10 +53,10 @@ in
};
} // cfg.machines;
extraConfig = ''
-PreferredAuthentications gssapi-with-mic,publickey,password
-GSSAPIAuthentication yes
-GSSAPIDelegateCredentials yes
-'';
+ PreferredAuthentications gssapi-with-mic,publickey,password
+ GSSAPIAuthentication yes
+ GSSAPIDelegateCredentials yes
+ '';
};
};
}
diff --git a/modules/profiles/users.nixos.nix b/modules/profiles/users.nixos.nix
@@ -27,40 +27,40 @@ in
isNormalUser = true;
uid = 1000;
createHome = true;
- extraGroups = [ "wheel" "input" ] ++ optionals config.profiles.desktop.enable ["audio" "video" "lp" "scanner" "networkmanager"]
- ++ optionals config.profiles.docker.enable [ "docker" ]
- ++ optionals config.profiles.buildkit.enable [ "buildkit" ]
- ++ optionals config.profiles.virtualization.enable [ "libvirtd" "vboxusers" ];
+ extraGroups = [ "wheel" "input" ] ++ optionals config.profiles.desktop.enable [ "audio" "video" "lp" "scanner" "networkmanager" ]
+ ++ optionals config.profiles.docker.enable [ "docker" ]
+ ++ optionals config.profiles.buildkit.enable [ "buildkit" ]
+ ++ optionals config.profiles.virtualization.enable [ "libvirtd" "vboxusers" ];
shell = if config.programs.fish.enable then pkgs.fish else pkgs.zsh;
initialPassword = "changeMe";
openssh.authorizedKeys.keys =
with import ../../assets/machines.nix; [ ssh.yubikey.key ssh.yubikey5.key ssh.wakasu.key ssh.vincent.key ssh.houbeb.key ssh.hokkaido.key ssh.okinawa.key ];
- subUidRanges = [{ startUid = 100000; count = 65536; }];
- subGidRanges = [{ startGid = 100000; count = 65536; }];
+ subUidRanges = [ { startUid = 100000; count = 65536; } ];
+ subGidRanges = [ { startGid = 100000; count = 65536; } ];
};
};
- };
- programs.ssh.extraConfig = with import ../../assets/machines.nix; ''
- Host kerkouane kerkouane.sbr.pm
- Hostname kerkouane.sbr.pm
- Port ${toString ssh.kerkouane.port}
- Host kerkouane.vpn ${wireguard.ips.kerkouane}
- Hostname ${wireguard.ips.kerkouane}
- Port ${toString ssh.kerkouane.port}
- Host carthage carthage.sbr.pm
- Hostname carthage.sbr.pm
- Port ${toString ssh.carthage.port}
- Host carthage.vpn ${wireguard.ips.carthage}
- Hostname ${wireguard.ips.carthage}
- Port ${toString ssh.carthage.port}
- Host hokkaido.vpn ${wireguard.ips.hokkaido}
- Hostname ${wireguard.ips.hokkaido}
- Host honshu.vpn ${wireguard.ips.honshu}
- Hostname ${wireguard.ips.honshu}
- Host okinawa.vpn ${wireguard.ips.okinawa}
- Hostname ${wireguard.ips.okinawa}
- Host wakasu.vpn ${wireguard.ips.wakasu}
- Hostname ${wireguard.ips.wakasu}
+ };
+ programs.ssh.extraConfig = with import ../../assets/machines.nix; ''
+ Host kerkouane kerkouane.sbr.pm
+ Hostname kerkouane.sbr.pm
+ Port ${toString ssh.kerkouane.port}
+ Host kerkouane.vpn ${wireguard.ips.kerkouane}
+ Hostname ${wireguard.ips.kerkouane}
+ Port ${toString ssh.kerkouane.port}
+ Host carthage carthage.sbr.pm
+ Hostname carthage.sbr.pm
+ Port ${toString ssh.carthage.port}
+ Host carthage.vpn ${wireguard.ips.carthage}
+ Hostname ${wireguard.ips.carthage}
+ Port ${toString ssh.carthage.port}
+ Host hokkaido.vpn ${wireguard.ips.hokkaido}
+ Hostname ${wireguard.ips.hokkaido}
+ Host honshu.vpn ${wireguard.ips.honshu}
+ Hostname ${wireguard.ips.honshu}
+ Host okinawa.vpn ${wireguard.ips.okinawa}
+ Hostname ${wireguard.ips.okinawa}
+ Host wakasu.vpn ${wireguard.ips.wakasu}
+ Hostname ${wireguard.ips.wakasu}
'';
};
}
diff --git a/modules/profiles/vscode.nix b/modules/profiles/vscode.nix
@@ -19,179 +19,179 @@ in
"editor.fontFamily" = "'Fira Code','Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";
"[nix]"."editor.tabSize" = 2;
"editor.minimap.enabled" = false;
- "window.titleBarStyle"= "custom";
+ "window.titleBarStyle" = "custom";
"breadcrumbs.enabled" = true;
"go.useLanguageServer" = true;
};
extensions = pkgs.vscode-utils.extensionsFromVscodeMarketplace [
- {
- name = "remote-ssh";
- publisher = "ms-vscode-remote";
- version = "0.42.2";
- sha256 = "0aqjlbndiq1q8gh4dkj68sbr56ya458c8xh7f8bkhw5rnmz31pj5";
- }
- {
- name = "remote-ssh-edit";
- publisher = "ms-vscode-remote";
- version = "0.42.2";
- sha256 = "0qkdz1ng5mk35x8awa9wavb138hd454da8gsf7m66xyfifsmcn6h";
- }
- {
- name = "remote-ssh-explorer";
- publisher = "ms-vscode-remote";
- version = "0.42.2";
- sha256 = "02wg1bvl9923ldxlkj0qdlpf0njrd2r805561dkw5yp8siiim768";
- }
- {
- name = "EditorConfig";
- publisher = "EditorConfig";
- version = "0.12.4";
- sha256 = "067mxkzjmgz9lv5443ig7jc4dpgml4pz0dac0xmqrdmiwml6j4k4";
- }
- {
- name = "vsc-material-theme";
- publisher = "Equinusocio";
- version = "2.6.3";
- sha256 = "1ghqp0yfcpcnjcwgvxw7aix9fj5q8kr0i97lmzlw2jqslmyvxg5x";
- }
- {
- name = "material-icon-theme";
- publisher = "PKief";
- version = "3.6.0";
- sha256 = "0jphqqs41pkyv11mq1a3wzx14sl6pifcfyz3lw5wany003fv5s9s";
- }
- {
- name = "fish-vscode";
- publisher = "skyapps";
- version = "0.2.0";
- sha256 = "148r186y3h7n84fcyh6wa2qwl2q3pfi8aykwkc9dhfj3kwfcm5rb";
- }
- {
- name = "code-runner";
- publisher = "formulahendry";
- version = "0.9.4";
- sha256 = "08qq21gaa7igklv9si35qxhs79na893vyp96hf7rvyv7c4fn1pvw";
- }
- {
- name = "gitlens";
- publisher = "eamodio";
- version = "8.5.6";
- sha256 = "1vn6fvxn4g3759pg9rp8hqdc58pgyvcdma1ylfwmdnipga37xfd3";
- }
- {
- name = "vscode-direnv";
- publisher = "Rubymaniac";
- version = "0.0.2";
- sha256 = "1gml41bc77qlydnvk1rkaiv95rwprzqgj895kxllqy4ps8ly6nsd";
- }
- {
- name = "vscode-proto3";
- publisher = "zxh404";
- version = "0.2.1";
- sha256 = "12yf66a9ws5hlyj38nmn91y8a1jrq8696fnmgk60w9anyfalbn4q";
- }
- {
- name = "project-manager";
- publisher = "alefragnani";
- version = "9.0.1";
- sha256 = "0aqyavgpaqvv62q15h4dkxcgj4khsgr1rlzr3wi9aflyncg7addb";
- }
- {
- name = "tslint";
- publisher = "eg2";
- version = "1.0.39";
- sha256 = "1al61xzz7p6rqgk7rplg3njj4hyiipx7w89pqfn8634skw7r32rl";
- }
- {
- name = "vscode-npm-script";
- publisher = "eg2";
- version = "0.3.5";
- sha256 = "1v4081siab0fm0zfn6vlvqlc4vx131q8y6f3h3l46mvpndsa2rck";
- }
- {
- name = "vscode-pull-request-github";
- publisher = "GitHub";
- version = "0.1.6";
- sha256 = "08r0i265q4gk6kmz3ynxglhssdk5020bifagl9jr8spfs5sacnsx";
- }
- {
- name = "vscode-kubernetes-tools";
- publisher = "ms-kubernetes-tools";
- version = "0.1.14";
- sha256 = "0ixs1cydbz6qizf9cs0jdqpxwfg7gs74jdy9hp2v9h8q7vq6503l";
- }
- # languages
- {
- name = "Go";
- publisher = "ms-vscode";
- version = "0.6.89";
- sha256 = "05mzw4bwsa9wxldnkdgk0b4n4xm8gzhmrbqy6j8lbk3p360wdg8z";
- }
- {
- name = "rust";
- publisher = "rust-lang";
- version = "0.4.10";
- sha256 = "1y7sb3585knv2pbq7vf2cjf3xy1fgzrqzn2h3fx2d2bj6ns6vpy3";
- }
- {
- name = "crates";
- publisher = "serayuzgur";
- version = "0.3.2";
- sha256 = "0xn24vghmcf8fi8cdgaa3f0npmkdr4fdn9y1g56l2fzrx2z4rw3q";
- }
- {
- name = "Kotlin";
- publisher = "mathiasfrohlich";
- version = "1.7.0";
- sha256 = "1d81rgfh1c1wkz4la0mmjj6k28if237f835diyk3z6n63cazapli";
- }
- {
- name = "java";
- publisher = "redhat";
- version = "0.31.0";
- sha256 = "1hzqiqkja4931k7rb4pmva6k80ss53nvyksiqvq6kxj25rg3kd1b";
- }
- {
- name = "vscode-java-debug";
- publisher = "vscjava";
- version = "0.13.0";
- sha256 = "11xvd1b0qsvrbm4yb0c7fm537p1gs6wz45xzl6v1a7k08dapi20i";
- }
- {
- name = "vscode-java-test";
- publisher = "vscjava";
- version = "0.9.0";
- sha256 = "0000v5qh100n3n529r1nzx79cawx83kvprrmhw6pb4j0m5b3p3p2";
- }
- {
- name = "gradle-language";
- publisher = "naco-siren";
- version = "0.2.3";
- sha256 = "15lzxvym0mkljjn57av1p4z6hqqwbsbn5idw2fn7nccgrl93aywf";
- }
- {
- name = "vscode-yaml";
- publisher = "redhat";
- version = "0.0.16";
- sha256 = "0v21qj65nrp850r0jmivmsm9y5i99ymxxm8ganzdia4vbv5hzx9r";
- }
- {
- name = "better-toml";
- publisher = "bungcip";
- version = "0.3.2";
- sha256 = "08lhzhrn6p0xwi0hcyp6lj9bvpfj87vr99klzsiy8ji7621dzql3";
- }
- {
- name = "plain";
- publisher = "konstantin";
- version = "0.0.7";
- sha256 = "0qbn8bdcbvz8qfjb42n4j9asmsd6zf33w9ypyinb7x37ylw482nx";
- }
- ] ++ [
- pkgs.vscode-extensions.bbenoist.Nix
- pkgs.vscode-extensions.ms-python.python
- # pkgs.vscodeliveshare
- ];
+ {
+ name = "remote-ssh";
+ publisher = "ms-vscode-remote";
+ version = "0.42.2";
+ sha256 = "0aqjlbndiq1q8gh4dkj68sbr56ya458c8xh7f8bkhw5rnmz31pj5";
+ }
+ {
+ name = "remote-ssh-edit";
+ publisher = "ms-vscode-remote";
+ version = "0.42.2";
+ sha256 = "0qkdz1ng5mk35x8awa9wavb138hd454da8gsf7m66xyfifsmcn6h";
+ }
+ {
+ name = "remote-ssh-explorer";
+ publisher = "ms-vscode-remote";
+ version = "0.42.2";
+ sha256 = "02wg1bvl9923ldxlkj0qdlpf0njrd2r805561dkw5yp8siiim768";
+ }
+ {
+ name = "EditorConfig";
+ publisher = "EditorConfig";
+ version = "0.12.4";
+ sha256 = "067mxkzjmgz9lv5443ig7jc4dpgml4pz0dac0xmqrdmiwml6j4k4";
+ }
+ {
+ name = "vsc-material-theme";
+ publisher = "Equinusocio";
+ version = "2.6.3";
+ sha256 = "1ghqp0yfcpcnjcwgvxw7aix9fj5q8kr0i97lmzlw2jqslmyvxg5x";
+ }
+ {
+ name = "material-icon-theme";
+ publisher = "PKief";
+ version = "3.6.0";
+ sha256 = "0jphqqs41pkyv11mq1a3wzx14sl6pifcfyz3lw5wany003fv5s9s";
+ }
+ {
+ name = "fish-vscode";
+ publisher = "skyapps";
+ version = "0.2.0";
+ sha256 = "148r186y3h7n84fcyh6wa2qwl2q3pfi8aykwkc9dhfj3kwfcm5rb";
+ }
+ {
+ name = "code-runner";
+ publisher = "formulahendry";
+ version = "0.9.4";
+ sha256 = "08qq21gaa7igklv9si35qxhs79na893vyp96hf7rvyv7c4fn1pvw";
+ }
+ {
+ name = "gitlens";
+ publisher = "eamodio";
+ version = "8.5.6";
+ sha256 = "1vn6fvxn4g3759pg9rp8hqdc58pgyvcdma1ylfwmdnipga37xfd3";
+ }
+ {
+ name = "vscode-direnv";
+ publisher = "Rubymaniac";
+ version = "0.0.2";
+ sha256 = "1gml41bc77qlydnvk1rkaiv95rwprzqgj895kxllqy4ps8ly6nsd";
+ }
+ {
+ name = "vscode-proto3";
+ publisher = "zxh404";
+ version = "0.2.1";
+ sha256 = "12yf66a9ws5hlyj38nmn91y8a1jrq8696fnmgk60w9anyfalbn4q";
+ }
+ {
+ name = "project-manager";
+ publisher = "alefragnani";
+ version = "9.0.1";
+ sha256 = "0aqyavgpaqvv62q15h4dkxcgj4khsgr1rlzr3wi9aflyncg7addb";
+ }
+ {
+ name = "tslint";
+ publisher = "eg2";
+ version = "1.0.39";
+ sha256 = "1al61xzz7p6rqgk7rplg3njj4hyiipx7w89pqfn8634skw7r32rl";
+ }
+ {
+ name = "vscode-npm-script";
+ publisher = "eg2";
+ version = "0.3.5";
+ sha256 = "1v4081siab0fm0zfn6vlvqlc4vx131q8y6f3h3l46mvpndsa2rck";
+ }
+ {
+ name = "vscode-pull-request-github";
+ publisher = "GitHub";
+ version = "0.1.6";
+ sha256 = "08r0i265q4gk6kmz3ynxglhssdk5020bifagl9jr8spfs5sacnsx";
+ }
+ {
+ name = "vscode-kubernetes-tools";
+ publisher = "ms-kubernetes-tools";
+ version = "0.1.14";
+ sha256 = "0ixs1cydbz6qizf9cs0jdqpxwfg7gs74jdy9hp2v9h8q7vq6503l";
+ }
+ # languages
+ {
+ name = "Go";
+ publisher = "ms-vscode";
+ version = "0.6.89";
+ sha256 = "05mzw4bwsa9wxldnkdgk0b4n4xm8gzhmrbqy6j8lbk3p360wdg8z";
+ }
+ {
+ name = "rust";
+ publisher = "rust-lang";
+ version = "0.4.10";
+ sha256 = "1y7sb3585knv2pbq7vf2cjf3xy1fgzrqzn2h3fx2d2bj6ns6vpy3";
+ }
+ {
+ name = "crates";
+ publisher = "serayuzgur";
+ version = "0.3.2";
+ sha256 = "0xn24vghmcf8fi8cdgaa3f0npmkdr4fdn9y1g56l2fzrx2z4rw3q";
+ }
+ {
+ name = "Kotlin";
+ publisher = "mathiasfrohlich";
+ version = "1.7.0";
+ sha256 = "1d81rgfh1c1wkz4la0mmjj6k28if237f835diyk3z6n63cazapli";
+ }
+ {
+ name = "java";
+ publisher = "redhat";
+ version = "0.31.0";
+ sha256 = "1hzqiqkja4931k7rb4pmva6k80ss53nvyksiqvq6kxj25rg3kd1b";
+ }
+ {
+ name = "vscode-java-debug";
+ publisher = "vscjava";
+ version = "0.13.0";
+ sha256 = "11xvd1b0qsvrbm4yb0c7fm537p1gs6wz45xzl6v1a7k08dapi20i";
+ }
+ {
+ name = "vscode-java-test";
+ publisher = "vscjava";
+ version = "0.9.0";
+ sha256 = "0000v5qh100n3n529r1nzx79cawx83kvprrmhw6pb4j0m5b3p3p2";
+ }
+ {
+ name = "gradle-language";
+ publisher = "naco-siren";
+ version = "0.2.3";
+ sha256 = "15lzxvym0mkljjn57av1p4z6hqqwbsbn5idw2fn7nccgrl93aywf";
+ }
+ {
+ name = "vscode-yaml";
+ publisher = "redhat";
+ version = "0.0.16";
+ sha256 = "0v21qj65nrp850r0jmivmsm9y5i99ymxxm8ganzdia4vbv5hzx9r";
+ }
+ {
+ name = "better-toml";
+ publisher = "bungcip";
+ version = "0.3.2";
+ sha256 = "08lhzhrn6p0xwi0hcyp6lj9bvpfj87vr99klzsiy8ji7621dzql3";
+ }
+ {
+ name = "plain";
+ publisher = "konstantin";
+ version = "0.0.7";
+ sha256 = "0qbn8bdcbvz8qfjb42n4j9asmsd6zf33w9ypyinb7x37ylw482nx";
+ }
+ ] ++ [
+ pkgs.vscode-extensions.bbenoist.Nix
+ pkgs.vscode-extensions.ms-python.python
+ # pkgs.vscodeliveshare
+ ];
};
};
}
diff --git a/modules/profiles/yubikey.nixos.nix b/modules/profiles/yubikey.nixos.nix
@@ -20,7 +20,7 @@ in
yubico-piv-tool
yubikey-personalization
yubioath-desktop
- yubikey-manager
+ yubikey-manager
];
};
services = {
@@ -28,9 +28,9 @@ in
udev = {
packages = with pkgs; [ yubikey-personalization ];
extraRules = ''
-# Yubico YubiKey
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", TAG+="uaccess", MODE="0660", GROUP="wheel"
-# ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
+ # Yubico YubiKey
+ KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", TAG+="uaccess", MODE="0660", GROUP="wheel"
+ # ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
'';
};
};
diff --git a/modules/programs/podman.nix b/modules/programs/podman.nix
@@ -38,11 +38,11 @@ in
'';
xdg.configFile."containers/policy.json".text = ''
- {
- "default": [
- { "type": "insecureAcceptAnything" }
- ]
- }
+ {
+ "default": [
+ { "type": "insecureAcceptAnything" }
+ ]
+ }
'';
};
}
diff --git a/modules/programs/podman.nixos.nix b/modules/programs/podman.nixos.nix
@@ -1,13 +1,9 @@
{ config, lib, pkgs, ... }:
with lib;
-
let
-
cfg = config.programs.podman;
-
in
-
{
options = {
programs.podman = {
@@ -70,39 +66,39 @@ in
'';
environment.etc."containers/policy.json".text = ''
- {
- "default": [
- { "type": "insecureAcceptAnything" }
- ]
- }
+ {
+ "default": [
+ { "type": "insecureAcceptAnything" }
+ ]
+ }
'';
environment.etc."cni/net.d/87-podman-bridge.conflist".text = ''
-{
- "cniVersion": "0.3.0",
- "name": "podman",
- "plugins": [
{
- "type": "bridge",
- "bridge": "cni0",
- "isGateway": true,
- "ipMasq": true,
- "ipam": {
- "type": "host-local",
- "subnet": "10.88.0.0/16",
- "routes": [
- { "dst": "0.0.0.0/0" }
- ]
- }
- },
- {
- "type": "portmap",
- "capabilities": {
- "portMappings": true
- }
+ "cniVersion": "0.3.0",
+ "name": "podman",
+ "plugins": [
+ {
+ "type": "bridge",
+ "bridge": "cni0",
+ "isGateway": true,
+ "ipMasq": true,
+ "ipam": {
+ "type": "host-local",
+ "subnet": "10.88.0.0/16",
+ "routes": [
+ { "dst": "0.0.0.0/0" }
+ ]
+ }
+ },
+ {
+ "type": "portmap",
+ "capabilities": {
+ "portMappings": true
+ }
+ }
+ ]
}
- ]
-}
'';
environment.systemPackages = with pkgs; [ cfg.package cfg.conmonPackage cfg.runcPackage iptables ];
diff --git a/modules/services/athens.nixos.nix b/modules/services/athens.nixos.nix
@@ -8,7 +8,7 @@ in
options = {
services.athens = {
enable = mkEnableOption ''
- Athens is a go module proxy
+ Athens is a go module proxy
'';
package = mkOption {
type = types.package;
@@ -58,7 +58,7 @@ in
preStart = ''
mkdir -p /var/lib/athens
'';
- environment = { HOME="/var/lib/athens"; };
+ environment = { HOME = "/var/lib/athens"; };
serviceConfig = {
User = cfg.user;
Restart = "on-failure";
diff --git a/modules/services/nix-binary-cache.nixos.nix b/modules/services/nix-binary-cache.nixos.nix
@@ -24,7 +24,7 @@ in
};
};
config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = [ 80 443];
+ networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx = {
enable = true;
appendHttpConfig = ''
@@ -39,7 +39,7 @@ in
access_log logs/access.log;
'';
virtualHosts."${cfg.domain}" = {
- serverAliases = cfg.aliases;
+ serverAliases = cfg.aliases;
# enableACME = true;
locations."/" = {
@@ -89,6 +89,6 @@ in
'';
};
};
- };
+ };
};
}
diff --git a/modules/services/shairport-sync.nix b/modules/services/shairport-sync.nix
@@ -1,13 +1,9 @@
{ config, lib, pkgs, ... }:
with lib;
-
let
-
cfg = config.services.shairport-sync;
-
in
-
{
###### interface
diff --git a/modules/services/wireguard.client.nixos.nix b/modules/services/wireguard.client.nixos.nix
@@ -17,33 +17,33 @@ in
ips = mkOption {
type = with types; listOf str;
description = ''
- The client IPs
+ The client IPs
'';
};
allowedIPs = mkOption {
default = [ "10.100.0.0/24" ];
type = with types; listOf str;
description = ''
- The peer (server) allowedIPs
+ The peer (server) allowedIPs
'';
};
endpoint = mkOption {
type = with types; str;
description = ''
- The endpoint IP to target
+ The endpoint IP to target
'';
};
endpointPort = mkOption {
default = 51820;
type = with types; int;
description = ''
- The endpoint Port to target
+ The endpoint Port to target
'';
};
endpointPublicKey = mkOption {
type = with types; str;
description = ''
- The peer (server) public key
+ The peer (server) public key
'';
};
};
@@ -61,9 +61,9 @@ in
{
publicKey = cfg.endpointPublicKey;
allowedIPs = cfg.allowedIPs;
- endpoint = "${cfg.endpoint}:${toString cfg.endpointPort}";
- persistentKeepalive = 25;
- }
+ endpoint = "${cfg.endpoint}:${toString cfg.endpointPort}";
+ persistentKeepalive = 25;
+ }
];
};
};
diff --git a/overlays/emacs/builder.nix b/overlays/emacs/builder.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
buildPhase = ''
${preBuild}
ARGS=$(find ${stdenv.lib.concatStrings
- (builtins.map (arg: arg + "/share/emacs/site-lisp ") buildInputs)} \
+ (builtins.map (arg: arg + "/share/emacs/site-lisp ") buildInputs)} \
-type d -exec echo -L {} \;)
mkdir $out
export HOME=$out
diff --git a/overlays/unstable.overlay.nix b/overlays/unstable.overlay.nix
@@ -1,9 +1,11 @@
-_: _: let
+_: _:
+let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
unstable = import unstableTarball { overlays = []; };
-in {
+in
+{
inherit (unstable)
- # cachix
- #git
- ;
+ # cachix
+ #git
+ ;
}
diff --git a/pkgs/tmux-tpm/default.nix b/pkgs/tmux-tpm/default.nix
@@ -2,14 +2,14 @@
stdenv.mkDerivation rec {
name = "tmux-tpm";
- rev = "95f78336c3972f3e6648b7b3db754f2224320a5e";
- version = "20170902-${lib.strings.substring 0 7 rev}";
+ rev = "06d41226af02ca4f5bcf58169dd4f0a2aa42218c";
+ version = "20200218-${lib.strings.substring 0 7 rev}";
src = fetchFromGitHub {
inherit rev;
owner = "tmux-plugins";
repo = "tpm";
- sha256 = "01jjbvzrjqlxxdgszkrnx4rapcqh1sh7k7y6mk42ymrzfkrbi0rd";
+ sha256 = "1ap5x761abcpw6wd6jb575rws88prkpjygjks9cibvws59xsnki4";
};
builder = ./builder.sh;
diff --git a/pkgs/vscodeliveshare/default.nix b/pkgs/vscodeliveshare/default.nix
@@ -1,36 +1,51 @@
-{ stdenv, vscode-utils, autoPatchelfHook,
- /*icu, curl, lttng-ust,*/ xorg, gnome3,
- utillinux, openssl, icu, zlib, curl, lttng-ust, libsecret, libkrb5,
- gcc, libunwind, binutils
+{ stdenv
+, vscode-utils
+, autoPatchelfHook
+, /*icu, curl, lttng-ust,*/ xorg
+, gnome3
+, utillinux
+, openssl
+, icu
+, zlib
+, curl
+, lttng-ust
+, libsecret
+, libkrb5
+, gcc
+, libunwind
+, binutils
}:
let
- runtimeVersion = "2.1.1";
- runtimeHash = "6985b9f6844d51ba1197c3f52aabc7291bb15bc1";
- runtime = fetchTarball {
- url = "https://download.microsoft.com/download/9/3/E/93ED35C8-57B9-4D50-AE32-0330111B38E8/dotnet-runtime-${runtimeVersion}-linux-x64.tar.gz";
- sha256 = "1g754mpwznmxlml5vnbxlm7v253al2m5jwzfvd7hj74f45yx8amf";
- };
- rpath = stdenv.lib.makeLibraryPath [utillinux openssl icu zlib curl lttng-ust libsecret libkrb5 gcc.cc.lib libunwind binutils.bintools_bin];
+ runtimeVersion = "2.1.1";
+ runtimeHash = "6985b9f6844d51ba1197c3f52aabc7291bb15bc1";
+ runtime = fetchTarball {
+ url = "https://download.microsoft.com/download/9/3/E/93ED35C8-57B9-4D50-AE32-0330111B38E8/dotnet-runtime-${runtimeVersion}-linux-x64.tar.gz";
+ sha256 = "1g754mpwznmxlml5vnbxlm7v253al2m5jwzfvd7hj74f45yx8amf";
+ };
+ rpath = stdenv.lib.makeLibraryPath [ utillinux openssl icu zlib curl lttng-ust libsecret libkrb5 gcc.cc.lib libunwind binutils.bintools_bin ];
in
-(vscode-utils.buildVscodeMarketplaceExtension {
+(
+ vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
- name = "vsliveshare";
- publisher = "ms-vsliveshare";
- version = "0.3.504";
- sha256 = "1y24q5id9hkgdndh2v8z1rpw736bi16yk66n260s44qd3w5yss8r";
+ name = "vsliveshare";
+ publisher = "ms-vsliveshare";
+ version = "0.3.504";
+ sha256 = "1y24q5id9hkgdndh2v8z1rpw736bi16yk66n260s44qd3w5yss8r";
};
-}).overrideAttrs( attrs:
-{
- buildInputs = attrs.buildInputs
- ++ [ autoPatchelfHook ]
- ++ [ icu curl lttng-ust xorg.libX11 ];
+ }
+).overrideAttrs (
+ attrs:
+ {
+ buildInputs = attrs.buildInputs
+ ++ [ autoPatchelfHook ]
+ ++ [ icu curl lttng-ust xorg.libX11 ];
- installPhase = attrs.installPhase + ''
+ installPhase = attrs.installPhase + ''
runHook postInstall
'';
- postInstall = ''
+ postInstall = ''
bash -s <<ENDSUBSHELL
shopt -s extglob
cd $out/share/*/extensions/*
@@ -62,15 +77,16 @@ in
sed -i out/src/internalConfig.js \
-e "s|path.join(__dirname, '..', '..', 'modifiedInternalSettings.json')|'/tmp/modifiedInternalSettings.json'|"
ENDSUBSHELL
- '';
+ '';
- #-e "s|launcher_1.Launcher.safelyDeleteCascadeUrlFile();||" \
- #-e "s|yield launcher_1.Launcher.readCascadeURL()|void 0|" \
-
- postFixup = ''
+ #-e "s|launcher_1.Launcher.safelyDeleteCascadeUrlFile();||" \
+ #-e "s|yield launcher_1.Launcher.readCascadeURL()|void 0|" \
+
+ postFixup = ''
cd $out/share/*/extensions/*
find . -iname '*.so' -ls -exec patchelf --set-rpath ${rpath} '{}' \;
- '';
+ '';
- propagatedBuildInputs = with gnome3; [ gnome-keyring ];
-})
+ propagatedBuildInputs = with gnome3; [ gnome-keyring ];
+ }
+)