Compare commits
37 Commits
1e0e83b934
...
03c95b7b6f
Author | SHA1 | Date | |
---|---|---|---|
03c95b7b6f | |||
6d1afe26eb | |||
e1853bdbb5 | |||
23631f0391 | |||
b1d0a85100 | |||
1110b28c36 | |||
7429f4e861 | |||
1a7ab84cbd | |||
0be300aa7b | |||
71fa64ccfa | |||
9baa192388 | |||
fec2bba6fc | |||
539f35cf2e | |||
b9e6e8e28b | |||
9cf8e67377 | |||
d8ba3bc590 | |||
2310f2fa90 | |||
6c76023edc | |||
45a7046b35 | |||
4cc4d51655 | |||
9973c8ccad | |||
9dc1ca3175 | |||
54b53e5026 | |||
2072020b9c | |||
d613665f5c | |||
1c8ffbf289 | |||
da0bf720dd | |||
3667246bf0 | |||
d712b4d00d | |||
01275a4785 | |||
0cd6a8708e | |||
308fab0078 | |||
67b147c22f | |||
00d63a90a7 | |||
f0719ab51c | |||
3c58cead1c | |||
e5a70822ad |
16
flake.lock
16
flake.lock
@ -7,16 +7,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710888565,
|
||||
"narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=",
|
||||
"lastModified": 1717527182,
|
||||
"narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce",
|
||||
"rev": "845a5c4c073f74105022533907703441e0464bc3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.11",
|
||||
"ref": "release-24.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@ -73,16 +73,16 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1715668745,
|
||||
"narHash": "sha256-xp62OkRkbUDNUc6VSqH02jB0FbOS+MsfMb7wL1RJOfA=",
|
||||
"lastModified": 1718086528,
|
||||
"narHash": "sha256-hoB7B7oPgypePz16cKWawPfhVvMSXj4G/qLsfFuhFjw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9ddcaffecdf098822d944d4147dd8da30b4e6843",
|
||||
"rev": "47b604b07d1e8146d5398b42d3306fdebd343986",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.11",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -2,12 +2,12 @@
|
||||
description = "Nixos config flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
|
||||
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
url = "github:nix-community/home-manager/release-24.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
@ -10,96 +10,22 @@
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# script for rebuilding nixos
|
||||
../../modules/nixos/rebuild.nix
|
||||
../../modules/nixos/wifi.nix
|
||||
../../modules/nixos/sops.nix
|
||||
# greetd login manager
|
||||
../../modules/nixos/greetd.nix
|
||||
# sway as window manager
|
||||
../../modules/nixos/sway.nix
|
||||
../../modules/nixos
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
myConfig = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
libvdpau-va-gl
|
||||
libvdpau
|
||||
libva
|
||||
rocmPackages.clr.icd
|
||||
amdvlk
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
desktop = true;
|
||||
gpu.amd.enable = true;
|
||||
laptop = true;
|
||||
};
|
||||
|
||||
hardware.spacenavd.enable = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "MaxNixosLaptop"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
# networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# NIXOS
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [pkgs.samsung-unified-linux-driver];
|
||||
};
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
hardware.printers = {
|
||||
ensurePrinters = [
|
||||
{
|
||||
name = "Samsung_ML-1630W_Series";
|
||||
location = "luhbots";
|
||||
deviceUri = "dnssd://Samsung%20ML-1630W%20Series%20(SEC00159937E684)._pdl-datastream._tcp.local/";
|
||||
model = "samsung/ML-1630W.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.max = {
|
||||
isNormalUser = true;
|
||||
@ -224,8 +150,6 @@
|
||||
'';
|
||||
};
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
|
@ -3,12 +3,11 @@
|
||||
../../modules/home
|
||||
];
|
||||
|
||||
shell.enable = true;
|
||||
git.enable = true;
|
||||
music.enable = true;
|
||||
sway.enable = true;
|
||||
sway.laptop = true;
|
||||
myPrograms.enable = true;
|
||||
myConfig = {
|
||||
enable = true;
|
||||
desktop = true;
|
||||
laptop = true;
|
||||
};
|
||||
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
@ -23,15 +22,4 @@
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
xdg.enable = true;
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
|
@ -1,3 +1,33 @@
|
||||
{...}: {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig;
|
||||
in {
|
||||
imports = [./git ./music ./programs ./shell ./sway];
|
||||
|
||||
options.myConfig = {
|
||||
enable = lib.mkEnableOption "custom home-manager config";
|
||||
desktop = lib.mkEnableOption "custom home-manager config for desktop use";
|
||||
laptop = lib.mkEnableOption "extra settings for laptop use";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig = {
|
||||
shell.enable = true;
|
||||
git.enable = true;
|
||||
|
||||
sway.enable = lib.mkIf cfg.desktop true;
|
||||
music.enable = lib.mkIf cfg.desktop true;
|
||||
programs.enable = lib.mkIf cfg.desktop true;
|
||||
|
||||
sway.laptop = lib.mkIf cfg.laptop true;
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
}
|
||||
|
@ -3,16 +3,16 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.git;
|
||||
cfg = config.myConfig.git;
|
||||
in {
|
||||
imports = [./lazygit.nix];
|
||||
|
||||
options = {
|
||||
git.enable = lib.mkEnableOption "git";
|
||||
options.myConfig.git = {
|
||||
enable = lib.mkEnableOption "git";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
git.lazygit.enable = lib.mkDefault true;
|
||||
myConfig.git.lazygit.enable = lib.mkDefault true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.git.lazygit;
|
||||
cfg = config.myConfig.git.lazygit;
|
||||
in {
|
||||
options = {
|
||||
git.lazygit.enable = lib.mkEnableOption "lazygit, a git tui";
|
||||
options.myConfig.git.lazygit = {
|
||||
enable = lib.mkEnableOption "lazygit, a git tui";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -4,15 +4,15 @@
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.music;
|
||||
cfg = config.myConfig.music;
|
||||
in {
|
||||
imports = [./mpd.nix];
|
||||
|
||||
options = {
|
||||
music.enable = lib.mkEnableOption "make the system ready for listening to music";
|
||||
options.myConfig.music = {
|
||||
enable = lib.mkEnableOption "make the system ready for listening to music";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
music.mpd.enable = lib.mkDefault true;
|
||||
myConfig.music.mpd.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
|
@ -4,10 +4,10 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.music.mpd;
|
||||
cfg = config.myConfig.music.mpd;
|
||||
in {
|
||||
options = {
|
||||
music.mpd.enable = lib.mkEnableOption "Music Player Daemon";
|
||||
options.myConfig.music.mpd = {
|
||||
enable = lib.mkEnableOption "Music Player Daemon";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -4,19 +4,21 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myPrograms;
|
||||
cfg = config.myConfig.programs;
|
||||
in {
|
||||
imports = [./foot.nix ./thunderbird.nix ./nextcloud.nix ./udiskie.nix];
|
||||
|
||||
options = {
|
||||
myPrograms.enable = lib.mkEnableOption "programs for desktop use";
|
||||
options.myConfig.programs = {
|
||||
enable = lib.mkEnableOption "programs for desktop use";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myPrograms.foot.enable = lib.mkDefault true;
|
||||
myPrograms.thunderbird.enable = lib.mkDefault true;
|
||||
myPrograms.nextcloud.enable = lib.mkDefault true;
|
||||
myPrograms.udiskie.enable = lib.mkDefault true;
|
||||
myConfig.programs = {
|
||||
foot.enable = lib.mkDefault true;
|
||||
thunderbird.enable = lib.mkDefault true;
|
||||
nextcloud.enable = lib.mkDefault true;
|
||||
udiskie.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
unzip
|
||||
@ -43,8 +45,9 @@ in {
|
||||
freecad
|
||||
flatpak
|
||||
wine
|
||||
unstable.gyroflow
|
||||
gyroflow
|
||||
prusa-slicer
|
||||
kicad
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myPrograms.foot;
|
||||
cfg = config.myConfig.programs.foot;
|
||||
in {
|
||||
options = {
|
||||
myPrograms.foot.enable = lib.mkEnableOption "foot, a lightweight wayland terminal emulator";
|
||||
options.myConfig.programs.foot = {
|
||||
enable = lib.mkEnableOption "foot, a lightweight wayland terminal emulator";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myPrograms.nextcloud;
|
||||
cfg = config.myConfig.programs.nextcloud;
|
||||
in {
|
||||
options = {
|
||||
myPrograms.nextcloud.enable = lib.mkEnableOption "nextcloud client";
|
||||
options.myConfig.programs.nextcloud = {
|
||||
enable = lib.mkEnableOption "nextcloud client";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myPrograms.thunderbird;
|
||||
cfg = config.myConfig.programs.thunderbird;
|
||||
in {
|
||||
options = {
|
||||
myPrograms.thunderbird.enable = lib.mkEnableOption "thunderbird, a email client";
|
||||
options.myConfig.programs.thunderbird = {
|
||||
enable = lib.mkEnableOption "thunderbird, a email client";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myPrograms.udiskie;
|
||||
cfg = config.myConfig.programs.udiskie;
|
||||
in {
|
||||
options = {
|
||||
myPrograms.udiskie.enable = lib.mkEnableOption "auto media mounting";
|
||||
options.myConfig.programs.udiskie = {
|
||||
enable = lib.mkEnableOption "auto media mounting";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.shell.bat;
|
||||
cfg = config.myConfig.shell.bat;
|
||||
in {
|
||||
options = {
|
||||
shell.bat.enable = lib.mkEnableOption "bat, a cat replacement with syntax highlighting";
|
||||
options.myConfig.shell.bat = {
|
||||
enable = lib.mkEnableOption "bat, a cat replacement with syntax highlighting";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -4,10 +4,10 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.shell.btop;
|
||||
cfg = config.myConfig.shell.btop;
|
||||
in {
|
||||
options = {
|
||||
shell.btop.enable = lib.mkEnableOption "btop, a system monitor";
|
||||
options.myConfig.shell.btop = {
|
||||
enable = lib.mkEnableOption "btop, a system monitor";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -3,18 +3,21 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.shell;
|
||||
cfg = config.myConfig.shell;
|
||||
in {
|
||||
imports = [./zsh.nix ./bat.nix ./btop.nix ./neovim.nix];
|
||||
imports = [./zsh.nix ./bat.nix ./btop.nix ./neovim.nix ./direnv.nix];
|
||||
|
||||
options = {
|
||||
shell.enable = lib.mkEnableOption "my shell environment";
|
||||
options.myConfig.shell = {
|
||||
enable = lib.mkEnableOption "my shell environment";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
shell.zsh.enable = lib.mkDefault true;
|
||||
shell.neovim.enable = lib.mkDefault true;
|
||||
shell.btop.enable = lib.mkDefault true;
|
||||
shell.bat.enable = lib.mkDefault true;
|
||||
myConfig.shell = {
|
||||
zsh.enable = lib.mkDefault true;
|
||||
neovim.enable = lib.mkDefault true;
|
||||
btop.enable = lib.mkDefault true;
|
||||
bat.enable = lib.mkDefault true;
|
||||
direnv.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
19
modules/home/shell/direnv.nix
Normal file
19
modules/home/shell/direnv.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell.direnv;
|
||||
in {
|
||||
options.myConfig.shell.direnv = {
|
||||
enable = lib.mkEnableOption "direnv for changing the environment when entering a directory";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
@ -4,16 +4,34 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.shell.neovim;
|
||||
cfg = config.myConfig.shell.neovim;
|
||||
in {
|
||||
options = {
|
||||
shell.neovim.enable = lib.mkEnableOption "neovim";
|
||||
options.myConfig.shell.neovim = {
|
||||
enable = lib.mkEnableOption "neovim";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [neovim];
|
||||
home.sessionVariables = {
|
||||
EDITOR = "${pkgs.neovim}/bin/nvim";
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
lazy-nvim
|
||||
];
|
||||
extraLuaConfig = ''
|
||||
require "lazy_setup"
|
||||
'';
|
||||
extraPackages = with pkgs; [
|
||||
gnumake
|
||||
clang
|
||||
gcc
|
||||
zig
|
||||
cargo
|
||||
rust-analyzer
|
||||
rustup
|
||||
nodejs
|
||||
];
|
||||
};
|
||||
|
||||
home.file.".config/nvim/lua".source = ./nvim-lua;
|
||||
};
|
||||
}
|
||||
|
24
modules/home/shell/nvim-lua/community.lua
Normal file
24
modules/home/shell/nvim-lua/community.lua
Normal file
@ -0,0 +1,24 @@
|
||||
return {
|
||||
"AstroNvim/astrocommunity",
|
||||
{ import = "astrocommunity.pack.bash" },
|
||||
{ import = "astrocommunity.pack.cmake" },
|
||||
{ import = "astrocommunity.pack.cpp" },
|
||||
{ import = "astrocommunity.pack.docker" },
|
||||
{ import = "astrocommunity.pack.html-css" },
|
||||
{ import = "astrocommunity.pack.json" },
|
||||
{ import = "astrocommunity.pack.lua" },
|
||||
{ import = "astrocommunity.pack.markdown" },
|
||||
{ import = "astrocommunity.pack.nix" },
|
||||
{ import = "astrocommunity.pack.python" },
|
||||
{ import = "astrocommunity.pack.rust" },
|
||||
{ import = "astrocommunity.pack.toml" },
|
||||
{ import = "astrocommunity.pack.yaml" },
|
||||
{ import = "astrocommunity.git.git-blame-nvim" },
|
||||
{ import = "astrocommunity.markdown-and-latex.vimtex" },
|
||||
{ import = "astrocommunity.lsp.lsp-inlayhints-nvim" },
|
||||
{ import = "astrocommunity.lsp.lsp-lens-nvim" },
|
||||
{ import = "astrocommunity.lsp.lsp-signature-nvim" },
|
||||
{ import = "astrocommunity.lsp.nvim-lsp-file-operations" },
|
||||
{ import = "astrocommunity.bars-and-lines.vim-illuminate" },
|
||||
}
|
||||
|
33
modules/home/shell/nvim-lua/lazy_setup.lua
Normal file
33
modules/home/shell/nvim-lua/lazy_setup.lua
Normal file
@ -0,0 +1,33 @@
|
||||
require("lazy").setup({
|
||||
{
|
||||
"AstroNvim/AstroNvim",
|
||||
version = "^4", -- Remove version tracking to elect for nighly AstroNvim
|
||||
import = "astronvim.plugins",
|
||||
opts = { -- AstroNvim options must be set here with the `import` key
|
||||
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
|
||||
maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up
|
||||
icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available)
|
||||
pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
|
||||
update_notifications = true, -- Enable/disable notification about running `:Lazy update` twice to update pinned plugins
|
||||
},
|
||||
},
|
||||
{ import = "community" },
|
||||
{ import = "plugins" },
|
||||
} --[[@as LazySpec]], {
|
||||
-- Configure any other `lazy.nvim` configuration options here
|
||||
install = { colorscheme = { "astrodark", "habamax" } },
|
||||
ui = { backdrop = 100 },
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins, add more to your liking
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
"netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
} --[[@as LazyConfig]])
|
||||
|
35
modules/home/shell/nvim-lua/plugins/astrocore.lua
Normal file
35
modules/home/shell/nvim-lua/plugins/astrocore.lua
Normal file
@ -0,0 +1,35 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrocore",
|
||||
opts = {
|
||||
options = {
|
||||
opt = {
|
||||
relativenumber = false,
|
||||
number = true,
|
||||
spell = true,
|
||||
signcolumn = "yes",
|
||||
wrap = true,
|
||||
colorcolumn = "80,120",
|
||||
},
|
||||
g = {
|
||||
inlay_hints_enabled = true,
|
||||
},
|
||||
},
|
||||
lsp = {
|
||||
config = {
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = { buildScripts = { enable = true } },
|
||||
procMacro = { enable = true },
|
||||
check = {
|
||||
command = "clippy",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
clangd = { capabilities = { offsetEncoding = "utf-8" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
29
modules/home/shell/nvim-lua/plugins/user.lua
Normal file
29
modules/home/shell/nvim-lua/plugins/user.lua
Normal file
@ -0,0 +1,29 @@
|
||||
return {
|
||||
{
|
||||
"p00f/clangd_extensions.nvim",
|
||||
optional = true,
|
||||
opts = { extensions = { autoSetHints = true } },
|
||||
init = function()
|
||||
--load clangd extensions when clangd attaches
|
||||
local augroup = vim.api.nvim_create_augroup("clangd_extensions", { clear = true })
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = augroup,
|
||||
desc = "Load clangd_extensions with clangd",
|
||||
callback = function(args)
|
||||
if assert(vim.lsp.get_client_by_id(args.data.client_id)).name == "clangd" then
|
||||
require("clangd_extensions")
|
||||
require("clangd_extensions.inlay_hints").setup_autocmd()
|
||||
require("clangd_extensions.inlay_hints").set_inlay_hints()
|
||||
vim.api.nvim_del_augroup_by_id(augroup)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"simrat39/rust-tools.nvim",
|
||||
optional = true,
|
||||
opts = { tools = { inlay_hints = { auto = true } } },
|
||||
},
|
||||
}
|
||||
|
@ -4,16 +4,16 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.shell.zsh;
|
||||
cfg = config.myConfig.shell.zsh;
|
||||
in {
|
||||
options = {
|
||||
shell.zsh.enable = lib.mkEnableOption "Zsh, an advanced shell";
|
||||
options.myConfig.shell.zsh = {
|
||||
enable = lib.mkEnableOption "Zsh, an advanced shell";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
defaultKeymap = "emacs";
|
||||
dotDir = ".config/zsh";
|
||||
|
@ -4,7 +4,7 @@
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.sway;
|
||||
cfg = config.myConfig.sway;
|
||||
|
||||
rotate_lisgd = pkgs.writeShellScriptBin "rotate_lisgd" ''
|
||||
# PREV_ORIENTATION and ORIENTATION are given by rot8
|
||||
@ -44,19 +44,22 @@
|
||||
in {
|
||||
imports = [./kanshi.nix ./waybar.nix ./theme.nix ./mako.nix];
|
||||
|
||||
options = {
|
||||
sway.enable = lib.mkEnableOption "sway, a lightweight window manager";
|
||||
sway.laptop = lib.mkEnableOption "laptop config";
|
||||
options.myConfig.sway = {
|
||||
enable = lib.mkEnableOption "sway, a lightweight window manager";
|
||||
laptop = lib.mkEnableOption "laptop config";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
sway.kanshi.enable = lib.mkDefault true;
|
||||
sway.waybar.enable = lib.mkDefault true;
|
||||
sway.theming.enable = lib.mkDefault true;
|
||||
sway.mako.enable = lib.mkDefault true;
|
||||
sway.waybar.battery = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
sway.waybar.backlight = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
sway.waybar.squeekboard = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
myConfig.sway = {
|
||||
kanshi.enable = lib.mkDefault true;
|
||||
waybar.enable = lib.mkDefault true;
|
||||
theming.enable = lib.mkDefault true;
|
||||
mako.enable = lib.mkDefault true;
|
||||
waybar.battery = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
waybar.backlight = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
waybar.squeekboard = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
kanshi.laptop = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
swaylock # screen locking
|
||||
|
@ -4,25 +4,28 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.sway.kanshi;
|
||||
cfg = config.myConfig.sway.kanshi;
|
||||
in {
|
||||
options = {
|
||||
sway.kanshi.enable = lib.mkEnableOption "kanshi, a dynamic display recognizer";
|
||||
sway.kanshi.laptop = lib.mkEnableOption "laptop workspaces";
|
||||
options.myConfig.sway.kanshi = {
|
||||
enable = lib.mkEnableOption "kanshi, a dynamic display recognizer";
|
||||
laptop = lib.mkEnableOption "laptop workspaces";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
profiles = lib.mkIf cfg.laptop {
|
||||
laptop.outputs = [
|
||||
settings = lib.mkIf cfg.laptop [
|
||||
{
|
||||
profile.name = "laptop";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
dock_luhbots = {
|
||||
outputs = [
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
@ -37,16 +40,16 @@ in {
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
exec = [
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg workspace 1, move workspace to DP-4"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 2, move workspace to DP-5"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 3, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 4, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to DP-4"
|
||||
];
|
||||
};
|
||||
dock_luhbots2 = {
|
||||
outputs = [
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "1080,1080";
|
||||
@ -61,16 +64,16 @@ in {
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
exec = [
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg workspace 1, move workspace to DP-4"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 2, move workspace to DP-5"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 3, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 4, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to DP-4"
|
||||
];
|
||||
};
|
||||
dock_luhbots3 = {
|
||||
outputs = [
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
@ -85,16 +88,16 @@ in {
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
exec = [
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg workspace 1, move workspace to DP-6"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 2, move workspace to DP-7"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 3, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 4, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to DP-6"
|
||||
];
|
||||
};
|
||||
dock_luhbots4 = {
|
||||
outputs = [
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "1080,1080";
|
||||
@ -109,16 +112,17 @@ in {
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
exec = [
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg workspace 1, move workspace to DP-3"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 2, move workspace to DP-4"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 3, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 4, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to DP-3"
|
||||
];
|
||||
};
|
||||
laptop_hannspree = {
|
||||
outputs = [
|
||||
}
|
||||
{
|
||||
profile.name = "docked-4k";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "320,1440";
|
||||
@ -130,15 +134,15 @@ in {
|
||||
scale = 1.5;
|
||||
}
|
||||
];
|
||||
exec = [
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg workspace 1, move workspace to HDMI-A-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 2, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 3, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 4, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to HDMI-A-1"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.sway.mako;
|
||||
cfg = config.myConfig.sway.mako;
|
||||
in {
|
||||
options = {
|
||||
sway.mako.enable = lib.mkEnableOption "mako, a notification deamon";
|
||||
options.myConfig.sway.mako = {
|
||||
enable = lib.mkEnableOption "mako, a notification deamon";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -4,7 +4,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.sway.theming;
|
||||
cfg = config.myConfig.sway.theming;
|
||||
|
||||
# currently, there is some friction between sway and gtk:
|
||||
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||
@ -13,8 +13,8 @@
|
||||
gsettings set $gnome_schema gtk-theme 'Dracula'
|
||||
'';
|
||||
in {
|
||||
options = {
|
||||
sway.theming.enable = lib.mkEnableOption "theming for sway";
|
||||
options.myConfig.sway.theming = {
|
||||
enable = lib.mkEnableOption "theming for sway";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -4,7 +4,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.sway.waybar;
|
||||
cfg = config.myConfig.sway.waybar;
|
||||
|
||||
schema = "org.gnome.desktop.a11y.applications";
|
||||
key = "screen-keyboard-enabled";
|
||||
@ -25,12 +25,12 @@
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
options = {
|
||||
sway.waybar.enable = lib.mkEnableOption "waybar, a status bar for wayland compositors";
|
||||
sway.waybar.squeekboard = lib.mkEnableOption "squeekboard";
|
||||
sway.waybar.mpd = lib.mkEnableOption "mpd";
|
||||
sway.waybar.battery = lib.mkEnableOption "battery";
|
||||
sway.waybar.backlight = lib.mkEnableOption "backlight";
|
||||
options.myConfig.sway.waybar = {
|
||||
enable = lib.mkEnableOption "waybar, a status bar for wayland compositors";
|
||||
squeekboard = lib.mkEnableOption "squeekboard";
|
||||
mpd = lib.mkEnableOption "mpd";
|
||||
battery = lib.mkEnableOption "battery";
|
||||
backlight = lib.mkEnableOption "backlight";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
21
modules/nixos/bootloader.nix
Normal file
21
modules/nixos/bootloader.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.bootloader;
|
||||
in {
|
||||
options.myConfig.bootloader = {
|
||||
enable = lib.mkEnableOption "enable systemd bootloader";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.loader = {
|
||||
timeout = 0;
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.memtest86.enable = true;
|
||||
systemd-boot.editor = false;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
}
|
47
modules/nixos/cups.nix
Normal file
47
modules/nixos/cups.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.cups;
|
||||
in {
|
||||
options.myConfig.cups = {
|
||||
enable = lib.mkEnableOption "printing";
|
||||
};
|
||||
|
||||
config = {
|
||||
# Enable CUPS to print documents.
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [pkgs.samsung-unified-linux-driver];
|
||||
};
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
hardware.printers = {
|
||||
ensurePrinters = [
|
||||
{
|
||||
name = "Samsung_ML-1630W_Series";
|
||||
location = "luhbots";
|
||||
deviceUri = "dnssd://Samsung%20ML-1630W%20Series%20(SEC00159937E684)._pdl-datastream._tcp.local/";
|
||||
model = "samsung/ML-1630W.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "Brother_HL-L3210CW_series";
|
||||
location = "Max Zimmer";
|
||||
deviceUri = "dnssd://Brother%20HL-L3210CW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-900f0c617136";
|
||||
model = "drv:///sample.drv/generic.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
30
modules/nixos/default.nix
Normal file
30
modules/nixos/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig;
|
||||
in {
|
||||
imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix];
|
||||
|
||||
options.myConfig = {
|
||||
enable = lib.mkEnableOption "my custom config";
|
||||
desktop = lib.mkEnableOption "custom config with desktop support";
|
||||
laptop = lib.mkEnableOption "extra stuff for laptops like wifi";
|
||||
};
|
||||
|
||||
config.myConfig = lib.mkIf cfg.enable {
|
||||
bootloader.enable = true;
|
||||
locale.enable = true;
|
||||
rebuild.enable = true;
|
||||
|
||||
greetd.enable = lib.mkIf cfg.desktop true;
|
||||
sway.enable = lib.mkIf cfg.desktop true;
|
||||
music.enable = lib.mkIf cfg.desktop true;
|
||||
cups.enable = lib.mkIf cfg.desktop true;
|
||||
wifi.tray = lib.mkIf cfg.desktop true;
|
||||
|
||||
sway.laptop = lib.mkIf cfg.laptop true;
|
||||
wifi.enable = lib.mkIf cfg.laptop true;
|
||||
};
|
||||
}
|
40
modules/nixos/gpu/amd.nix
Normal file
40
modules/nixos/gpu/amd.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.gpu.amd;
|
||||
in {
|
||||
options.myConfig.gpu.amd = {
|
||||
enable = lib.mkEnableOption "enable amd gpu hardware acceleration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.initrd.kernelModules = ["amdgpu"];
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
amdvlk
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
glxinfo
|
||||
vulkan-tools
|
||||
gpu-viewer
|
||||
];
|
||||
};
|
||||
}
|
@ -1,24 +1,30 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.greetd;
|
||||
themeEnv = ''
|
||||
export XDG_DATA_DIRS="${pkgs.whitesur-gtk-theme}/share:$XDG_DATA_DIRS"
|
||||
export XDG_DATA_DIRS="${pkgs.whitesur-icon-theme}/share:$XDG_DATA_DIRS"
|
||||
export XDG_DATA_DIRS="${pkgs.whitesur-cursors}/share:$XDG_DATA_DIRS"
|
||||
'';
|
||||
in {
|
||||
options.myConfig.greetd = {
|
||||
enable = lib.mkEnableOption "greetd, a light weight greater deamon";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.extraInit = themeEnv;
|
||||
programs.regreet = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
fit = "Contain";
|
||||
path = "/home/max/Documents/Blender/desktop background Informatiker/render 4K new color.png";
|
||||
path = ../../assets/bg4k.png;
|
||||
};
|
||||
gtk = {
|
||||
GTK = {
|
||||
application_prefer_dark_theme = true;
|
||||
cursor_theme_name = "capitaine-cursors-white";
|
||||
font_name = "FiraCode Nerd Font 20";
|
||||
@ -49,4 +55,5 @@ in {
|
||||
whitesur-icon-theme
|
||||
whitesur-cursors
|
||||
];
|
||||
};
|
||||
}
|
||||
|
34
modules/nixos/locale.nix
Normal file
34
modules/nixos/locale.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.locale;
|
||||
in {
|
||||
options.myConfig.locale = {
|
||||
enable = lib.mkEnableOption "custom locale";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
};
|
||||
}
|
33
modules/nixos/music.nix
Normal file
33
modules/nixos/music.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.music;
|
||||
in {
|
||||
options.myConfig.music = {
|
||||
enable = lib.mkEnableOption "sound system";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
musnix = {
|
||||
enable = true;
|
||||
rtcqs.enable = true;
|
||||
kernel.realtime = true;
|
||||
kernel.packages = pkgs.linuxPackages-rt_latest;
|
||||
};
|
||||
users.users.max.extraGroups = ["audio"];
|
||||
|
||||
sound.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
};
|
||||
}
|
@ -1,4 +1,11 @@
|
||||
{pkgs, ...}: let
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.rebuild;
|
||||
|
||||
# script for rebuilding nixos
|
||||
rebuild = pkgs.writeShellScriptBin "rebuild" ''
|
||||
# A rebuild script that commits on a successful build
|
||||
@ -37,5 +44,11 @@
|
||||
${pkgs.libnotify}/bin/notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
|
||||
'';
|
||||
in {
|
||||
options.myConfig.rebuild = {
|
||||
enable = lib.mkEnableOption "rebuild script with automatic git commits";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [rebuild];
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,15 @@
|
||||
{sops, ...}: {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sops;
|
||||
in {
|
||||
options.myConfig.sops = {
|
||||
enable = lib.mkEnableOption "sops, an secrets manager";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
sops = {
|
||||
age.keyFile = /home/max/.config/sops/age/keys.txt;
|
||||
secrets = {
|
||||
@ -31,4 +42,5 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,37 +1,22 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
cfg = config.myConfig.sway;
|
||||
in {
|
||||
options.myConfig.sway = {
|
||||
enable = lib.mkEnableOption "sway";
|
||||
laptop = lib.mkEnableOption "enable laptop things (backlight)";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
dbus # make dbus-update-activation-environment available in the path
|
||||
wayland
|
||||
xdg-utils # for opening default programs when clicking links
|
||||
glib # gsettings
|
||||
dracula-theme # gtk theme
|
||||
gnome3.adwaita-icon-theme # default gnome cursors
|
||||
swaylock
|
||||
swayidle
|
||||
grim # screenshot functionality
|
||||
slurp # screenshot functionality
|
||||
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin/stdout
|
||||
mako # notification system developed by swaywm maintainer
|
||||
wdisplays # tool to configure displays
|
||||
libnotify
|
||||
];
|
||||
|
||||
sound.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# xdg-desktop-portal works by exposing a series of D-Bus interfaces
|
||||
# known as portals under a well-known name
|
||||
# (org.freedesktop.portal.Desktop) and object path
|
||||
@ -53,11 +38,10 @@
|
||||
};
|
||||
|
||||
# make brightness keys work
|
||||
users.users.max.extraGroups = ["video"];
|
||||
programs.light.enable = true;
|
||||
users.users.max.extraGroups = ["video" "input"];
|
||||
programs.light.enable = lib.mkIf cfg.laptop true;
|
||||
|
||||
# make swaylock work
|
||||
security.pam.services.swaylock = {};
|
||||
|
||||
users.extraUsers.max.extraGroups = ["input"];
|
||||
};
|
||||
}
|
||||
|
@ -1,9 +1,63 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
sops.templates = let
|
||||
}: let
|
||||
cfg = config.myConfig.wifi;
|
||||
in {
|
||||
options.myConfig.wifi = {
|
||||
enable = lib.mkEnableOption "wifi";
|
||||
tray = lib.mkEnableOption "nm tray entry";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.etc = let
|
||||
template = config.sops.templates;
|
||||
base = "NetworkManager/system-connections";
|
||||
in {
|
||||
"${base}/home.nmconnection".source = template."home.nmconnection".path;
|
||||
"${base}/parents.nmconnection".source = template."parents.nmconnection".path;
|
||||
"${base}/eduroam.nmconnection".source = template."eduroam.nmconnection".path;
|
||||
"${base}/luhbots.nmconnection".source = template."luhbots.nmconnection".path;
|
||||
"${base}/luhbots5.nmconnection".source = template."luhbots5.nmconnection".path;
|
||||
};
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
environment.systemPackages = lib.optional cfg.tray pkgs.nm-tray;
|
||||
|
||||
myConfig.sops.enable = true;
|
||||
sops = {
|
||||
secrets = {
|
||||
"home/ssid" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"home/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"parents/ssid" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"parents/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"eduroam/ident" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"eduroam/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"luhbots/ssid" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"luhbots/ssid5" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"luhbots/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
};
|
||||
templates = let
|
||||
placeholder = config.sops.placeholder;
|
||||
in {
|
||||
"home.nmconnection".content = ''
|
||||
@ -88,19 +142,6 @@
|
||||
psk=${placeholder."luhbots/psk"}
|
||||
'';
|
||||
};
|
||||
environment.etc = let
|
||||
template = config.sops.templates;
|
||||
base = "NetworkManager/system-connections";
|
||||
in {
|
||||
"${base}/home.nmconnection".source = template."home.nmconnection".path;
|
||||
"${base}/parents.nmconnection".source = template."parents.nmconnection".path;
|
||||
"${base}/eduroam.nmconnection".source = template."eduroam.nmconnection".path;
|
||||
"${base}/luhbots.nmconnection".source = template."luhbots.nmconnection".path;
|
||||
"${base}/luhbots5.nmconnection".source = template."luhbots5.nmconnection".path;
|
||||
};
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nm-tray
|
||||
];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user