Compare commits

..

3 commits

Author SHA1 Message Date
d0413cb830 Merge branch 'main' of https://git.marty.tf/marty/config.nix 2026-03-29 08:21:53 +02:00
a9a77e75fe h2 2026-03-29 08:16:58 +02:00
00da286651 i thinkpad therefore i am 2026-02-22 11:21:07 +01:00
13 changed files with 453 additions and 2 deletions

73
flake.lock generated
View file

@ -145,6 +145,27 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": [
"swayfx",
"systems"
]
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@ -807,10 +828,60 @@
"nixos-cli": "nixos-cli",
"nixpkgs": "nixpkgs_5",
"noctalia": "noctalia",
"swayfx": "swayfx",
"walker": "walker",
"zen-browser": "zen-browser"
}
},
"scenefx": {
"inputs": {
"flake-utils": [
"swayfx",
"flake-utils"
],
"nixpkgs": [
"swayfx",
"nixpkgs"
],
"systems": "systems_4"
},
"locked": {
"lastModified": 1768403764,
"narHash": "sha256-1RVLChp1WUcjnDu30jG2DTXW0A6K3lkezEip3KTf/gE=",
"owner": "wlrfx",
"repo": "scenefx",
"rev": "05a5e7a9177de04bc398e25821c0898c2a284c9f",
"type": "github"
},
"original": {
"owner": "wlrfx",
"repo": "scenefx",
"type": "github"
}
},
"swayfx": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"scenefx": "scenefx",
"systems": "systems_5"
},
"locked": {
"lastModified": 1769467630,
"narHash": "sha256-SufN5nd0+BojwTpe2tPuFIXswpLGo4syG/OwBF2Glzs=",
"owner": "WillPower3309",
"repo": "swayfx",
"rev": "c4ce2331c90120fafc12ba86200591255e836caf",
"type": "github"
},
"original": {
"owner": "WillPower3309",
"repo": "swayfx",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -910,7 +981,7 @@
"elephant"
],
"nixpkgs": "nixpkgs_7",
"systems": "systems_5"
"systems": "systems_4"
},
"locked": {
"lastModified": 1773675699,

View file

@ -23,6 +23,10 @@
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
swayfx = {
url = "github:WillPower3309/swayfx";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
};
@ -41,6 +45,7 @@
nixos-cli,
zen-browser,
agenix,
swayfx,
...
}:
let
@ -59,6 +64,17 @@
agenix.nixosModules.default
];
};
marty-thinkpad = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./hosts/marty-thinkpad
./configuration.nix
home-manager.nixosModules.home-manager
nixos-cli.nixosModules.nixos-cli
agenix.nixosModules.default
];
};
marty-pc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };

12
home/default.nix Normal file
View file

@ -0,0 +1,12 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
./sway.nix
];
}

22
home/niri.nix Normal file
View file

@ -0,0 +1,22 @@
{
config,
pkgs,
lib,
inputs,
...
}:
{
options = {
desktop = {
sway = {
enable = lib.mkEnableOption "enable sway";
};
};
};
config = {
wayland.windowManager.niri = {
};
};
};

75
home/sway.nix Normal file
View file

@ -0,0 +1,75 @@
{
config,
pkgs,
lib,
inputs,
...
}:
{
options = {
desktop = {
sway = {
enable = lib.mkEnableOption "enable sway";
};
};
};
config = {
wayland.windowManager.sway = {
enable = true;
package = pkgs.swayfx;
config = {
modifier = "Mod4";
startup = [
{ command = "elephant"; }
];
keybindings =
let
modifier = config.wayland.windowManager.sway.config.modifier;
in
{
"${modifier}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}";
"${modifier}+Shift+q" = "kill";
"${modifier}+d" = "exec walker";
"${modifier}+o" = "exec zen";
"${modifier}+Control+right" = "exec /home/marty/.config/sway/scripts/workspaceswitcher right";
"${modifier}+Control+left" = "exec /home/marty/.config/sway/scripts/workspaceswitcher left";
"${modifier}+f" = "fullscreen";
"${modifier}+1" = "workspace number 1";
"${modifier}+2" = "workspace number 2";
"${modifier}+3" = "workspace number 3";
"${modifier}+4" = "workspace number 4";
"${modifier}+5" = "workspace number 5";
"${modifier}+6" = "workspace number 6";
"${modifier}+7" = "workspace number 7";
"${modifier}+8" = "workspace number 8";
"${modifier}+9" = "workspace number 9";
"${modifier}+s" = "workspace number 0";
"${modifier}+Shift+1" = "move container to workspace number 1";
"${modifier}+Shift+2" = "move container to workspace number 2";
"${modifier}+Shift+3" = "move container to workspace number 3";
"${modifier}+Shift+4" = "move container to workspace number 4";
"${modifier}+Shift+5" = "move container to workspace number 5";
"${modifier}+Shift+6" = "move container to workspace number 6";
"${modifier}+Shift+7" = "move container to workspace number 7";
"${modifier}+Shift+8" = "move container to workspace number 8";
"${modifier}+Shift+9" = "move container to workspace number 9";
"${modifier}+Shift+s" = "move container to workspace number 0";
};
input = {
"*" = {
xkb_layout = "de";
};
};
defaultWorkspace = "workspace number 1";
terminal = "${pkgs.kitty}/bin/kitty";
};
checkConfig = false;
};
};
}

