mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-15 05:39:11 +02:00
feat: Add automatic formatting for .nix files
This commit is contained in:
parent
9dc9a1fe1b
commit
72d321f478
46 changed files with 3204 additions and 3164 deletions
6
.github/workflows/flake-checks.yaml
vendored
6
.github/workflows/flake-checks.yaml
vendored
|
|
@ -14,7 +14,9 @@ jobs:
|
|||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v3
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Check for dead code
|
||||
- name: Check for dead code in .nix files
|
||||
run: git ls-files '*.nix' | nix run nixpkgs#deadnix
|
||||
- name: Check for lints
|
||||
- name: Check for lints in .nix files
|
||||
run: nix run nixpkgs#statix -- check
|
||||
- name: Check formatting in .nix files
|
||||
run: git ls-files '*.nix' | xargs nix run nixpkgs#alejandra -- --check
|
||||
|
|
|
|||
|
|
@ -5131,6 +5131,11 @@ Programming languages and default lsp's are defined here: [[#h:0e7e8bea-ec58-499
|
|||
nmap
|
||||
lsof
|
||||
|
||||
# nix
|
||||
alejandra
|
||||
deadnix
|
||||
statix
|
||||
|
||||
# local file sharing
|
||||
wormhole-rs
|
||||
|
||||
|
|
@ -7524,16 +7529,24 @@ Used in: [[#h:bbcfa895-4d46-4b1d-b84e-f634e982c46e][Centered org-mode Buffers]]
|
|||
|
||||
#+end_src
|
||||
|
||||
**** org-mode: Auto-tangle and export Configuration Files
|
||||
**** org-mode: Upon-save actions (Auto-tangle, export to html, formatting)
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:59d4306e-9b73-4b2c-b039-6a6518c357fc
|
||||
:END:
|
||||
|
||||
This section automatically tangles all configuration blocks in this file to the defined Emacs org-file. It also exports the configuration file as html.
|
||||
This section handles everything that shoudld happen when I save =SwarselSystems.org=. It:
|
||||
|
||||
1) automatically tangles all configuration blocks in this file
|
||||
2) exports the configuration file as html for an easier reading experience with working links and index
|
||||
3) formats the generated =.nix= files in accordance to the =Alejandra=-style.
|
||||
|
||||
We set a hook that runs everytime we save the file. It would be a bit more efficient to only export and format when we enter a magit window for instance (since especially the html export takes times), however, since I cannot be sure to only ever commit from magit (I do indeed sometimes use git from the command line), I prefer this approach.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun run-alejandra ()
|
||||
(interactive)
|
||||
(let ((default-directory (expand-file-name "~/.dotfiles")))
|
||||
(shell-command "alejandra . -q")))
|
||||
|
||||
(defun swarsel/org-babel-tangle-config ()
|
||||
(when (string-equal (buffer-file-name)
|
||||
|
|
@ -7541,25 +7554,13 @@ This section automatically tangles all configuration blocks in this file to the
|
|||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-html-export-to-html)
|
||||
(org-babel-tangle)))
|
||||
(when (string-equal (buffer-file-name)
|
||||
swarsel-emacs-org-filepath)
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-html-export-to-html)
|
||||
(org-babel-tangle)))
|
||||
(when (string-equal (buffer-file-name)
|
||||
swarsel-nix-org-filepath)
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-babel-tangle))))
|
||||
(org-babel-tangle)
|
||||
(run-alejandra))))
|
||||
|
||||
(setq org-html-htmlize-output-type nil)
|
||||
|
||||
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'swarsel/org-babel-tangle-config)))
|
||||
|
||||
|
||||
|
||||
#+end_src
|
||||
|
||||
**** org-mode: Fold current heading
|
||||
|
|
|
|||
124
flake.nix
124
flake.nix
|
|
@ -2,7 +2,6 @@
|
|||
description = "SwarseFlake - Nix Flake for all SwarselSystems";
|
||||
|
||||
inputs = {
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
|
|
@ -67,11 +66,9 @@
|
|||
nswitch-rcm-nix = {
|
||||
url = "github:Swarsel/nswitch-rcm-nix";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = inputs@{
|
||||
|
||||
outputs = inputs @ {
|
||||
nixpkgs,
|
||||
nixpkgs-stable,
|
||||
home-manager,
|
||||
|
|
@ -85,13 +82,13 @@
|
|||
nixos-hardware,
|
||||
nix-alien,
|
||||
nswitch-rcm-nix,
|
||||
|
||||
...
|
||||
}: let
|
||||
|
||||
system = "x86_64-linux"; # not very portable, but I do not use other architectures at the moment
|
||||
pkgs = import nixpkgs { inherit system;
|
||||
overlays = [ emacs-overlay.overlay
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
emacs-overlay.overlay
|
||||
nur.overlay
|
||||
nixgl.overlay
|
||||
(final: _prev: {
|
||||
|
|
@ -104,12 +101,17 @@
|
|||
};
|
||||
|
||||
# NixOS modules that can only be used on NixOS systems
|
||||
nixModules = [ stylix.nixosModules.stylix
|
||||
nixModules = [
|
||||
stylix.nixosModules.stylix
|
||||
sops-nix.nixosModules.sops
|
||||
nswitch-rcm-nix.nixosModules.nswitch-rcm
|
||||
./profiles/common/nixos.nix
|
||||
# dynamic library loading
|
||||
({ self, system, ... }: {
|
||||
({
|
||||
self,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with self.inputs.nix-alien.packages.${system}; [
|
||||
nix-alien
|
||||
];
|
||||
|
|
@ -119,15 +121,15 @@
|
|||
];
|
||||
|
||||
# Home-Manager modules wanted on non-NixOS systems
|
||||
homeModules = [ stylix.homeManagerModules.stylix
|
||||
homeModules = [
|
||||
stylix.homeManagerModules.stylix
|
||||
];
|
||||
# Home-Manager modules wanted on both NixOS and non-NixOS systems
|
||||
mixedModules = [ sops-nix.homeManagerModules.sops
|
||||
mixedModules = [
|
||||
sops-nix.homeManagerModules.sops
|
||||
./profiles/common/home.nix
|
||||
];
|
||||
|
||||
in {
|
||||
|
||||
# NixOS setups - run home-manager as a NixOS module for better compatibility
|
||||
# another benefit - full rebuild on nixos-rebuild switch
|
||||
# run rebuild using `nswitch`
|
||||
|
|
@ -136,14 +138,17 @@
|
|||
# Make sure to move hardware-configuration to the appropriate location, by default it is found in /etc/nixos/.
|
||||
|
||||
nixosConfigurations = {
|
||||
|
||||
onett = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
modules = nixModules ++ [
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules =
|
||||
nixModules
|
||||
++ [
|
||||
./profiles/onett/nixos.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.swarsel.imports = mixedModules ++ [
|
||||
home-manager.users.swarsel.imports =
|
||||
mixedModules
|
||||
++ [
|
||||
./profiles/onett/home.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -151,7 +156,7 @@
|
|||
};
|
||||
|
||||
sandbox = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
./profiles/sandbox/nixos.nix
|
||||
|
|
@ -159,12 +164,16 @@
|
|||
};
|
||||
|
||||
twoson = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
modules = nixModules ++ [
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules =
|
||||
nixModules
|
||||
++ [
|
||||
./profiles/twoson/nixos.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.swarsel.imports = mixedModules ++ [
|
||||
home-manager.users.swarsel.imports =
|
||||
mixedModules
|
||||
++ [
|
||||
./profiles/twoson/home.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -172,13 +181,17 @@
|
|||
};
|
||||
|
||||
threed = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
modules = nixModules ++ [
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules =
|
||||
nixModules
|
||||
++ [
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
./profiles/threed/nixos.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.swarsel.imports = mixedModules ++ [
|
||||
home-manager.users.swarsel.imports =
|
||||
mixedModules
|
||||
++ [
|
||||
./profiles/threed/home.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -186,13 +199,17 @@
|
|||
};
|
||||
|
||||
fourside = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
modules = nixModules ++ [
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules =
|
||||
nixModules
|
||||
++ [
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-p14s-amd-gen2
|
||||
./profiles/fourside/nixos.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.swarsel.imports = mixedModules ++ [
|
||||
home-manager.users.swarsel.imports =
|
||||
mixedModules
|
||||
++ [
|
||||
./profiles/fourside/home.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -200,13 +217,17 @@
|
|||
};
|
||||
|
||||
winters = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
modules = nixModules ++ [
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules =
|
||||
nixModules
|
||||
++ [
|
||||
nixos-hardware.nixosModules.framework-16-inch-7040-amd
|
||||
./profiles/winters/nixos.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.swarsel.imports = mixedModules ++ [
|
||||
home-manager.users.swarsel.imports =
|
||||
mixedModules
|
||||
++ [
|
||||
./profiles/winters/home.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -214,12 +235,16 @@
|
|||
};
|
||||
|
||||
stand = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
modules = nixModules ++ [
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules =
|
||||
nixModules
|
||||
++ [
|
||||
./profiles/stand/nixos.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.homelen.imports = mixedModules ++ [
|
||||
home-manager.users.homelen.imports =
|
||||
mixedModules
|
||||
++ [
|
||||
./profiles/stand/home.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -227,7 +252,7 @@
|
|||
};
|
||||
|
||||
nginx = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
./profiles/server1/nginx/nixos.nix
|
||||
|
|
@ -235,7 +260,7 @@
|
|||
};
|
||||
|
||||
calibre = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
./profiles/server1/calibre/nixos.nix
|
||||
|
|
@ -243,7 +268,7 @@
|
|||
};
|
||||
|
||||
jellyfin = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules = [
|
||||
# sops-nix.nixosModules.sops
|
||||
./profiles/server1/jellyfin/nixos.nix
|
||||
|
|
@ -251,7 +276,7 @@
|
|||
};
|
||||
|
||||
transmission = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
./profiles/server1/transmission/nixos.nix
|
||||
|
|
@ -259,7 +284,7 @@
|
|||
};
|
||||
|
||||
matrix = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
# this is to import a service module that is not on nixpkgs
|
||||
# this way avoids infinite recursion errors
|
||||
modules = [
|
||||
|
|
@ -269,7 +294,7 @@
|
|||
};
|
||||
|
||||
sound = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
./profiles/server1/sound/nixos.nix
|
||||
|
|
@ -277,7 +302,7 @@
|
|||
};
|
||||
|
||||
spotifyd = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
./profiles/server1/spotifyd/nixos.nix
|
||||
|
|
@ -285,7 +310,7 @@
|
|||
};
|
||||
|
||||
paperless = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
./profiles/server1/paperless/nixos.nix
|
||||
|
|
@ -294,7 +319,7 @@
|
|||
|
||||
#ovm swarsel
|
||||
sync = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
./profiles/remote/oracle/sync/nixos.nix
|
||||
|
|
@ -303,7 +328,7 @@
|
|||
|
||||
#ovm swarsel
|
||||
swatrix = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
specialArgs = {inherit inputs pkgs;};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
./profiles/remote/oracle/matrix/nixos.nix
|
||||
|
|
@ -315,29 +340,26 @@
|
|||
# run rebuild using `hmswitch`
|
||||
|
||||
homeConfigurations = {
|
||||
|
||||
"leons@PCisLee" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = homeModules ++ mixedModules ++ [
|
||||
modules =
|
||||
homeModules
|
||||
++ mixedModules
|
||||
++ [
|
||||
./profiles/surface/home.nix
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
nixOnDroidConfigurations = {
|
||||
|
||||
default = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
modules = [
|
||||
./profiles/mysticant/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
packages.x86_64-linux = {
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
55
index.html
55
index.html
|
|
@ -3,7 +3,7 @@
|
|||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2024-07-19 Fr 00:29 -->
|
||||
<!-- 2024-07-19 Fr 00:52 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>SwarselSystems: NixOS + Emacs Configuration</title>
|
||||
|
|
@ -387,7 +387,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<b>This file has 40971 words spanning 10908 lines and was last revised on 2024-07-19 00:29:02 +0200.</b>
|
||||
<b>This file has 41033 words spanning 10909 lines and was last revised on 2024-07-19 00:52:31 +0200.</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
@ -437,7 +437,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry
|
|||
</p>
|
||||
|
||||
<p>
|
||||
My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-07-19 00:29:02 +0200)
|
||||
My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-07-19 00:52:31 +0200)
|
||||
</p></li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -6335,6 +6335,11 @@ Programming languages and default lsp's are defined here: <a href="#h:0e7e8bea-e
|
|||
nmap
|
||||
lsof
|
||||
|
||||
# nix
|
||||
alejandra
|
||||
deadnix
|
||||
statix
|
||||
|
||||
# local file sharing
|
||||
wormhole-rs
|
||||
|
||||
|
|
@ -9194,40 +9199,40 @@ Used in: <a href="#h:bbcfa895-4d46-4b1d-b84e-f634e982c46e">Centered org-mode Buf
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="h:59d4306e-9b73-4b2c-b039-6a6518c357fc"></a>org-mode: Auto-tangle and export Configuration Files<br />
|
||||
<li><a id="h:59d4306e-9b73-4b2c-b039-6a6518c357fc"></a>org-mode: Upon-save actions (Auto-tangle, export to html, formatting)<br />
|
||||
<div class="outline-text-5" id="text-h:59d4306e-9b73-4b2c-b039-6a6518c357fc">
|
||||
<p>
|
||||
This section automatically tangles all configuration blocks in this file to the defined Emacs org-file. It also exports the configuration file as html.
|
||||
This section handles everything that shoudld happen when I save <code>SwarselSystems.org</code>. It:
|
||||
</p>
|
||||
|
||||
<ol class="org-ol">
|
||||
<li>automatically tangles all configuration blocks in this file</li>
|
||||
<li>exports the configuration file as html for an easier reading experience with working links and index</li>
|
||||
<li>formats the generated <code>.nix</code> files in accordance to the <code>Alejandra</code>-style.</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
We set a hook that runs everytime we save the file. It would be a bit more efficient to only export and format when we enter a magit window for instance (since especially the html export takes times), however, since I cannot be sure to only ever commit from magit (I do indeed sometimes use git from the command line), I prefer this approach.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-emacs-lisp">
|
||||
(defun swarsel/org-babel-tangle-config ()
|
||||
<pre class="src src-emacs-lisp">(defun run-alejandra ()
|
||||
(interactive)
|
||||
(let ((default-directory (expand-file-name "~/.dotfiles")))
|
||||
(shell-command "alejandra . -q")))
|
||||
|
||||
(defun swarsel/org-babel-tangle-config ()
|
||||
(when (string-equal (buffer-file-name)
|
||||
swarsel-swarsel-org-filepath)
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-html-export-to-html)
|
||||
(org-babel-tangle)))
|
||||
(when (string-equal (buffer-file-name)
|
||||
swarsel-emacs-org-filepath)
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-html-export-to-html)
|
||||
(org-babel-tangle)))
|
||||
(when (string-equal (buffer-file-name)
|
||||
swarsel-nix-org-filepath)
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-babel-tangle))))
|
||||
|
||||
(setq org-html-htmlize-output-type nil)
|
||||
|
||||
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'swarsel/org-babel-tangle-config)))
|
||||
(org-babel-tangle)
|
||||
(run-alejandra))))
|
||||
|
||||
(setq org-html-htmlize-output-type nil)
|
||||
|
||||
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'swarsel/org-babel-tangle-config)))
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
|
@ -9336,7 +9341,7 @@ The standard Emacs behaviour for the Python process shell is a bit annoying. Thi
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org03da7a6"></a>Nix common prefix bracketer<br />
|
||||
<li><a id="orgbb564b1"></a>Nix common prefix bracketer<br />
|
||||
<div class="outline-text-5" id="text-4-2-1-15">
|
||||
<p>
|
||||
This function searches for common delimiters in region and removes them, summarizing all captured lines by it.
|
||||
|
|
@ -12907,7 +12912,7 @@ My laptop, sadly soon to be replaced by a new one, since most basic functions ar
|
|||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: Leon Schwarzäugl</p>
|
||||
<p class="date">Created: 2024-07-19 Fr 00:29</p>
|
||||
<p class="date">Created: 2024-07-19 Fr 00:52</p>
|
||||
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
];
|
||||
};
|
||||
# update path if the sops private key is stored somewhere else
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||
sops.age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/sops"];
|
||||
|
||||
# waybar config - TEMPLATE - update for cores and temp
|
||||
programs.waybar.settings.mainBar = {
|
||||
|
|
@ -67,7 +67,8 @@
|
|||
# -----------------------------------------------------------------
|
||||
# if not always connected to power (laptop), use this (default):
|
||||
|
||||
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark"
|
||||
programs.waybar.settings.mainBar.modules-right = [
|
||||
"custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
|
|
@ -86,7 +87,7 @@
|
|||
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
wayland.windowManager.sway= {
|
||||
wayland.windowManager.sway = {
|
||||
config = rec {
|
||||
# update for actual inputs here,
|
||||
input = {
|
||||
|
|
@ -94,7 +95,8 @@
|
|||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"1:1:AT_Translated_Set_2_keyboard" = { # TEMPLATE
|
||||
"1:1:AT_Translated_Set_2_keyboard" = {
|
||||
# TEMPLATE
|
||||
xkb_layout = "us";
|
||||
xkb_options = "grp:win_space_toggle";
|
||||
# xkb_options = "ctrl:nocaps,grp:win_space_toggle";
|
||||
|
|
@ -106,7 +108,6 @@
|
|||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
output = {
|
||||
|
|
@ -126,14 +127,12 @@
|
|||
};
|
||||
|
||||
startup = [
|
||||
|
||||
{ command = "nextcloud --background";}
|
||||
{ command = "discord --start-minimized";}
|
||||
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{ command = "ANKI_WAYLAND=1 anki";}
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{ command = "nm-applet";}
|
||||
|
||||
{command = "nextcloud --background";}
|
||||
{command = "discord --start-minimized";}
|
||||
{command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{command = "ANKI_WAYLAND=1 anki";}
|
||||
{command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{command = "nm-applet";}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
imports =
|
||||
[
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "TEMPLATE";
|
||||
greetd.settings.initial_session.user="TEMPLATE";
|
||||
greetd.settings.initial_session.user = "TEMPLATE";
|
||||
};
|
||||
|
||||
# Bootloader
|
||||
|
|
@ -73,7 +67,7 @@
|
|||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerdfonts.override { fonts = [ "FiraCode"]; };
|
||||
package = pkgs.nerdfonts.override {fonts = ["FiraCode"];};
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
|
||||
|
|
@ -84,9 +78,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
# Configure keymap in X11 (only used for login)
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
|
|
@ -96,7 +87,7 @@
|
|||
users.users.TEMPLATE = {
|
||||
isNormalUser = true;
|
||||
description = "TEMPLATE";
|
||||
extraGroups = [ "networkmanager" "wheel" "lp" "audio" "video" ];
|
||||
extraGroups = ["networkmanager" "wheel" "lp" "audio" "video"];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
|
|
@ -104,5 +95,4 @@
|
|||
];
|
||||
|
||||
system.stateVersion = "23.05"; # TEMPLATE - but probably no need to change
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
{ config, pkgs, fetchFromGitHub , ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
fetchFromGitHub,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
|
||||
# audio stuff
|
||||
spek # spectrum analyzer
|
||||
losslessaudiochecker
|
||||
|
|
@ -18,13 +20,18 @@
|
|||
simple-scan
|
||||
|
||||
# dict
|
||||
(aspellWithDicts (dicts: with dicts; [ de en en-computers en-science ]))
|
||||
(aspellWithDicts (dicts: with dicts; [de en en-computers en-science]))
|
||||
|
||||
# utilities
|
||||
util-linux
|
||||
nmap
|
||||
lsof
|
||||
|
||||
# nix
|
||||
alejandra
|
||||
deadnix
|
||||
statix
|
||||
|
||||
# local file sharing
|
||||
wormhole-rs
|
||||
|
||||
|
|
@ -142,28 +149,39 @@
|
|||
|
||||
# latex and related packages
|
||||
(pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive) scheme-full
|
||||
dvisvgm dvipng # for preview and export as html
|
||||
wrapfig amsmath ulem hyperref capt-of;
|
||||
inherit
|
||||
(pkgs.texlive)
|
||||
scheme-full
|
||||
dvisvgm
|
||||
dvipng # for preview and export as html
|
||||
wrapfig
|
||||
amsmath
|
||||
ulem
|
||||
hyperref
|
||||
capt-of
|
||||
;
|
||||
})
|
||||
|
||||
# font stuff
|
||||
(nerdfonts.override { fonts = [ "FiraMono" "FiraCode" "NerdFontsSymbolsOnly"]; })
|
||||
(nerdfonts.override {fonts = ["FiraMono" "FiraCode" "NerdFontsSymbolsOnly"];})
|
||||
noto-fonts-emoji
|
||||
font-awesome_5
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
|
||||
# cura
|
||||
(let cura5 = appimageTools.wrapType2 rec {
|
||||
# cura
|
||||
(let
|
||||
cura5 = appimageTools.wrapType2 rec {
|
||||
name = "cura5";
|
||||
version = "5.4.0";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/Ultimaker/Cura/releases/download/${version}/UltiMaker-Cura-${version}-linux-modern.AppImage";
|
||||
hash = "sha256-QVv7Wkfo082PH6n6rpsB79st2xK2+Np9ivBg/PYZd74=";
|
||||
};
|
||||
extraPkgs = pkgs: with pkgs; [ ];
|
||||
}; in writeScriptBin "cura" ''
|
||||
extraPkgs = pkgs: with pkgs; [];
|
||||
};
|
||||
in
|
||||
writeScriptBin "cura" ''
|
||||
#! ${pkgs.bash}/bin/bash
|
||||
# AppImage version of Cura loses current working directory and treats all paths relateive to $HOME.
|
||||
# So we convert each of the files passed as argument to an absolute path.
|
||||
|
|
@ -216,7 +234,7 @@
|
|||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "pass-fuzzel";
|
||||
runtimeInputs = [ pkgs.pass pkgs.fuzzel ];
|
||||
runtimeInputs = [pkgs.pass pkgs.fuzzel];
|
||||
text = ''
|
||||
shopt -s nullglob globstar
|
||||
|
||||
|
|
@ -247,7 +265,7 @@
|
|||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "pass-fuzzel-otp";
|
||||
runtimeInputs = [ pkgs.fuzzel (pkgs.pass.withExtensions (exts: [exts.pass-otp]))];
|
||||
runtimeInputs = [pkgs.fuzzel (pkgs.pass.withExtensions (exts: [exts.pass-otp]))];
|
||||
text = ''
|
||||
shopt -s nullglob globstar
|
||||
|
||||
|
|
@ -278,7 +296,7 @@
|
|||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "cdw";
|
||||
runtimeInputs = [ pkgs.fzf ];
|
||||
runtimeInputs = [pkgs.fzf];
|
||||
text = ''
|
||||
cd "$(git worktree list | fzf | awk '{print $1}')"
|
||||
'';
|
||||
|
|
@ -286,7 +304,7 @@
|
|||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "cdb";
|
||||
runtimeInputs = [ pkgs.fzf ];
|
||||
runtimeInputs = [pkgs.fzf];
|
||||
text = ''
|
||||
git checkout "$(git branch --list | grep -v "^\*" | fzf | awk '{print $1}')"
|
||||
'';
|
||||
|
|
@ -298,10 +316,9 @@
|
|||
cp "$1"{,.bak}
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
];
|
||||
|
||||
sops = {
|
||||
sops = {
|
||||
defaultSopsFile = "${config.home.homeDirectory}/.dotfiles/secrets/general/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets = {
|
||||
|
|
@ -311,9 +328,9 @@ sops = {
|
|||
swarselmail = {path = "/run/user/1000/secrets/swarselmail";};
|
||||
caldav = {path = "${config.home.homeDirectory}/.emacs.d/.caldav";};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh= {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = "SetEnv TERM=xterm-256color";
|
||||
matchBlocks = {
|
||||
|
|
@ -442,18 +459,17 @@ programs.ssh= {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
stylix.targets.emacs.enable = false;
|
||||
|
||||
xdg.desktopEntries = {
|
||||
stylix.targets.emacs.enable = false;
|
||||
|
||||
xdg.desktopEntries = {
|
||||
cura = {
|
||||
name = "Ultimaker Cura";
|
||||
genericName = "Cura";
|
||||
exec = "cura";
|
||||
terminal = false;
|
||||
categories = [ "Application"];
|
||||
categories = ["Application"];
|
||||
};
|
||||
|
||||
anki = {
|
||||
|
|
@ -461,7 +477,7 @@ xdg.desktopEntries = {
|
|||
genericName = "Anki";
|
||||
exec = "anki";
|
||||
terminal = false;
|
||||
categories = [ "Application"];
|
||||
categories = ["Application"];
|
||||
};
|
||||
|
||||
# schlidichat = {
|
||||
|
|
@ -477,7 +493,7 @@ xdg.desktopEntries = {
|
|||
genericName = "Element";
|
||||
exec = "element-desktop -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";
|
||||
terminal = false;
|
||||
categories = [ "Application"];
|
||||
categories = ["Application"];
|
||||
};
|
||||
|
||||
emacsclient-newframe = {
|
||||
|
|
@ -486,12 +502,11 @@ xdg.desktopEntries = {
|
|||
exec = "emacsclient -r %u";
|
||||
icon = "emacs";
|
||||
terminal = false;
|
||||
categories = [ "Development" "TextEditor"];
|
||||
categories = ["Development" "TextEditor"];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
home.file = {
|
||||
home.file = {
|
||||
"init.el" = {
|
||||
source = ../../programs/emacs/init.el;
|
||||
target = ".emacs.d/init.el";
|
||||
|
|
@ -509,18 +524,18 @@ home.file = {
|
|||
source = ../../programs/git/.gitmessage;
|
||||
target = ".gitmessage";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
xdg.configFile = {
|
||||
"tridactyl/tridactylrc".source = ../../programs/firefox/tridactyl/tridactylrc;
|
||||
"tridactyl/themes/base16-codeschool.css".source = ../../programs/firefox/tridactyl/themes/base16-codeschool.css;
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
home.sessionVariables = {
|
||||
EDITOR = "bash ~/.dotfiles/scripts/editor.sh";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
programs = {
|
||||
bottom.enable = true;
|
||||
imv.enable = true;
|
||||
sioyek.enable = true;
|
||||
|
|
@ -536,19 +551,19 @@ programs = {
|
|||
pandoc.enable = true;
|
||||
fzf.enable = true;
|
||||
zoxide.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.password-store = {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.eza = {
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
icons = true;
|
||||
git = true;
|
||||
|
|
@ -556,9 +571,9 @@ programs.eza = {
|
|||
"-l"
|
||||
"--group-directories-first"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
aliases = {
|
||||
a = "add";
|
||||
|
|
@ -593,9 +608,9 @@ programs.git = {
|
|||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.fuzzel = {
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
|
|
@ -605,9 +620,9 @@ programs.fuzzel = {
|
|||
};
|
||||
border.radius = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
|
|
@ -709,9 +724,9 @@ programs.starship = {
|
|||
rust.symbol = " ";
|
||||
scala.symbol = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
keybindings = {
|
||||
"ctrl+shift+left" = "no_op";
|
||||
|
|
@ -719,9 +734,9 @@ programs.kitty = {
|
|||
"ctrl+shift+home" = "no_op";
|
||||
"ctrl+shift+end" = "no_op";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
hg = "history | grep";
|
||||
|
|
@ -729,13 +744,13 @@ programs.zsh = {
|
|||
nswitch = "cd ~/.dotfiles; sudo nixos-rebuild --flake .#$(hostname) switch; cd -;";
|
||||
edithome = "bash ~/.dotfiles/scripts/editor.sh ~/.dotfiles/Nix.org";
|
||||
magit = "emacsclient -nc -e \"(magit-status)\"";
|
||||
config="git --git-dir=$HOME/.cfg/ --work-tree=$HOME";
|
||||
g="git";
|
||||
c="git --git-dir=$HOME/.dotfiles/.git --work-tree=$HOME/.dotfiles/";
|
||||
config = "git --git-dir=$HOME/.cfg/ --work-tree=$HOME";
|
||||
g = "git";
|
||||
c = "git --git-dir=$HOME/.dotfiles/.git --work-tree=$HOME/.dotfiles/";
|
||||
passpush = "cd ~/.local/share/password-store; git add .; git commit -m 'pass file changes'; git push; cd -;";
|
||||
passpull = "cd ~/.local/share/password-store; git pull; cd -;";
|
||||
hotspot = "nmcli connection up local; nmcli device wifi hotspot;";
|
||||
cd="z";
|
||||
cd = "z";
|
||||
cdr = "cd \"$( (find /home/swarsel/Documents/GitHub -maxdepth 1 && echo /home/swarsel/.dotfiles) | fzf )\"";
|
||||
};
|
||||
autosuggestion.enable = true;
|
||||
|
|
@ -768,23 +783,23 @@ programs.zsh = {
|
|||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[1;5C" forward-word
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.mbsync = {
|
||||
programs.mbsync = {
|
||||
enable = true;
|
||||
};
|
||||
# this is needed so that mbsync can use the passwords from sops
|
||||
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
|
||||
};
|
||||
# this is needed so that mbsync can use the passwords from sops
|
||||
systemd.user.services.mbsync.Unit.After = ["sops-nix.service"];
|
||||
|
||||
programs.msmtp = {
|
||||
programs.msmtp = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.mu = {
|
||||
programs.mu = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
accounts.email = {
|
||||
accounts.email = {
|
||||
maildirBasePath = "Mail";
|
||||
accounts.leon = {
|
||||
primary = true;
|
||||
|
|
@ -805,7 +820,7 @@ accounts.email = {
|
|||
};
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create= "maildir";
|
||||
create = "maildir";
|
||||
expunge = "both";
|
||||
patterns = ["*" "![Gmail]*" "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"];
|
||||
extraConfig = {
|
||||
|
|
@ -855,7 +870,7 @@ accounts.email = {
|
|||
mu.enable = true;
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create= "maildir";
|
||||
create = "maildir";
|
||||
expunge = "both";
|
||||
patterns = ["*" "![Gmail]*" "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"];
|
||||
extraConfig = {
|
||||
|
|
@ -882,7 +897,7 @@ accounts.email = {
|
|||
mu.enable = true;
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create= "maildir";
|
||||
create = "maildir";
|
||||
expunge = "both";
|
||||
patterns = ["*" "![Gmail]*" "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"];
|
||||
extraConfig = {
|
||||
|
|
@ -896,11 +911,11 @@ accounts.email = {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# enable emacs overlay for bleeding edge features
|
||||
# also read init.el file and install use-package packages
|
||||
programs.emacs = {
|
||||
# enable emacs overlay for bleeding edge features
|
||||
# also read init.el file and install use-package packages
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacsWithPackagesFromUsePackage {
|
||||
config = ../../programs/emacs/init.el;
|
||||
|
|
@ -925,7 +940,7 @@ programs.emacs = {
|
|||
rev = "bc99afee611690f85f0cd0bd33300f3385ddd3d3";
|
||||
hash = "sha256-0xMII1KJhTBgQ57tXJks0ZFYMXIanrOl9XyqVmu7a7Y=";
|
||||
};
|
||||
packageRequires = [ epkgs.howm ];
|
||||
packageRequires = [epkgs.howm];
|
||||
})
|
||||
|
||||
(epkgs.trivialBuild rec {
|
||||
|
|
@ -939,28 +954,26 @@ programs.emacs = {
|
|||
};
|
||||
packageRequires = [];
|
||||
})
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
# systemd.enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
modules-left = [ "sway/workspaces" "custom/outer-right-arrow-dark" "sway/window"];
|
||||
modules-center = [ "sway/mode" "custom/configwarn" ];
|
||||
modules-left = ["sway/workspaces" "custom/outer-right-arrow-dark" "sway/window"];
|
||||
modules-center = ["sway/mode" "custom/configwarn"];
|
||||
"sway/mode" = {
|
||||
format = "<span style=\"italic\" font-weight=\"bold\">{}</span>";
|
||||
};
|
||||
|
||||
"custom/configwarn" = {
|
||||
exec= "bash ~/.dotfiles/scripts/checkconfigstatus.sh";
|
||||
interval= 60;
|
||||
exec = "bash ~/.dotfiles/scripts/checkconfigstatus.sh";
|
||||
interval = 60;
|
||||
};
|
||||
|
||||
"group/hardware" = {
|
||||
|
|
@ -983,14 +996,14 @@ programs.waybar = {
|
|||
};
|
||||
|
||||
power-profiles-daemon = {
|
||||
format= "{icon}";
|
||||
tooltip-format= "Power profile: {profile}\nDriver: {driver}";
|
||||
tooltip= true;
|
||||
format-icons= {
|
||||
"default"= "";
|
||||
"performance"= "";
|
||||
"balanced"= "";
|
||||
"power-saver"= "";
|
||||
format = "{icon}";
|
||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||
tooltip = true;
|
||||
format-icons = {
|
||||
"default" = "";
|
||||
"performance" = "";
|
||||
"balanced" = "";
|
||||
"power-saver" = "";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -998,19 +1011,18 @@ programs.waybar = {
|
|||
critical-threshold = 80;
|
||||
format-critical = " {temperatureC}°C";
|
||||
format = " {temperatureC}°C";
|
||||
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format= "{player_icon} {title} <small>[{position}/{length}]</small>";
|
||||
format-paused= "{player_icon} <i>{title} <small>[{position}/{length}]</small></i>";
|
||||
player-icons= {
|
||||
format = "{player_icon} {title} <small>[{position}/{length}]</small>";
|
||||
format-paused = "{player_icon} <i>{title} <small>[{position}/{length}]</small></i>";
|
||||
player-icons = {
|
||||
"default" = "▶ ";
|
||||
"mpv" = "🎵 ";
|
||||
"spotify" = " ";
|
||||
};
|
||||
status-icons= {
|
||||
"paused"= " ";
|
||||
status-icons = {
|
||||
"paused" = " ";
|
||||
};
|
||||
interval = 1;
|
||||
title-len = 20;
|
||||
|
|
@ -1021,121 +1033,120 @@ programs.waybar = {
|
|||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/outer-left-arrow-dark"= {
|
||||
"custom/outer-left-arrow-dark" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/left-arrow-light"= {
|
||||
format= "";
|
||||
tooltip= false;
|
||||
"custom/left-arrow-light" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/right-arrow-dark"= {
|
||||
format= "";
|
||||
tooltip= false;
|
||||
"custom/right-arrow-dark" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/outer-right-arrow-dark"= {
|
||||
format= "";
|
||||
tooltip= false;
|
||||
"custom/outer-right-arrow-dark" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/right-arrow-light"= {
|
||||
format= "";
|
||||
tooltip= false;
|
||||
"custom/right-arrow-light" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"sway/workspaces"= {
|
||||
disable-scroll= true;
|
||||
format= "{name}";
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
format = "{name}";
|
||||
};
|
||||
|
||||
"clock#1"= {
|
||||
min-length= 8;
|
||||
interval= 1;
|
||||
format= "{:%H:%M:%S}";
|
||||
"clock#1" = {
|
||||
min-length = 8;
|
||||
interval = 1;
|
||||
format = "{:%H:%M:%S}";
|
||||
# on-click-right= "gnome-clocks";
|
||||
tooltip-format= "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
|
||||
"clock#2"= {
|
||||
format= "{:%d. %B %Y}";
|
||||
"clock#2" = {
|
||||
format = "{:%d. %B %Y}";
|
||||
# on-click-right= "gnome-clocks";
|
||||
tooltip-format= "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
|
||||
pulseaudio= {
|
||||
format= "{icon} {volume:2}%";
|
||||
format-bluetooth= "{icon} {volume}%";
|
||||
format-muted= "MUTE";
|
||||
format-icons= {
|
||||
headphones= "";
|
||||
default= [
|
||||
pulseaudio = {
|
||||
format = "{icon} {volume:2}%";
|
||||
format-bluetooth = "{icon} {volume}%";
|
||||
format-muted = "MUTE";
|
||||
format-icons = {
|
||||
headphones = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
scroll-step= 1;
|
||||
on-click= "pamixer -t";
|
||||
on-click-right= "pavucontrol";
|
||||
scroll-step = 1;
|
||||
on-click = "pamixer -t";
|
||||
on-click-right = "pavucontrol";
|
||||
};
|
||||
memory= {
|
||||
interval= 5;
|
||||
format= " {}%";
|
||||
tooltip-format= "Memory: {used:0.1f}G/{total:0.1f}G\nSwap: {swapUsed}G/{swapTotal}G";
|
||||
memory = {
|
||||
interval = 5;
|
||||
format = " {}%";
|
||||
tooltip-format = "Memory: {used:0.1f}G/{total:0.1f}G\nSwap: {swapUsed}G/{swapTotal}G";
|
||||
};
|
||||
cpu= {
|
||||
min-length= 6;
|
||||
interval= 5;
|
||||
cpu = {
|
||||
min-length = 6;
|
||||
interval = 5;
|
||||
format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"];
|
||||
# on-click-right= "com.github.stsdc.monitor";
|
||||
on-click-right= "kitty -o confirm_os_window_close=0 btm";
|
||||
|
||||
on-click-right = "kitty -o confirm_os_window_close=0 btm";
|
||||
};
|
||||
battery= {
|
||||
states= {
|
||||
"warning"= 60;
|
||||
"error"= 30;
|
||||
"critical"= 15;
|
||||
battery = {
|
||||
states = {
|
||||
"warning" = 60;
|
||||
"error" = 30;
|
||||
"critical" = 15;
|
||||
};
|
||||
interval=5;
|
||||
format= "{icon} {capacity}%";
|
||||
format-charging= "{capacity}% ";
|
||||
format-plugged= "{capacity}% ";
|
||||
format-icons= [
|
||||
interval = 5;
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = "{capacity}% ";
|
||||
format-plugged = "{capacity}% ";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click-right= "wlogout -p layer-shell";
|
||||
on-click-right = "wlogout -p layer-shell";
|
||||
};
|
||||
disk= {
|
||||
interval= 30;
|
||||
format= "Disk {percentage_used:2}%";
|
||||
path= "/";
|
||||
states= {
|
||||
"warning"= 80;
|
||||
"critical"= 90;
|
||||
disk = {
|
||||
interval = 30;
|
||||
format = "Disk {percentage_used:2}%";
|
||||
path = "/";
|
||||
states = {
|
||||
"warning" = 80;
|
||||
"critical" = 90;
|
||||
};
|
||||
tooltip-format = "{used} used out of {total} on {path} ({percentage_used}%)\n{free} free on {path} ({percentage_free}%)";
|
||||
};
|
||||
tray= {
|
||||
icon-size= 20;
|
||||
tray = {
|
||||
icon-size = 20;
|
||||
};
|
||||
network= {
|
||||
network = {
|
||||
interval = 5;
|
||||
format-wifi= "{signalStrength}% ";
|
||||
format-ethernet= "";
|
||||
format-linked= "{ifname} (No IP) ";
|
||||
format-disconnected= "Disconnected ⚠";
|
||||
format-alt= "{ifname}: {ipaddr}/{cidr}";
|
||||
tooltip-format-ethernet= "{ifname} via {gwaddr}: {essid} {ipaddr}/{cidr}\n\n⇡{bandwidthUpBytes} ⇣{bandwidthDownBytes}";
|
||||
tooltip-format-wifi= "{ifname} via {gwaddr}: {essid} {ipaddr}/{cidr} \n{signaldBm}dBm @ {frequency}MHz\n\n⇡{bandwidthUpBytes} ⇣{bandwidthDownBytes}";
|
||||
format-wifi = "{signalStrength}% ";
|
||||
format-ethernet = "";
|
||||
format-linked = "{ifname} (No IP) ";
|
||||
format-disconnected = "Disconnected ⚠";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
tooltip-format-ethernet = "{ifname} via {gwaddr}: {essid} {ipaddr}/{cidr}\n\n⇡{bandwidthUpBytes} ⇣{bandwidthDownBytes}";
|
||||
tooltip-format-wifi = "{ifname} via {gwaddr}: {essid} {ipaddr}/{cidr} \n{signaldBm}dBm @ {frequency}MHz\n\n⇡{bandwidthUpBytes} ⇣{bandwidthDownBytes}";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = builtins.readFile ../../programs/waybar/style.css;
|
||||
};
|
||||
};
|
||||
|
||||
programs.firefox = {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox.override {
|
||||
nativeMessagingHosts = [
|
||||
|
|
@ -1181,82 +1192,103 @@ programs.firefox = {
|
|||
|
||||
search.engines = {
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{ name = "type"; value = "packages"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
definedAliases = ["@np"];
|
||||
};
|
||||
|
||||
"NixOS Wiki" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
||||
}];
|
||||
}
|
||||
];
|
||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||
definedAliases = [ "@nw" ];
|
||||
definedAliases = ["@nw"];
|
||||
};
|
||||
|
||||
"NixOS Options" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/options";
|
||||
params = [
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@no" ];
|
||||
definedAliases = ["@no"];
|
||||
};
|
||||
|
||||
"Home Manager Options" = {
|
||||
urls = [{ template = "https://home-manager-options.extranix.com/";
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com/";
|
||||
params = [
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@hm" "@ho" "@hmo" ];
|
||||
definedAliases = ["@hm" "@ho" "@hmo"];
|
||||
};
|
||||
|
||||
"Google".metaData.alias = "@g";
|
||||
};
|
||||
search.force = true; # this is required because otherwise the search.json.mozlz4 symlink gets replaced on every firefox restart
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.gnome-keyring = {
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.mbsync = {
|
||||
services.mbsync = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.kdeconnect = {
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
tray = {
|
||||
enable = false; # we enable this by installing the syncthingtray package instead, it works better.
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.emacs = {
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
# socketActivation.enable = false;
|
||||
# startWithUserSession = "graphical";
|
||||
};
|
||||
};
|
||||
|
||||
services.mako = {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
# backgroundColor = "#2e3440";
|
||||
# borderColor = "#88c0d0";
|
||||
|
|
@ -1282,9 +1314,9 @@ default-timeout=3000
|
|||
default-timeout=2000
|
||||
group-by=category
|
||||
";
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
checkConfig = false; # delete this line once SwayFX is fixed upstream
|
||||
package = pkgs.swayfx;
|
||||
|
|
@ -1297,7 +1329,7 @@ wayland.windowManager.sway = {
|
|||
modifier = "Mod4";
|
||||
terminal = "kitty";
|
||||
menu = "fuzzel";
|
||||
bars = [{ command = "waybar";}];
|
||||
bars = [{command = "waybar";}];
|
||||
keybindings = let
|
||||
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||
in {
|
||||
|
|
@ -1381,15 +1413,15 @@ wayland.windowManager.sway = {
|
|||
};
|
||||
defaultWorkspace = "workspace 1:一";
|
||||
startup = [
|
||||
{ command = "kitty -T kittyterm";}
|
||||
{ command = "sleep 60; kitty -T spotifytui -o confirm_os_window_close=0 spotify_player";}
|
||||
{command = "kitty -T kittyterm";}
|
||||
{command = "sleep 60; kitty -T spotifytui -o confirm_os_window_close=0 spotify_player";}
|
||||
];
|
||||
window = {
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
};
|
||||
assigns = {
|
||||
"1:一" = [{ app_id = "firefox"; }];
|
||||
"1:一" = [{app_id = "firefox";}];
|
||||
};
|
||||
floating = {
|
||||
border = 1;
|
||||
|
|
@ -1442,19 +1474,19 @@ wayland.windowManager.sway = {
|
|||
{
|
||||
command = "sticky enable, shadows enable";
|
||||
criteria = {
|
||||
title="^Picture-in-Picture$";
|
||||
title = "^Picture-in-Picture$";
|
||||
};
|
||||
}
|
||||
{
|
||||
command = "opacity 0.8, sticky enable, border normal, move container to scratchpad";
|
||||
criteria = {
|
||||
title="^kittyterm$";
|
||||
title = "^kittyterm$";
|
||||
};
|
||||
}
|
||||
{
|
||||
command = "opacity 0.95, sticky enable, border normal, move container to scratchpad";
|
||||
criteria = {
|
||||
title="^spotifytui$";
|
||||
title = "^spotifytui$";
|
||||
};
|
||||
}
|
||||
# {
|
||||
|
|
@ -1465,10 +1497,9 @@ wayland.windowManager.sway = {
|
|||
# };
|
||||
# }
|
||||
{
|
||||
|
||||
command = "resize set width 60 ppt height 60 ppt, sticky enable, move container to scratchpad";
|
||||
criteria = {
|
||||
class="Spotify";
|
||||
class = "Spotify";
|
||||
};
|
||||
}
|
||||
{
|
||||
|
|
@ -1495,7 +1526,7 @@ wayland.windowManager.sway = {
|
|||
inner = 5;
|
||||
};
|
||||
};
|
||||
extraSessionCommands =''
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||
|
|
@ -1510,7 +1541,7 @@ wayland.windowManager.sway = {
|
|||
# exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
# exec hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
# ";
|
||||
extraConfig =let
|
||||
extraConfig = let
|
||||
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||
swayfxSettings = "
|
||||
blur enable
|
||||
|
|
@ -1544,6 +1575,5 @@ wayland.windowManager.sway = {
|
|||
${swayfxSettings}
|
||||
|
||||
";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,26 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
services.xserver = {
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
users.mutableUsers = false;
|
||||
users.mutableUsers = false;
|
||||
|
||||
environment = {
|
||||
environment = {
|
||||
wordlist.enable = true;
|
||||
sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
|
|
@ -28,41 +31,41 @@ environment = {
|
|||
gst-libav
|
||||
]);
|
||||
};
|
||||
};
|
||||
# gstreamer plugins for nautilus (used for file metadata)
|
||||
};
|
||||
# gstreamer plugins for nautilus (used for file metadata)
|
||||
|
||||
time.hardwareClockInLocalTime = true;
|
||||
time.hardwareClockInLocalTime = true;
|
||||
|
||||
# dont style GRUB with stylix
|
||||
stylix.targets.grub.enable = false; # the styling makes grub more ugly
|
||||
# dont style GRUB with stylix
|
||||
stylix.targets.grub.enable = false; # the styling makes grub more ugly
|
||||
|
||||
security.polkit.enable = true;
|
||||
security.polkit.enable = true;
|
||||
|
||||
nix.gc = {
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
randomizedDelaySec = "14m";
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 10d";
|
||||
};
|
||||
};
|
||||
|
||||
nix.optimise = {
|
||||
nix.optimise = {
|
||||
automatic = true;
|
||||
dates = [ "weekly" ];
|
||||
};
|
||||
dates = ["weekly"];
|
||||
};
|
||||
|
||||
# systemd
|
||||
systemd.extraConfig = ''
|
||||
# systemd
|
||||
systemd.extraConfig = ''
|
||||
DefaultTimeoutStartSec=60s
|
||||
DefaultTimeoutStopSec=15s
|
||||
'';
|
||||
'';
|
||||
|
||||
hardware = {
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
pulseaudio= {
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
|
@ -77,9 +80,9 @@ hardware = {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager = {
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
ensureProfiles = {
|
||||
environmentFiles = [
|
||||
|
|
@ -124,12 +127,12 @@ networking.networkmanager = {
|
|||
cloned-mac-address = "preserve";
|
||||
mac-address = "90:2E:16:D0:A1:87";
|
||||
};
|
||||
ipv4 = { method = "shared"; };
|
||||
ipv4 = {method = "shared";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "stable-privacy";
|
||||
method = "auto";
|
||||
};
|
||||
proxy = { };
|
||||
proxy = {};
|
||||
};
|
||||
|
||||
eduroam = {
|
||||
|
|
@ -143,12 +146,12 @@ networking.networkmanager = {
|
|||
id = "eduroam";
|
||||
type = "wifi";
|
||||
};
|
||||
ipv4 = { method = "auto"; };
|
||||
ipv4 = {method = "auto";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "default";
|
||||
method = "auto";
|
||||
};
|
||||
proxy = { };
|
||||
proxy = {};
|
||||
wifi = {
|
||||
mode = "infrastructure";
|
||||
ssid = "eduroam";
|
||||
|
|
@ -165,7 +168,7 @@ networking.networkmanager = {
|
|||
id = "local";
|
||||
type = "ethernet";
|
||||
};
|
||||
ethernet = { };
|
||||
ethernet = {};
|
||||
ipv4 = {
|
||||
address1 = "10.42.1.1/24";
|
||||
method = "shared";
|
||||
|
|
@ -174,7 +177,7 @@ networking.networkmanager = {
|
|||
addr-gen-mode = "stable-privacy";
|
||||
method = "auto";
|
||||
};
|
||||
proxy = { };
|
||||
proxy = {};
|
||||
};
|
||||
|
||||
HH40V_39F5 = {
|
||||
|
|
@ -182,12 +185,12 @@ networking.networkmanager = {
|
|||
id = "HH40V_39F5";
|
||||
type = "wifi";
|
||||
};
|
||||
ipv4 = { method = "auto"; };
|
||||
ipv4 = {method = "auto";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "stable-privacy";
|
||||
method = "auto";
|
||||
};
|
||||
proxy = { };
|
||||
proxy = {};
|
||||
wifi = {
|
||||
band = "bg";
|
||||
mode = "infrastructure";
|
||||
|
|
@ -204,12 +207,12 @@ networking.networkmanager = {
|
|||
id = "magicant";
|
||||
type = "wifi";
|
||||
};
|
||||
ipv4 = { method = "auto"; };
|
||||
ipv4 = {method = "auto";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "default";
|
||||
method = "auto";
|
||||
};
|
||||
proxy = { };
|
||||
proxy = {};
|
||||
wifi = {
|
||||
mode = "infrastructure";
|
||||
ssid = "magicant";
|
||||
|
|
@ -227,16 +230,15 @@ networking.networkmanager = {
|
|||
id = "PIA Sweden";
|
||||
type = "vpn";
|
||||
};
|
||||
ipv4 = { method = "auto"; };
|
||||
ipv4 = {method = "auto";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "stable-privacy";
|
||||
method = "auto";
|
||||
};
|
||||
proxy = { };
|
||||
proxy = {};
|
||||
vpn = {
|
||||
auth = "sha1";
|
||||
ca =
|
||||
"${config.users.users.swarsel.home}/.dotfiles/secrets/certs/sweden-aes-128-cbc-udp-dns-ca.pem";
|
||||
ca = "${config.users.users.swarsel.home}/.dotfiles/secrets/certs/sweden-aes-128-cbc-udp-dns-ca.pem";
|
||||
challenge-response-flags = "2";
|
||||
cipher = "aes-128-cbc";
|
||||
compress = "yes";
|
||||
|
|
@ -250,7 +252,7 @@ networking.networkmanager = {
|
|||
service-type = "org.freedesktop.NetworkManager.openvpn";
|
||||
username = "$VPNUSER";
|
||||
};
|
||||
vpn-secrets = { password = "$VPNPASS"; };
|
||||
vpn-secrets = {password = "$VPNPASS";};
|
||||
};
|
||||
|
||||
Hotspot = {
|
||||
|
|
@ -259,12 +261,12 @@ networking.networkmanager = {
|
|||
id = "Hotspot";
|
||||
type = "wifi";
|
||||
};
|
||||
ipv4 = { method = "shared"; };
|
||||
ipv4 = {method = "shared";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "default";
|
||||
method = "ignore";
|
||||
};
|
||||
proxy = { };
|
||||
proxy = {};
|
||||
wifi = {
|
||||
mode = "ap";
|
||||
ssid = "Hotspot-fourside";
|
||||
|
|
@ -277,16 +279,15 @@ networking.networkmanager = {
|
|||
psk = "$HOTSPOT";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.NetworkManager-ensure-profiles.after = [ "NetworkManager.service" ];
|
||||
systemd.services.NetworkManager-ensure-profiles.after = ["NetworkManager.service"];
|
||||
|
||||
time.timeZone = "Europe/Vienna";
|
||||
time.timeZone = "Europe/Vienna";
|
||||
|
||||
i18n = {
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_AT.UTF-8";
|
||||
|
|
@ -299,10 +300,9 @@ i18n = {
|
|||
LC_TELEPHONE = "de_AT.UTF-8";
|
||||
LC_TIME = "de_AT.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
sops = {
|
||||
};
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = "${config.users.users.swarsel.home}/.dotfiles/secrets/general/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
|
||||
|
|
@ -329,9 +329,9 @@ sops = {
|
|||
VPNPASS=${config.sops.placeholder.vpnpass}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
environment.systemPackages = with pkgs; [
|
||||
# yubikey packages
|
||||
gnupg
|
||||
yubikey-personalization
|
||||
|
|
@ -383,7 +383,7 @@ environment.systemPackages = with pkgs; [
|
|||
#lsp-bridge / python
|
||||
gcc
|
||||
gdb
|
||||
(python3.withPackages(ps: with ps; [ jupyter ipython pyqt5 epc orjson sexpdata six setuptools paramiko numpy pandas scipy matplotlib requests debugpy flake8 gnureadline python-lsp-server]))
|
||||
(python3.withPackages (ps: with ps; [jupyter ipython pyqt5 epc orjson sexpdata six setuptools paramiko numpy pandas scipy matplotlib requests debugpy flake8 gnureadline python-lsp-server]))
|
||||
# (python3.withPackages(ps: with ps; [ jupyter ipython pyqt5 numpy pandas scipy matplotlib requests debugpy flake8 gnureadline python-lsp-server]))
|
||||
# --------------------------------------------
|
||||
|
||||
|
|
@ -405,56 +405,54 @@ environment.systemPackages = with pkgs; [
|
|||
tar xvf $src -C $out/
|
||||
mv $out/oama-0.13.1-Linux-x86_64-static/oama $out/bin/
|
||||
'';
|
||||
|
||||
})
|
||||
];
|
||||
|
||||
];
|
||||
|
||||
programs = {
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
evince.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.shells = with pkgs; [zsh];
|
||||
environment.pathsToLink = ["/share/zsh"];
|
||||
|
||||
services.blueman.enable = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
# enable scanners over network
|
||||
hardware.sane = {
|
||||
# enable scanners over network
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
extraBackends = [ pkgs.sane-airscan ];
|
||||
};
|
||||
extraBackends = [pkgs.sane-airscan];
|
||||
};
|
||||
|
||||
# enable discovery and usage of network devices (esp. printers)
|
||||
services.printing = {
|
||||
# enable discovery and usage of network devices (esp. printers)
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [
|
||||
pkgs.gutenprint
|
||||
pkgs.gutenprintBin
|
||||
];
|
||||
browsedConf = ''
|
||||
BrowseDNSSDSubTypes _cups,_print
|
||||
BrowseLocalProtocols all
|
||||
BrowseRemoteProtocols all
|
||||
CreateIPPPrinterQueues All
|
||||
BrowseProtocols all
|
||||
BrowseDNSSDSubTypes _cups,_print
|
||||
BrowseLocalProtocols all
|
||||
BrowseRemoteProtocols all
|
||||
CreateIPPPrinterQueues All
|
||||
BrowseProtocols all
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.gvfs.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
|
||||
# Make CAPS work as a dual function ESC/CTRL key
|
||||
services.interception-tools = {
|
||||
# Make CAPS work as a dual function ESC/CTRL key
|
||||
services.interception-tools = {
|
||||
enable = true;
|
||||
udevmonConfig = let
|
||||
dualFunctionKeysConfig = builtins.toFile "dual-function-keys.yaml" ''
|
||||
|
|
@ -476,20 +474,20 @@ services.interception-tools = {
|
|||
EVENTS:
|
||||
EV_KEY: [KEY_CAPSLOCK]
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.startAgent = false;
|
||||
programs.ssh.startAgent = false;
|
||||
|
||||
services.pcscd.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
|
||||
hardware.ledger.enable = true;
|
||||
hardware.ledger.enable = true;
|
||||
|
||||
services.udev.packages = with pkgs; [
|
||||
services.udev.packages = with pkgs; [
|
||||
yubikey-personalization
|
||||
ledger-udev-rules
|
||||
];
|
||||
];
|
||||
|
||||
services.greetd = {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
initial_session.command = "sway";
|
||||
|
|
@ -502,10 +500,9 @@ services.greetd = {
|
|||
--cmd sway
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."greetd/environments".text = ''
|
||||
environment.etc."greetd/environments".text = ''
|
||||
sway
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,33 @@
|
|||
# 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, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/55eee3d2-4125-4aba-a326-10cde2abdf26";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/55eee3d2-4125-4aba-a326-10cde2abdf26";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/BC7A-F7D9";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/BC7A-F7D9";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/0a74b04a-99e0-48cd-afcf-6ca849f6f85a"; }
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/0a74b04a-99e0-48cd-afcf-6ca849f6f85a";}
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||
sops.age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/sops"];
|
||||
|
||||
# waybar config - TEMPLATE - update for cores and temp
|
||||
programs.waybar.settings.mainBar = {
|
||||
|
|
@ -34,8 +34,8 @@
|
|||
temperature.input-filename = "temp1_input";
|
||||
};
|
||||
|
||||
|
||||
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark"
|
||||
programs.waybar.settings.mainBar.modules-right = [
|
||||
"custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
|
|
@ -52,8 +52,7 @@
|
|||
"clock#1"
|
||||
];
|
||||
|
||||
|
||||
wayland.windowManager.sway= {
|
||||
wayland.windowManager.sway = {
|
||||
config = rec {
|
||||
# update for actual inputs here,
|
||||
input = {
|
||||
|
|
@ -61,7 +60,8 @@
|
|||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"1:1:AT_Translated_Set_2_keyboard" = { # TEMPLATE
|
||||
"1:1:AT_Translated_Set_2_keyboard" = {
|
||||
# TEMPLATE
|
||||
xkb_layout = "us";
|
||||
xkb_options = "grp:win_space_toggle";
|
||||
xkb_variant = "altgr-intl";
|
||||
|
|
@ -72,7 +72,6 @@
|
|||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
output = {
|
||||
|
|
@ -91,17 +90,22 @@
|
|||
};
|
||||
|
||||
workspaceOutputAssign = [
|
||||
{ output = "eDP-1"; workspace = "1:一";}
|
||||
{ output = "DP-4"; workspace = "2:二";}
|
||||
{
|
||||
output = "eDP-1";
|
||||
workspace = "1:一";
|
||||
}
|
||||
{
|
||||
output = "DP-4";
|
||||
workspace = "2:二";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
keybindings = let
|
||||
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||
in {
|
||||
"${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkelement.sh\"";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
||||
"XF86MonBrightnessDown"= "exec brightnessctl set 5%-";
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
||||
"XF86Display" = "exec wl-mirror eDP-1";
|
||||
# these are left open to use
|
||||
# "XF86WLAN" = "exec wl-mirror eDP-1";
|
||||
|
|
@ -115,14 +119,12 @@
|
|||
};
|
||||
|
||||
startup = [
|
||||
|
||||
{ command = "nextcloud --background";}
|
||||
{ command = "discord --start-minimized";}
|
||||
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{ command = "ANKI_WAYLAND=1 anki";}
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{ command = "nm-applet";}
|
||||
|
||||
{command = "nextcloud --background";}
|
||||
{command = "discord --start-minimized";}
|
||||
{command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{command = "ANKI_WAYLAND=1 anki";}
|
||||
{command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{command = "nm-applet";}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
#
|
||||
# imports =
|
||||
# [
|
||||
# ./hardware-configuration.nix
|
||||
# ];
|
||||
#
|
||||
imports =
|
||||
[
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
greetd.settings.initial_session.user="swarsel";
|
||||
greetd.settings.initial_session.user = "swarsel";
|
||||
};
|
||||
|
||||
boot = {
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
# kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
sops.age.sshKeyPaths = [ "${config.users.users.swarsel.home}/.ssh/sops" ];
|
||||
sops.age.sshKeyPaths = ["${config.users.users.swarsel.home}/.ssh/sops"];
|
||||
|
||||
networking = {
|
||||
hostName = "fourside"; # Define your hostname.
|
||||
|
|
@ -33,15 +33,27 @@
|
|||
firewall.checkReversePath = false;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [ 4380 27036 14242 34197 51820 ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPorts = [ ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedUDPPorts = [4380 27036 14242 34197 51820]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPorts = []; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPortRanges = [
|
||||
{from = 27015; to = 27030;} # barotrauma
|
||||
{from = 27036; to = 27037;} # barotrauma
|
||||
{
|
||||
from = 27015;
|
||||
to = 27030;
|
||||
} # barotrauma
|
||||
{
|
||||
from = 27036;
|
||||
to = 27037;
|
||||
} # barotrauma
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{from = 27000; to = 27031;} # barotrauma
|
||||
{from = 58962; to = 58964;} # barotrauma
|
||||
{
|
||||
from = 27000;
|
||||
to = 27031;
|
||||
} # barotrauma
|
||||
{
|
||||
from = 58962;
|
||||
to = 58964;
|
||||
} # barotrauma
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
@ -94,7 +106,7 @@
|
|||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerdfonts.override { fonts = [ "FiraCode"]; };
|
||||
package = pkgs.nerdfonts.override {fonts = ["FiraCode"];};
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
|
||||
|
|
@ -105,9 +117,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
|
|
@ -153,7 +162,7 @@
|
|||
isNormalUser = true;
|
||||
description = "Leon S";
|
||||
hashedPasswordFile = config.sops.secrets.swarseluser.path;
|
||||
extraGroups = [ "networkmanager" "wheel" "lp" "audio" "video" "vboxusers" "scanner" ];
|
||||
extraGroups = ["networkmanager" "wheel" "lp" "audio" "video" "vboxusers" "scanner"];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
|
|
@ -168,6 +177,4 @@
|
|||
];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
environment.packages = with pkgs; [
|
||||
vim
|
||||
git
|
||||
|
|
@ -18,5 +16,4 @@
|
|||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
{modulesPath, ...}: {
|
||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "nodev";
|
||||
};
|
||||
fileSystems."/boot" = { device = "/dev/disk/by-uuid/A1B2-7E6F"; fsType = "vfat"; };
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
||||
boot.initrd.kernelModules = [ "nvme" ];
|
||||
fileSystems."/" = { device = "/dev/mapper/ocivolume-root"; fsType = "xfs"; };
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/A1B2-7E6F";
|
||||
fsType = "vfat";
|
||||
};
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"];
|
||||
boot.initrd.kernelModules = ["nvme"];
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/ocivolume-root";
|
||||
fsType = "xfs";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
{ config, pkgs, sops, ... }: let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
sops,
|
||||
...
|
||||
}: let
|
||||
matrixDomain = "swatrix.swarsel.win";
|
||||
in {
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
|
@ -23,16 +27,16 @@ in {
|
|||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
age.sshKeyPaths = ["/etc/ssh/sops"];
|
||||
defaultSopsFile = "/root/.dotfiles/secrets/omatrix/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets = {
|
||||
dnstokenfull = {owner="acme";};
|
||||
matrixsharedsecret = {owner="matrix-synapse";};
|
||||
mautrixtelegram_as = {owner="matrix-synapse";};
|
||||
mautrixtelegram_hs = {owner="matrix-synapse";};
|
||||
mautrixtelegram_api_id = {owner="matrix-synapse";};
|
||||
mautrixtelegram_api_hash = {owner="matrix-synapse";};
|
||||
dnstokenfull = {owner = "acme";};
|
||||
matrixsharedsecret = {owner = "matrix-synapse";};
|
||||
mautrixtelegram_as = {owner = "matrix-synapse";};
|
||||
mautrixtelegram_hs = {owner = "matrix-synapse";};
|
||||
mautrixtelegram_api_id = {owner = "matrix-synapse";};
|
||||
mautrixtelegram_api_hash = {owner = "matrix-synapse";};
|
||||
};
|
||||
templates = {
|
||||
"certs.secret".content = ''
|
||||
|
|
@ -78,7 +82,6 @@ in {
|
|||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
virtualHosts = {
|
||||
|
||||
"swatrix.swarsel.win" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
@ -164,14 +167,15 @@ in {
|
|||
public_baseurl = "https://${matrixDomain}";
|
||||
};
|
||||
listeners = [
|
||||
{ port = 8008;
|
||||
bind_addresses = [ "0.0.0.0" ];
|
||||
{
|
||||
port = 8008;
|
||||
bind_addresses = ["0.0.0.0"];
|
||||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
resources = [
|
||||
{
|
||||
names = [ "client" "federation" ];
|
||||
names = ["client" "federation"];
|
||||
compress = true;
|
||||
}
|
||||
];
|
||||
|
|
@ -191,7 +195,7 @@ in {
|
|||
domain = matrixDomain;
|
||||
};
|
||||
appservice = {
|
||||
address= "http://localhost:29317";
|
||||
address = "http://localhost:29317";
|
||||
hostname = "0.0.0.0";
|
||||
port = "29317";
|
||||
provisioning.enabled = true;
|
||||
|
|
@ -240,7 +244,7 @@ in {
|
|||
domain = matrixDomain;
|
||||
};
|
||||
appservice = {
|
||||
address= "http://localhost:29318";
|
||||
address = "http://localhost:29318";
|
||||
hostname = "0.0.0.0";
|
||||
port = 29318;
|
||||
database = {
|
||||
|
|
@ -287,8 +291,7 @@ in {
|
|||
domain = matrixDomain;
|
||||
};
|
||||
appservice = {
|
||||
|
||||
address= "http://localhost:29328";
|
||||
address = "http://localhost:29328";
|
||||
hostname = "0.0.0.0";
|
||||
port = 29328;
|
||||
database = {
|
||||
|
|
@ -314,7 +317,7 @@ in {
|
|||
# messages out after a while.
|
||||
|
||||
systemd.timers."restart-bridges" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnBootSec = "1d";
|
||||
OnUnitActiveSec = "1d";
|
||||
|
|
@ -333,5 +336,4 @@ in {
|
|||
User = "root";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,30 @@
|
|||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/4b47378a-02eb-4548-bab8-59cbf379252a";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/4b47378a-02eb-4548-bab8-59cbf379252a";
|
||||
fsType = "xfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2B75-2AD5";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/2B75-2AD5";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/f0126a93-753e-4769-ada8-7499a1efb3a9"; }
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/f0126a93-753e-4769-ada8-7499a1efb3a9";}
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
|
@ -19,11 +21,11 @@
|
|||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
age.sshKeyPaths = ["/etc/ssh/sops"];
|
||||
defaultSopsFile = "/root/.dotfiles/secrets/sync/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets.swarsel = { owner = "root";};
|
||||
secrets.dnstokenfull = {owner="acme";};
|
||||
secrets.swarsel = {owner = "root";};
|
||||
secrets.dnstokenfull = {owner = "acme";};
|
||||
templates."certs.secret".content = ''
|
||||
CF_DNS_API_TOKEN=${config.sops.placeholder.dnstokenfull}
|
||||
'';
|
||||
|
|
@ -44,7 +46,6 @@
|
|||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
virtualHosts = {
|
||||
|
||||
"synki.swarsel.win" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
@ -160,5 +161,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,27 @@
|
|||
# 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, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ata_piix" "usb_storage" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ata_piix" "usb_storage" "sd_mod" "sr_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/147e3682-eb15-4e96-9cac-4f2fb5888a69";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/147e3682-eb15-4e96-9cac-4f2fb5888a69";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
{ config, pkgs, sops, ... }: let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
sops,
|
||||
...
|
||||
}: let
|
||||
matrixDomain = "swatrix.swarsel.win";
|
||||
in {
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
|
@ -10,9 +14,9 @@ in {
|
|||
enable = true;
|
||||
device = "/dev/sda";
|
||||
useOSProber = true;
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
supportedFilesystems = ["zfs"];
|
||||
zfs.forceImportRoot = false;
|
||||
kernelModules = [ "tun" ];
|
||||
kernelModules = ["tun"];
|
||||
kernel.sysctl = {
|
||||
"net.ipv4.conf.all.rp_filter" = 2;
|
||||
"net.ipv4.conf.default.rp_filter" = 2;
|
||||
|
|
@ -64,7 +68,7 @@ in {
|
|||
};
|
||||
users = {
|
||||
jellyfin = {
|
||||
extraGroups = [ "video" "render" ];
|
||||
extraGroups = ["video" "render"];
|
||||
};
|
||||
vpn = {
|
||||
isNormalUser = true;
|
||||
|
|
@ -75,23 +79,23 @@ in {
|
|||
isSystemUser = true;
|
||||
uid = 61593;
|
||||
group = "navidrome";
|
||||
extraGroups = [ "audio" "utmp" ];
|
||||
extraGroups = ["audio" "utmp"];
|
||||
};
|
||||
spotifyd = {
|
||||
isSystemUser = true;
|
||||
uid = 65136;
|
||||
group = "spotifyd";
|
||||
extraGroups = [ "audio" "utmp" ];
|
||||
extraGroups = ["audio" "utmp"];
|
||||
};
|
||||
mpd = {
|
||||
isSystemUser = true;
|
||||
group = "mpd";
|
||||
extraGroups = [ "audio" "utmp" ];
|
||||
extraGroups = ["audio" "utmp"];
|
||||
};
|
||||
swarsel = {
|
||||
isNormalUser = true;
|
||||
description = "Leon S";
|
||||
extraGroups = [ "networkmanager" "wheel" "lp"];
|
||||
extraGroups = ["networkmanager" "wheel" "lp"];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
root = {
|
||||
|
|
@ -133,24 +137,24 @@ in {
|
|||
zfs
|
||||
];
|
||||
etc = {
|
||||
"openvpn/iptables.sh" =
|
||||
{ source = ../../scripts/server1/iptables.sh;
|
||||
"openvpn/iptables.sh" = {
|
||||
source = ../../scripts/server1/iptables.sh;
|
||||
mode = "0755";
|
||||
};
|
||||
"openvpn/update-resolv-conf" =
|
||||
{ source = ../../scripts/server1/update-resolv-conf;
|
||||
"openvpn/update-resolv-conf" = {
|
||||
source = ../../scripts/server1/update-resolv-conf;
|
||||
mode = "0755";
|
||||
};
|
||||
"openvpn/routing.sh" =
|
||||
{ source = ../../scripts/server1/routing.sh;
|
||||
"openvpn/routing.sh" = {
|
||||
source = ../../scripts/server1/routing.sh;
|
||||
mode = "0755";
|
||||
};
|
||||
"openvpn/ca.rsa.2048.crt" =
|
||||
{ source = ../../secrets/certs/ca.rsa.2048.crt;
|
||||
"openvpn/ca.rsa.2048.crt" = {
|
||||
source = ../../secrets/certs/ca.rsa.2048.crt;
|
||||
mode = "0644";
|
||||
};
|
||||
"openvpn/crl.rsa.2048.pem" =
|
||||
{ source = ../../secrets/certs/crl.rsa.2048.pem;
|
||||
"openvpn/crl.rsa.2048.pem" = {
|
||||
source = ../../secrets/certs/crl.rsa.2048.pem;
|
||||
mode = "0644";
|
||||
};
|
||||
};
|
||||
|
|
@ -161,7 +165,7 @@ in {
|
|||
|
||||
systemd = {
|
||||
timers."restart-bridges" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnBootSec = "1d";
|
||||
OnUnitActiveSec = "1d";
|
||||
|
|
@ -190,19 +194,19 @@ in {
|
|||
};
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
age.sshKeyPaths = ["/etc/ssh/sops"];
|
||||
defaultSopsFile = "/root/.dotfiles/secrets/sandbox/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets = {
|
||||
dnstokenfull = {owner="acme";};
|
||||
kavita = { owner = "kavita";};
|
||||
dnstokenfull = {owner = "acme";};
|
||||
kavita = {owner = "kavita";};
|
||||
vpnuser = {};
|
||||
rpcuser = {owner="vpn";};
|
||||
rpcuser = {owner = "vpn";};
|
||||
vpnpass = {};
|
||||
rpcpass = {owner="vpn";};
|
||||
rpcpass = {owner = "vpn";};
|
||||
vpnprot = {};
|
||||
vpnloc = {};
|
||||
mpdpass = { owner = "mpd";};
|
||||
mpdpass = {owner = "mpd";};
|
||||
};
|
||||
templates = {
|
||||
"transmission-rpc" = {
|
||||
|
|
@ -265,10 +269,12 @@ in {
|
|||
openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
listenAddresses = [{
|
||||
listenAddresses = [
|
||||
{
|
||||
port = 22;
|
||||
addr = "0.0.0.0";
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nginx = {
|
||||
|
|
@ -278,7 +284,6 @@ in {
|
|||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
virtualHosts = {
|
||||
|
||||
"stash.swarsel.win" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
@ -313,7 +318,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
"sound.swarsel.win" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
@ -417,74 +421,74 @@ in {
|
|||
credentialsFile = config.sops.templates."transmission-rpc".path;
|
||||
user = "vpn";
|
||||
settings = {
|
||||
alt-speed-down= 8000;
|
||||
alt-speed-enabled= false;
|
||||
alt-speed-time-begin= 0;
|
||||
alt-speed-time-day= 127;
|
||||
alt-speed-time-enabled= true;
|
||||
alt-speed-time-end= 360;
|
||||
alt-speed-up= 2000;
|
||||
bind-address-ipv4= "0.0.0.0";
|
||||
bind-address-ipv6= "::";
|
||||
blocklist-enabled= false;
|
||||
blocklist-url= "http://www.example.com/blocklist";
|
||||
cache-size-mb= 256;
|
||||
dht-enabled= false;
|
||||
download-dir= "/test";
|
||||
download-limit= 100;
|
||||
download-limit-enabled= 0;
|
||||
download-queue-enabled= true;
|
||||
download-queue-size= 5;
|
||||
encryption= 2;
|
||||
idle-seeding-limit= 30;
|
||||
idle-seeding-limit-enabled= false;
|
||||
incomplete-dir= "/var/lib/transmission-daemon/Downloads";
|
||||
incomplete-dir-enabled= false;
|
||||
lpd-enabled= false;
|
||||
max-peers-global= 200;
|
||||
message-level= 1;
|
||||
peer-congestion-algorithm= "";
|
||||
peer-id-ttl-hours= 6;
|
||||
peer-limit-global= 100;
|
||||
peer-limit-per-torrent= 40;
|
||||
peer-port= 22371;
|
||||
peer-port-random-high= 65535;
|
||||
peer-port-random-low= 49152;
|
||||
peer-port-random-on-start= false;
|
||||
peer-socket-tos= "default";
|
||||
pex-enabled= false;
|
||||
port-forwarding-enabled= false;
|
||||
preallocation= 1;
|
||||
prefetch-enabled= true;
|
||||
queue-stalled-enabled= true;
|
||||
queue-stalled-minutes= 30;
|
||||
ratio-limit= 2;
|
||||
ratio-limit-enabled= false;
|
||||
rename-partial-files= true;
|
||||
rpc-authentication-required= true;
|
||||
rpc-bind-address= "0.0.0.0";
|
||||
rpc-enabled= true;
|
||||
rpc-host-whitelist= "";
|
||||
rpc-host-whitelist-enabled= true;
|
||||
rpc-port= 9091;
|
||||
rpc-url= "/transmission/";
|
||||
rpc-whitelist= "127.0.0.1,192.168.3.2";
|
||||
rpc-whitelist-enabled= true;
|
||||
scrape-paused-torrents-enabled= true;
|
||||
script-torrent-done-enabled= false;
|
||||
seed-queue-enabled= false;
|
||||
seed-queue-size= 10;
|
||||
speed-limit-down= 6000;
|
||||
speed-limit-down-enabled= true;
|
||||
speed-limit-up= 500;
|
||||
speed-limit-up-enabled= true;
|
||||
start-added-torrents= true;
|
||||
trash-original-torrent-files= false;
|
||||
umask= 2;
|
||||
upload-limit= 100;
|
||||
upload-limit-enabled= 0;
|
||||
upload-slots-per-torrent= 14;
|
||||
utp-enabled= false;
|
||||
alt-speed-down = 8000;
|
||||
alt-speed-enabled = false;
|
||||
alt-speed-time-begin = 0;
|
||||
alt-speed-time-day = 127;
|
||||
alt-speed-time-enabled = true;
|
||||
alt-speed-time-end = 360;
|
||||
alt-speed-up = 2000;
|
||||
bind-address-ipv4 = "0.0.0.0";
|
||||
bind-address-ipv6 = "::";
|
||||
blocklist-enabled = false;
|
||||
blocklist-url = "http://www.example.com/blocklist";
|
||||
cache-size-mb = 256;
|
||||
dht-enabled = false;
|
||||
download-dir = "/test";
|
||||
download-limit = 100;
|
||||
download-limit-enabled = 0;
|
||||
download-queue-enabled = true;
|
||||
download-queue-size = 5;
|
||||
encryption = 2;
|
||||
idle-seeding-limit = 30;
|
||||
idle-seeding-limit-enabled = false;
|
||||
incomplete-dir = "/var/lib/transmission-daemon/Downloads";
|
||||
incomplete-dir-enabled = false;
|
||||
lpd-enabled = false;
|
||||
max-peers-global = 200;
|
||||
message-level = 1;
|
||||
peer-congestion-algorithm = "";
|
||||
peer-id-ttl-hours = 6;
|
||||
peer-limit-global = 100;
|
||||
peer-limit-per-torrent = 40;
|
||||
peer-port = 22371;
|
||||
peer-port-random-high = 65535;
|
||||
peer-port-random-low = 49152;
|
||||
peer-port-random-on-start = false;
|
||||
peer-socket-tos = "default";
|
||||
pex-enabled = false;
|
||||
port-forwarding-enabled = false;
|
||||
preallocation = 1;
|
||||
prefetch-enabled = true;
|
||||
queue-stalled-enabled = true;
|
||||
queue-stalled-minutes = 30;
|
||||
ratio-limit = 2;
|
||||
ratio-limit-enabled = false;
|
||||
rename-partial-files = true;
|
||||
rpc-authentication-required = true;
|
||||
rpc-bind-address = "0.0.0.0";
|
||||
rpc-enabled = true;
|
||||
rpc-host-whitelist = "";
|
||||
rpc-host-whitelist-enabled = true;
|
||||
rpc-port = 9091;
|
||||
rpc-url = "/transmission/";
|
||||
rpc-whitelist = "127.0.0.1,192.168.3.2";
|
||||
rpc-whitelist-enabled = true;
|
||||
scrape-paused-torrents-enabled = true;
|
||||
script-torrent-done-enabled = false;
|
||||
seed-queue-enabled = false;
|
||||
seed-queue-size = 10;
|
||||
speed-limit-down = 6000;
|
||||
speed-limit-down-enabled = true;
|
||||
speed-limit-up = 500;
|
||||
speed-limit-up-enabled = true;
|
||||
start-added-torrents = true;
|
||||
trash-original-torrent-files = false;
|
||||
umask = 2;
|
||||
upload-limit = 100;
|
||||
upload-limit-enabled = 0;
|
||||
upload-slots-per-torrent = 14;
|
||||
utp-enabled = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -508,9 +512,6 @@ in {
|
|||
# MAUTRIX_TELEGRAM_TELEGRAM_API_HASH=${config.sops.placeholder.mautrixtelegram_api_hash}
|
||||
# '';
|
||||
|
||||
|
||||
|
||||
|
||||
# ----------------
|
||||
# sops.secrets.mautrixwhatsapp_shared = {owner="matrix-synapse";};
|
||||
# sops.templates.mautrixwhatsapp.owner = "matrix-synapse";
|
||||
|
|
@ -557,14 +558,15 @@ in {
|
|||
config.sops.templates.matrixshared.path
|
||||
];
|
||||
settings.listeners = [
|
||||
{ port = 8008;
|
||||
bind_addresses = [ "0.0.0.0" ];
|
||||
{
|
||||
port = 8008;
|
||||
bind_addresses = ["0.0.0.0"];
|
||||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
resources = [
|
||||
{
|
||||
names = [ "client" "federation" ];
|
||||
names = ["client" "federation"];
|
||||
compress = true;
|
||||
}
|
||||
];
|
||||
|
|
@ -581,7 +583,7 @@ in {
|
|||
domain = matrixDomain;
|
||||
};
|
||||
appservice = {
|
||||
address= "http://localhost:29317";
|
||||
address = "http://localhost:29317";
|
||||
hostname = "0.0.0.0";
|
||||
port = "29317";
|
||||
provisioning.enabled = true;
|
||||
|
|
@ -630,7 +632,7 @@ in {
|
|||
domain = matrixDomain;
|
||||
};
|
||||
appservice = {
|
||||
address= "http://localhost:29318";
|
||||
address = "http://localhost:29318";
|
||||
hostname = "0.0.0.0";
|
||||
port = 29318;
|
||||
database = {
|
||||
|
|
@ -676,8 +678,7 @@ in {
|
|||
domain = matrixDomain;
|
||||
};
|
||||
appservice = {
|
||||
|
||||
address= "http://localhost:29328";
|
||||
address = "http://localhost:29328";
|
||||
hostname = "0.0.0.0";
|
||||
port = 29328;
|
||||
database = {
|
||||
|
|
@ -740,7 +741,6 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
|
||||
spotifyd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
@ -789,7 +789,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
avahi = {
|
||||
publish.enable = true;
|
||||
publish.userServices = true;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
{
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
];
|
||||
|
|
@ -19,15 +21,15 @@
|
|||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
proxmoxLXC = {
|
||||
manageNetwork = true; # manage network myself
|
||||
manageHostName = false; # manage hostname myself
|
||||
};
|
||||
manageNetwork = true; # manage network myself
|
||||
manageHostName = false; # manage hostname myself
|
||||
};
|
||||
networking = {
|
||||
hostName = "TEMPLATE"; # Define your hostname.
|
||||
useDHCP = true;
|
||||
enableIPv6 = false;
|
||||
firewall.enable = false;
|
||||
};
|
||||
hostName = "TEMPLATE"; # Define your hostname.
|
||||
useDHCP = true;
|
||||
enableIPv6 = false;
|
||||
firewall.enable = false;
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
|
|
@ -38,4 +40,4 @@ firewall.enable = false;
|
|||
# users.users.root.password = "TEMPLATE";
|
||||
|
||||
system.stateVersion = "23.05"; # TEMPLATE - but probably no need to change
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
# 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.
|
||||
{ lib, ... }:
|
||||
{lib, ...}: {
|
||||
imports = [];
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "vfio_pci" "usbhid"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "vfio_pci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/pve-vm--120--disk--0";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/pve-vm--120--disk--0";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{ config, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
|
|
@ -30,21 +33,21 @@
|
|||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
defaultSopsFile = "/.dotfiles/secrets/calibre/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets.kavita = { owner = "kavita";};
|
||||
};
|
||||
age.sshKeyPaths = ["/etc/ssh/sops"];
|
||||
defaultSopsFile = "/.dotfiles/secrets/calibre/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets.kavita = {owner = "kavita";};
|
||||
};
|
||||
proxmoxLXC = {
|
||||
manageNetwork = true; # manage network myself
|
||||
manageHostName = false; # manage hostname myself
|
||||
};
|
||||
manageNetwork = true; # manage network myself
|
||||
manageHostName = false; # manage hostname myself
|
||||
};
|
||||
networking = {
|
||||
hostName = "calibre"; # Define your hostname.
|
||||
useDHCP = true;
|
||||
enableIPv6 = false;
|
||||
firewall.enable = false;
|
||||
};
|
||||
hostName = "calibre"; # Define your hostname.
|
||||
useDHCP = true;
|
||||
enableIPv6 = false;
|
||||
firewall.enable = false;
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
|
|
@ -65,6 +68,4 @@ firewall.enable = false;
|
|||
port = 8080;
|
||||
tokenKeyFile = config.sops.secrets.kavita.path;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,25 @@
|
|||
# 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.
|
||||
{ lib, ... }:
|
||||
{lib, ...}: {
|
||||
imports = [];
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "vfio_pci" "usbhid"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "vfio_pci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/pve-vm--121--disk--0";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/pve-vm--121--disk--0";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/media/Videos" =
|
||||
{ device = "//192.168.1.3/Eternor";
|
||||
fileSystems."/media/Videos" = {
|
||||
device = "//192.168.1.3/Eternor";
|
||||
fsType = "cifs";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{ config, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
|
|
@ -21,7 +24,7 @@
|
|||
};
|
||||
|
||||
users.users.jellyfin = {
|
||||
extraGroups = [ "video" "render" ];
|
||||
extraGroups = ["video" "render"];
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
|
|
@ -56,7 +59,7 @@
|
|||
};
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
|
||||
};
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
|
|
@ -73,5 +76,4 @@
|
|||
user = "jellyfin";
|
||||
# openFirewall = true; # this works only for the default ports
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
# 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.
|
||||
{ lib, ... }:
|
||||
{lib, ...}: {
|
||||
imports = [];
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "vfio_pci" "usbhid"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "vfio_pci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/pve-vm--102--disk--0";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/pve-vm--102--disk--0";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
{ config, pkgs, modulesPath, sops, ... }: let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
sops,
|
||||
...
|
||||
}: let
|
||||
matrixDomain = "matrix2.swarsel.win";
|
||||
in {
|
||||
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
layout = "us";
|
||||
|
|
@ -11,10 +15,12 @@ in {
|
|||
openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
listenAddresses = [{
|
||||
listenAddresses = [
|
||||
{
|
||||
port = 22;
|
||||
addr = "0.0.0.0";
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -40,7 +46,6 @@ in {
|
|||
nswitch = "cd /.dotfiles; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;";
|
||||
};
|
||||
|
||||
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
|
|
@ -62,15 +67,15 @@ in {
|
|||
];
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
age.sshKeyPaths = ["/etc/ssh/sops"];
|
||||
defaultSopsFile = "/.dotfiles/secrets/matrix/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets = {
|
||||
matrixsharedsecret = {owner="matrix-synapse";};
|
||||
mautrixtelegram_as = {owner="matrix-synapse";};
|
||||
mautrixtelegram_hs = {owner="matrix-synapse";};
|
||||
mautrixtelegram_api_id = {owner="matrix-synapse";};
|
||||
mautrixtelegram_api_hash = {owner="matrix-synapse";};
|
||||
matrixsharedsecret = {owner = "matrix-synapse";};
|
||||
mautrixtelegram_as = {owner = "matrix-synapse";};
|
||||
mautrixtelegram_hs = {owner = "matrix-synapse";};
|
||||
mautrixtelegram_api_id = {owner = "matrix-synapse";};
|
||||
mautrixtelegram_api_hash = {owner = "matrix-synapse";};
|
||||
};
|
||||
templates = {
|
||||
"matrix_user_register.sh".content = ''
|
||||
|
|
@ -132,14 +137,15 @@ in {
|
|||
server_name = matrixDomain;
|
||||
public_baseurl = "https://${matrixDomain}";
|
||||
listeners = [
|
||||
{ port = 8008;
|
||||
bind_addresses = [ "0.0.0.0" ];
|
||||
{
|
||||
port = 8008;
|
||||
bind_addresses = ["0.0.0.0"];
|
||||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
resources = [
|
||||
{
|
||||
names = [ "client" "federation" ];
|
||||
names = ["client" "federation"];
|
||||
compress = true;
|
||||
}
|
||||
];
|
||||
|
|
@ -160,7 +166,7 @@ in {
|
|||
domain = matrixDomain;
|
||||
};
|
||||
appservice = {
|
||||
address= "http://localhost:29317";
|
||||
address = "http://localhost:29317";
|
||||
hostname = "0.0.0.0";
|
||||
port = "29317";
|
||||
provisioning.enabled = true;
|
||||
|
|
@ -209,7 +215,7 @@ in {
|
|||
domain = matrixDomain;
|
||||
};
|
||||
appservice = {
|
||||
address= "http://localhost:29318";
|
||||
address = "http://localhost:29318";
|
||||
hostname = "0.0.0.0";
|
||||
port = 29318;
|
||||
database = {
|
||||
|
|
@ -255,8 +261,7 @@ in {
|
|||
domain = matrixDomain;
|
||||
};
|
||||
appservice = {
|
||||
|
||||
address= "http://localhost:29328";
|
||||
address = "http://localhost:29328";
|
||||
hostname = "0.0.0.0";
|
||||
port = 29328;
|
||||
database = {
|
||||
|
|
@ -282,7 +287,7 @@ in {
|
|||
# messages out after a while.
|
||||
|
||||
systemd.timers."restart-bridges" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnBootSec = "1d";
|
||||
OnUnitActiveSec = "1d";
|
||||
|
|
@ -301,5 +306,4 @@ in {
|
|||
User = "root";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
# 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.
|
||||
{ lib, ... }:
|
||||
{lib, ...}: {
|
||||
imports = [];
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "vfio_pci" "usbhid"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "vfio_pci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/pve-vm--119--disk--0";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/pve-vm--119--disk--0";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
{ config, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
|
|
@ -21,10 +25,10 @@
|
|||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
age.sshKeyPaths = ["/etc/ssh/sops"];
|
||||
defaultSopsFile = "/.dotfiles/secrets/nginx/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets.dnstokenfull = {owner="acme";};
|
||||
secrets.dnstokenfull = {owner = "acme";};
|
||||
templates."certs.secret".content = ''
|
||||
CF_DNS_API_TOKEN=${config.sops.placeholder.dnstokenfull}
|
||||
'';
|
||||
|
|
@ -69,7 +73,6 @@
|
|||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
virtualHosts = {
|
||||
|
||||
"stash.swarsel.win" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
@ -107,7 +110,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
"sound.swarsel.win" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
@ -197,8 +199,6 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
# 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.
|
||||
{ lib, ... }:
|
||||
{lib, ...}: {
|
||||
imports = [];
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "vfio_pci" "usbhid"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "vfio_pci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/pve-vm--117--disk--0";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/pve-vm--117--disk--0";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
{ config, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
layout = "us";
|
||||
|
|
@ -17,10 +17,12 @@
|
|||
openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
listenAddresses = [{
|
||||
listenAddresses = [
|
||||
{
|
||||
port = 22;
|
||||
addr = "0.0.0.0";
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -46,8 +48,6 @@
|
|||
nswitch = "cd /.dotfiles; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;";
|
||||
};
|
||||
|
||||
|
||||
|
||||
users.groups.lxc_shares = {
|
||||
gid = 10000;
|
||||
members = [
|
||||
|
|
@ -68,10 +68,10 @@
|
|||
};
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
age.sshKeyPaths = ["/etc/ssh/sops"];
|
||||
defaultSopsFile = "/root/.dotfiles/secrets/paperless/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets.admin = { owner = "paperless";};
|
||||
secrets.admin = {owner = "paperless";};
|
||||
};
|
||||
|
||||
services.paperless = {
|
||||
|
|
@ -90,5 +90,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,26 @@
|
|||
# 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.
|
||||
{ lib, ... }:
|
||||
{lib, ...}: {
|
||||
imports = [];
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "vfio_pci" "usbhid"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "vfio_pci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/mnt/data/images/118/vm-118-disk-0.raw";
|
||||
fileSystems."/" = {
|
||||
device = "/mnt/data/images/118/vm-118-disk-0.raw";
|
||||
fsType = "ext4";
|
||||
options = [ "loop" ];
|
||||
options = ["loop"];
|
||||
};
|
||||
|
||||
fileSystems."/media" =
|
||||
{ device = "//192.168.1.3/Eternor";
|
||||
fileSystems."/media" = {
|
||||
device = "//192.168.1.3/Eternor";
|
||||
fsType = "cifs";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
{ config, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
layout = "us";
|
||||
|
|
@ -17,10 +17,12 @@
|
|||
openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
listenAddresses = [{
|
||||
listenAddresses = [
|
||||
{
|
||||
port = 22;
|
||||
addr = "0.0.0.0";
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -46,8 +48,6 @@
|
|||
nswitch = "cd /.dotfiles; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;";
|
||||
};
|
||||
|
||||
|
||||
|
||||
proxmoxLXC.privileged = true; # manage hostname myself
|
||||
|
||||
users = {
|
||||
|
|
@ -73,13 +73,13 @@
|
|||
isSystemUser = true;
|
||||
uid = 61593;
|
||||
group = "navidrome";
|
||||
extraGroups = [ "audio" "utmp" ];
|
||||
extraGroups = ["audio" "utmp"];
|
||||
};
|
||||
|
||||
mpd = {
|
||||
isSystemUser = true;
|
||||
group = "mpd";
|
||||
extraGroups = [ "audio" "utmp" ];
|
||||
extraGroups = ["audio" "utmp"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -103,10 +103,10 @@
|
|||
];
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
age.sshKeyPaths = ["/etc/ssh/sops"];
|
||||
defaultSopsFile = "/.dotfiles/secrets/sound/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets.mpdpass = { owner = "mpd";};
|
||||
secrets.mpdpass = {owner = "mpd";};
|
||||
};
|
||||
|
||||
services.navidrome = {
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
# 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.
|
||||
{ lib, ... }:
|
||||
{lib, ...}: {
|
||||
imports = [];
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "vfio_pci" "usbhid"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "vfio_pci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/pve-vm--123--disk--0";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/pve-vm--123--disk--0";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
{ pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
layout = "us";
|
||||
|
|
@ -17,10 +16,12 @@
|
|||
openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
listenAddresses = [{
|
||||
listenAddresses = [
|
||||
{
|
||||
port = 22;
|
||||
addr = "0.0.0.0";
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -46,8 +47,6 @@
|
|||
nswitch = "cd /.dotfiles; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;";
|
||||
};
|
||||
|
||||
|
||||
|
||||
proxmoxLXC.privileged = true; # manage hostname myself
|
||||
|
||||
users.groups.spotifyd = {
|
||||
|
|
@ -58,7 +57,7 @@
|
|||
isSystemUser = true;
|
||||
uid = 65136;
|
||||
group = "spotifyd";
|
||||
extraGroups = [ "audio" "utmp" ];
|
||||
extraGroups = ["audio" "utmp"];
|
||||
};
|
||||
|
||||
sound = {
|
||||
|
|
@ -89,5 +88,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
# 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.
|
||||
{ lib, ... }:
|
||||
{lib, ...}: {
|
||||
imports = [];
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "vfio_pci" "usbhid"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "vfio_pci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/pve-vm--122--disk--0";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/pve-vm--122--disk--0";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{ config, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
|
|
@ -45,12 +48,12 @@
|
|||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
age.sshKeyPaths = ["/etc/ssh/sops"];
|
||||
defaultSopsFile = "/.dotfiles/secrets/transmission/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
};
|
||||
|
||||
boot.kernelModules = [ "tun" ];
|
||||
boot.kernelModules = ["tun"];
|
||||
proxmoxLXC = {
|
||||
manageNetwork = true; # manage network myself
|
||||
manageHostName = false; # manage hostname myself
|
||||
|
|
@ -87,34 +90,36 @@
|
|||
'';
|
||||
};
|
||||
environment.etc = {
|
||||
"openvpn/iptables.sh" =
|
||||
{ source = ../../../scripts/server1/iptables.sh;
|
||||
"openvpn/iptables.sh" = {
|
||||
source = ../../../scripts/server1/iptables.sh;
|
||||
mode = "0755";
|
||||
};
|
||||
"openvpn/update-resolv-conf" =
|
||||
{ source = ../../../scripts/server1/update-resolv-conf;
|
||||
"openvpn/update-resolv-conf" = {
|
||||
source = ../../../scripts/server1/update-resolv-conf;
|
||||
mode = "0755";
|
||||
};
|
||||
"openvpn/routing.sh" =
|
||||
{ source = ../../../scripts/server1/routing.sh;
|
||||
"openvpn/routing.sh" = {
|
||||
source = ../../../scripts/server1/routing.sh;
|
||||
mode = "0755";
|
||||
};
|
||||
"openvpn/ca.rsa.2048.crt" =
|
||||
{ source = ../../../secrets/certs/ca.rsa.2048.crt;
|
||||
"openvpn/ca.rsa.2048.crt" = {
|
||||
source = ../../../secrets/certs/ca.rsa.2048.crt;
|
||||
mode = "0644";
|
||||
};
|
||||
"openvpn/crl.rsa.2048.pem" =
|
||||
{ source = ../../../secrets/certs/crl.rsa.2048.pem;
|
||||
"openvpn/crl.rsa.2048.pem" = {
|
||||
source = ../../../secrets/certs/crl.rsa.2048.pem;
|
||||
mode = "0644";
|
||||
};
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
listenAddresses = [{
|
||||
listenAddresses = [
|
||||
{
|
||||
port = 22;
|
||||
addr = "0.0.0.0";
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
../../../secrets/keys/authorized_keys
|
||||
|
|
@ -173,9 +178,9 @@
|
|||
};
|
||||
secrets = {
|
||||
vpnuser = {};
|
||||
rpcuser = {owner="vpn";};
|
||||
rpcuser = {owner = "vpn";};
|
||||
vpnpass = {};
|
||||
rpcpass = {owner="vpn";};
|
||||
rpcpass = {owner = "vpn";};
|
||||
vpnprot = {};
|
||||
vpnloc = {};
|
||||
};
|
||||
|
|
@ -194,77 +199,74 @@
|
|||
user = "vpn";
|
||||
group = "lxc_shares";
|
||||
settings = {
|
||||
|
||||
alt-speed-down= 8000;
|
||||
alt-speed-enabled= false;
|
||||
alt-speed-time-begin= 0;
|
||||
alt-speed-time-day= 127;
|
||||
alt-speed-time-enabled= true;
|
||||
alt-speed-time-end= 360;
|
||||
alt-speed-up= 2000;
|
||||
bind-address-ipv4= "0.0.0.0";
|
||||
bind-address-ipv6= "::";
|
||||
blocklist-enabled= false;
|
||||
blocklist-url= "http://www.example.com/blocklist";
|
||||
cache-size-mb= 4;
|
||||
dht-enabled= false;
|
||||
download-dir= "/media/Eternor/New";
|
||||
download-limit= 100;
|
||||
download-limit-enabled= 0;
|
||||
download-queue-enabled= true;
|
||||
download-queue-size= 5;
|
||||
encryption= 2;
|
||||
idle-seeding-limit= 30;
|
||||
idle-seeding-limit-enabled= false;
|
||||
incomplete-dir= "/var/lib/transmission-daemon/Downloads";
|
||||
incomplete-dir-enabled= false;
|
||||
lpd-enabled= false;
|
||||
max-peers-global= 200;
|
||||
message-level= 1;
|
||||
peer-congestion-algorithm= "";
|
||||
peer-id-ttl-hours= 6;
|
||||
peer-limit-global= 100;
|
||||
peer-limit-per-torrent= 40;
|
||||
peer-port= 22371;
|
||||
peer-port-random-high= 65535;
|
||||
peer-port-random-low= 49152;
|
||||
peer-port-random-on-start= false;
|
||||
peer-socket-tos= "default";
|
||||
pex-enabled= false;
|
||||
port-forwarding-enabled= false;
|
||||
preallocation= 1;
|
||||
prefetch-enabled= true;
|
||||
queue-stalled-enabled= true;
|
||||
queue-stalled-minutes= 30;
|
||||
ratio-limit= 2;
|
||||
ratio-limit-enabled= false;
|
||||
rename-partial-files= true;
|
||||
rpc-authentication-required= true;
|
||||
rpc-bind-address= "0.0.0.0";
|
||||
rpc-enabled= true;
|
||||
rpc-host-whitelist= "";
|
||||
rpc-host-whitelist-enabled= true;
|
||||
rpc-port= 9091;
|
||||
rpc-url= "/transmission/";
|
||||
rpc-whitelist= "127.0.0.1,192.168.3.2";
|
||||
rpc-whitelist-enabled= true;
|
||||
scrape-paused-torrents-enabled= true;
|
||||
script-torrent-done-enabled= false;
|
||||
seed-queue-enabled= false;
|
||||
seed-queue-size= 10;
|
||||
speed-limit-down= 6000;
|
||||
speed-limit-down-enabled= true;
|
||||
speed-limit-up= 500;
|
||||
speed-limit-up-enabled= true;
|
||||
start-added-torrents= true;
|
||||
trash-original-torrent-files= false;
|
||||
umask= 2;
|
||||
upload-limit= 100;
|
||||
upload-limit-enabled= 0;
|
||||
upload-slots-per-torrent= 14;
|
||||
utp-enabled= false;
|
||||
alt-speed-down = 8000;
|
||||
alt-speed-enabled = false;
|
||||
alt-speed-time-begin = 0;
|
||||
alt-speed-time-day = 127;
|
||||
alt-speed-time-enabled = true;
|
||||
alt-speed-time-end = 360;
|
||||
alt-speed-up = 2000;
|
||||
bind-address-ipv4 = "0.0.0.0";
|
||||
bind-address-ipv6 = "::";
|
||||
blocklist-enabled = false;
|
||||
blocklist-url = "http://www.example.com/blocklist";
|
||||
cache-size-mb = 4;
|
||||
dht-enabled = false;
|
||||
download-dir = "/media/Eternor/New";
|
||||
download-limit = 100;
|
||||
download-limit-enabled = 0;
|
||||
download-queue-enabled = true;
|
||||
download-queue-size = 5;
|
||||
encryption = 2;
|
||||
idle-seeding-limit = 30;
|
||||
idle-seeding-limit-enabled = false;
|
||||
incomplete-dir = "/var/lib/transmission-daemon/Downloads";
|
||||
incomplete-dir-enabled = false;
|
||||
lpd-enabled = false;
|
||||
max-peers-global = 200;
|
||||
message-level = 1;
|
||||
peer-congestion-algorithm = "";
|
||||
peer-id-ttl-hours = 6;
|
||||
peer-limit-global = 100;
|
||||
peer-limit-per-torrent = 40;
|
||||
peer-port = 22371;
|
||||
peer-port-random-high = 65535;
|
||||
peer-port-random-low = 49152;
|
||||
peer-port-random-on-start = false;
|
||||
peer-socket-tos = "default";
|
||||
pex-enabled = false;
|
||||
port-forwarding-enabled = false;
|
||||
preallocation = 1;
|
||||
prefetch-enabled = true;
|
||||
queue-stalled-enabled = true;
|
||||
queue-stalled-minutes = 30;
|
||||
ratio-limit = 2;
|
||||
ratio-limit-enabled = false;
|
||||
rename-partial-files = true;
|
||||
rpc-authentication-required = true;
|
||||
rpc-bind-address = "0.0.0.0";
|
||||
rpc-enabled = true;
|
||||
rpc-host-whitelist = "";
|
||||
rpc-host-whitelist-enabled = true;
|
||||
rpc-port = 9091;
|
||||
rpc-url = "/transmission/";
|
||||
rpc-whitelist = "127.0.0.1,192.168.3.2";
|
||||
rpc-whitelist-enabled = true;
|
||||
scrape-paused-torrents-enabled = true;
|
||||
script-torrent-done-enabled = false;
|
||||
seed-queue-enabled = false;
|
||||
seed-queue-size = 10;
|
||||
speed-limit-down = 6000;
|
||||
speed-limit-down-enabled = true;
|
||||
speed-limit-up = 500;
|
||||
speed-limit-up-enabled = true;
|
||||
start-added-torrents = true;
|
||||
trash-original-torrent-files = false;
|
||||
umask = 2;
|
||||
upload-limit = 100;
|
||||
upload-limit-enabled = 0;
|
||||
upload-slots-per-torrent = 14;
|
||||
utp-enabled = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,33 @@
|
|||
# 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, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/4a590cad-28d9-4153-bdb8-e424ec3bd5c8";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/4a590cad-28d9-4153-bdb8-e424ec3bd5c8";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/C67D-61AD";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/C67D-61AD";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/b07aac27-a443-489c-9fdb-01c1ef633699"; }
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/b07aac27-a443-489c-9fdb-01c1ef633699";}
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
'';
|
||||
};
|
||||
|
||||
|
||||
home = {
|
||||
username = "swarsel";
|
||||
homeDirectory = "/home/swarsel";
|
||||
|
|
@ -26,14 +25,15 @@
|
|||
];
|
||||
};
|
||||
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||
sops.age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/sops"];
|
||||
|
||||
programs.waybar.settings.mainBar = {
|
||||
cpu.format = "{icon0} {icon1} {icon2} {icon3}";
|
||||
temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input";
|
||||
};
|
||||
|
||||
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark"
|
||||
programs.waybar.settings.mainBar.modules-right = [
|
||||
"custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
|
|
@ -50,8 +50,7 @@
|
|||
"clock#1"
|
||||
];
|
||||
|
||||
|
||||
wayland.windowManager.sway= {
|
||||
wayland.windowManager.sway = {
|
||||
config = rec {
|
||||
input = {
|
||||
"*" = {
|
||||
|
|
@ -79,7 +78,7 @@
|
|||
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||
in {
|
||||
"${modifier}+F2" = "exec brightnessctl set +5%";
|
||||
"${modifier}+F1"= "exec brightnessctl set 5%-";
|
||||
"${modifier}+F1" = "exec brightnessctl set 5%-";
|
||||
"${modifier}+n" = "exec sway output eDP-1 transform normal, splith";
|
||||
"${modifier}+Ctrl+p" = "exec wl-mirror eDP-1";
|
||||
"${modifier}+t" = "exec sway output eDP-1 transform 90, splitv";
|
||||
|
|
@ -89,14 +88,12 @@
|
|||
};
|
||||
|
||||
startup = [
|
||||
|
||||
{ command = "nextcloud --background";}
|
||||
{ command = "discord --start-minimized";}
|
||||
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{ command = "ANKI_WAYLAND=1 anki";}
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{ command = "nm-applet";}
|
||||
|
||||
{command = "nextcloud --background";}
|
||||
{command = "discord --start-minimized";}
|
||||
{command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{command = "ANKI_WAYLAND=1 anki";}
|
||||
{command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{command = "nm-applet";}
|
||||
];
|
||||
|
||||
keycodebindings = {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports =
|
||||
[
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
greetd.settings.initial_session.user="swarsel";
|
||||
greetd.settings.initial_session.user = "swarsel";
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
|
@ -71,7 +70,7 @@
|
|||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerdfonts.override { fonts = [ "FiraCode"]; };
|
||||
package = pkgs.nerdfonts.override {fonts = ["FiraCode"];};
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
|
||||
|
|
@ -82,13 +81,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
users.users.swarsel = {
|
||||
isNormalUser = true;
|
||||
description = "Leon S";
|
||||
extraGroups = [ "networkmanager" "wheel" "lp" "audio" "video" ];
|
||||
extraGroups = ["networkmanager" "wheel" "lp" "audio" "video"];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
|
|
@ -96,5 +92,4 @@
|
|||
];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||
sops.age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/sops"];
|
||||
|
||||
# waybar config - TEMPLATE - update for cores and temp
|
||||
programs.waybar.settings.mainBar = {
|
||||
|
|
@ -34,8 +34,8 @@
|
|||
temperature.input-filename = "temp1_input";
|
||||
};
|
||||
|
||||
|
||||
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark"
|
||||
programs.waybar.settings.mainBar.modules-right = [
|
||||
"custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
|
|
@ -52,8 +52,7 @@
|
|||
"clock#1"
|
||||
];
|
||||
|
||||
|
||||
wayland.windowManager.sway= {
|
||||
wayland.windowManager.sway = {
|
||||
config = rec {
|
||||
# update for actual inputs here,
|
||||
input = {
|
||||
|
|
@ -61,7 +60,8 @@
|
|||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"1:1:AT_Translated_Set_2_keyboard" = { # TEMPLATE
|
||||
"1:1:AT_Translated_Set_2_keyboard" = {
|
||||
# TEMPLATE
|
||||
xkb_layout = "us";
|
||||
xkb_options = "grp:win_space_toggle";
|
||||
xkb_variant = "altgr-intl";
|
||||
|
|
@ -72,7 +72,6 @@
|
|||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
output = {
|
||||
|
|
@ -92,11 +91,16 @@
|
|||
};
|
||||
|
||||
workspaceOutputAssign = [
|
||||
{ output = "eDP-1"; workspace = "1:一";}
|
||||
{ output = "HDMI-A-1"; workspace = "2:二";}
|
||||
{
|
||||
output = "eDP-1";
|
||||
workspace = "1:一";
|
||||
}
|
||||
{
|
||||
output = "HDMI-A-1";
|
||||
workspace = "2:二";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
# keybindings = let
|
||||
# inherit (config.wayland.windowManager.sway.config) modifier;
|
||||
# in {
|
||||
|
|
@ -104,14 +108,12 @@
|
|||
# };
|
||||
|
||||
startup = [
|
||||
|
||||
{ command = "nextcloud --background";}
|
||||
{ command = "discord --start-minimized";}
|
||||
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{ command = "ANKI_WAYLAND=1 anki";}
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{ command = "nm-applet";}
|
||||
|
||||
{command = "nextcloud --background";}
|
||||
{command = "discord --start-minimized";}
|
||||
{command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{command = "ANKI_WAYLAND=1 anki";}
|
||||
{command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{command = "nm-applet";}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,21 +1,17 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
{pkgs, ...}: {
|
||||
#
|
||||
# imports =
|
||||
# [
|
||||
# ./hardware-configuration.nix
|
||||
# ];
|
||||
#
|
||||
imports =
|
||||
[
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
greetd.settings.initial_session.user="swarsel";
|
||||
greetd.settings.initial_session.user = "swarsel";
|
||||
};
|
||||
|
||||
boot = {
|
||||
|
|
@ -31,8 +27,8 @@
|
|||
firewall.checkReversePath = "strict";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [ ];
|
||||
allowedTCPPorts = [ ];
|
||||
allowedUDPPorts = [];
|
||||
allowedTCPPorts = [];
|
||||
allowedTCPPortRanges = [
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
|
|
@ -88,7 +84,7 @@
|
|||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerdfonts.override { fonts = [ "FiraCode"]; };
|
||||
package = pkgs.nerdfonts.override {fonts = ["FiraCode"];};
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
|
||||
|
|
@ -99,9 +95,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
|
|
@ -124,7 +117,7 @@
|
|||
users.users.swarsel = {
|
||||
isNormalUser = true;
|
||||
description = "Leon S";
|
||||
extraGroups = [ "networkmanager" "wheel" "lp" "audio" "video" "vboxusers" "scanner" ];
|
||||
extraGroups = ["networkmanager" "wheel" "lp" "audio" "video" "vboxusers" "scanner"];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
|
|
@ -140,6 +133,4 @@
|
|||
];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,28 +171,23 @@ create a new one."
|
|||
visual-fill-column-center-text t)
|
||||
(visual-fill-column-mode 1))
|
||||
|
||||
(defun swarsel/org-babel-tangle-config ()
|
||||
(defun run-alejandra ()
|
||||
(interactive)
|
||||
(let ((default-directory (expand-file-name "~/.dotfiles")))
|
||||
(shell-command "alejandra . -q")))
|
||||
|
||||
(defun swarsel/org-babel-tangle-config ()
|
||||
(when (string-equal (buffer-file-name)
|
||||
swarsel-swarsel-org-filepath)
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-html-export-to-html)
|
||||
(org-babel-tangle)))
|
||||
(when (string-equal (buffer-file-name)
|
||||
swarsel-emacs-org-filepath)
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-html-export-to-html)
|
||||
(org-babel-tangle)))
|
||||
(when (string-equal (buffer-file-name)
|
||||
swarsel-nix-org-filepath)
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-babel-tangle))))
|
||||
(org-babel-tangle)
|
||||
(run-alejandra))))
|
||||
|
||||
(setq org-html-htmlize-output-type nil)
|
||||
(setq org-html-htmlize-output-type nil)
|
||||
|
||||
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'swarsel/org-babel-tangle-config)))
|
||||
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'swarsel/org-babel-tangle-config)))
|
||||
|
||||
(defun org-fold-outer ()
|
||||
(interactive)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
llvm = pkgs.llvmPackages_latest;
|
||||
in {
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
||||
packages = with pkgs; [
|
||||
gcc
|
||||
#builder
|
||||
|
|
@ -32,7 +31,6 @@
|
|||
PATH_add ~/.dotfiles/scripts/devShell
|
||||
'';
|
||||
# ...
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,12 @@
|
|||
|
||||
outputs = {nixpkgs, ...}: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; };
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in {
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
||||
packages = with pkgs; [
|
||||
# gcc
|
||||
#builder
|
||||
|
|
@ -39,7 +41,6 @@
|
|||
];
|
||||
hardeningDisable = ["all"];
|
||||
# ...
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
||||
packages = with pkgs; [
|
||||
# fill here
|
||||
];
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
||||
packages = [
|
||||
(pkgs.python3.withPackages (python-pkgs: [
|
||||
python-pkgs.numpy
|
||||
|
|
|
|||
|
|
@ -5,7 +5,11 @@
|
|||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, rust-overlay, ...}: let
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
...
|
||||
}: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
|
@ -14,7 +18,6 @@
|
|||
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./toolchain.toml;
|
||||
in {
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
||||
packages = with pkgs; [
|
||||
cargo
|
||||
clippy
|
||||
|
|
@ -30,7 +33,6 @@
|
|||
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
|
||||
|
||||
# ...
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue