Compare commits
No commits in common. "03c95b7b6f71e8a87358ddb49590caa2f246d846" and "1e0e83b9340129939e2516fa62da5e3cb5a9badc" have entirely different histories.
03c95b7b6f
...
1e0e83b934
16
flake.lock
16
flake.lock
@ -7,16 +7,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717527182,
|
||||
"narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=",
|
||||
"lastModified": 1710888565,
|
||||
"narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "845a5c4c073f74105022533907703441e0464bc3",
|
||||
"rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.05",
|
||||
"ref": "release-23.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@ -73,16 +73,16 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1718086528,
|
||||
"narHash": "sha256-hoB7B7oPgypePz16cKWawPfhVvMSXj4G/qLsfFuhFjw=",
|
||||
"lastModified": 1715668745,
|
||||
"narHash": "sha256-xp62OkRkbUDNUc6VSqH02jB0FbOS+MsfMb7wL1RJOfA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "47b604b07d1e8146d5398b42d3306fdebd343986",
|
||||
"rev": "9ddcaffecdf098822d944d4147dd8da30b4e6843",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-24.05",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -2,12 +2,12 @@
|
||||
description = "Nixos config flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-24.05";
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
@ -10,22 +10,96 @@
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../modules/nixos
|
||||
# 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
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
myConfig = {
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
desktop = true;
|
||||
gpu.amd.enable = true;
|
||||
laptop = true;
|
||||
extraPackages = with pkgs; [
|
||||
libvdpau-va-gl
|
||||
libvdpau
|
||||
libva
|
||||
rocmPackages.clr.icd
|
||||
amdvlk
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
};
|
||||
|
||||
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;
|
||||
@ -150,6 +224,8 @@
|
||||
'';
|
||||
};
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
|
@ -3,11 +3,12 @@
|
||||
../../modules/home
|
||||
];
|
||||
|
||||
myConfig = {
|
||||
enable = true;
|
||||
desktop = true;
|
||||
laptop = true;
|
||||
};
|
||||
shell.enable = true;
|
||||
git.enable = true;
|
||||
music.enable = true;
|
||||
sway.enable = true;
|
||||
sway.laptop = true;
|
||||
myPrograms.enable = true;
|
||||
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
@ -22,4 +23,15 @@
|
||||
# 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,33 +1,3 @@
|
||||
{
|
||||
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.myConfig.git;
|
||||
cfg = config.git;
|
||||
in {
|
||||
imports = [./lazygit.nix];
|
||||
|
||||
options.myConfig.git = {
|
||||
enable = lib.mkEnableOption "git";
|
||||
options = {
|
||||
git.enable = lib.mkEnableOption "git";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig.git.lazygit.enable = lib.mkDefault true;
|
||||
git.lazygit.enable = lib.mkDefault true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.git.lazygit;
|
||||
cfg = config.git.lazygit;
|
||||
in {
|
||||
options.myConfig.git.lazygit = {
|
||||
enable = lib.mkEnableOption "lazygit, a git tui";
|
||||
options = {
|
||||
git.lazygit.enable = lib.mkEnableOption "lazygit, a git tui";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -4,15 +4,15 @@
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.music;
|
||||
cfg = config.music;
|
||||
in {
|
||||
imports = [./mpd.nix];
|
||||
|
||||
options.myConfig.music = {
|
||||
enable = lib.mkEnableOption "make the system ready for listening to music";
|
||||
options = {
|
||||
music.enable = lib.mkEnableOption "make the system ready for listening to music";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig.music.mpd.enable = lib.mkDefault true;
|
||||
music.mpd.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
|
@ -4,10 +4,10 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.music.mpd;
|
||||
cfg = config.music.mpd;
|
||||
in {
|
||||
options.myConfig.music.mpd = {
|
||||
enable = lib.mkEnableOption "Music Player Daemon";
|
||||
options = {
|
||||
music.mpd.enable = lib.mkEnableOption "Music Player Daemon";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -4,21 +4,19 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs;
|
||||
cfg = config.myPrograms;
|
||||
in {
|
||||
imports = [./foot.nix ./thunderbird.nix ./nextcloud.nix ./udiskie.nix];
|
||||
|
||||
options.myConfig.programs = {
|
||||
enable = lib.mkEnableOption "programs for desktop use";
|
||||
options = {
|
||||
myPrograms.enable = lib.mkEnableOption "programs for desktop use";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig.programs = {
|
||||
foot.enable = lib.mkDefault true;
|
||||
thunderbird.enable = lib.mkDefault true;
|
||||
nextcloud.enable = lib.mkDefault true;
|
||||
udiskie.enable = lib.mkDefault true;
|
||||
};
|
||||
myPrograms.foot.enable = lib.mkDefault true;
|
||||
myPrograms.thunderbird.enable = lib.mkDefault true;
|
||||
myPrograms.nextcloud.enable = lib.mkDefault true;
|
||||
myPrograms.udiskie.enable = lib.mkDefault true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
unzip
|
||||
@ -45,9 +43,8 @@ in {
|
||||
freecad
|
||||
flatpak
|
||||
wine
|
||||
gyroflow
|
||||
unstable.gyroflow
|
||||
prusa-slicer
|
||||
kicad
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs.foot;
|
||||
cfg = config.myPrograms.foot;
|
||||
in {
|
||||
options.myConfig.programs.foot = {
|
||||
enable = lib.mkEnableOption "foot, a lightweight wayland terminal emulator";
|
||||
options = {
|
||||
myPrograms.foot.enable = lib.mkEnableOption "foot, a lightweight wayland terminal emulator";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs.nextcloud;
|
||||
cfg = config.myPrograms.nextcloud;
|
||||
in {
|
||||
options.myConfig.programs.nextcloud = {
|
||||
enable = lib.mkEnableOption "nextcloud client";
|
||||
options = {
|
||||
myPrograms.nextcloud.enable = lib.mkEnableOption "nextcloud client";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs.thunderbird;
|
||||
cfg = config.myPrograms.thunderbird;
|
||||
in {
|
||||
options.myConfig.programs.thunderbird = {
|
||||
enable = lib.mkEnableOption "thunderbird, a email client";
|
||||
options = {
|
||||
myPrograms.thunderbird.enable = lib.mkEnableOption "thunderbird, a email client";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs.udiskie;
|
||||
cfg = config.myPrograms.udiskie;
|
||||
in {
|
||||
options.myConfig.programs.udiskie = {
|
||||
enable = lib.mkEnableOption "auto media mounting";
|
||||
options = {
|
||||
myPrograms.udiskie.enable = lib.mkEnableOption "auto media mounting";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -3,10 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell.bat;
|
||||
cfg = config.shell.bat;
|
||||
in {
|
||||
options.myConfig.shell.bat = {
|
||||
enable = lib.mkEnableOption "bat, a cat replacement with syntax highlighting";
|
||||
options = {
|
||||
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.myConfig.shell.btop;
|
||||
cfg = config.shell.btop;
|
||||
in {
|
||||
options.myConfig.shell.btop = {
|
||||
enable = lib.mkEnableOption "btop, a system monitor";
|
||||
options = {
|
||||
shell.btop.enable = lib.mkEnableOption "btop, a system monitor";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -3,21 +3,18 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell;
|
||||
cfg = config.shell;
|
||||
in {
|
||||
imports = [./zsh.nix ./bat.nix ./btop.nix ./neovim.nix ./direnv.nix];
|
||||
imports = [./zsh.nix ./bat.nix ./btop.nix ./neovim.nix];
|
||||
|
||||
options.myConfig.shell = {
|
||||
enable = lib.mkEnableOption "my shell environment";
|
||||
options = {
|
||||
shell.enable = lib.mkEnableOption "my shell environment";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
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;
|
||||
};
|
||||
shell.zsh.enable = lib.mkDefault true;
|
||||
shell.neovim.enable = lib.mkDefault true;
|
||||
shell.btop.enable = lib.mkDefault true;
|
||||
shell.bat.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
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,34 +4,16 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell.neovim;
|
||||
cfg = config.shell.neovim;
|
||||
in {
|
||||
options.myConfig.shell.neovim = {
|
||||
enable = lib.mkEnableOption "neovim";
|
||||
options = {
|
||||
shell.neovim.enable = lib.mkEnableOption "neovim";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
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.packages = with pkgs; [neovim];
|
||||
home.sessionVariables = {
|
||||
EDITOR = "${pkgs.neovim}/bin/nvim";
|
||||
};
|
||||
|
||||
home.file.".config/nvim/lua".source = ./nvim-lua;
|
||||
};
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
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" },
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
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]])
|
||||
|
@ -1,35 +0,0 @@
|
||||
---@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" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
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.myConfig.shell.zsh;
|
||||
cfg = config.shell.zsh;
|
||||
in {
|
||||
options.myConfig.shell.zsh = {
|
||||
enable = lib.mkEnableOption "Zsh, an advanced shell";
|
||||
options = {
|
||||
shell.zsh.enable = lib.mkEnableOption "Zsh, an advanced shell";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
defaultKeymap = "emacs";
|
||||
dotDir = ".config/zsh";
|
||||
|
@ -4,7 +4,7 @@
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sway;
|
||||
cfg = config.sway;
|
||||
|
||||
rotate_lisgd = pkgs.writeShellScriptBin "rotate_lisgd" ''
|
||||
# PREV_ORIENTATION and ORIENTATION are given by rot8
|
||||
@ -44,22 +44,19 @@
|
||||
in {
|
||||
imports = [./kanshi.nix ./waybar.nix ./theme.nix ./mako.nix];
|
||||
|
||||
options.myConfig.sway = {
|
||||
enable = lib.mkEnableOption "sway, a lightweight window manager";
|
||||
laptop = lib.mkEnableOption "laptop config";
|
||||
options = {
|
||||
sway.enable = lib.mkEnableOption "sway, a lightweight window manager";
|
||||
sway.laptop = lib.mkEnableOption "laptop config";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
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);
|
||||
};
|
||||
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);
|
||||
|
||||
home.packages = with pkgs; [
|
||||
swaylock # screen locking
|
||||
|
@ -4,28 +4,25 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sway.kanshi;
|
||||
cfg = config.sway.kanshi;
|
||||
in {
|
||||
options.myConfig.sway.kanshi = {
|
||||
enable = lib.mkEnableOption "kanshi, a dynamic display recognizer";
|
||||
laptop = lib.mkEnableOption "laptop workspaces";
|
||||
options = {
|
||||
sway.kanshi.enable = lib.mkEnableOption "kanshi, a dynamic display recognizer";
|
||||
sway.kanshi.laptop = lib.mkEnableOption "laptop workspaces";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
settings = lib.mkIf cfg.laptop [
|
||||
{
|
||||
profile.name = "laptop";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
profiles = lib.mkIf cfg.laptop {
|
||||
laptop.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
dock_luhbots = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
@ -40,16 +37,16 @@ in {
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
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"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
};
|
||||
dock_luhbots2 = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "1080,1080";
|
||||
@ -64,16 +61,16 @@ in {
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
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"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
};
|
||||
dock_luhbots3 = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
@ -88,16 +85,16 @@ in {
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
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"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
};
|
||||
dock_luhbots4 = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "1080,1080";
|
||||
@ -112,17 +109,16 @@ in {
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
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"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.name = "docked-4k";
|
||||
profile.outputs = [
|
||||
};
|
||||
laptop_hannspree = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "320,1440";
|
||||
@ -134,15 +130,15 @@ in {
|
||||
scale = 1.5;
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
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.myConfig.sway.mako;
|
||||
cfg = config.sway.mako;
|
||||
in {
|
||||
options.myConfig.sway.mako = {
|
||||
enable = lib.mkEnableOption "mako, a notification deamon";
|
||||
options = {
|
||||
sway.mako.enable = lib.mkEnableOption "mako, a notification deamon";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -4,7 +4,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sway.theming;
|
||||
cfg = config.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.myConfig.sway.theming = {
|
||||
enable = lib.mkEnableOption "theming for sway";
|
||||
options = {
|
||||
sway.theming.enable = lib.mkEnableOption "theming for sway";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -4,7 +4,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sway.waybar;
|
||||
cfg = config.sway.waybar;
|
||||
|
||||
schema = "org.gnome.desktop.a11y.applications";
|
||||
key = "screen-keyboard-enabled";
|
||||
@ -25,12 +25,12 @@
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
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";
|
||||
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";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -1,21 +0,0 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
{
|
||||
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";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
{
|
||||
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,59 +1,52 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
lib,
|
||||
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 = ../../assets/bg4k.png;
|
||||
};
|
||||
GTK = {
|
||||
application_prefer_dark_theme = true;
|
||||
cursor_theme_name = "capitaine-cursors-white";
|
||||
font_name = "FiraCode Nerd Font 20";
|
||||
icon_theme_name = "WhiteSur-dark";
|
||||
theme_name = "WhiteSur-Dark";
|
||||
};
|
||||
commands = {
|
||||
reboot = ["systemctl" "reboot"];
|
||||
poweroff = ["systemctl" "poweroff"];
|
||||
};
|
||||
environment.extraInit = themeEnv;
|
||||
programs.regreet = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
fit = "Contain";
|
||||
path = "/home/max/Documents/Blender/desktop background Informatiker/render 4K new color.png";
|
||||
};
|
||||
gtk = {
|
||||
application_prefer_dark_theme = true;
|
||||
cursor_theme_name = "capitaine-cursors-white";
|
||||
font_name = "FiraCode Nerd Font 20";
|
||||
icon_theme_name = "WhiteSur-dark";
|
||||
theme_name = "WhiteSur-Dark";
|
||||
};
|
||||
commands = {
|
||||
reboot = ["systemctl" "reboot"];
|
||||
poweroff = ["systemctl" "poweroff"];
|
||||
};
|
||||
};
|
||||
|
||||
users.users.greeter = {
|
||||
isNormalUser = false;
|
||||
description = "Greeter";
|
||||
extraGroups = [];
|
||||
};
|
||||
|
||||
services.greetd.enable = true;
|
||||
|
||||
environment.etc."greetd/environments".text = ''
|
||||
sway
|
||||
'';
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
whitesur-gtk-theme
|
||||
whitesur-icon-theme
|
||||
whitesur-cursors
|
||||
];
|
||||
};
|
||||
|
||||
users.users.greeter = {
|
||||
isNormalUser = false;
|
||||
description = "Greeter";
|
||||
extraGroups = [];
|
||||
};
|
||||
|
||||
services.greetd.enable = true;
|
||||
|
||||
environment.etc."greetd/environments".text = ''
|
||||
sway
|
||||
'';
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
whitesur-gtk-theme
|
||||
whitesur-icon-theme
|
||||
whitesur-cursors
|
||||
];
|
||||
}
|
||||
|
@ -1,34 +0,0 @@
|
||||
{
|
||||
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";
|
||||
};
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
{
|
||||
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,11 +1,4 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.rebuild;
|
||||
|
||||
{pkgs, ...}: let
|
||||
# script for rebuilding nixos
|
||||
rebuild = pkgs.writeShellScriptBin "rebuild" ''
|
||||
# A rebuild script that commits on a successful build
|
||||
@ -44,11 +37,5 @@
|
||||
${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];
|
||||
};
|
||||
environment.systemPackages = [rebuild];
|
||||
}
|
||||
|
@ -1,45 +1,33 @@
|
||||
{
|
||||
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 = {
|
||||
"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;
|
||||
};
|
||||
{sops, ...}: {
|
||||
sops = {
|
||||
age.keyFile = /home/max/.config/sops/age/keys.txt;
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,47 +1,63 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sway;
|
||||
in {
|
||||
options.myConfig.sway = {
|
||||
enable = lib.mkEnableOption "sway";
|
||||
laptop = lib.mkEnableOption "enable laptop things (backlight)";
|
||||
}: {
|
||||
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
|
||||
# (/org/freedesktop/portal/desktop).
|
||||
# The portal interfaces include APIs for file access, opening URIs,
|
||||
# printing and others.
|
||||
services.dbus.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
config.common.default = ["wlr" "gtk"];
|
||||
# gtk portal needed to make gtk apps happy
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
dbus # make dbus-update-activation-environment available in the path
|
||||
libnotify
|
||||
];
|
||||
|
||||
# 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
|
||||
# (/org/freedesktop/portal/desktop).
|
||||
# The portal interfaces include APIs for file access, opening URIs,
|
||||
# printing and others.
|
||||
services.dbus.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
config.common.default = ["wlr" "gtk"];
|
||||
# gtk portal needed to make gtk apps happy
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
};
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
# make brightness keys work
|
||||
users.users.max.extraGroups = ["video" "input"];
|
||||
programs.light.enable = lib.mkIf cfg.laptop true;
|
||||
|
||||
# make swaylock work
|
||||
security.pam.services.swaylock = {};
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
# make brightness keys work
|
||||
users.users.max.extraGroups = ["video"];
|
||||
programs.light.enable = true;
|
||||
|
||||
# make swaylock work
|
||||
security.pam.services.swaylock = {};
|
||||
|
||||
users.extraUsers.max.extraGroups = ["input"];
|
||||
}
|
||||
|
@ -1,147 +1,106 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.wifi;
|
||||
in {
|
||||
options.myConfig.wifi = {
|
||||
enable = lib.mkEnableOption "wifi";
|
||||
tray = lib.mkEnableOption "nm tray entry";
|
||||
}: {
|
||||
sops.templates = let
|
||||
placeholder = config.sops.placeholder;
|
||||
in {
|
||||
"home.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."home/ssid"}
|
||||
type=wifi
|
||||
autoconnect-priority=10
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."home/ssid"}
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."home/psk"}
|
||||
'';
|
||||
"parents.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."parents/ssid"}
|
||||
type=wifi
|
||||
autoconnect-priority=10
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."parents/ssid"}
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."parents/psk"}
|
||||
'';
|
||||
"eduroam.nmconnection".content = ''
|
||||
[connection]
|
||||
id=eduroam
|
||||
type=wifi
|
||||
autoconnect-priority=0
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=eduroam
|
||||
|
||||
[wifi-security]
|
||||
auth-alg=open
|
||||
key-mgmt=wpa-eap
|
||||
|
||||
[802-1x]
|
||||
anonymous-identity=anonymous@uni-hannover.de
|
||||
ca-cert=${./T-TeleSec_GlobalRoot_Class_2.crt}
|
||||
domain-suffix-match=radius-dfn.luis.uni-hannover.de
|
||||
eap=ttls;
|
||||
identity=${placeholder."eduroam/ident"}
|
||||
password=${placeholder."eduroam/psk"}
|
||||
phase2-auth=mschapv2
|
||||
'';
|
||||
"luhbots.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."luhbots/ssid"}
|
||||
type=wifi
|
||||
autoconnect-priority=5
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."luhbots/ssid"}
|
||||
autoconnect-priority=0
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."luhbots/psk"}
|
||||
'';
|
||||
"luhbots5.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."luhbots/ssid5"}
|
||||
type=wifi
|
||||
autoconnect-priority=10
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."luhbots/ssid5"}
|
||||
autoconnect-priority=0
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."luhbots/psk"}
|
||||
'';
|
||||
};
|
||||
|
||||
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 = ''
|
||||
[connection]
|
||||
id=${placeholder."home/ssid"}
|
||||
type=wifi
|
||||
autoconnect-priority=10
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."home/ssid"}
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."home/psk"}
|
||||
'';
|
||||
"parents.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."parents/ssid"}
|
||||
type=wifi
|
||||
autoconnect-priority=10
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."parents/ssid"}
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."parents/psk"}
|
||||
'';
|
||||
"eduroam.nmconnection".content = ''
|
||||
[connection]
|
||||
id=eduroam
|
||||
type=wifi
|
||||
autoconnect-priority=0
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=eduroam
|
||||
|
||||
[wifi-security]
|
||||
auth-alg=open
|
||||
key-mgmt=wpa-eap
|
||||
|
||||
[802-1x]
|
||||
anonymous-identity=anonymous@uni-hannover.de
|
||||
ca-cert=${./T-TeleSec_GlobalRoot_Class_2.crt}
|
||||
domain-suffix-match=radius-dfn.luis.uni-hannover.de
|
||||
eap=ttls;
|
||||
identity=${placeholder."eduroam/ident"}
|
||||
password=${placeholder."eduroam/psk"}
|
||||
phase2-auth=mschapv2
|
||||
'';
|
||||
"luhbots.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."luhbots/ssid"}
|
||||
type=wifi
|
||||
autoconnect-priority=5
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."luhbots/ssid"}
|
||||
autoconnect-priority=0
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."luhbots/psk"}
|
||||
'';
|
||||
"luhbots5.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."luhbots/ssid5"}
|
||||
type=wifi
|
||||
autoconnect-priority=10
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."luhbots/ssid5"}
|
||||
autoconnect-priority=0
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
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