View file

@ -0,0 +1,45 @@
{
config,
lib,
pkgs,
home-manager,
inputs,
...
}:
{
networking = {
hostName = "marty-thinkpad";
};
home-manager = {
extraSpecialArgs = { inherit inputs; };
useGlobalPkgs = true;
useUserPackages = true;
users = {
marty = import ./home.nix;
};
};
main-user = {
userName = "marty";
shell = pkgs.fish;
};
imports = [
./hardware.nix
../../modules/desktop/niri.nix
# ../../modules/server/nginx.nix
];
desktop.niri.enable = true;
programs = {
light.enable = true;
};
services.flatpak.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.open = true;
system.stateVersion = "24.11"; # Did you read the comment?
}

View file

@ -0,0 +1,42 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/4920cf79-5972-4eaa-ba1a-56cac062320f";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/B7C8-039D";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/a9df5515-da5f-41fa-a371-31eec40dac73"; }
];
# 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
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wwp0s29u1u6i6.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,97 @@
{
config,
pkgs,
inputs,
lib,
...
}:
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "marty";
home.homeDirectory = "/home/marty";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
programs.fish.enable = true;
home.packages = with pkgs; [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/marty/etc/profile.d/hm-session-vars.sh
#
device.type.laptop = true;
desktop.hyprland = {
monitors = [
"desc:AU Optronics 0x313E,1600x900@60,0x0,1"
];
};
imports = [
inputs.walker.homeManagerModules.default
inputs.noctalia.homeModules.default
./../../modules
./../../home
];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

7
modules/README.md Normal file
View file

@ -0,0 +1,7 @@
# MODULES
todo:
- [ ] move home-manager stuff to ../home
- [ ] add server stuff
-> seperate home manager stuff from normal nix stuff, use home manager purely for dotfiles, use modules to install stuff

View file

@ -0,0 +1,3 @@
# HOME
only for dotfiles, no longer installing stuff from here

29
modules/desktop/niri.nix Normal file
View file

@ -0,0 +1,29 @@
{
config,
pkgs,
lib,
...
}:
{
options = {
desktop = {
niri = {
enable = lib.mkEnableOption "enable niri";
};
};
};
config = lib.mkIf config.desktop.niri.enable {
# Enable the gnome-keyring secrets vault.
# Will be exposed through DBus to programs willing to store secrets.
services.gnome.gnome-keyring.enable = true;
environment.systemPackages = with pkgs; [
xwayland-satellite
niri
];
programs.niri = {
enable = true;
};
};
}

33
modules/desktop/sway.nix Normal file
View file

@ -0,0 +1,33 @@
{
config,
pkgs,
lib,
...
}:
{
options = {
desktop = {
sway = {
enable = lib.mkEnableOption "enable sway";
};
};
};
config = lib.mkIf config.desktop.sway.enable {
environment.systemPackages = with pkgs; [
grim # screenshot functionality
slurp # screenshot functionality
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
];
# Enable the gnome-keyring secrets vault.
# Will be exposed through DBus to programs willing to store secrets.
services.gnome.gnome-keyring.enable = true;
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
package = null;
};
};
}

View file

@ -62,7 +62,6 @@
inactive_text_alpha = 0.5;
hide_window_decorations = "no";
themeFile = "Catppuccin-Mocha";
# tab bar