chore: nixfmt *

This commit is contained in:
steveej 2022-10-31 11:04:38 +01:00
parent aae3fd4090
commit 47c5c9dc56
161 changed files with 2693 additions and 3029 deletions

View file

@ -1,10 +1,5 @@
{ gitpkgs ? import /home/steveej/src/github/NixOS/nixpkgs {}
, pkgs ? gitpkgs
, name ? "generic"
, version
, extraBuildInputs ? []
, extraShellHook ? ""
}:
{ gitpkgs ? import /home/steveej/src/github/NixOS/nixpkgs { }, pkgs ? gitpkgs
, name ? "generic", version, extraBuildInputs ? [ ], extraShellHook ? "" }:
let
go = builtins.getAttr "go_${version}" pkgs;
commonVimRC = ''
@ -68,8 +63,8 @@ let
gox.bin
#ginkgo ginkgo.bin
#gomega
# ( import ./vim-go.nix { pkgs=gitpkgs; commonRC=commonVimRC; } )
# ( import ./neovim-go.nix { pkgs=gitpkgs; commonRC=commonVimRC; } )
# ( import ./vim-go.nix { pkgs=gitpkgs; commonRC=commonVimRC; } )
# ( import ./neovim-go.nix { pkgs=gitpkgs; commonRC=commonVimRC; } )
];
in pkgs.stdenv.mkDerivation {

View file

@ -1,4 +1,4 @@
{ commonRC, ... } @ args :
{ commonRC, ... }@args:
(import ../../pkg-configuration/vim-derivates/neovim.nix args // {
additionalRC = commonRC + ''
@ -7,9 +7,5 @@
let g:deoplete#enable_smart_case = 1
" }
'';
additionalPlugins = [
"deoplete-go"
"deoplete-nvim"
"vim-go"
];
additionalPlugins = [ "deoplete-go" "deoplete-nvim" "vim-go" ];
})

View file

@ -1,16 +1,14 @@
{ gitpkgs ? import /home/steveej/src/github/NixOS/nixpkgs {}
, pkgs ? gitpkgs
, name ? "generic"
, version ? "Stable"
, extraBuildInputs ? []
}:
let
commonVimRC = ''
'';
{ gitpkgs ? import /home/steveej/src/github/NixOS/nixpkgs { }, pkgs ? gitpkgs
, name ? "generic", version ? "Stable", extraBuildInputs ? [ ] }:
let commonVimRC = "";
in pkgs.stdenv.mkDerivation {
inherit name;
buildInputs = with pkgs; [
( import ./vim-pandoc.nix { pkgs=gitpkgs; commonRC=commonVimRC; })
buildInputs = with pkgs;
[
(import ./vim-pandoc.nix {
pkgs = gitpkgs;
commonRC = commonVimRC;
})
pandoc
texlive.combined.scheme-medium
python27Packages.pandocfilters

View file

@ -1,8 +1,5 @@
{
pkgs ? import /home/steveej/src/github/NixOS/nixpkgs {},
mkGoEnv ? import ./go.nix,
rktPath,
}:
{ pkgs ? import /home/steveej/src/github/NixOS/nixpkgs { }
, mkGoEnv ? import ./go.nix, rktPath, }:
let
rktBasebuildInputs = with pkgs; [
glibc.out

View file

@ -1,9 +1,5 @@
{ gitpkgs ? import /home/steveej/src/github/NixOS/nixpkgs {}
, pkgs ? gitpkgs
, name ? "generic"
, version ? "Stable"
, extraBuildInputs ? []
}:
{ gitpkgs ? import /home/steveej/src/github/NixOS/nixpkgs { }, pkgs ? gitpkgs
, name ? "generic", version ? "Stable", extraBuildInputs ? [ ] }:
let
rustPackages = builtins.getAttr "rust${version}" pkgs;
rustc = rustPackages.rustc;
@ -12,20 +8,21 @@ let
setPS1 $rustname
unset name
'';
commonVimRC = ''
'';
commonVimRC = "";
in pkgs.stdenv.mkDerivation {
inherit name;
buildInputs = with rustPackages;[
( import ./vim-rust.nix { pkgs=gitpkgs; commonRC=commonVimRC;
buildInputs = with rustPackages;
[
(import ./vim-rust.nix {
pkgs = gitpkgs;
commonRC = commonVimRC;
inherit rustc;
racerd=pkgs.rustracerd;
racerd = pkgs.rustracerd;
})
rustc cargo
] ++ [
pkgs.rustfmt
] ++ extraBuildInputs;
shellHook = (rustShellHook){
rustc
cargo
] ++ [ pkgs.rustfmt ] ++ extraBuildInputs;
shellHook = (rustShellHook) {
inherit name;
inherit rustc;
};

View file

@ -1,4 +1,4 @@
{ commonRC, ... } @ args :
{ commonRC, ... }@args:
import ../../pkg-configuration/vim-derivates/vim.nix (args // {
name = "vim-for-go";
@ -13,8 +13,5 @@ import ../../pkg-configuration/vim-derivates/vim.nix (args // {
let g:neocomplete#sources#omni#input_patterns = {}
endif
'';
additionalPlugins = [
"neocomplete"
"vim-go"
];
additionalPlugins = [ "neocomplete" "vim-go" ];
})

View file

@ -1,6 +1,4 @@
{ commonRC
,
... } @ args :
{ commonRC, ... }@args:
import ../../pkg-configuration/vim-derivates/vim.nix (args // {
name = "vim-for-pandoc";
@ -14,9 +12,5 @@ import ../../pkg-configuration/vim-derivates/vim.nix (args // {
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
'';
additionalPlugins = [
"vim-pandoc"
"vim-pandoc-syntax"
"vimpreviewpandoc"
];
additionalPlugins = [ "vim-pandoc" "vim-pandoc-syntax" "vimpreviewpandoc" ];
})

View file

@ -1,7 +1,4 @@
{ commonRC
, rustc
, racerd,
... } @ args :
{ commonRC, rustc, racerd, ... }@args:
import ../../pkg-configuration/vim-derivates/vim.nix (args // {
name = "vim-for-rust";
@ -40,7 +37,5 @@ import ../../pkg-configuration/vim-derivates/vim.nix (args // {
let g:ycm_racerd_binary_path = '${racerd.out}/bin/racerd'
'';
additionalPlugins = [
"rust-vim"
];
additionalPlugins = [ "rust-vim" ];
})

View file

@ -1,8 +1,9 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> { } }:
(pkgs.buildFHSUserEnv {
name = "devfhs";
multiPkgs = pkgs: (with pkgs; [
multiPkgs = pkgs:
(with pkgs; [
android-udev-rules
sudo
gawk

View file

@ -1,9 +1,10 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> { } }:
(pkgs.buildFHSUserEnv {
name = "everydayFHS";
targetPkgs = pkgs: (with pkgs;
[ which
targetPkgs = pkgs:
(with pkgs; [
which
gitFull
zsh
file
@ -28,9 +29,7 @@
zlib
libsecret
]);
multiPkgs = pkgs: (with pkgs;
[
]);
multiPkgs = pkgs: (with pkgs; [ ]);
profile = ''
export SHELL=/bin/zsh
'';

View file

@ -1,6 +1,4 @@
{ config
, pkgs
, ... } @ args:
{ config, pkgs, ... }@args:
{
environment.systemPackages = [

View file

@ -1,9 +1,9 @@
{ pkgs
, ... } @ args:
{ pkgs, ... }@args:
{
environment.systemPackages = [
pkgs.xsel
(import ../../../pkg-configuration/vim-derivates/vim.nix (args // { name = "vim"; }))
(import ../../../pkg-configuration/vim-derivates/vim.nix
(args // { name = "vim"; }))
];
}

View file

@ -1,6 +1,4 @@
{ config
, pkgs
, ... }:
{ config, pkgs, ... }:
let
passwords = import ../passwords.crypt.nix;

View file

@ -5,8 +5,7 @@
# commands such as:
# nix-build -A mypackage
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> { } }:
{
overlays = import ./nix/overlays;

View file

@ -1,11 +1,6 @@
{ pkgs ? import <nixpkgs> {}
}:
let
baseEnv = [
"SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
];
{ pkgs ? import <nixpkgs> { } }:
let baseEnv = [ "SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ];
in rec {
@ -29,16 +24,9 @@ in rec {
interactive_base = pkgs.dockerTools.buildImage {
name = "interactive_base";
fromImage = base;
contents = with pkgs; [
procps
zsh
coreutils
neovim
];
contents = with pkgs; [ procps zsh coreutils neovim ];
config = {
Cmd = [ "/bin/zsh" ];
};
config = { Cmd = [ "/bin/zsh" ]; };
};
s3ql = let
@ -87,10 +75,7 @@ in rec {
in pkgs.dockerTools.buildImage {
name = "s3ql";
fromImage = interactive_base;
contents = [
pkgs.s3ql
pkgs.fuse
];
contents = [ pkgs.s3ql pkgs.fuse ];
runAsRoot = ''
#!${pkgs.stdenv.shell}
@ -109,10 +94,10 @@ in rec {
];
Cmd = [ entrypoint ];
Volumes = {
"/var/cache/s3ql" = {};
"/etc/s3ql/authinfo2" = {};
"/buckets" = {};
"/tmp" = {};
"/var/cache/s3ql" = { };
"/etc/s3ql/authinfo2" = { };
"/buckets" = { };
"/tmp" = { };
};
};
};
@ -146,13 +131,9 @@ in rec {
contents = pkgs.syncthing;
config = {
Env = baseEnv ++ [
"SYNCTHING_HOME=/home/syncthing"
];
Env = baseEnv ++ [ "SYNCTHING_HOME=/home/syncthing" ];
Cmd = [ entrypoint ];
Volumes = {
"/data" = {};
};
Volumes = { "/data" = { }; };
};
};
}

View file

@ -3,8 +3,7 @@
let
channelVersions = (import versionsPath);
mkChannelSource = name:
let
channelVersion = builtins.getAttr name channelVersions;
let channelVersion = builtins.getAttr name channelVersions;
in builtins.fetchGit {
# Descriptive name to make the store path easier to identify
inherit name;
@ -15,13 +14,11 @@ let
elem = builtins.getAttr elemName channelVersions;
elemPath = (mkChannelSource elemName);
suffix = if builtins.hasAttr "suffix" elem then elem.suffix else "";
in
builtins.concatStringsSep "=" [ elemName elemPath ] + suffix
) (builtins.attrNames channelVersions));
pkgs = import (mkChannelSource "nixpkgs") {};
in
in builtins.concatStringsSep "=" [ elemName elemPath ] + suffix)
(builtins.attrNames channelVersions));
pkgs = import (mkChannelSource "nixpkgs") { };
{
in {
inherit nixPath;
channelSources = pkgs.writeText "channels.rc" ''
export NIX_PATH=${nixPath}

View file

@ -1,16 +1,13 @@
{ pkgs }:
let
zshCurried = import ../programs/zsh.nix { inherit pkgs; };
in
let zshCurried = import ../programs/zsh.nix { inherit pkgs; };
{ pkgs
, config
, ... }:
in { pkgs, config, ... }:
let
# gitpkgs = import /home/steveej/src/github/NixOS/nixpkgs {};
unstablepkgs = import <channels-nixos-unstable-small> { config = config.nixpkgs.config; };
unstablepkgs =
import <channels-nixos-unstable-small> { config = config.nixpkgs.config; };
masterpkgs = import <nixpkgs-master> { config = config.nixpkgs.config; };
in {
@ -37,25 +34,20 @@ in {
gnutls = true;
};
packageOverrides = pkgs: with pkgs; {
};
packageOverrides = pkgs: with pkgs; { };
};
home.sessionVariables = {
# TODO: find a way to prevent using a store path for the current file
# HM_CONFIG_PATH=builtins.toString "${./.}";
HM_CONFIG="graphical-fullblown";
HM_CONFIG = "graphical-fullblown";
GOPATH="$HOME/src/go";
GOPATH = "$HOME/src/go";
PATH=pkgs.lib.concatStringsSep ":" [
"$HOME/.local/bin"
"$PATH"
];
PATH = pkgs.lib.concatStringsSep ":" [ "$HOME/.local/bin" "$PATH" ];
};
home.packages = []
++ (with pkgs; [
home.packages = [ ] ++ (with pkgs; [
# Authentication
cacert
fprintd
@ -135,7 +127,6 @@ in {
# }))
appimage-run
# Remote Control Tools
remmina
freerdp
@ -184,7 +175,6 @@ in {
feh
# digikam
# Modelling Tools
# plantuml
# umlet
@ -216,26 +206,14 @@ in {
perlPackages.UnicodeLineBreak
(texlive.combine {
inherit (texlive)
scheme-small
texlive-de
texlive-en
texlive-scripts
collection-langgerman
scheme-small texlive-de texlive-en texlive-scripts collection-langgerman
latexindent
latexmk
latexindent latexmk
algorithms
cm-super
algorithms cm-super
preprint
enumitem
draftwatermark
everypage
ulem
placeins
minted ifplatform fvextra xstring framed
;
preprint enumitem draftwatermark everypage ulem placeins minted
ifplatform fvextra xstring framed;
})
pdftk

View file

@ -1,15 +1,12 @@
{ pkgs }:
let
zshCurried = import ../programs/zsh.nix { inherit pkgs; };
in
let zshCurried = import ../programs/zsh.nix { inherit pkgs; };
{ pkgs
, config,
... }:
in { pkgs, config, ... }:
let
unstablepkgs = import <channels-nixos-unstable> { config = config.nixpkgs.config; };
unstablepkgs =
import <channels-nixos-unstable> { config = config.nixpkgs.config; };
in {
imports = [
@ -30,16 +27,12 @@ in {
gnutls = true;
};
packageOverrides = pkgs: with pkgs; {
};
packageOverrides = pkgs: with pkgs; { };
};
home.sessionVariables = {
};
home.sessionVariables = { };
home.packages =
[] ++ (with pkgs; [
home.packages = [ ] ++ (with pkgs; [
# Nix package related tools
patchelf
nix-index

View file

@ -1,15 +1,12 @@
{ pkgs }:
let
zshCurried = import ../programs/zsh.nix { inherit pkgs; };
in
let zshCurried = import ../programs/zsh.nix { inherit pkgs; };
{ pkgs
, config,
... }:
in { pkgs, config, ... }:
let
unstablepkgs = import <channels-nixos-unstable> { config = config.nixpkgs.config; };
unstablepkgs =
import <channels-nixos-unstable> { config = config.nixpkgs.config; };
in {
imports = [
@ -32,16 +29,12 @@ in {
gnutls = true;
};
packageOverrides = pkgs: with pkgs; {
};
packageOverrides = pkgs: with pkgs; { };
};
home.sessionVariables = {
};
home.sessionVariables = { };
home.packages =
[] ++ (with pkgs; [
home.packages = [ ] ++ (with pkgs; [
# Nix package related tools
patchelf
nix-index

View file

@ -1,12 +1,8 @@
{ pkgs, extraPackages ? [] }:
{ pkgs, extraPackages ? [ ] }:
let
zshCurried = import ../programs/zsh.nix { inherit pkgs; };
in
let zshCurried = import ../programs/zsh.nix { inherit pkgs; };
{ pkgs
, config
, ... }:
in { pkgs, config, ... }:
let
@ -18,18 +14,10 @@ in {
zshCurried
];
nixpkgs.config = {
packageOverrides = pkgs: with pkgs; {
};
};
nixpkgs.config = { packageOverrides = pkgs: with pkgs; { }; };
home.sessionVariables = {
};
home.sessionVariables = { };
home.packages = extraPackages
++ (with pkgs; [
iperf3
inetutils
speedtest-cli
]);
++ (with pkgs; [ iperf3 inetutils speedtest-cli ]);
}

View file

@ -1,5 +1,4 @@
{
}:
{ }:
let
@ -11,12 +10,8 @@ in {
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Service = {
ExecStart = execStart;
};
Service = { ExecStart = execStart; };
};
}

View file

@ -1,6 +1,4 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
let
in {
@ -36,8 +34,7 @@ in {
programs.command-not-found.enable = true;
programs.fzf.enable = true;
home.packages =
[] ++ (with pkgs; [
home.packages = [ ] ++ (with pkgs; [
# git helpers
git-crypt

View file

@ -1,10 +1,6 @@
{ pkgs
, config
, ...
}:
{ pkgs, config, ... }:
let
vcshActivationScript = pkgs.callPackage ./dotfiles/vcsh.nix {};
let vcshActivationScript = pkgs.callPackage ./dotfiles/vcsh.nix { };
in {
# TODO: fix the dotfiles

View file

@ -1,8 +1,5 @@
{ pkgs
, repoHttps ? "https://gitlab.com/steveeJ/dotfiles.git"
, repoSsh ? "git@gitlab.com:/steveeJ/dotfiles.git"
, ...
}:
{ pkgs, repoHttps ? "https://gitlab.com/steveeJ/dotfiles.git"
, repoSsh ? "git@gitlab.com:/steveeJ/dotfiles.git", ... }:
let
repoBareLocal = pkgs.runCommand "fetchbare" {
@ -36,4 +33,4 @@ in pkgs.writeScript "activation-script" ''
${pkgs.vcsh}/bin/vcsh pull $HOST || true
set_remotes ${repoHttps} ${repoSsh}
fi
''
''

View file

@ -1,15 +1,13 @@
{ pkgs
, config
, ...
}:
{ pkgs, config, ... }:
let
in {
home.file.".nix-channels".text = ''
'';
home.file.".nix-channels".text = "";
home.activation.removeExistingNixChannels = config.lib.dag.entryBefore ["checkLinkTargets"] ''
$DRY_RUN_CMD ${pkgs.writeScript "activation-script" ''
home.activation.removeExistingNixChannels =
config.lib.dag.entryBefore [ "checkLinkTargets" ] ''
$DRY_RUN_CMD ${
pkgs.writeScript "activation-script" ''
set -ex
if test -f $HOME/.nix-channels; then
echo Uninstalling available channels...
@ -23,6 +21,7 @@ in {
mv --backup=numbered $HOME/.nix-channels.dummy $HOME/.nix-channels
rm $HOME/.nix-channels
fi
''};
''
};
'';
}

View file

@ -1,16 +1,13 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
let
inherit (import ../lib.nix { })
mkSimpleTrayService
;
inherit (import ../lib.nix { }) mkSimpleTrayService;
audio = pkgs.writeShellScript "audio" ''
export PATH=${with pkgs; lib.makeBinPath [
pulseaudio findutils gnugrep
]}:$PATH
export PATH=${
with pkgs;
lib.makeBinPath [ pulseaudio findutils gnugrep ]
}:$PATH
export MUTEFILE=''${TEMPDIR:-/tmp}/.qtilemute
case $1 in
@ -34,9 +31,7 @@ let
terminalCommand = "${pkgs.alacritty}/bin/alacritty";
dpmsScript = pkgs.writeShellScript "dpmsScript" ''
export PATH=${with pkgs; lib.makeBinPath [
xorg.xset
]}:$PATH
export PATH=${with pkgs; lib.makeBinPath [ xorg.xset ]}:$PATH
set -xe
@ -59,9 +54,7 @@ let
'';
screenLockCommand = pkgs.writeShellScript "screenLock" ''
export PATH=${with pkgs; lib.makeBinPath [
i3lock
]}:$PATH
export PATH=${with pkgs; lib.makeBinPath [ i3lock ]}:$PATH
revert() {
${dpmsScript} default
@ -82,27 +75,27 @@ let
'';
qtileConfig = pkgs.writeScript "qtile_config.py" ''
from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget
from libqtile import hook
from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget
from libqtile import hook
import logging, os
logger = logging.getLogger()
logger.setLevel(logging.WARN)
import logging, os
logger = logging.getLogger()
logger.setLevel(logging.WARN)
handler = logging.handlers.RotatingFileHandler(
handler = logging.handlers.RotatingFileHandler(
os.path.join(os.getenv('TEMPDIR', default="/tmp"), '.qtilelog'), maxBytes=10240000,
backupCount=7
)
handler.setLevel(logging.WARN)
logger.addHandler(handler)
)
handler.setLevel(logging.WARN)
logger.addHandler(handler)
key_super = "mod4"
key_alt = "mod1"
key_control = "control"
key_super = "mod4"
key_alt = "mod1"
key_control = "control"
keys = [
keys = [
# https://github.com/qtile/qtile/blob/master/libqtile/backend/x11/xkeysyms.py
Key([key_super], "Return", lazy.spawn("${terminalCommand}")),
Key([key_super], "r", lazy.spawncmd()),
@ -179,10 +172,10 @@ keys = [
Key([], "XF86AudioLowerVolume", lazy.spawn("${audio} lower")),
Key([], "XF86AudioRaiseVolume", lazy.spawn("${audio} raise")),
Key([], "Print", lazy.spawn("${pkgs.flameshot}/bin/flameshot gui")),
]
groups = [Group(i) for i in "1234567890"]
]
groups = [Group(i) for i in "1234567890"]
for i in groups:
for i in groups:
# super + letter of group = switch to group
keys.append(
Key([key_super], i.name, lazy.group[i.name].toscreen())
@ -193,23 +186,23 @@ for i in groups:
Key([key_super, key_control], i.name, lazy.window.togroup(i.name))
)
layouts = [
layouts = [
layout.Columns(num_columns=3, border_focus='#00ff00', border_width=2),
layout.Max(),
# layout.Stack(num_stacks=3, border_focus='#00ff00', border_width=2, autosplit=True, previous_on_rm=True),
# layout.Wmii(border_focus='#00ff00'),
# layout.MonadTall(ratio=0.6, border_focus='#00ff00'),
]
]
widget_defaults = dict(
widget_defaults = dict(
font='Arial',
fontsize=16,
padding=3,
)
)
screens_count = 4
screens = []
for i in range(0, screens_count+1):
screens_count = 4
screens = []
for i in range(0, screens_count+1):
j = i+1
widgets = [
widget.TextBox("Screen %i" % j, name="Screen %i" % j),
@ -230,38 +223,37 @@ for i in range(0, screens_count+1):
keys.append(Key([key_super, "shift"], "%i" % (i+1), lazy.to_screen(i)))
dgroups_key_binder = None
dgroups_app_rules = []
follow_mouse_focus = False
bring_front_click = False
cursor_warp = False
auto_fullscreen = True
auto_minimize = False
# focus_on_window_activation = "urgent"
dgroups_key_binder = None
dgroups_app_rules = []
follow_mouse_focus = False
bring_front_click = False
cursor_warp = False
auto_fullscreen = True
auto_minimize = False
# focus_on_window_activation = "urgent"
# Drag floating layouts.
mouse = [
# Drag floating layouts.
mouse = [
# Drag([key_super,key_control], "Button1", lazy.window.set_position_floating(), start=lazy.window.get_position()),
# Drag([key_super,key_control], "Button2", lazy.window.set_size_floating(), start=lazy.window.get_size()),
Click([key_super,key_control], "Button3", lazy.window.disable_floating())
]
]
# disable any floating
@hook.subscribe.client_new
def disable_floating_for_all_new_windows(window):
# disable any floating
@hook.subscribe.client_new
def disable_floating_for_all_new_windows(window):
window.floating = False
@hook.subscribe.client_new
def print_new_window(window):
@hook.subscribe.client_new
def print_new_window(window):
print("new window: ", window)
'';
'';
in {
systemd.user = {
startServices = true;
services = {
};
services = { };
};
services = {
@ -306,13 +298,13 @@ in {
enable = true;
settings = {
matches = let
playerctl = ''${pkgs.coreutils}/bin/env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(${pkgs.coreutils}/bin/id -u)/bus" ${pkgs.playerctl}/bin/playerctl'';
playerctl = ''
${pkgs.coreutils}/bin/env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(${pkgs.coreutils}/bin/id -u)/bus" ${pkgs.playerctl}/bin/playerctl'';
in [
{
trigger = ":vpos";
replace = "{{output}}";
vars = [
{
vars = [{
name = "output";
type = "script";
params = {
@ -331,25 +323,21 @@ in {
'')
];
};
}
];
}];
}
{
trigger = ":vtit";
replace = "{{output}}";
vars = [
{
vars = [{
name = "output";
type = "script";
params = {
args = [
(pkgs.writeShellScript "espanso" ''
${playerctl} metadata title''
)
(pkgs.writeShellScript "espanso"
"${playerctl} metadata title")
];
};
}
];
}];
}
{
trigger = ":dunno";

View file

@ -1,15 +1,9 @@
{
...
}:
{ ... }:
{
programs.chromium = {
enable = true;
};
programs.chromium = { enable = true; };
programs.brave = {
enable = true;
};
programs.brave = { enable = true; };
nixpkgs.config = {
chromium = {
@ -18,11 +12,6 @@
};
};
programs.browserpass = {
browsers = [
"chromium"
"brave"
];
};
programs.browserpass = { browsers = [ "chromium" "brave" ]; };
}

View file

@ -1,23 +1,21 @@
{ pkgs,
...
}:
{ pkgs, ... }:
{
programs.emacs = {
enable = true;
extraPackages = epkgs: (with epkgs; [
extraPackages = epkgs:
(with epkgs; [
nix-mode
magit # ; Integrate git <C-x g>
zerodark-theme # ; Nicolas' theme
undo-tree # ; <C-x u> to show the undo tree
# zoom-frm # ; increase/decrease font size for all buffers %lt;C-x C-+>
]) ++ (with epkgs.melpaPackages; [
evil
]) ++ (with epkgs.elpaPackages; [
]) ++ (with epkgs.melpaPackages; [ evil ]) ++ (with epkgs.elpaPackages; [
auctex # ; LaTeX mode
beacon # ; highlight my cursor when scrolling
nameless # ; hide current package name everywhere in elisp code
]) ++ (with pkgs; [
]) ++ (with pkgs;
[
pkgs.notmuch # From main packages set
]);
};

View file

@ -1,19 +1,14 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
programs.firefox = {
enable = true;
};
programs.firefox = { enable = true; };
programs.browserpass = {
enable = true;
browsers = [
"firefox"
];
browsers = [ "firefox" ];
};
home.file.".mozilla/native-messaging-hosts/passff.json".source = "${pkgs.passff-host}/share/passff-host/passff.json";
home.file.".mozilla/native-messaging-hosts/passff.json".source =
"${pkgs.passff-host}/share/passff-host/passff.json";
}

View file

@ -1,7 +1,5 @@
{ pkgs, ... }:
{
home.packages = [
pkgs.holochain-launcher
];
home.packages = [ pkgs.holochain-launcher ];
}

View file

@ -1,18 +1,15 @@
{ pkgs
, config
, ...
}:
{ pkgs, config, ... }:
let
# TODO: clean up the impurity in here
in {
home.sessionVariables = {
HOMESHICK_DIR="${pkgs.homeshick}";
};
home.sessionVariables = { HOMESHICK_DIR = "${pkgs.homeshick}"; };
home.activation.bootstrapRepos = config.lib.dag.entryAfter ["writeBoundary"] ''
$DRY_RUN_CMD ${pkgs.writeScript "activation-script" ''
home.activation.bootstrapRepos =
config.lib.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD ${
pkgs.writeScript "activation-script" ''
set -e
echo home-manager path is ${config.home.path}
echo home is $HOME
@ -23,12 +20,14 @@ in {
# echo Updating homeshick
# ln -sfT ${pkgs.homeshick} "$HOMESICK_REPOS"/.homeshick
# mv -Tf "$HOMESICK_REPOS"/{.,}homeshick
''};
''
};
'';
nixpkgs.config = {
packageOverrides = pkgs: with pkgs; {
packageOverrides = pkgs:
with pkgs; {
homeshick = builtins.fetchGit {
url = "https://github.com/andsens/homeshick.git";
ref = "master";

View file

@ -1,6 +1,4 @@
{ pkgs,
...
}:
{ pkgs, ... }:
{
home.sessionVariables = {
@ -8,7 +6,5 @@
SAL_USE_VCLPLUGIN = "gtk3";
};
home.packages = with pkgs; [
libreoffice-fresh
];
home.packages = with pkgs; [ libreoffice-fresh ];
}

View file

@ -1,13 +1,9 @@
{ pkgs,
...
}:
{ pkgs, ... }:
let
in {
home.sessionVariables = {
EDITOR = "nvim";
};
home.sessionVariables = { EDITOR = "nvim"; };
programs.neovim = {
enable = true;
@ -16,7 +12,8 @@ in {
extraConfig = builtins.readFile ./neovim/vimrc;
plugins = with pkgs; [
plugins = with pkgs;
[
# yaml-folds
{
plugin = vimUtils.buildVimPlugin {
@ -80,8 +77,7 @@ in {
};
};
}
]
++ (with pkgs.vimPlugins; [
] ++ (with pkgs.vimPlugins; [
delimitMate
vim-airline
vim-airline-themes
@ -109,7 +105,8 @@ in {
tabular
# Nix
vim-addon-nix tlib
vim-addon-nix
tlib
vim-addon-vim2nix
# LaTeX
@ -124,8 +121,8 @@ in {
vim-markdown-toc
# misc syntax support
vim-bazel maktaba
])
;
vim-bazel
maktaba
]);
};
}

View file

@ -1,23 +1,15 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
home.sessionVariables = {
# required by pass-otp
PASSWORD_STORE_EXTENSIONS_DIR = "$HOME/.nix-profile/lib/password-store/extensions";
PASSWORD_STORE_EXTENSIONS_DIR =
"$HOME/.nix-profile/lib/password-store/extensions";
PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
};
programs.browserpass = {
enable = true;
};
programs.browserpass = { enable = true; };
home.packages = with pkgs; [
pass
qtpass
rofi-pass
gnupg
];
home.packages = with pkgs; [ pass qtpass rofi-pass gnupg ];
}

View file

@ -1,6 +1,4 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
let
cniConfigDir = let
@ -38,7 +36,7 @@ let
]
}
'';
in pkgs.runCommand "cniConfig" {} ''
in pkgs.runCommand "cniConfig" { } ''
set -x
mkdir $out;
ln -s ${loopback} $out/${loopback.name}
@ -107,9 +105,7 @@ let
default_network = "podman"
'';
in {
home.packages = with pkgs; [
podman
];
home.packages = with pkgs; [ podman ];
home.file.".config/containers/containers.conf".source = containersConf;

View file

@ -462,20 +462,16 @@ let
sha256 = "1jmmbz3i0hxq5ka4rsk07mynxh3pkh5g736d9ryv1czhnrb06lwf";
}
];
in
{
in {
programs.vscode = {
enable = true;
extensions = []
++ packagedExtensions
extensions = [ ] ++ packagedExtensions
# ++ marketPlaceExtensions
;
};
home.packages = [
pkgs.nixpkgs-fmt
];
home.packages = [ pkgs.nixpkgs-fmt ];
}
# TODO: automate

View file

@ -3,8 +3,7 @@
{ ... }:
let
just-plugin =
let
just-plugin = let
plugin_file = pkgs.writeText "_just" ''
#compdef just
#autload
@ -43,8 +42,7 @@ in {
# will be called again by oh-my-zsh
enableCompletion = false;
enableAutosuggestions = true;
initExtra = let
inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
initExtra = let inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
in ''
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}%f.%F{red} ($?%))%f %F{blue}%~%f${inNixShell}%F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
RPROMPT=""
@ -59,8 +57,8 @@ in {
${if builtins.hasAttr "homeshick" pkgs then ''
source ${pkgs.homeshick}/homeshick.sh
fpath=(${pkgs.homeshick}/completions $fpath)
'' else ''
''}
'' else
""}
# Disable intercepting of ctrl-s and ctrl-q as flow control.
stty stop ''' -ixoff -ixon
@ -117,10 +115,7 @@ in {
oh-my-zsh = {
enable = true;
theme = "tjkirch";
plugins = [
"git"
"sudo"
];
plugins = [ "git" "sudo" ];
};
};
}

View file

@ -5,8 +5,7 @@
{ n, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
];

View file

@ -4,16 +4,15 @@
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/e02a410e-5044-440f-90e9-b573e51f1315";
fileSystems."/" = {
device = "/dev/disk/by-uuid/e02a410e-5044-440f-90e9-b573e51f1315";
fsType = "ext4";
};

View file

@ -1,10 +1,10 @@
{ nixpkgs ? import <nixpkgs> {}
, nrNanos ? 1 # Number of nanos
{ nixpkgs ? import <nixpkgs> { }, nrNanos ? 1 # Number of nanos
}:
let
pkgs = nixpkgs;
webserver = { services.httpd.enable = true;
webserver = {
services.httpd.enable = true;
services.httpd.adminAddr = "mail@stefanjunker.de";
services.httpd.documentRoot = "${pkgs.nixops}/share/doc/nixops/";
networking.firewall.allowedTCPPorts = [ 80 ];
@ -12,15 +12,14 @@ let
mkNano = { n }: {
imports = [
(import ./nano/configuration.nix {inherit pkgs n;})
(import ./nano/configuration.nix { inherit pkgs n; })
../configuration/common/user/root.nix
];
deployment.targetEnv = "none";
deployment.targetHost = "nano${toString n}";
};
mkNanos = n: nixpkgs.lib.nameValuePair "nano${toString n}" (
mkNano { inherit n; }
);
mkNanos = n:
nixpkgs.lib.nameValuePair "nano${toString n}" (mkNano { inherit n; });
in nixpkgs.lib.listToAttrs (map mkNanos (nixpkgs.lib.range 0 (nrNanos - 1)))

View file

@ -1,14 +1,9 @@
{ hostAddress
, localAddress
, containerBackupCfg
, sshPort ? containerBackupCfg.portInt
}: {
{ hostAddress, localAddress, containerBackupCfg
, sshPort ? containerBackupCfg.portInt }: {
config = { config, pkgs, lib, ... }: {
system.stateVersion = "21.11"; # Did you read the comment?
imports = [
../profiles/containers/configuration.nix
];
imports = [ ../profiles/containers/configuration.nix ];
networking.firewall.enable = false;
@ -28,7 +23,8 @@
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDNI3H0BRSYOZ/MbTs9J80doJwSd1HymFOP5quNt0J48vxZ5FPVrT2FHpQiNrCcYbCKRsU4X8AiGUHiXC0PapQQ3JDkqp6WZoqBNDx6BI7RadyH1TqVQPlou3pQmCAogzfBInruR53YTDmQqXiPwfM0okPOXgiBNjDfZXOX4+CyUfkmZZwASoicTInqWGkn1sFnh4tyXIkgWflg0njlVmfkVvH71+evvKLYHtoNpVXazkQ0SXbyuW5f3mSta7TNkpC3HbBm+4n+WxYGySrlRLWQhTo+aoWUKk9h5zvECDNpwRtbqzt+bA9nKrdg180ceu8hruwvWNiC6PPA2GW9Z1+VKROviGu1C3dliE/pPCBtK+ZoRVv2CGE+pmAuQsB9Nif9tk5tY6HJhuLNxKYiMfQkiLsDYv6KdZXUIVK/4BIDkZuQNnjhdOQBLnea0ANOhutA9gnjxnsd3UT6ovfazg5gud7n3u4yBtzjTkRrqWZ63eM1NmUVOgMWHQ715pV+hJfOFGqzRBEe3g/p3bWNgpROBYJbG1H8l9DN7emG4FGWsb1HeNFwQ5lS0Zsezb7qzahr4vSmHNugVw7w8ONt5dPbPI9wQnWvkkuHH76P/NYy6OC6lHrN1rXyA1okqdPr06YAZnCot+Pqdgn/ijxgp06J3dtkhin+Q7PoQbGff3ERIw== bkp"
];
packages = with pkgs; [
packages = with pkgs;
[
btrfsProgs
# btrbk
];
@ -38,16 +34,23 @@
security.sudo = {
enable = true;
extraRules = [
{
extraRules = [{
users = [ "bkp" ];
commands = [
{ command = "/etc/profiles/per-user/bkp/bin/btrfs"; options = [ "NOPASSWD" ]; }
{ command = "/run/current-system/sw/bin/readlink"; options = [ "NOPASSWD" ]; }
{ command = "/run/current-system/sw/bin/test"; options = [ "NOPASSWD" ]; }
];
{
command = "/etc/profiles/per-user/bkp/bin/btrfs";
options = [ "NOPASSWD" ];
}
{
command = "/run/current-system/sw/bin/readlink";
options = [ "NOPASSWD" ];
}
{
command = "/run/current-system/sw/bin/test";
options = [ "NOPASSWD" ];
}
];
}];
};
};
@ -61,14 +64,12 @@
};
privateNetwork = true;
forwardPorts = [
{
forwardPorts = [{
# ssh
containerPort = 22;
hostPort = sshPort;
protocol = "tcp";
}
];
}];
inherit hostAddress localAddress;
}

View file

@ -1,9 +1,4 @@
{ config
, hostAddress
, localAddress
, subvolumes
, targetPathSuffix ? ""
}:
{ config, hostAddress, localAddress, subvolumes, targetPathSuffix ? "" }:
let
passwords = import ../../variables/passwords.crypt.nix;
@ -13,14 +8,9 @@ in {
config = { pkgs, ... }: {
system.stateVersion = "20.03"; # Did you read the comment?
imports = [
../profiles/containers/configuration.nix
];
imports = [ ../profiles/containers/configuration.nix ];
environment.systemPackages = with pkgs; [
btrfs-progs
btrbk
];
environment.systemPackages = with pkgs; [ btrfs-progs btrbk ];
networking.firewall.enable = true;
@ -28,17 +18,11 @@ in {
enable = true;
description = "bkp-sync service";
serviceConfig = {
Type = "oneshot";
};
serviceConfig = { Type = "oneshot"; };
after = [
"bkp-run.service"
];
after = [ "bkp-run.service" ];
requires = [
"bkp-run.service"
];
requires = [ "bkp-run.service" ];
path = with pkgs; [ utillinux ];
script = ''
@ -51,13 +35,9 @@ in {
enable = true;
description = "bkp-run";
serviceConfig = {
Type = "oneshot";
};
serviceConfig = { Type = "oneshot"; };
partOf = [
"bkp-sync.service"
];
partOf = [ "bkp-sync.service" ];
path = with pkgs; [ btrfs-progs btrbk coreutils ];
@ -78,7 +58,8 @@ in {
volume ${subvolumeParentDir}
target ${passwords.storage.backupTarget.target}/container-volumes/${targetPathSuffix}
${builtins.foldl' (sum: elem: sum + " subvolume " + elem + "\n") "" subvolumes}
${builtins.foldl' (sum: elem: sum + " subvolume " + elem + "\n") ""
subvolumes}
'';
in ''
#! ${pkgs.bash}/bin/bash
@ -95,10 +76,10 @@ in {
timerConfig = {
# Obtained using `systemd-analyze calendar "Wed 23:00"`
# OnCalendar = "Wed *-*-* 23:00:00";
OnStartupSec="1m";
OnStartupSec = "1m";
Unit = "bkp-sync.service";
OnUnitInactiveSec="2h";
Persistent="true";
OnUnitInactiveSec = "2h";
Persistent = "true";
};
};
};
@ -122,13 +103,13 @@ in {
};
};
allowedDevices = [
{ node = "/dev/fuse"; modifier = "rw"; }
];
allowedDevices = [{
node = "/dev/fuse";
modifier = "rw";
}];
privateNetwork = true;
forwardPorts = [
];
forwardPorts = [ ];
inherit hostAddress localAddress;
}

View file

@ -1,22 +1,14 @@
{ hostAddress
, localAddress
, imapsPort ? 993
, sievePort ? 4190
}:
{ hostAddress, localAddress, imapsPort ? 993, sievePort ? 4190 }:
let
passwords = import ../../variables/passwords.crypt.nix;
let passwords = import ../../variables/passwords.crypt.nix;
in
{
in {
config = { pkgs, ... }: {
system.stateVersion = "21.11"; # Did you read the comment?
imports = [
../profiles/containers/configuration.nix
../profiles/common/user.nix
];
imports =
[ ../profiles/containers/configuration.nix ../profiles/common/user.nix ];
networking.firewall.enable = false;
@ -146,7 +138,7 @@ in
};
};
privateNetwork = true ;
privateNetwork = true;
forwardPorts = [
{
# imaps

View file

@ -1,17 +1,12 @@
{ hostAddress
, localAddress
, syncthingPort ? 22000
, syncthingLocalAnnouncePort ? 21027
}:
{ hostAddress, localAddress, syncthingPort ? 22000
, syncthingLocalAnnouncePort ? 21027 }:
{
config = { config, pkgs, ... }: {
system.stateVersion = "20.05"; # Did you read the comment?
imports = [
../profiles/containers/configuration.nix
];
imports = [ ../profiles/containers/configuration.nix ];
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [

View file

@ -1,19 +1,11 @@
{ hostAddress
, localAddress
, httpPort ? 80
, httpsPort ? 443
}:
{ hostAddress, localAddress, httpPort ? 80, httpsPort ? 443 }:
let
passwords = import ../../variables/passwords.crypt.nix;
in
{
let passwords = import ../../variables/passwords.crypt.nix;
in {
config = { config, pkgs, lib, ... }: {
system.stateVersion = "22.05"; # Did you read the comment?
imports = [
../profiles/containers/configuration.nix
];
imports = [ ../profiles/containers/configuration.nix ];
networking.firewall.enable = false;
@ -58,20 +50,16 @@ in
# sslCertificate = "/etc/secrets/stefanjunker.de/nginx/nginx.crt";
# sslCertificateKey = "/etc/secrets/stefanjunker.de/nginx/nginx.key";
locations."/fi" = {
index = "index.php";
};
locations."/fi" = { index = "index.php"; };
locations."~ ^(.+\.php)(.*)$".extraConfig = ''
locations."~ ^(.+.php)(.*)$".extraConfig = ''
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket};
fastcgi_index index.php;
'';
locations."/hedgedoc/" = {
proxyPass = "http://127.0.0.1:3000/";
};
locations."/hedgedoc/" = { proxyPass = "http://127.0.0.1:3000/"; };
locations."/hedgedoc/socket.io/" = {
proxyPass = "http://127.0.0.1:3000/socket.io/";
@ -92,15 +80,14 @@ in
"pm.max_spare_servers" = 3;
"pm.max_requests" = 500;
"php_admin_value[error_reporting]" = "E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED";
"php_admin_value[error_reporting]" =
"E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED";
};
};
# the custom php5 we're using here has no fpm-systemd, so the default `Type = "notify"` won't work
systemd.services."phpfpm-mypool" = {
serviceConfig = {
Type = lib.mkForce "simple";
};
serviceConfig = { Type = lib.mkForce "simple"; };
};
services.mysql = {

View file

@ -1,6 +1,4 @@
{ lib
, ...
}:
{ lib, ... }:
{
boot.loader.grub.efiSupport = lib.mkForce false;

View file

@ -1,8 +1,7 @@
{ ... }:
{
disabledModules = [
];
disabledModules = [ ];
imports = [
../../profiles/common/configuration.nix

View file

@ -18,8 +18,7 @@ let
"ata_generic"
];
in
{
in {
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/354fb107-2f4a-42ad-80dd-9dddb61bfd02";
fsType = "ext4";
@ -39,14 +38,12 @@ in
neededForBoot = true;
};
swapDevices = [ { device = "/dev/disk/by-uuid/d16b5f4a-f38c-41c6-8aae-1625be815f9d"; } ];
swapDevices =
[{ device = "/dev/disk/by-uuid/d16b5f4a-f38c-41c6-8aae-1625be815f9d"; }];
boot.loader.grub = {
device = "/dev/vda";
};
boot.loader.grub = { device = "/dev/vda"; };
boot.initrd.availableKernelModules = stage1Modules;
boot.initrd.kernelModules = stage1Modules;
boot.extraModprobeConfig = ''
'';
boot.extraModprobeConfig = "";
}

View file

@ -1,14 +1,14 @@
{ config
, pkgs
, lib
, ...
}:
{ config, pkgs, lib, ... }:
{
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
nixPath = (import ../../../default.nix { versionsPath = ./versions.nix; }).nixPath;
nixpkgs.config.packageOverrides = pkgs:
with pkgs; {
nixPath = (import ../../../default.nix {
versionsPath = ./versions.nix;
}).nixPath;
};
home-manager.users.steveej = import ../../../home-manager/configuration/text-minimal.nix {
home-manager.users.steveej =
import ../../../home-manager/configuration/text-minimal.nix {
inherit pkgs;
extraPackages = [
# required by vscode's remote-ssh plugin
@ -20,11 +20,10 @@
];
};
nix.buildMachines = [
{ hostName = "localhost";
nix.buildMachines = [{
hostName = "localhost";
system = "x86_64-linux";
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
supportedFeatures = [ "kvm" "nixos-test" "big-parallel" "benchmark" ];
maxJobs = 4;
}
];
}];
}

View file

@ -1,15 +1,9 @@
{ pkgs
, lib
, config
, ... }:
{ pkgs, lib, config, ... }:
let
keys = import ../../../variables/keys.nix;
let keys = import ../../../variables/keys.nix;
in {
nix.binaryCaches = [
"https://cache.holo.host"
];
nix.binaryCaches = [ "https://cache.holo.host" ];
nix.binaryCachePublicKeys = [
"cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE="
@ -32,11 +26,11 @@ in {
networking.interfaces.eth0 = {
mtu = 1400;
useDHCP = false;
ipv4.addresses = [
{ "address" = "167.233.1.14"; "prefixLength" = 29; }
];
ipv6.addresses = [
];
ipv4.addresses = [{
"address" = "167.233.1.14";
"prefixLength" = 29;
}];
ipv6.addresses = [ ];
};
networking.defaultGateway = {
@ -49,9 +43,7 @@ in {
interface = "eth0";
};
networking.nameservers = [
"1.1.1.1"
];
networking.nameservers = [ "1.1.1.1" ];
networking.nat = {
enable = true;
@ -63,9 +55,7 @@ in {
# services.kubernetes.roles = ["master" "node"];
# virtualization
virtualisation = {
docker.enable = true;
};
virtualisation = { docker.enable = true; };
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;
@ -79,25 +69,21 @@ in {
'';
};
systemd.services.sshd.serviceConfig = {
TasksMax = 32;
};
systemd.services.sshd.serviceConfig = { TasksMax = 32; };
systemd.timers."sshd-status" = {
description = "Timer to trigger sshd-status periodically";
enable = true;
wantedBy = [ "timer.target" "multi-user.target" ];
timerConfig = {
OnActiveSec="360s";
OnUnitActiveSec="360s";
AccuracySec="1s";
OnActiveSec = "360s";
OnUnitActiveSec = "360s";
AccuracySec = "1s";
Unit = "sshd-status.service";
};
};
nix.gc = {
automatic = true;
};
nix.gc = { automatic = true; };
networking.useHostResolvConf = true;

View file

@ -4,9 +4,8 @@ let
ref = "nixos-21.11";
rev = "e34c5379866833f41e2a36f309912fa675d687c7";
};
in
{
in {
inherit nixpkgs;
"channels-nixos-stable" = nixpkgs;
"channels-nixos-21.05" = {

View file

@ -2,46 +2,61 @@ let
nixpkgs = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-21.11";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.11 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.11 | awk '{ print $1 }' | tr -d '
' -%>'';
};
in
{
in {
inherit nixpkgs;
"channels-nixos-stable" = nixpkgs;
"channels-nixos-21.05" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-21.05";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-20.05 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-20.05 | awk '{ print $1 }' | tr -d '
' -%>'';
};
"channels-nixos-20.09" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-20.09";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-20.09 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-20.09 | awk '{ print $1 }' | tr -d '
' -%>'';
};
"channels-nixos-20.03" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-20.03";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-20.03 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-20.03 | awk '{ print $1 }' | tr -d '
' -%>'';
};
"channels-nixos-19.09" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-19.09";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-19.09 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-19.09 | awk '{ print $1 }' | tr -d '
' -%>'';
};
"channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-unstable";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-unstable | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-unstable | awk '{ print $1 }' | tr -d '
' -%>'';
};
"nixpkgs-master" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "master";
rev = "<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '
' -%>'';
};
"home-manager-module" = {
url = "https://github.com/nix-community/home-manager";
ref = "release-21.05";
rev = "<% git ls-remote https://github.com/nix-community/home-manager.git release-21.05 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nix-community/home-manager.git release-21.05 | awk '{ print $1 }' | tr -d '
' -%>'';
};
}

View file

@ -1,23 +1,16 @@
{ dir
, pkgs ? import <channels-nixos-stable> {}
, ownLib ? import ../lib/default.nix { }
, gitRoot ? "$(git rev-parse --show-toplevel)"
{ dir, pkgs ? import <channels-nixos-stable> { }
, ownLib ? import ../lib/default.nix { }, gitRoot ?
"$(git rev-parse --show-toplevel)"
# FIXME: why do these need explicit mentioning?
, moreargs ? ""
, rebuildarg ? ""
, ...
} @ args :
# FIXME: why do these need explicit mentioning?
, moreargs ? "", rebuildarg ? "", ... }@args:
let
rebuildargsSudo = [ "switch" "boot" ];
rebuild = {
gitRoot
, rebuildarg ? "dry-activate"
, moreargs ? ""
rebuild = { gitRoot, rebuildarg ? "dry-activate", moreargs ? ""
, ...
}: pkgs.writeScript "script" ''
, ... }:
pkgs.writeScript "script" ''
#!/usr/bin/env bash
set -xe
@ -31,16 +24,13 @@ let
fi
${if (builtins.elem rebuildarg rebuildargsSudo)
&& (builtins.match ".*--target-host.*" moreargs) == null
then
&& (builtins.match ".*--target-host.*" moreargs) == null then
"sudo -E \\"
else
""
}
""}
nixos-rebuild --show-trace -I nixos-config=''${NIXOS_CONFIG} ${rebuildarg} ${moreargs}
'';
in {
recipes = {
rebuild = rebuild {
@ -51,6 +41,5 @@ in {
# // pkgs.lib.attrsets.optionalAttrs (moreargs != "") { inherit moreargs; }
# // pkgs.lib.attrsets.optionalAttrs (rebuildarg != "") { inherit rebuildarg; }
;
} // (import ./disk.nix (args // { inherit pkgs ownLib gitRoot; }))
;
} // (import ./disk.nix (args // { inherit pkgs ownLib gitRoot; }));
}

View file

@ -1,16 +1,12 @@
{ pkgs
, ownLib
, dir
, gitRoot
, diskId ? (import ((builtins.getEnv "PWD")+"/${dir}/hw.nix") {}).hardware.opinionatedDisk.diskId
, encrypted ? (import ((builtins.getEnv "PWD")+"/${dir}/hw.nix") {}).hardware.opinionatedDisk.encrypted
, previousDiskId ? ""
{ pkgs, ownLib, dir, gitRoot, diskId ?
(import ((builtins.getEnv "PWD") + "/${dir}/hw.nix")
{ }).hardware.opinionatedDisk.diskId, encrypted ?
(import ((builtins.getEnv "PWD") + "/${dir}/hw.nix")
{ }).hardware.opinionatedDisk.encrypted, previousDiskId ? ""
, ...
}:
, ... }:
let
mntRootVol="/mnt/${diskId}-root";
let mntRootVol = "/mnt/${diskId}-root";
in rec {
diskMount = pkgs.writeScript "script" ''
@ -18,14 +14,18 @@ in rec {
set -xe
echo Mounting ${diskId}
${pkgs.lib.strings.optionalString encrypted ''
sudo cryptsetup luksOpen ${ownLib.disk.bootLuksDevice diskId} ${ownLib.disk.luksName diskId}
sudo cryptsetup luksOpen ${ownLib.disk.bootLuksDevice diskId} ${
ownLib.disk.luksName diskId
}
''}
sleep 1
sudo vgchange -ay ${ownLib.disk.volumeGroup diskId}
sudo mkdir -p /mnt
sudo mkdir ${mntRootVol}
sudo mount ${ownLib.disk.rootFsDevice diskId} ${mntRootVol}
sudo mount ${ownLib.disk.rootFsDevice diskId} ${mntRootVol}/nixos/home -o subvol=home
sudo mount ${
ownLib.disk.rootFsDevice diskId
} ${mntRootVol}/nixos/home -o subvol=home
sudo mount ${ownLib.disk.bootFsDevice diskId} ${mntRootVol}/nixos/boot
'';
@ -62,7 +62,9 @@ in rec {
#!/usr/bin/env bash
set -xe
read -p "Continue to format ${ownLib.disk.bootGrubDevice diskId} (YES/n)? " choice
read -p "Continue to format ${
ownLib.disk.bootGrubDevice diskId
} (YES/n)? " choice
case "$choice" in
YES ) echo "Continuing in 3 seconds..."; sleep 3;;
n|N ) echo "Exiting..."; exit 0;;
@ -109,11 +111,15 @@ in rec {
${pkgs.lib.strings.optionalString encrypted ''
# Encrypt
sudo cryptsetup luksFormat ${ownLib.disk.bootLuksDevice diskId} -
sudo cryptsetup luksOpen ${ownLib.disk.bootLuksDevice diskId} ${ownLib.disk.luksName diskId}
sudo cryptsetup luksOpen ${ownLib.disk.bootLuksDevice diskId} ${
ownLib.disk.luksName diskId
}
''}
# LVM
sudo vgcreate ${ownLib.disk.volumeGroup diskId} ${ownLib.disk.lvmPv diskId encrypted}
sudo vgcreate ${ownLib.disk.volumeGroup diskId} ${
ownLib.disk.lvmPv diskId encrypted
}
sudo lvcreate ${ownLib.disk.volumeGroup diskId} -L 2G -n swap
sudo lvcreate ${ownLib.disk.volumeGroup diskId} -l 100%FREE -n root
@ -137,7 +143,9 @@ in rec {
#!/usr/bin/env bash
set -xe
read -p "Continue to relabel ${ownLib.disk.bootGrubDevice diskId} (YES/n)?" choice
read -p "Continue to relabel ${
ownLib.disk.bootGrubDevice diskId
} (YES/n)?" choice
case "$choice" in
YES ) echo "Continuing in 3 seconds..."; sleep 3;;
n|N ) echo "Exiting..."; exit 0;;
@ -168,9 +176,13 @@ in rec {
if test "${previousDiskId}"; then
${pkgs.lib.strings.optionalString encrypted ''
sudo cryptsetup luksOpen ${ownLib.disk.bootLuksDevice diskId} ${ownLib.disk.luksName diskId}
''}
${
pkgs.lib.strings.optionalString encrypted ''
sudo cryptsetup luksOpen ${ownLib.disk.bootLuksDevice diskId} ${
ownLib.disk.luksName diskId
}
''
}
sync
sleep 1
if sudo vgs ${previousDiskId}; then

View file

@ -1,6 +1,4 @@
{ lib
, ...
}:
{ lib, ... }:
{
boot.loader.grub.efiInstallAsRemovable = lib.mkForce true;

View file

@ -9,6 +9,5 @@
};
# boot.initrd.availableKernelModules = stage1Modules;
boot.extraModprobeConfig = ''
'';
boot.extraModprobeConfig = "";
}

View file

@ -1,13 +1,11 @@
{ pkgs
, lib
, ...
}:
{ pkgs, lib, ... }:
let
homeEnv = keyboard:
{
homeEnv = keyboard: {
imports = [
(import ../../../home-manager/configuration/graphical-gnome3.nix { inherit pkgs; })
(import ../../../home-manager/configuration/graphical-gnome3.nix {
inherit pkgs;
})
];
home.keyboard = keyboard;
@ -20,17 +18,16 @@ let
jitsi
];
};
in
{
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
nixPath = (import ../../../default.nix { versionsPath = ./versions.nix; }).nixPath;
in {
nixpkgs.config.packageOverrides = pkgs:
with pkgs; {
nixPath = (import ../../../default.nix {
versionsPath = ./versions.nix;
}).nixPath;
};
services.gnome =
builtins.mapAttrs
(attr: value: lib.mkForce value)
{
services.gnome = builtins.mapAttrs (attr: value: lib.mkForce value) {
games.enable = true;
gnome-remote-desktop.enable = true;
gnome-user-share.enable = true;
@ -38,8 +35,7 @@ in
sushi.enable = true;
tracker.enable = true;
tracker-miners.enable = true;
}
;
};
home-manager.users.steveej = homeEnv {
layout = "en";
@ -49,17 +45,16 @@ in
home-manager.users.elias = homeEnv {
layout = "de";
options = [];
options = [ ];
variant = "";
};
home-manager.users.justyna = homeEnv {
layout = "de";
options = [];
options = [ ];
variant = "";
};
services.teamviewer.enable = true;
system.stateVersion = "21.11";
}

View file

@ -1,13 +1,8 @@
{ pkgs
, lib
, config
, ... }:
{ pkgs, lib, config, ... }:
let
in
{
in {
# TASK: new device
networking.hostName = "elias-e525"; # Define your hostname.
@ -22,10 +17,7 @@ in
services.printing = {
enable = true;
drivers = with pkgs; [
mfcl3770cdw.driver
mfcl3770cdw.cupswrapper
];
drivers = with pkgs; [ mfcl3770cdw.driver mfcl3770cdw.cupswrapper ];
};
services.fprintd.enable = true;
@ -49,9 +41,8 @@ in
# udev.packages = [ pkgs.gnome3.gnome-settings-daemon ];
};
security.pki.certificateFiles = [
"${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
];
security.pki.certificateFiles =
[ "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ];
services.xserver.videoDrivers = [ "modesetting" ];

View file

@ -1,6 +1,4 @@
{ config
, pkgs
, ... }:
{ config, pkgs, ... }:
let
passwords = import ../../../variables/passwords.crypt.nix;

View file

@ -4,13 +4,10 @@ let
ref = "nixos-21.11";
rev = "386234e2a61e1e8acf94dfa3a3d3ca19a6776efb";
};
in
{
in {
inherit nixpkgs;
nixos = nixpkgs // {
suffix = "/nixos";
};
nixos = nixpkgs // { suffix = "/nixos"; };
"channels-nixos-stable" = nixpkgs;
"channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/";

View file

@ -2,29 +2,34 @@ let
nixpkgs = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-21.11";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.11 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.11 | awk '{ print $1 }' | tr -d '
' -%>'';
};
in
{
in {
inherit nixpkgs;
nixos = nixpkgs // {
suffix = "/nixos";
};
nixos = nixpkgs // { suffix = "/nixos"; };
"channels-nixos-stable" = nixpkgs;
"channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-unstable";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-unstable | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-unstable | awk '{ print $1 }' | tr -d '
' -%>'';
};
"nixpkgs-master" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "master";
rev = "<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '
' -%>'';
};
"home-manager-module" = {
url = "https://github.com/nix-community/home-manager";
ref = "release-21.11";
rev = "<% git ls-remote https://github.com/nix-community/home-manager.git release-21.11 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nix-community/home-manager.git release-21.11 | awk '{ print $1 }' | tr -d '
' -%>'';
};
}

View file

@ -1,6 +1,4 @@
{ lib
, ...
}:
{ lib, ... }:
{
boot.loader.grub.efiInstallAsRemovable = lib.mkForce true;

View file

@ -2,8 +2,7 @@
let
in
{
in {
# TASK: new device
hardware.opinionatedDisk = {
enable = true;
@ -12,6 +11,5 @@ in
};
hardware.enableRedistributableFirmware = true;
boot.extraModprobeConfig = ''
'';
boot.extraModprobeConfig = "";
}

View file

@ -1,18 +1,18 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
nixPath = (import ../../../default.nix { versionsPath = ./versions.nix; }).nixPath;
nixpkgs.config.packageOverrides = pkgs:
with pkgs; {
nixPath = (import ../../../default.nix {
versionsPath = ./versions.nix;
}).nixPath;
};
home-manager.users.steveej =
import ../../../home-manager/configuration/text-minimal.nix {
inherit pkgs;
};
home-manager.users.steveej = import ../../../home-manager/configuration/text-minimal.nix { inherit pkgs; };
environment.systemPackages = with pkgs; [
iw
wirelesstools
];
environment.systemPackages = with pkgs; [ iw wirelesstools ];
system.stateVersion = "21.11";
}

View file

@ -1,7 +1,4 @@
{ pkgs
, lib
, config
, ... }:
{ pkgs, lib, config, ... }:
let
keys = import ../../../variables/keys.nix;
@ -31,16 +28,25 @@ in {
# WAN interfaces, currently unused because the OPNsense guest acts as a router.
networking.vlans.wan1.id = 3;
networking.vlans.wan1.interface = "breth";
networking.interfaces.wan1.ipv4.addresses = [{ address = "192.168.0.15"; prefixLength = 24; } ];
networking.interfaces.wan1.ipv4.addresses = [{
address = "192.168.0.15";
prefixLength = 24;
}];
networking.vlans.wan2.id = 4;
networking.vlans.wan2.interface = "breth";
networking.interfaces.wan2.ipv4.addresses = [{ address = "172.16.0.15"; prefixLength = 12; } ];
networking.interfaces.wan2.ipv4.addresses = [{
address = "172.16.0.15";
prefixLength = 12;
}];
# Local interfaces, all accessed via VLAN tags on the main bridge
networking.vlans.lan.id = 1;
networking.vlans.lan.interface = "breth";
networking.interfaces.lan.ipv4.addresses = [{ address = "172.172.171.15"; prefixLength = 24; } ];
networking.interfaces.lan.ipv4.addresses = [{
address = "172.172.171.15";
prefixLength = 24;
}];
networking.vlans.dmz.id = 5;
networking.vlans.dmz.interface = "breth";

View file

@ -1,11 +1,8 @@
{ config
, pkgs
, ... }:
{ config, pkgs, ... }:
let
passwords = import ../../../variables/passwords.crypt.nix;
keys = import ../../../variables/keys.nix;
inherit (import ../../lib/default.nix { }) mkUser;
in {
}
in { }

View file

@ -4,13 +4,10 @@ let
ref = "nixos-21.11";
rev = "386234e2a61e1e8acf94dfa3a3d3ca19a6776efb";
};
in
{
in {
inherit nixpkgs;
nixos = nixpkgs // {
suffix = "/nixos";
};
nixos = nixpkgs // { suffix = "/nixos"; };
"channels-nixos-stable" = nixpkgs;
"channels-nixos-unstable" = {

View file

@ -2,30 +2,35 @@ let
nixpkgs = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-21.11";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.11 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.11 | awk '{ print $1 }' | tr -d '
' -%>'';
};
in
{
in {
inherit nixpkgs;
nixos = nixpkgs // {
suffix = "/nixos";
};
nixos = nixpkgs // { suffix = "/nixos"; };
"channels-nixos-stable" = nixpkgs;
"channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-unstable";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-unstable | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-unstable | awk '{ print $1 }' | tr -d '
' -%>'';
};
"nixpkgs-master" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "master";
rev = "<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '
' -%>'';
};
"home-manager-module" = {
url = "https://github.com/nix-community/home-manager";
ref = "release-21.11";
rev = "<% git ls-remote https://github.com/nix-community/home-manager.git release-21.11 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nix-community/home-manager.git release-21.11 | awk '{ print $1 }' | tr -d '
' -%>'';
};
}

View file

@ -1,6 +1,4 @@
{ lib
, ...
}:
{ lib, ... }:
{
boot.loader.grub.efiInstallAsRemovable = lib.mkForce true;

View file

@ -2,8 +2,7 @@
let
in
{
in {
# TASK: new device
hardware.opinionatedDisk = {
enable = true;
@ -12,6 +11,5 @@ in
};
hardware.enableRedistributableFirmware = true;
boot.extraModprobeConfig = ''
'';
boot.extraModprobeConfig = "";
}

View file

@ -1,18 +1,18 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
nixPath = (import ../../../default.nix { versionsPath = ./versions.nix; }).nixPath;
nixpkgs.config.packageOverrides = pkgs:
with pkgs; {
nixPath = (import ../../../default.nix {
versionsPath = ./versions.nix;
}).nixPath;
};
home-manager.users.steveej =
import ../../../home-manager/configuration/text-minimal.nix {
inherit pkgs;
};
home-manager.users.steveej = import ../../../home-manager/configuration/text-minimal.nix { inherit pkgs; };
environment.systemPackages = with pkgs; [
iw
wirelesstools
];
environment.systemPackages = with pkgs; [ iw wirelesstools ];
system.stateVersion = "21.11";
}

View file

@ -1,8 +1,4 @@
{ pkgs
, lib
, config
, utils
, ... }:
{ pkgs, lib, config, utils, ... }:
let
keys = import ../../../variables/keys.nix;
@ -32,16 +28,25 @@ in {
# WAN interfaces, currently unused because the OPNsense guest acts as a router.
networking.vlans.wan1.id = 3;
networking.vlans.wan1.interface = "breth";
networking.interfaces.wan1.ipv4.addresses = [{ address = "192.168.0.16"; prefixLength = 24; } ];
networking.interfaces.wan1.ipv4.addresses = [{
address = "192.168.0.16";
prefixLength = 24;
}];
networking.vlans.wan2.id = 4;
networking.vlans.wan2.interface = "breth";
networking.interfaces.wan2.ipv4.addresses = [{ address = "172.16.0.16"; prefixLength = 12; } ];
networking.interfaces.wan2.ipv4.addresses = [{
address = "172.16.0.16";
prefixLength = 12;
}];
# Local interfaces, all accessed via VLAN tags on the main bridge
networking.vlans.lan.id = 1;
networking.vlans.lan.interface = "breth";
networking.interfaces.lan.ipv4.addresses = [{ address = "172.172.171.16"; prefixLength = 24; } ];
networking.interfaces.lan.ipv4.addresses = [{
address = "172.172.171.16";
prefixLength = 24;
}];
networking.vlans.dmz.id = 5;
networking.vlans.dmz.interface = "breth";

View file

@ -1,6 +1,4 @@
{ config
, pkgs
, ... }:
{ config, pkgs, ... }:
let
passwords = import ../../../variables/passwords.crypt.nix;

View file

@ -4,13 +4,10 @@ let
ref = "nixos-21.11";
rev = "386234e2a61e1e8acf94dfa3a3d3ca19a6776efb";
};
in
{
in {
inherit nixpkgs;
nixos = nixpkgs // {
suffix = "/nixos";
};
nixos = nixpkgs // { suffix = "/nixos"; };
"channels-nixos-stable" = nixpkgs;
"channels-nixos-unstable" = {

View file

@ -2,30 +2,35 @@ let
nixpkgs = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-21.11";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.11 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.11 | awk '{ print $1 }' | tr -d '
' -%>'';
};
in
{
in {
inherit nixpkgs;
nixos = nixpkgs // {
suffix = "/nixos";
};
nixos = nixpkgs // { suffix = "/nixos"; };
"channels-nixos-stable" = nixpkgs;
"channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-unstable";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-unstable | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-unstable | awk '{ print $1 }' | tr -d '
' -%>'';
};
"nixpkgs-master" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "master";
rev = "<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '
' -%>'';
};
"home-manager-module" = {
url = "https://github.com/nix-community/home-manager";
ref = "release-21.11";
rev = "<% git ls-remote https://github.com/nix-community/home-manager.git release-21.11 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nix-community/home-manager.git release-21.11 | awk '{ print $1 }' | tr -d '
' -%>'';
};
}

View file

@ -1,6 +1,4 @@
{ lib
, ...
}:
{ lib, ... }:
{
boot.loader.grub.efiSupport = true;

View file

@ -1,8 +1,7 @@
{ ... }:
{
disabledModules = [
];
disabledModules = [ ];
imports = [
../../profiles/common/configuration.nix
../../modules/opinionatedDisk.nix

View file

@ -20,8 +20,7 @@ let
"xhci_pci"
];
in
{
in {
# TASK: new device
hardware.opinionatedDisk = {
enable = true;
@ -31,6 +30,5 @@ in
boot.initrd.availableKernelModules = stage1Modules;
boot.initrd.kernelModules = stage1Modules;
boot.extraModprobeConfig = ''
'';
boot.extraModprobeConfig = "";
}

View file

@ -1,22 +1,23 @@
{ config
, pkgs
, lib
, ...
}:
{ config, pkgs, lib, ... }:
{
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
nixPath = (import ../../../default.nix { versionsPath = ./versions.nix; }).nixPath;
nixpkgs.config.packageOverrides = pkgs:
with pkgs; {
nixPath = (import ../../../default.nix {
versionsPath = ./versions.nix;
}).nixPath;
};
home-manager.users.steveej =
import ../../../home-manager/configuration/text-minimal.nix {
inherit pkgs;
};
home-manager.users.steveej = import ../../../home-manager/configuration/text-minimal.nix { inherit pkgs; };
nix.buildMachines = [
{ hostName = "localhost";
nix.buildMachines = [{
hostName = "localhost";
system = "x86_64-linux";
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
supportedFeatures = [ "kvm" "nixos-test" "big-parallel" "benchmark" ];
maxJobs = 4;
}
];
}];
# services.hydra = {
# enable = false;

View file

@ -1,10 +1,6 @@
{ pkgs
, lib
, config
, ... }:
{ pkgs, lib, config, ... }:
let
keys = import ../../../variables/keys.nix;
let keys = import ../../../variables/keys.nix;
in {
# TASK: new device
@ -46,18 +42,12 @@ in {
# services.kubernetes.roles = ["master" "node"];
# virtualization
virtualisation = {
docker.enable = true;
};
virtualisation = { docker.enable = true; };
nix.gc = {
automatic = true;
};
nix.gc = { automatic = true; };
networking.useHostResolvConf = false;
services.resolved = {
enable = true;
};
services.resolved = { enable = true; };
containers = {
mailserver = import ../../containers/mailserver.nix {
@ -87,12 +77,7 @@ in {
inherit config;
hostAddress = "192.168.100.16";
localAddress = "192.168.100.17";
subvolumes = [
"mailserver"
"webserver"
"backup"
"syncthing"
];
subvolumes = [ "mailserver" "webserver" "backup" "syncthing" ];
};
};

View file

@ -4,9 +4,8 @@ let
ref = "nixos-22.05";
rev = "040c6d8374d090f46ab0e99f1f7c27a4529ecffd";
};
in
{
in {
inherit nixpkgs;
"channels-nixos-stable" = nixpkgs;
"nixpkgs-master" = {

View file

@ -2,21 +2,26 @@ let
nixpkgs = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-22.05";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-22.05 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-22.05 | awk '{ print $1 }' | tr -d '
' -%>'';
};
in
{
in {
inherit nixpkgs;
"channels-nixos-stable" = nixpkgs;
"nixpkgs-master" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "master";
rev = "<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '
' -%>'';
};
"home-manager-module" = {
url = "https://github.com/nix-community/home-manager";
ref = "release-22.05";
rev = "<% git ls-remote https://github.com/nix-community/home-manager.git release-22.05 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nix-community/home-manager.git release-22.05 | awk '{ print $1 }' | tr -d '
' -%>'';
};
}

View file

@ -3,7 +3,7 @@
let
in {
services.udev.extraRules = ''SUBSYSTEM=="sgx", MODE="0660", GROUP="sgx"'';
users.groups.sgx = {};
users.groups.sgx = { };
networking.hostName = "steveej-nuc7pjyh-work"; # Define your hostname.
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_sgx_latest;
}

View file

@ -1,6 +1,4 @@
{ config
, pkgs
, ... }:
{ config, pkgs, ... }:
let
passwords = import ../../../variables/passwords.crypt.nix;
@ -11,10 +9,19 @@ in {
users.extraUsers.sjunker = mkUser {
uid = 1001;
openssh.authorizedKeys.keys = keys.users.steveej.openssh;
shell = pkgs.posh { image = "quay.io/enarx/fedora"; run_args = "-v /dev/sgx:/dev/sgx"; };
shell = pkgs.posh {
image = "quay.io/enarx/fedora";
run_args = "-v /dev/sgx:/dev/sgx";
};
extraGroups = [ "sgx" ];
subUidRanges = [{ startUid = 100000; count = 65536; }];
subGidRanges = [{ startGid = 100000; count = 65536; }];
subUidRanges = [{
startUid = 100000;
count = 65536;
}];
subGidRanges = [{
startGid = 100000;
count = 65536;
}];
};
}

View file

@ -1,6 +1,4 @@
{ lib
, ...
}:
{ lib, ... }:
{
boot.loader.grub.efiInstallAsRemovable = lib.mkForce true;

View file

@ -10,8 +10,7 @@ let
"hxci_hcd"
];
in
{
in {
# TASK: new device
hardware.opinionatedDisk = {
enable = true;
@ -21,6 +20,5 @@ in
# boot.initrd.availableKernelModules = stage1Modules;
boot.initrd.kernelModules = stage1Modules;
boot.extraModprobeConfig = ''
'';
boot.extraModprobeConfig = "";
}

View file

@ -1,12 +1,16 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
nixPath = (import ../../../default.nix { versionsPath = ./versions.nix; }).nixPath;
nixpkgs.config.packageOverrides = pkgs:
with pkgs; {
nixPath = (import ../../../default.nix {
versionsPath = ./versions.nix;
}).nixPath;
};
home-manager.users.steveej =
import ../../../home-manager/configuration/graphical-fullblown.nix {
inherit pkgs;
};
home-manager.users.steveej = import ../../../home-manager/configuration/graphical-fullblown.nix { inherit pkgs; };
services.teamviewer.enable = true;
system.stateVersion = "20.09";
}

View file

@ -1,10 +1,6 @@
{ pkgs
, lib
, config
, ... }:
{ pkgs, lib, config, ... }:
let
keys = import ../../../variables/keys.nix;
let keys = import ../../../variables/keys.nix;
in {
# TASK: new device
@ -21,11 +17,7 @@ in {
services.printing = {
enable = true;
drivers = with pkgs; [
hplip
mfcl3770cdw.driver
mfcl3770cdw.cupswrapper
];
drivers = with pkgs; [ hplip mfcl3770cdw.driver mfcl3770cdw.cupswrapper ];
};
services.fprintd.enable = true;
@ -34,9 +26,8 @@ in {
sudo.fprintAuth = true;
};
security.pki.certificateFiles = [
"${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
];
security.pki.certificateFiles =
[ "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ];
services.xserver.videoDrivers = [ "modesetting" ];
services.xserver.serverFlagsSection = ''

View file

@ -1,6 +1,4 @@
{ config
, pkgs
, ... }:
{ config, pkgs, ... }:
let
passwords = import ../../../variables/passwords.crypt.nix;

View file

@ -4,13 +4,10 @@ let
ref = "nixos-20.09";
rev = "e065200fc90175a8f6e50e76ef10a48786126e1c";
};
in
{
in {
inherit nixpkgs;
nixos = nixpkgs // {
suffix = "/nixos";
};
nixos = nixpkgs // { suffix = "/nixos"; };
"channels-nixos-stable" = nixpkgs;
"channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/";

View file

@ -2,29 +2,34 @@ let
nixpkgs = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-20.09";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-20.09 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-20.09 | awk '{ print $1 }' | tr -d '
' -%>'';
};
in
{
in {
inherit nixpkgs;
nixos = nixpkgs // {
suffix = "/nixos";
};
nixos = nixpkgs // { suffix = "/nixos"; };
"channels-nixos-stable" = nixpkgs;
"channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-unstable";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-unstable | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nixos/nixpkgs nixos-unstable | awk '{ print $1 }' | tr -d '
' -%>'';
};
"nixpkgs-master" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "master";
rev = "<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '
' -%>'';
};
"home-manager-module" = {
url = "https://github.com/nix-community/home-manager";
ref = "release-20.09";
rev = "<% git ls-remote https://github.com/nix-community/home-manager.git release-20.09 | awk '{ print $1 }' | tr -d '\n' -%>";
rev = ''
<% git ls-remote https://github.com/nix-community/home-manager.git release-20.09 | awk '{ print $1 }' | tr -d '
' -%>'';
};
}

View file

@ -1,5 +1,6 @@
{ ... }:
{
networking.hostName = "steveej-rmvbl-mmc-SL32G_0x259093f6"; # Define your hostname.
networking.hostName =
"steveej-rmvbl-mmc-SL32G_0x259093f6"; # Define your hostname.
}

View file

@ -1,8 +1,11 @@
{ ... }:
{
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
nixPath = (import ../../../default.nix { versionsPath = ./versions.nix; }).nixPath;
nixpkgs.config.packageOverrides = pkgs:
with pkgs; {
nixPath = (import ../../../default.nix {
versionsPath = ./versions.nix;
}).nixPath;
};
imports = [

View file

@ -4,20 +4,17 @@ let
ref = "nixos-21.11";
rev = "386234e2a61e1e8acf94dfa3a3d3ca19a6776efb";
};
in
{
in {
inherit nixpkgs;
nixos = nixpkgs // {
suffix = "/nixos";
};
nixos = nixpkgs // { suffix = "/nixos"; };
"channels-nixos-stable" = nixpkgs;
# "channels-nixos-21.05" = {
# url = "https://github.com/NixOS/nixpkgs/";
# ref = "nixos-21.05";
# rev = "df123677560db3b0db7c19d71981b11091fbeaf6";
# };
# "channels-nixos-21.05" = {
# url = "https://github.com/NixOS/nixpkgs/";
# ref = "nixos-21.05";
# rev = "df123677560db3b0db7c19d71981b11091fbeaf6";
# };
"channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-unstable";

View file

@ -1,7 +1,4 @@
{ lib
, pkgs
, ...
}:
{ lib, pkgs, ... }:
{
boot.loader.grub.efiInstallAsRemovable = lib.mkForce true;

View file

@ -11,8 +11,7 @@ let
"e1000e"
];
in
{
in {
# TASK: new device
hardware.opinionatedDisk = {
enable = true;

View file

@ -1,12 +1,16 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
nixPath = (import ../../../default.nix { versionsPath = ./versions.nix; }).nixPath;
nixpkgs.config.packageOverrides = pkgs:
with pkgs; {
nixPath = (import ../../../default.nix {
versionsPath = ./versions.nix;
}).nixPath;
};
home-manager.users.steveej =
import ../../../home-manager/configuration/graphical-fullblown.nix {
inherit pkgs;
};
home-manager.users.steveej = import ../../../home-manager/configuration/graphical-fullblown.nix { inherit pkgs; };
services.teamviewer.enable = true;
system.stateVersion = "20.09";
}

View file

@ -1,16 +1,10 @@
{ pkgs
, lib
, config
, ... }:
{ pkgs, lib, config, ... }:
let
keys = import ../../../variables/keys.nix;
let keys = import ../../../variables/keys.nix;
in {
nix = {
binaryCaches = [
"https://holochain-ci.cachix.org"
"https://cache.holo.host/"
];
binaryCaches =
[ "https://holochain-ci.cachix.org" "https://cache.holo.host/" ];
binaryCachePublicKeys = [
"holochain-ci.cachix.org-1:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8="
"cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE="
@ -21,10 +15,11 @@ in {
# TASK: new device
networking.hostName = "steveej-t14"; # Define your hostname.
networking.bridges."virbr1".interfaces = [];
networking.interfaces."virbr1".ipv4.addresses = [
{ address = "10.254.254.254"; prefixLength = 24; }
];
networking.bridges."virbr1".interfaces = [ ];
networking.interfaces."virbr1".ipv4.addresses = [{
address = "10.254.254.254";
prefixLength = 24;
}];
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [
@ -40,11 +35,7 @@ in {
services.printing = {
enable = true;
drivers = with pkgs; [
hplip
mfcl3770cdw.driver
mfcl3770cdw.cupswrapper
];
drivers = with pkgs; [ hplip mfcl3770cdw.driver mfcl3770cdw.cupswrapper ];
};
services.fprintd.enable = true;
@ -55,12 +46,10 @@ in {
# virtualization
virtualisation = {
libvirtd = {
enable = true;
};
libvirtd = { enable = true; };
virtualbox.host = {
enable = false ;
enable = false;
addNetworkInterface = false;
};
@ -74,14 +63,10 @@ in {
# client min protocol = NT1
'';
security.pki.certificateFiles =
[ "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ];
security.pki.certificateFiles = [
"${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
];
services.xserver.videoDrivers = lib.mkForce [
"amdgpu"
];
services.xserver.videoDrivers = lib.mkForce [ "amdgpu" ];
services.xserver.serverFlagsSection = ''
Option "BlankTime" "0"
Option "StandbyTime" "0"

View file

@ -1,6 +1,4 @@
{ config
, pkgs
, ... }:
{ config, pkgs, ... }:
let
passwords = import ../../../variables/passwords.crypt.nix;

View file

@ -4,13 +4,10 @@ let
ref = "nixos-22.05";
rev = "6107f97012a0c134c5848125b5aa1b149b76d2c9";
};
in
{
in {
inherit nixpkgs;
nixos = nixpkgs // {
suffix = "/nixos";
};
nixos = nixpkgs // { suffix = "/nixos"; };
"channels-nixos-stable" = nixpkgs;
"channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/";

Some files were not shown because too many files have changed in this diff Show more