try and fix it

This commit is contained in:
Mans Ziesel 2023-06-06 17:19:23 +02:00
parent fdd1737685
commit 02095f0b71
5 changed files with 78 additions and 60 deletions

View File

@ -1,79 +1,47 @@
{
"nodes": {
"hardware": {
"locked": {
"lastModified": 1684899633,
"narHash": "sha256-NtwerXX8UFsoNy6k+DukJMriWtEjQtMU/Urbff2O2Dg=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "4cc688ee711159b9bcb5a367be44007934e1a49d",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixos-hardware",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
]
},
"locked": {
"lastModified": 1681092193,
"narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=",
"lastModified": 1685599623,
"narHash": "sha256-Tob4CMOVHue0D3RzguDBCtUmX5ji2PsdbQDbIOIKvsc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af",
"rev": "93db05480c0c0f30382d3e80779e8386dcb4f9dd",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-22.11",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1684398685,
"narHash": "sha256-TRE62m91iZ5ArVMgA+uj22Yda8JoQuuhc9uwZ+NoX+0=",
"lastModified": 1685865905,
"narHash": "sha256-XJZ/o17eOd2sEsGif+/MQBnfa2DKmndWgJyc7CWajFc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "628d4bb6e9f4f0c30cfd9b23d3c1cdcec9d3cb5c",
"rev": "e7603eba51f2c7820c0a182c6bbb351181caa8e7",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-22.11",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"hardware": "hardware",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",

View File

@ -3,14 +3,14 @@
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-22.11";
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# TODO_: Add any other flake you might need
hardware.url = "github:nixos/nixos-hardware";
# hardware.url = "github:nixos/nixos-hardware";
# Shameless plug: looking for a way to nixify your themes and make
# everything match nicely? Try nix-colors!

43
home-manager/i3.nix Normal file
View File

@ -0,0 +1,43 @@
{ config, lib, pkgs, ... }:
let
mod = "Mod1";
in {
xsession.windowManager.i3 = {
enable = true;
config = {
modifier = mod;
fonts = ["DejaVu Sans Mono, FontAwesome 6"];
keybindings = lib.mkOptionDefault {
"${mod}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run";
"${mod}+x" = "exec sh -c '${pkgs.maim}/bin/maim -s | xclip -selection clipboard -t image/png'";
"${mod}+Shift+x" = "exec sh -c '${pkgs.i3lock}/bin/i3lock -c 222222 & sleep 5 && xset dpms force of'";
# Focus
"${mod}+j" = "focus left";
"${mod}+k" = "focus down";
"${mod}+l" = "focus up";
"${mod}+semicolon" = "focus right";
# Move
"${mod}+Shift+j" = "move left";
"${mod}+Shift+k" = "move down";
"${mod}+Shift+l" = "move up";
"${mod}+Shift+semicolon" = "move right";
# My multi monitor setup
"${mod}+m" = "move workspace to output DP-2";
"${mod}+Shift+m" = "move workspace to output DP-5";
};
bars = [
{
position = "bottom";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${./i3status-rust.toml}";
}
];
};
};
}

View File

@ -6,14 +6,13 @@
# You can import other NixOS modules here
imports = [
# If you want to use modules from other flakes (such as nixos-hardware):
inputs.hardware.nixosModules.common-cpu-amd
inputs.hardware.nixosModules.common-ssd
inputs.hardware.nixosModules.common-gpu-nvidia
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-gpu-nvidia
# You can also split up your configuration and import pieces of it here:
# ./users.nix
./network.nix
./i3.nix
# ./i3.nix
# Import home-manager's NixOS module
inputs.home-manager.nixosModules.home-manager

View File

@ -2,21 +2,29 @@
{
# Define the i3 window manager configuration
services.xserver.windowManager.i3 = {
services.xserver = {
enable = true;
extraPackages = with pkgs; [ i3status dmenu ];
config = ''
# i3 configuration options go here
# For example:
# set $mod Mod4
# exec_always --no-startup-id feh --bg-fill /path/to/wallpaper.jpg
'';
};
# Set the default session to i3
services.xserver = {
desktopManager = {
xterm.enable = false;
};
displayManager = {
defaultSession = "none+i3";
};
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
dmenu #application launcher most people use
i3status # gives you the default i3 status bar
i3lock #default i3 screen locker
i3blocks #if you are planning on using i3blocks over i3status
];
};
displayManager.session = "none";
windowManager.default = "i3";
# windowManager.default = "i3";
layout = "us";
xkbVariant = "";
};