This commit is contained in:
martyTF 2026-03-29 08:16:58 +02:00
parent 00da286651
commit a9a77e75fe
12 changed files with 307 additions and 3 deletions

103
flake.lock generated
View file

@ -161,6 +161,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": [
@ -793,10 +814,60 @@
"nixos-cli": "nixos-cli",
"nixpkgs": "nixpkgs_6",
"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,
@ -857,13 +928,43 @@
"type": "github"
}
},
"systems_5": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"walker": {
"inputs": {
"elephant": [
"elephant"
],
"nixpkgs": "nixpkgs_7",
"systems": "systems_4"
"systems": "systems_6"
},
"locked": {
"lastModified": 1769016454,

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

@ -28,12 +28,18 @@
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

@ -19,7 +19,7 @@
# 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 = "25.11"; # Please read the comment before changing.
home.stateVersion = "24.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
@ -89,6 +89,7 @@
inputs.walker.homeManagerModules.default
inputs.noctalia.homeModules.default
./../../modules
./../../home
];
# Let Home Manager install and manage itself.

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