Compare commits

...

11 Commits

Author SHA1 Message Date
Andreas Schaafsma
99b30e124a add triliumnext 2024-12-10 09:18:29 +01:00
Andreas Schaafsma
b891969c7e add remmina 2024-12-10 09:18:17 +01:00
Andreas Schaafsma
1cb2a609a8 add shell 2024-12-10 09:18:02 +01:00
Andreas Schaafsma
4ff075bce4 add trilium-next 2024-12-10 09:17:50 +01:00
Andreas Schaafsma
a496d0451b add another sops master key 2024-12-10 05:16:09 +01:00
Andreas Schaafsma
c606f39f8f ignore vscode settings json 2024-12-10 03:58:50 +01:00
Andreas Schaafsma
b779b84242 try to bring back gnome remote desktop (bugged upstream, no bueno, wait for fix) 2024-12-10 03:58:32 +01:00
Andreas Schaafsma
8c0ecd90e8 clean up formatting 2024-12-10 03:57:00 +01:00
Andreas Schaafsma
092691c665 list all inputs 2024-12-10 03:56:20 +01:00
Andreas Schaafsma
718ca864e3 Add shared system config module 2024-12-10 03:53:46 +01:00
Andreas Schaafsma
4454eb84fb whatever, still sorta works 2024-12-09 23:35:27 +01:00
10 changed files with 246 additions and 76 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.vscode/settings.json

View File

@ -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
View File

@ -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"

View File

@ -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:

View File

@ -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 = { };
};
}

View File

@ -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,12 +47,12 @@ in
# Enable required Kernel Modules
boot.initrd.kernelModules = [
"amdgpu"
"nvidia"
# # "nvidia-drm"
# # "nvidiafb"
# # # "nvidia-uvm"
# # "nvidia-modeset"
"nvidia-drm"
"nvidia-uvm"
"nvidia-modeset"
"nvidiafb"
"amdgpu"
# # "i2c-nvidia_gpu"
];
@ -83,6 +87,37 @@ 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.
@ -116,7 +151,7 @@ in
# package = config.boot.kernelPackages.nvidiaPackages.none;
# package = config.boot.kernelPackages.nvidiaPackages.production;
nvidiaPersistenced = true;
forceFullCompositionPipeline = false;
forceFullCompositionPipeline = true;
prime = {
offload = {
@ -137,5 +172,5 @@ in
extraGroups = [ "video" "render" ];
};
};
};
}

View 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
]);
};
};
}

View File

@ -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
View 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
'';
}

View File

@ -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;