Compare commits
11 Commits
f7823d9ad3
...
99b30e124a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99b30e124a | ||
|
|
b891969c7e | ||
|
|
1cb2a609a8 | ||
|
|
4ff075bce4 | ||
|
|
a496d0451b | ||
|
|
c606f39f8f | ||
|
|
b779b84242 | ||
|
|
8c0ecd90e8 | ||
|
|
092691c665 | ||
|
|
718ca864e3 | ||
|
|
4454eb84fb |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.vscode/settings.json
|
||||
@ -3,9 +3,11 @@ keys:
|
||||
- &andreas age19j24x89dfh4f7v58c8k64yupqas4f7qkkyper7yj9dd7vqwvvq0qkyvhxk # generated using cli
|
||||
- hosts:
|
||||
- &th0nkpad-nixos age1ma8x6wugvc40mkst33mejq0m6r44jk6zwjjun3znyer5nztgn9vs0nwjx4 # derived from ssh host key
|
||||
- &drivebystation-nix age1s5qwsuc3e4m3c4w5hl6tyja70w273gr60j9j9dcpc6mz69lemg3qpwud3h #derived from ssh host key
|
||||
creation_rules:
|
||||
- path_regex: secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *andreas
|
||||
- *th0nkpad-nixos
|
||||
- *drivebystation-nix
|
||||
17
flake.lock
generated
17
flake.lock
generated
@ -288,6 +288,7 @@
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"snowfall-lib": "snowfall-lib",
|
||||
"sops-nix": "sops-nix",
|
||||
"trilium-next-pr": "trilium-next-pr",
|
||||
"zen-browser": "zen-browser"
|
||||
}
|
||||
},
|
||||
@ -384,6 +385,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"trilium-next-pr": {
|
||||
"locked": {
|
||||
"lastModified": 1733744893,
|
||||
"narHash": "sha256-CufsQ+I/s7TsPd6Rq62WAQZQDtoeC8nw+ExuXeWnDRk=",
|
||||
"owner": "FliegendeWurst",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6000de6a3f96f729ef031cbd4ecb04898cb38780",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "FliegendeWurst",
|
||||
"ref": "trilium-next",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
trilium-next-pr.url = "github:FliegendeWurst/nixpkgs/trilium-next";
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
|
||||
@ -1,14 +1,35 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib
|
||||
, # An instance of `pkgs` with your overlays and packages applied is also available.
|
||||
pkgs
|
||||
, # You also have access to your flake's inputs.
|
||||
inputs
|
||||
, # Additional metadata is provided by Snowfall Lib.
|
||||
namespace
|
||||
, # The namespace used for your flake, defaulting to "internal" if not set.
|
||||
system
|
||||
, # The system architecture for this host (eg. `x86_64-linux`).
|
||||
target
|
||||
, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||
format
|
||||
, # A normalized name for the system target (eg. `iso`).
|
||||
virtual
|
||||
, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||
systems
|
||||
, # An attribute map of your defined hosts.
|
||||
# All other arguments come from the module system.
|
||||
config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.my-namespace) enabled;
|
||||
|
||||
imp = config.my-namespace.home.impermanence.enable;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
@ -22,7 +43,7 @@ in {
|
||||
unzip
|
||||
zip
|
||||
];
|
||||
sessionPath = ["$HOME/bin" "$HOME/.local/bin"];
|
||||
sessionPath = [ "$HOME/bin" "$HOME/.local/bin" ];
|
||||
shellAliases = {
|
||||
# "df" = "duf -only local";
|
||||
# "du" = "dust -xd1 --skip-total";
|
||||
@ -52,8 +73,6 @@ in {
|
||||
};
|
||||
home-manager = enabled;
|
||||
};
|
||||
services = {
|
||||
|
||||
};
|
||||
services = { };
|
||||
};
|
||||
}
|
||||
|
||||
@ -18,9 +18,13 @@ in
|
||||
# Enable NVIDIA driver for X11 and Wayland
|
||||
# without modesetting, x server will be run by nvidia
|
||||
services.xserver.videoDrivers = [
|
||||
"amdgpu"
|
||||
#"modesetting"
|
||||
"nvidia"
|
||||
# "nvidia-drm"
|
||||
# "nvidia-uvm"
|
||||
# "nvidia-modeset"
|
||||
# "nvidiafb"
|
||||
"amdgpu"
|
||||
# "modesetting"
|
||||
];
|
||||
|
||||
# Enable OpenGL
|
||||
@ -43,13 +47,13 @@ in
|
||||
|
||||
# Enable required Kernel Modules
|
||||
boot.initrd.kernelModules = [
|
||||
"amdgpu"
|
||||
"nvidia"
|
||||
# # "nvidia-drm"
|
||||
# # "nvidiafb"
|
||||
# # # "nvidia-uvm"
|
||||
# # "nvidia-modeset"
|
||||
# # "i2c-nvidia_gpu"
|
||||
"nvidia-drm"
|
||||
"nvidia-uvm"
|
||||
"nvidia-modeset"
|
||||
"nvidiafb"
|
||||
"amdgpu"
|
||||
# # "i2c-nvidia_gpu"
|
||||
];
|
||||
|
||||
|
||||
@ -83,59 +87,90 @@ in
|
||||
# options nouveau modeset=0
|
||||
# '';
|
||||
|
||||
# services.xserver.config = lib.mkForce ''
|
||||
# Section "ServerLayout"
|
||||
# Identifier "layout"
|
||||
# Screen 0 "amdgpu"
|
||||
# Inactive "nvidia"
|
||||
# Option "AllowNVIDIAGPUScreens"
|
||||
# EndSection
|
||||
|
||||
# Section "Device"
|
||||
# Identifier "nvidia"
|
||||
# Driver "nvidia"
|
||||
# BusID "PCI:01:0:0"
|
||||
# EndSection
|
||||
|
||||
# Section "Screen"
|
||||
# Identifier "nvidia"
|
||||
# Device "nvidia"
|
||||
# EndSection
|
||||
|
||||
# Section "Device"
|
||||
# Identifier "amdgpu"
|
||||
# Driver "amdgpu"
|
||||
# BusID "PCI:50:0:0"
|
||||
# EndSection
|
||||
|
||||
# Section "Screen"
|
||||
# Identifier "amdgpu"
|
||||
# Device "amdgpu"
|
||||
# EndSection
|
||||
# '';
|
||||
|
||||
# Configure NVIDIA driver
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = true;
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = false;
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.none;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||
nvidiaPersistenced = true;
|
||||
forceFullCompositionPipeline = false;
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.none;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||
nvidiaPersistenced = true;
|
||||
forceFullCompositionPipeline = true;
|
||||
|
||||
prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
# sync.enable=true;
|
||||
# reverseSync.enable = false;
|
||||
# Make sure to use the correct Bus ID values for your system!
|
||||
# intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
|
||||
prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
|
||||
};
|
||||
# Add user to extra groups
|
||||
users.users.andreas = {
|
||||
extraGroups = [ "video" "render" ];
|
||||
# sync.enable=true;
|
||||
# reverseSync.enable = false;
|
||||
# Make sure to use the correct Bus ID values for your system!
|
||||
# intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
|
||||
};
|
||||
|
||||
};
|
||||
# Add user to extra groups
|
||||
users.users.andreas = {
|
||||
extraGroups = [ "video" "render" ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
53
modules/nixos/nixos/default.nix
Normal file
53
modules/nixos/nixos/default.nix
Normal file
@ -0,0 +1,53 @@
|
||||
############################################
|
||||
#
|
||||
# Shared System Configuration module that's always enabled by default courtesy of snowfall lib
|
||||
#
|
||||
############################################
|
||||
{
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib
|
||||
, # An instance of `pkgs` with your overlays and packages applied is also available.
|
||||
pkgs
|
||||
, # You also have access to your flake's inputs.
|
||||
inputs
|
||||
, # Additional metadata is provided by Snowfall Lib.
|
||||
namespace
|
||||
, # The namespace used for your flake, defaulting to "internal" if not set.
|
||||
system
|
||||
, # The system architecture for this host (eg. `x86_64-linux`).
|
||||
target
|
||||
, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||
format
|
||||
, # A normalized name for the system target (eg. `iso`).
|
||||
virtual
|
||||
, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||
systems
|
||||
, # An attribute map of your defined hosts.
|
||||
|
||||
# All other arguments come from the module system.
|
||||
config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.my-namespace) enabled;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
boot = { };
|
||||
console = { };
|
||||
environment = {
|
||||
systemPackages =
|
||||
(with pkgs; [
|
||||
age
|
||||
wget
|
||||
sops
|
||||
bitwarden
|
||||
bitwarden-cli
|
||||
cowsay
|
||||
remmina
|
||||
]);
|
||||
};
|
||||
};
|
||||
}
|
||||
33
secrets.yaml
33
secrets.yaml
@ -20,23 +20,32 @@ sops:
|
||||
- recipient: age19j24x89dfh4f7v58c8k64yupqas4f7qkkyper7yj9dd7vqwvvq0qkyvhxk
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBdGZlV3R4eW5FYS9HZGYr
|
||||
N3VSR0tIbzUrL0RsUEw2NkZtUWcxVG55bEIwCjQ5U0Ztd1luUEQ2SEg4RHA2RWRK
|
||||
K3dhN2liMDYyZElhbkZEUC9namhrc2MKLS0tIEhYTEYwQWduNkdKbGJQcTBRUWVG
|
||||
aDMwR1I5NG13dUhwRXg1TXI4dG9nWXMKti+hv0+7/Rz0W22bToYs1/DFzoMllHpB
|
||||
7uuVpUFDuC2D40ize0UX4rJ8Yo63lhJrRpsxIhzkP/vq+wMAFrKKLg==
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4U204eXIyaDJFMXIweXp1
|
||||
NEhoYU5qa3B5Q1VpODNsSEpuT0txRWpuVDM0CmptVHNFQkpWTkJ2M3B4dWpWN0s4
|
||||
ZjRuc3BhckVLSzFuOGJ3WTB0YnRRRDgKLS0tIHlaSUxITUlGU3VaRWZFbENUTVY2
|
||||
SWVwUGVxcGJscG5PalphZFVIS1ZjY2MKi4VvrNW1AH+fJaI/rzOltPylSiY1z3nS
|
||||
ebrYdpyM5KKQ46uezvU4J3Qau/Inv8CkZ72vHlQ6EK2kmmZZLszwJg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1ma8x6wugvc40mkst33mejq0m6r44jk6zwjjun3znyer5nztgn9vs0nwjx4
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnK0dSTTVJWmt3aS91UmFm
|
||||
Ui9zT3VpMlBybWJXOVdKdU5mTkprdU5WRm00CktHd2g4M1VldHhTQyszRTVTOUtt
|
||||
Mld4a3lYSHF2SytIc0RjQ1RoODQvaE0KLS0tIGN3SlpMeTEvNktNSm5oT0dXRVFr
|
||||
UmZrTXhyM2hYWW1kY05xa01PM1MzUDAK67AkP1XE445RXbVxcksRXL7MYHFjLPLV
|
||||
ITL404AabakBeOX9yixwymzkD1BbUYEdW6N28ntqdH5cZZfVteYdMA==
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAyVHVwMEZjVk8xMTNIekF1
|
||||
ZFlZbFhvOTJSbVN4ZmorSmFCbkxBUUxOOERJCjBjMkdxQ0V4OXEwdGF2Sno4VTh2
|
||||
MURQMUhQV083M3lpREFRM2Qza3JLN0kKLS0tIEFoeUVsL3poajljMDEwTCtWcXRD
|
||||
Y3NHNmVDZFZuNjlUUDdMa3N3ZVNTWkUKeO4sT0ZyTAyrMKj27fbFhQZ+bDMru6Bk
|
||||
j4Im41l9ClpIVQt8iz61mwKrm+QmBA9r1aL34u3lGQyKBOk4vq/m9A==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-11-07T10:47:23Z"
|
||||
mac: ENC[AES256_GCM,data:zqkbmx7XIHQnOVkozPLiBzsNhACbGwvWiFcFlEHhlyEeQ7rvltLlUlgivb7aawwG1RuxCwshHwLfuKRQ/iGJcXjFO4UM5VER6CAA/88UrpgXW8VBw8iuchr+Y58lu0s+98fj7VffcuWjhJ1AYvBxFaTZA6DjxFjv3l1Gyxtw6kM=,iv:XG9Qb61INy1OJZjI3cDbY9fswLqf8+QvcUMrmtKGtuQ=,tag:+JacTF/+qU+j/cm8Wn1c8g==,type:str]
|
||||
- recipient: age1s5qwsuc3e4m3c4w5hl6tyja70w273gr60j9j9dcpc6mz69lemg3qpwud3h
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUT3dKNk4rSVZUck5LZ2t1
|
||||
eUhPSXBURUFGbnU4NUtjMVVpeGI5eVI1SVc4CkdTY25jTy91VFhLS1F3V3ZzM1A4
|
||||
OGMxWmtWd1lVU3dZcG8xWlRwYkorSU0KLS0tIE12WlFyUWZ0dHYvTEd0N0tPWUt1
|
||||
bldpMnp5cnpXN2J5MEc5cC9DZktEekUKC6sei7v252fZyW8sd1xuZDjwoJFCKGot
|
||||
t9f+jUDOx5wGlH53Fd2jCRArKZkQ850sFj79Lh2Rx6wbDj1Ks5XcVA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-12-10T04:12:19Z"
|
||||
mac: ENC[AES256_GCM,data:AcuCxKGm9xLgn/gnk0XDVtLM5PWQvgGd+qXusuvwCUV4ln1//Lpwpp3TL0mEMdwEcFOdCasW4A10rGpCoBqKsckroiUSEB0G2p0vrD3b3Vmo804JYcKmSZ85InZCXUWenfOTEzx/A1ruqSBSkRYro+NdyZ/+JXQVXnTLCPesgwE=,iv:UPRNsfeUKnml9OFkkqrI0fI4f/RWN2ovTsaItwT8Y0c=,tag:75NEPjeAXUwlCPGbLPhPFg==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.1
|
||||
|
||||
29
shell.nix
Normal file
29
shell.nix
Normal file
@ -0,0 +1,29 @@
|
||||
let
|
||||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
|
||||
pkgs = import nixpkgs { config = { }; overlays = [ ]; };
|
||||
in
|
||||
|
||||
pkgs.mkShellNoCC {
|
||||
packages = with pkgs; [
|
||||
cowsay
|
||||
lolcat
|
||||
bitwarden
|
||||
bitwarden-cli
|
||||
sops
|
||||
];
|
||||
|
||||
GREETING = "Hello, Nix!";
|
||||
|
||||
shellHook = ''
|
||||
echo $GREETING | cowsay | lolcat
|
||||
bw config server https://vault.subsonics.nl
|
||||
echo "please enter bitwarden email"
|
||||
read BW_USER
|
||||
echo "please enter bitwarden password"
|
||||
read -s BW_PASSWORD
|
||||
bw login $BW_USER $BW_PASSWORD
|
||||
BW_SESSION="$(bw unlock $BW_PASSWORD --raw)"
|
||||
mkdir -p ~/.config/sops/age
|
||||
bw get attachment keys.txt --itemid ee6a90b0-4120-46f7-a1c6-9648316e43d5 --output ~/.config/sops/age/keys.txt
|
||||
'';
|
||||
}
|
||||
@ -50,10 +50,14 @@ in
|
||||
inputs.game-of-life.packages.x86_64-linux.default
|
||||
inputs.zen-browser.packages.x86_64-linux.default
|
||||
inputs.nixos-cosmic
|
||||
|
||||
inputs.trilium-next-pr.legacyPackages.x86_64-linux.trilium-next-desktop
|
||||
# We want flatpak support
|
||||
flatpak
|
||||
# GNOME shit
|
||||
gnome-software
|
||||
gnomeExtensions.pop-shell
|
||||
gnome-remote-desktop
|
||||
|
||||
soundwireserver
|
||||
vscode
|
||||
spotify
|
||||
@ -64,7 +68,7 @@ in
|
||||
# thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
services.gnome.gnome-remote-desktop.enable = true;
|
||||
my-namespace.cosmic-desktop.enable = false;
|
||||
# lib.my-namespace.home.stream-tools.enable = true;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user