add code formatter and reformat
This commit is contained in:
parent
a055f4fa40
commit
8cd6ed1502
69 changed files with 1016 additions and 797 deletions
|
@ -1,16 +1,15 @@
|
|||
{ self
|
||||
, nixpkgs
|
||||
, home-manager
|
||||
}@inputs:
|
||||
let
|
||||
hmConfiguration =
|
||||
{ homeDirectory ? "/home/dadada"
|
||||
, extraModules ? [ ]
|
||||
, system ? "x86_64-linux"
|
||||
, username ? "dadada"
|
||||
, stateVersion
|
||||
}:
|
||||
(home-manager.lib.homeManagerConfiguration {
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
} @ inputs: let
|
||||
hmConfiguration = {
|
||||
homeDirectory ? "/home/dadada",
|
||||
extraModules ? [],
|
||||
system ? "x86_64-linux",
|
||||
username ? "dadada",
|
||||
stateVersion,
|
||||
}: (home-manager.lib.homeManagerConfiguration {
|
||||
configuration = {...}: {
|
||||
imports = (nixpkgs.lib.attrValues self.hmModules) ++ extraModules;
|
||||
nixpkgs = {
|
||||
|
@ -22,8 +21,7 @@ let
|
|||
};
|
||||
inherit system homeDirectory username stateVersion;
|
||||
});
|
||||
in
|
||||
{
|
||||
in {
|
||||
home = hmConfiguration {
|
||||
extraModules = [./home];
|
||||
stateVersion = "20.09";
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
useFeatures = [
|
||||
"alacritty"
|
||||
#"emacs"
|
||||
|
@ -14,8 +18,7 @@ let
|
|||
"xdg"
|
||||
"zsh"
|
||||
];
|
||||
in
|
||||
{
|
||||
in {
|
||||
programs.git = {
|
||||
signing = {
|
||||
key = "D68C84695C087E0F733A28D0EEB8D1CE62C4DFEA";
|
||||
|
@ -27,7 +30,9 @@ in
|
|||
|
||||
programs.gpg.settings.default-key = "99658A3EB5CD7C13";
|
||||
|
||||
dadada.home = lib.attrsets.genAttrs useFeatures (useFeatures: { enable = true; }) // {
|
||||
dadada.home =
|
||||
lib.attrsets.genAttrs useFeatures (useFeatures: {enable = true;})
|
||||
// {
|
||||
session = {
|
||||
enable = true;
|
||||
sessionVars = {
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.alacritty;
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.alacritty;
|
||||
in {
|
||||
options.dadada.home.alacritty = {
|
||||
enable = mkEnableOption "Enable alacritty config";
|
||||
};
|
||||
|
@ -78,12 +81,30 @@ in
|
|||
};
|
||||
|
||||
indexed_colors = [
|
||||
{ index = 16; color = "0xffa500"; }
|
||||
{ index = 17; color = "0xb03060"; }
|
||||
{ index = 18; color = "0x282828"; }
|
||||
{ index = 19; color = "0x444155"; }
|
||||
{ index = 20; color = "0xb8b8b8"; }
|
||||
{ index = 21; color = "0xe8e8e8"; }
|
||||
{
|
||||
index = 16;
|
||||
color = "0xffa500";
|
||||
}
|
||||
{
|
||||
index = 17;
|
||||
color = "0xb03060";
|
||||
}
|
||||
{
|
||||
index = 18;
|
||||
color = "0x282828";
|
||||
}
|
||||
{
|
||||
index = 19;
|
||||
color = "0x444155";
|
||||
}
|
||||
{
|
||||
index = 20;
|
||||
color = "0xb8b8b8";
|
||||
}
|
||||
{
|
||||
index = 21;
|
||||
color = "0xe8e8e8";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
options.dadada.home.colors = mkOption {
|
||||
type = types.attrs;
|
||||
description = "Color scheme";
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{ self, nix-doom-emacs, ... }@inputs:
|
||||
{
|
||||
self,
|
||||
nix-doom-emacs,
|
||||
...
|
||||
} @ inputs: {
|
||||
alacritty = import ./alacritty;
|
||||
colors = import ./colors.nix;
|
||||
direnv = import ./direnv.nix;
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.direnv;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.direnv;
|
||||
in {
|
||||
options.dadada.home.direnv = {
|
||||
enable = mkEnableOption "Enable direnv config";
|
||||
};
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{ nix-doom-emacs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
{nix-doom-emacs, ...}: {
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.emacs;
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [nix-doom-emacs.hmModule];
|
||||
options.dadada.home.emacs = {
|
||||
enable = mkEnableOption "Enable dadada emacs config";
|
||||
|
@ -13,9 +15,9 @@ in
|
|||
programs.doom-emacs = {
|
||||
enable = true;
|
||||
doomPrivateDir = ./doom.d;
|
||||
emacsPackagesOverlay = self: super: with pkgs; {
|
||||
tsc = super.tsc.overrideAttrs (old:
|
||||
let
|
||||
emacsPackagesOverlay = self: super:
|
||||
with pkgs; {
|
||||
tsc = super.tsc.overrideAttrs (old: let
|
||||
libtsc_dyn = rustPlatform.buildRustPackage rec {
|
||||
pname = "emacs-tree-sitter";
|
||||
version = "0.15.1";
|
||||
|
@ -40,8 +42,7 @@ in
|
|||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
||||
cargoHash = "sha256-HB5tFR1slY2D6jb2mt4KrGrGBUUVrxiBjmVycO+qfYY=";
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
inherit (libtsc_dyn) src;
|
||||
preBuild = ''
|
||||
ext=${stdenv.hostPlatform.extensions.sharedLibrary}
|
||||
|
@ -60,11 +61,11 @@ in
|
|||
});
|
||||
};
|
||||
};
|
||||
home.file.".tree-sitter".source = (pkgs.runCommand "grammars" {} ''
|
||||
home.file.".tree-sitter".source = pkgs.runCommand "grammars" {} ''
|
||||
mkdir -p $out/bin
|
||||
echo -n "0.10.2" > $out/BUNDLE-VERSION
|
||||
${lib.concatStringsSep "\n"
|
||||
(lib.mapAttrsToList (name: src: "name=${name}; ln -s ${src}/parser $out/bin/\${name#tree-sitter-}.so") pkgs.tree-sitter.builtGrammars)};
|
||||
'');
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.fish;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.fish;
|
||||
in {
|
||||
options.dadada.home.fish = {
|
||||
enable = mkEnableOption "Enable fish config";
|
||||
};
|
||||
|
@ -11,7 +14,8 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [{
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
name = "fzf";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jethrokuan";
|
||||
|
@ -19,7 +23,8 @@ in
|
|||
rev = "c3defd4a922e97120503b45e26efa775bc672b50";
|
||||
sha256 = "1k5b0nva0mbqc9830qhbcwxsi8d9b2p4ws1fq0bw9nkf2ripyp4p";
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
interactiveShellInit = ''
|
||||
# fish git prompt
|
||||
set __fish_git_prompt_show_informative_status 'yes'
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.git;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.git;
|
||||
in {
|
||||
options.dadada.home.git = {
|
||||
enable = mkEnableOption "Enable git config";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.gpg;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.gpg;
|
||||
in {
|
||||
options.dadada.home.gpg = {
|
||||
enable = mkEnableOption "Enable GnuPG config";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.gtk;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.gtk;
|
||||
in {
|
||||
options.dadada.home.gtk = {
|
||||
enable = mkEnableOption "Enable GTK config";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.keyring;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.keyring;
|
||||
in {
|
||||
options.dadada.home.keyring = {
|
||||
enable = mkEnableOption "Enable keyring config";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.kitty;
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.kitty;
|
||||
in {
|
||||
options.dadada.home.kitty = {
|
||||
enable = mkEnableOption "Enable kitty config";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
{ config, lib, pkgs, colors, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.mako;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
colors,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.mako;
|
||||
in {
|
||||
options.dadada.home.mako = {
|
||||
enable = mkEnableOption "Enable mako config";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.session;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.session;
|
||||
in {
|
||||
options.dadada.home.session = {
|
||||
enable = mkEnableOption "Enable session variable management";
|
||||
sessionVars = mkOption {
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.ssh;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.ssh;
|
||||
in {
|
||||
options.dadada.home.ssh = {
|
||||
enable = mkEnableOption "Enable SSH config";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
{ config, pkgs, lib, colors, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.sway;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
colors,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.sway;
|
||||
in {
|
||||
options.dadada.home.sway = {
|
||||
enable = mkEnableOption "Enable Sway config";
|
||||
};
|
||||
|
@ -26,7 +30,7 @@ in
|
|||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config = null;
|
||||
extraConfig = (builtins.readFile ./config);
|
||||
extraConfig = builtins.readFile ./config;
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
# needs qt5.qtwayland in systemPackages
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.syncthing;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.syncthing;
|
||||
in {
|
||||
options.dadada.home.syncthing = {
|
||||
enable = mkEnableOption "Enable Syncthing config";
|
||||
};
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, colors ? ../../lib/colors.nix
|
||||
, ...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.termite;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
colors ? ../../lib/colors.nix,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.termite;
|
||||
in {
|
||||
options.dadada.home.termite = {
|
||||
enable = mkEnableOption "Enable termite config";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.tmux;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.tmux;
|
||||
in {
|
||||
options.dadada.home.tmux = {
|
||||
enable = mkEnableOption "Enable tmux config";
|
||||
};
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.vim;
|
||||
vimPlugins = pkgs.callPackage ../../../pkgs/vimPlugins {};
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.dadada.home.vim = {
|
||||
enable = mkEnableOption "Enable VIM config";
|
||||
};
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
apps = {
|
||||
"x-scheme-handler/mailto" = "userapp-Thunderbird-PB7NI0.desktop";
|
||||
"message/rfc822" = "userapp-Thunderbird-PB7NI0.desktop";
|
||||
|
@ -19,8 +23,7 @@ let
|
|||
"application/pdf" = "org.pwmt.zathura.desktop";
|
||||
};
|
||||
cfg = config.dadada.home.xdg;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.dadada.home.xdg = {
|
||||
enable = mkEnableOption "Enable XDG config";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.zsh;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.home.zsh;
|
||||
in {
|
||||
options.dadada.home.zsh = {
|
||||
enable = mkEnableOption "Enable ZSH config";
|
||||
};
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs }:
|
||||
{
|
||||
{pkgs}: {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (pkg: true);
|
||||
allowUnfreePredicate = pkg: true;
|
||||
allowBroken = false;
|
||||
android_sdk.accept_license = true;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{pkgs}:
|
||||
|
||||
with pkgs.lib; {
|
||||
# TODO
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "ehci_pci" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/sda1";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/sda1";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=root"];
|
||||
};
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
{ self
|
||||
, admins
|
||||
, nixpkgs
|
||||
, nixosSystem
|
||||
, home-manager
|
||||
, homePage
|
||||
, nixos-hardware
|
||||
, nvd
|
||||
, scripts
|
||||
, recipemd
|
||||
}:
|
||||
let
|
||||
{
|
||||
self,
|
||||
admins,
|
||||
nixpkgs,
|
||||
nixosSystem,
|
||||
home-manager,
|
||||
homePage,
|
||||
nixos-hardware,
|
||||
nvd,
|
||||
scripts,
|
||||
recipemd,
|
||||
}: let
|
||||
adapterModule = system: {
|
||||
nixpkgs.config.allowUnfreePredicate = (pkg: true);
|
||||
nixpkgs.overlays = (nixpkgs.lib.attrValues self.overlays) ++ [
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: true;
|
||||
nixpkgs.overlays =
|
||||
(nixpkgs.lib.attrValues self.overlays)
|
||||
++ [
|
||||
(final: prev: {homePage = homePage.defaultPackage.${system};})
|
||||
(final: prev: {s = scripts;})
|
||||
(final: prev: {n = nvd;})
|
||||
|
@ -23,18 +25,21 @@ let
|
|||
adminConfig = users: {
|
||||
dadada.admin.users = lib.getAttrs users admins;
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
gorgon = nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [
|
||||
modules =
|
||||
(nixpkgs.lib.attrValues self.nixosModules)
|
||||
++ [
|
||||
(adapterModule system)
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-t14s-amd-gen1
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = (nixpkgs.lib.attrValues self.hmModules) ++ [
|
||||
home-manager.sharedModules =
|
||||
(nixpkgs.lib.attrValues self.hmModules)
|
||||
++ [
|
||||
{manual.manpages.enable = false;}
|
||||
];
|
||||
home-manager.users.dadada = import ../home/home;
|
||||
|
@ -45,7 +50,9 @@ in
|
|||
};
|
||||
ifrit = nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [
|
||||
modules =
|
||||
(nixpkgs.lib.attrValues self.nixosModules)
|
||||
++ [
|
||||
(adminConfig ["dadada"])
|
||||
(adapterModule system)
|
||||
./modules/profiles/server.nix
|
||||
|
@ -55,7 +62,9 @@ in
|
|||
|
||||
surgat = nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [
|
||||
modules =
|
||||
(nixpkgs.lib.attrValues self.nixosModules)
|
||||
++ [
|
||||
(adminConfig ["dadada"])
|
||||
(adapterModule system)
|
||||
./modules/profiles/server.nix
|
||||
|
@ -64,7 +73,9 @@ in
|
|||
};
|
||||
pruflas = nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [
|
||||
modules =
|
||||
(nixpkgs.lib.attrValues self.nixosModules)
|
||||
++ [
|
||||
(adminConfig ["dadada"])
|
||||
(adapterModule system)
|
||||
./modules/profiles/laptop.nix
|
||||
|
@ -74,7 +85,9 @@ in
|
|||
|
||||
agares = nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [
|
||||
modules =
|
||||
(nixpkgs.lib.attrValues self.nixosModules)
|
||||
++ [
|
||||
(adminConfig ["dadada"])
|
||||
(adapterModule system)
|
||||
./modules/profiles/server.nix
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
signHook = pkgs.writeShellScript "/etc/nix/sign-cache.sh"
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
signHook =
|
||||
pkgs.writeShellScript "/etc/nix/sign-cache.sh"
|
||||
''
|
||||
set -eu
|
||||
set -f # disable globbing
|
||||
|
@ -9,8 +14,7 @@ let
|
|||
echo "Signing paths" $OUT_PATHS
|
||||
nix store sign --key-file /etc/nix/key.private $OUT_PATHS
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
|
@ -14,28 +17,28 @@
|
|||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/2478e089-e5d6-480c-8530-4ea46988f9f7";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/2478e089-e5d6-480c-8530-4ea46988f9f7";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/5B90-D460";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/5B90-D460";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/a617625e-9325-4612-a086-954fb4b99ee0";
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/a617625e-9325-4612-a086-954fb4b99ee0";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/1f6ab0fb-ef4d-45b1-a731-ad0e7a440eef";
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/1f6ab0fb-ef4d-45b1-a731-ad0e7a440eef";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/92310a00-7f69-4775-85cb-38e1790f71db"; }
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/92310a00-7f69-4775-85cb-38e1790f71db";}
|
||||
];
|
||||
|
||||
nix.settings.max-jobs = lib.mkDefault 16;
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
hostAliases = [
|
||||
"ifrit.dadada.li"
|
||||
"media.dadada.li"
|
||||
"backup0.dadada.li"
|
||||
];
|
||||
backups = "/mnt/storage/backup";
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix" )
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "ehci_pci" "sd_mod" "sr_mod"];
|
||||
|
@ -13,13 +17,13 @@
|
|||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/0b4f5f01-5849-4f05-9822-b648abbc2485";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/0b4f5f01-5849-4f05-9822-b648abbc2485";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/53b5715e-2724-4800-9cfc-f892115681b6"; }
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/53b5715e-2724-4800-9cfc-f892115681b6";}
|
||||
];
|
||||
|
||||
nix.settings.max-jobs = lib.mkDefault 2;
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.admin;
|
||||
extraGroups = ["wheel" "libvirtd"];
|
||||
|
||||
|
@ -13,7 +16,11 @@ let
|
|||
|
||||
shellNames = builtins.attrNames shells;
|
||||
|
||||
adminOpts = { name, config, ... }: {
|
||||
adminOpts = {
|
||||
name,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
keys = mkOption {
|
||||
type = types.listOf types.str;
|
||||
|
@ -35,8 +42,7 @@ let
|
|||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
options = {
|
||||
dadada.admin = {
|
||||
enable = mkEnableOption "Enable admin access";
|
||||
|
@ -68,14 +74,14 @@ in
|
|||
security.sudo.wheelNeedsPassword = false;
|
||||
services.openssh.openFirewall = true;
|
||||
|
||||
users.users = mapAttrs
|
||||
(user: keys: (
|
||||
{
|
||||
users.users =
|
||||
mapAttrs
|
||||
(user: keys: {
|
||||
shell = shells."${keys.shell}";
|
||||
extraGroups = extraGroups;
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = keys.keys;
|
||||
}))
|
||||
})
|
||||
cfg.users;
|
||||
|
||||
nix.trustedUsers = builtins.attrNames cfg.users;
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
backupExcludes = [
|
||||
"/backup"
|
||||
"/dev"
|
||||
|
@ -20,8 +24,7 @@ let
|
|||
"/var/tmp"
|
||||
];
|
||||
cfg = config.dadada.backupClient;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options = {
|
||||
dadada.backupClient = {
|
||||
gs = {
|
||||
|
@ -63,7 +66,8 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.borgbackup.jobs.gs = {
|
||||
services.borgbackup.jobs.gs =
|
||||
{
|
||||
paths = "/";
|
||||
exclude = backupExcludes;
|
||||
repo = "/backup/${config.networking.hostName}";
|
||||
|
@ -81,8 +85,8 @@ in
|
|||
yearly = -1; # Keep at least one archive for each year
|
||||
};
|
||||
startAt = "monthly";
|
||||
} // mkIf cfg.bs.enable {
|
||||
|
||||
}
|
||||
// mkIf cfg.bs.enable {
|
||||
services.borgbackup.jobs.bs = {
|
||||
paths = "/";
|
||||
exclude = backupExcludes;
|
||||
|
|
|
@ -1,16 +1,22 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.ddns;
|
||||
ddnsConfig = hostNames: {
|
||||
systemd.timers = listToAttrs (forEach hostNames (hostname: nameValuePair "ddns-${hostname}"
|
||||
systemd.timers = listToAttrs (forEach hostNames (hostname:
|
||||
nameValuePair "ddns-${hostname}"
|
||||
{
|
||||
wantedBy = ["timers.target"];
|
||||
partOf = ["ddns-${hostname}.service"];
|
||||
timerConfig.OnCalendar = "hourly";
|
||||
}));
|
||||
|
||||
systemd.services = listToAttrs (forEach hostNames (hostname: nameValuePair "ddns-${hostname}"
|
||||
systemd.services = listToAttrs (forEach hostNames (hostname:
|
||||
nameValuePair "ddns-${hostname}"
|
||||
{
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ ... }@inputs:
|
||||
{
|
||||
{...} @ inputs: {
|
||||
admin = import ./admin.nix;
|
||||
backup = import ./backup.nix;
|
||||
ddns = import ./ddns.nix;
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.dadada.element;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.dadada.element;
|
||||
in {
|
||||
options.dadada.element = {
|
||||
enable = lib.mkEnableOption "Enable element webapp";
|
||||
};
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
luks = config.dadada.luks;
|
||||
fido2 = config.dadada.fido2;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options = {
|
||||
dadada.luks = {
|
||||
uuid = mkOption {
|
||||
|
@ -52,5 +55,4 @@ in
|
|||
cue = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.fileShare;
|
||||
sharePath = "/mnt/storage/share";
|
||||
ipv6 = "fd42:dead:beef::/48";
|
||||
ipv4 = "192.168.42.0/24";
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.dadada.fileShare = {
|
||||
enable = mkEnableOption "Enable file share server";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
redisSocket = "127.0.0.1:6379";
|
||||
cfg = config.dadada.gitea;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.dadada.gitea = {
|
||||
enable = lib.mkEnableOption "Enable gitea";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.headphones;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.headphones;
|
||||
in {
|
||||
options = {
|
||||
dadada.headphones = {
|
||||
enable = mkEnableOption "Enable bluetooth headphones with more audio codecs.";
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.dadada.homePage;
|
||||
in
|
||||
with lib; {
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
# Source https://github.com/NixOS/nixpkgs/issues/113384
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.dadada.kanboard;
|
||||
in {
|
||||
options = {
|
||||
|
@ -41,7 +45,10 @@ in {
|
|||
ln -s /var/lib/kanboard $out/data
|
||||
ln -s ${./kanboard-config.php} $out/config.php
|
||||
'')
|
||||
{ outPath = "${pkgs.kanboard}/share/kanboard"; meta.priority = 10; }
|
||||
{
|
||||
outPath = "${pkgs.kanboard}/share/kanboard";
|
||||
meta.priority = 10;
|
||||
}
|
||||
];
|
||||
};
|
||||
locations = {
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.networking;
|
||||
vpnPubKey = "x/y6I59buVzv9Lfzl+b17mGWbzxU+3Ke9mQNa1DLsDI=";
|
||||
in
|
||||
{
|
||||
in {
|
||||
options = {
|
||||
dadada.networking = {
|
||||
localResolver = {
|
||||
|
@ -83,7 +86,8 @@ in
|
|||
"149.112.112.112@853#dns.quad9.net"
|
||||
];
|
||||
}
|
||||
(mkIf cfg.localResolver.uwu {
|
||||
(
|
||||
mkIf cfg.localResolver.uwu {
|
||||
name = "uwu.";
|
||||
forward-addr = [
|
||||
"fc00:1337:dead:beef::10.11.0.1"
|
||||
|
@ -91,7 +95,8 @@ in
|
|||
];
|
||||
}
|
||||
)
|
||||
(mkIf cfg.localResolver.s0 {
|
||||
(
|
||||
mkIf cfg.localResolver.s0 {
|
||||
name = "s0.";
|
||||
forward-addr = [
|
||||
"192.168.178.1"
|
||||
|
@ -110,7 +115,8 @@ in
|
|||
|
||||
networking.useDHCP = false;
|
||||
|
||||
networking.interfaces = listToAttrs (forEach cfg.wanInterfaces (i: nameValuePair i {
|
||||
networking.interfaces = listToAttrs (forEach cfg.wanInterfaces (i:
|
||||
nameValuePair i {
|
||||
useDHCP = true;
|
||||
}));
|
||||
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
{ self
|
||||
, home-manager
|
||||
, nixpkgs
|
||||
, ...
|
||||
{
|
||||
self,
|
||||
home-manager,
|
||||
nixpkgs,
|
||||
...
|
||||
}: {
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{ config, pkgs, lib, ... }:
|
||||
# Global settings for nix daemon
|
||||
{
|
||||
nix.nixPath = [
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
networking.domain = mkDefault "dadada.li";
|
||||
|
||||
services.fwupd.enable = mkDefault true;
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
networking.domain = mkDefault "dadada.li";
|
||||
networking.tempAddresses = "disabled";
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.share;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.share;
|
||||
in {
|
||||
options.dadada.share = {
|
||||
enable = mkEnableOption "Enable file share";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.steam;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.steam;
|
||||
in {
|
||||
options = {
|
||||
dadada.steam = {
|
||||
enable = mkEnableOption "Enable Steam config";
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.autoUpgrade;
|
||||
in
|
||||
{
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.autoUpgrade;
|
||||
in {
|
||||
options.dadada.autoUpgrade = {
|
||||
enable = mkEnableOption "Enable automatic upgrades";
|
||||
};
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.vpnServer;
|
||||
wgPeer = {name, ...}: {
|
||||
options = {
|
||||
|
@ -21,8 +24,7 @@ let
|
|||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.dadada.vpnServer = {
|
||||
enable = mkEnableOption "Enable wireguard gateway";
|
||||
peers = mkOption {
|
||||
|
@ -39,12 +41,12 @@ in
|
|||
privateKeyFile = "/var/lib/wireguard/wg0-key";
|
||||
ips = ["fd42:9c3b:f96d:0201::0/64"];
|
||||
listenPort = 51234;
|
||||
peers = map
|
||||
(peer: (
|
||||
{
|
||||
peers =
|
||||
map
|
||||
(peer: {
|
||||
allowedIPs = ["fd42:9c3b:f96d:0201::${peer.id}/128"];
|
||||
publicKey = peer.key;
|
||||
}))
|
||||
})
|
||||
(attrValues cfg.peers);
|
||||
postSetup = ''
|
||||
wg set wg0 fwmark 51234
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.weechat;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.dadada.weechat;
|
||||
in {
|
||||
options.dadada.weechat = {
|
||||
enable = mkEnableOption "Enable weechat relay";
|
||||
};
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestions.enable = true;
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
imports = [./hardware-configuration.nix];
|
||||
|
||||
networking.hostName = "pruflas";
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci"];
|
||||
|
@ -13,18 +17,18 @@
|
|||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/6d7ea470-1909-4e84-82a6-d5d5e9eecf78";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/6d7ea470-1909-4e84-82a6-d5d5e9eecf78";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/337f04a7-4fe9-49a2-8a58-07dd4bc85168";
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/337f04a7-4fe9-49a2-8a58-07dd4bc85168";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/0494-CB52";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/0494-CB52";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
hostName = "surgat";
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
hostName = "surgat";
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
@ -72,10 +75,12 @@ in
|
|||
boot.loader.grub.version = 2;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
|
||||
networking.interfaces."ens3".ipv6.addresses = [{
|
||||
networking.interfaces."ens3".ipv6.addresses = [
|
||||
{
|
||||
address = "2a01:4f8:c17:1d70::";
|
||||
prefixLength = 64;
|
||||
}];
|
||||
}
|
||||
];
|
||||
|
||||
networking.defaultGateway6 = {
|
||||
address = "fe80::1";
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "virtio_pci" "xhci_pci" "sd_mod" "sr_mod"];
|
||||
|
@ -13,18 +17,17 @@
|
|||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/bd0b4d2d-37e5-444b-82ba-d7629114bf11";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/bd0b4d2d-37e5-444b-82ba-d7629114bf11";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."surgat".device = "/dev/disk/by-uuid/5aa2b4d3-5711-451c-bd35-7c33b5019093";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/472bc34f-3803-44ee-ad2a-f0080c0a44d3";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/472bc34f-3803-44ee-ad2a-f0080c0a44d3";
|
||||
fsType = "ext2";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
}
|
||||
|
|
47
outputs.nix
47
outputs.nix
|
@ -1,22 +1,22 @@
|
|||
# Adapted from Mic92/dotfiles
|
||||
{ self
|
||||
, flake-utils
|
||||
, homePage
|
||||
, nixpkgs
|
||||
, home-manager
|
||||
, nix-doom-emacs
|
||||
, nixos-hardware
|
||||
, nvd
|
||||
, scripts
|
||||
, recipemd
|
||||
, ...
|
||||
{
|
||||
self,
|
||||
flake-utils,
|
||||
homePage,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nix-doom-emacs,
|
||||
nixos-hardware,
|
||||
nvd,
|
||||
scripts,
|
||||
recipemd,
|
||||
...
|
||||
} @ inputs:
|
||||
(flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
(flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
selfPkgs = self.packages.${system};
|
||||
in
|
||||
{
|
||||
formatter = self.formatter.${system};
|
||||
in {
|
||||
apps.nixos-switch = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writeScript "deploy" ''
|
||||
|
@ -51,7 +51,12 @@
|
|||
'');
|
||||
};
|
||||
devShell = pkgs.callPackage ./shell.nix {};
|
||||
})) // {
|
||||
formatter = nixpkgs.legacyPackages."${system}".alejandra;
|
||||
checks = {
|
||||
format = pkgs.runCommand "check-format" {buildInputs = [formatter];} "${formatter}/bin/alejandra -c ${./.} && touch $out";
|
||||
};
|
||||
}))
|
||||
// {
|
||||
hmConfigurations = import ./home/configurations.nix {
|
||||
inherit self nixpkgs home-manager;
|
||||
};
|
||||
|
@ -63,12 +68,16 @@
|
|||
};
|
||||
nixosModules = import ./nixos/modules inputs;
|
||||
overlays = import ./overlays;
|
||||
hydraJobs = (
|
||||
hydraJobs =
|
||||
(
|
||||
nixpkgs.lib.mapAttrs'
|
||||
(name: config: nixpkgs.lib.nameValuePair name config.config.system.build.toplevel)
|
||||
self.nixosConfigurations
|
||||
) // (nixpkgs.lib.mapAttrs'
|
||||
)
|
||||
// (
|
||||
nixpkgs.lib.mapAttrs'
|
||||
(name: config: nixpkgs.lib.nameValuePair name config.activation-script)
|
||||
self.hmConfigurations
|
||||
) // (let tests = import ./tests; in flake-utils.lib.eachDefaultSystem tests);
|
||||
)
|
||||
// (let tests = import ./tests; in flake-utils.lib.eachDefaultSystem tests);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
let
|
||||
python3Packages = import ./python3-packages.nix;
|
||||
in
|
||||
{
|
||||
in {
|
||||
kanboard = final: prev: {
|
||||
kanboard = prev.kanboard.overrideAttrs (oldAttrs: {
|
||||
src = prev.fetchFromGitHub {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
self: super:
|
||||
{
|
||||
python3Packages = super.python3Packages // super.recurseIntoAttrs (
|
||||
self: super: {
|
||||
python3Packages =
|
||||
super.python3Packages
|
||||
// super.recurseIntoAttrs (
|
||||
super.python3Packages.callPackage ../pkgs/python-pkgs {}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
self: super:
|
||||
{
|
||||
self: super: {
|
||||
# Based on https://gist.github.com/clefru/9ed1186bf0b76d27e0ad20cbd9966b87
|
||||
tubslatex = super.lib.overrideDerivation
|
||||
tubslatex =
|
||||
super.lib.overrideDerivation
|
||||
(super.texlive.combine {
|
||||
inherit (super.texlive) scheme-full;
|
||||
tubslatex.pkgs = [(super.callPackage ../pkgs/tubslatex {})];
|
||||
})
|
||||
(oldAttrs: {
|
||||
postBuild = ''
|
||||
postBuild =
|
||||
''
|
||||
# Save the udpmap.cfg because texlive.combine removes it.
|
||||
cat $out/share/texmf/web2c/updmap.cfg > $out/share/texmf/web2c/updmap.cfg.1
|
||||
'' + oldAttrs.postBuild + ''
|
||||
''
|
||||
+ oldAttrs.postBuild
|
||||
+ ''
|
||||
# Move updmap.cfg into its original place and rerun mktexlsr, so that kpsewhich finds it
|
||||
rm $out/share/texmf/web2c/updmap.cfg || true
|
||||
cat $out/share/texmf/web2c/updmap.cfg.1 > $out/share/texmf/web2c/updmap.cfg
|
||||
|
@ -22,5 +25,4 @@ self: super:
|
|||
perl `type -P updmap.pl` --sys
|
||||
'';
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
{ callPackage }:
|
||||
{
|
||||
{callPackage}: {
|
||||
}
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
{ pkgs, stdenv, lib }:
|
||||
|
||||
(import
|
||||
{
|
||||
pkgs,
|
||||
stdenv,
|
||||
lib,
|
||||
}: (import
|
||||
(pkgs.fetchgit {
|
||||
url = "https://git.dadada.li/dadada/scripts.git";
|
||||
sha256 = "sha256-Kdwb34XXLOl4AaiVmOZ3nlu/KdENMqvH+UwISv8Pyiw=";
|
||||
rev = "065ff0f0ee9e44234678f0fefbba7961ea42518c";
|
||||
})
|
||||
{ stdenv = stdenv; lib = lib; })
|
||||
{
|
||||
stdenv = stdenv;
|
||||
lib = lib;
|
||||
})
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{ stdenv, fetchzip, unzip }:
|
||||
{
|
||||
stdenv,
|
||||
fetchzip,
|
||||
unzip,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
src = ./tubslatex_1.3.2.tds.zip;
|
||||
sourceRoot = ".";
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{ pkgs, lib, fetchFromGitHub, ... }:
|
||||
with lib;
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
filetype = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "dadadaVimFiletype";
|
||||
version = "0.2";
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{ mkShell
|
||||
}:
|
||||
|
||||
{mkShell}:
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
];
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
system:
|
||||
{
|
||||
system: {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue