mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
Compare commits
11 Commits
cecc249daa
...
1e736dbfaa
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e736dbfaa | |||
| ab3404b356 | |||
| a21583b199 | |||
| a5db2944c6 | |||
| 98e95b1475 | |||
| 8a9e8bf06a | |||
| e0b904b87a | |||
| b4c838d65d | |||
| 028b282d0c | |||
| 58d355e682 | |||
| 4701080f28 |
124
configs/applicative.nix
Normal file
124
configs/applicative.nix
Normal file
@@ -0,0 +1,124 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
users.users.applicative = {
|
||||
name = "applicative";
|
||||
description = "<*>";
|
||||
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"pipewire"
|
||||
"audio"
|
||||
];
|
||||
};
|
||||
|
||||
# to run nspawn in nix sandbox
|
||||
nix.settings = {
|
||||
auto-allocate-uids = true;
|
||||
system-features = [ "uid-range" ];
|
||||
experimental-features = [
|
||||
"auto-allocate-uids"
|
||||
"cgroups"
|
||||
];
|
||||
extra-sandbox-paths = [ "/dev/net" ]; # needed for tests of VPNs
|
||||
};
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
extraBackupArgs = [
|
||||
"--exclude=${config.users.users.applicative.home}/src/nixpkgs/.git"
|
||||
];
|
||||
paths = [
|
||||
config.users.users.applicative.home
|
||||
];
|
||||
};
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
# still required for systemd-nspawn
|
||||
users = [ config.users.users.applicative.name ];
|
||||
commands = [ "ALL" ];
|
||||
}
|
||||
];
|
||||
|
||||
home-manager.users.applicative =
|
||||
let
|
||||
mainGitConfig = (import ./git.nix {
|
||||
inherit pkgs lib config;
|
||||
}).home-manager.users.me.programs.git;
|
||||
mainAlacrittyConfig = (import ./alacritty.nix {
|
||||
inherit pkgs lib config;
|
||||
}).home-manager.users.me.programs.alacritty;
|
||||
in
|
||||
lib.recursiveUpdate
|
||||
(import ./graphical/home-manager.nix {
|
||||
inherit lib pkgs config;
|
||||
})
|
||||
{
|
||||
xdg.enable = true;
|
||||
home.stateVersion = "25.11";
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
inherit (mainGitConfig.settings) alias;
|
||||
};
|
||||
};
|
||||
|
||||
programs.alacritty = mainAlacrittyConfig;
|
||||
|
||||
services.hyprpaper =
|
||||
let
|
||||
# asgWallpaper = pkgs.fetchurl {
|
||||
# url = "http://c.krebsco.de/asg-wallpaper.png";
|
||||
# hash = "sha256-XLp8XcUgFgDKW5Qae0//0Xw9lhribcevQTVSQvClEB4=";
|
||||
# };
|
||||
|
||||
backgroundColor = config.lib.stylix.colors.withHashtag.base06;
|
||||
foregroundColor = config.lib.stylix.colors.withHashtag.base01;
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
|
||||
svgUrl = "https://applicative.systems/_astro/logo-full.D8zRvqBZ.svg";
|
||||
logoSvg = pkgs.fetchurl {
|
||||
url = svgUrl;
|
||||
hash = "sha256-qXDIEZsAPn4eUJ3kb5U6L3PMUCtWGYqhqyIaBt7FntE=";
|
||||
};
|
||||
|
||||
asgWallpaper =
|
||||
pkgs.runCommand "applicative-wallpaper.png"
|
||||
{
|
||||
nativeBuildInputs = [ pkgs.imagemagick ];
|
||||
}
|
||||
''
|
||||
# 1. We use -background to set the canvas color
|
||||
# 2. We use -fuzz and -opaque to replace the logo's internal colors
|
||||
# 3. We use -gravity and -extent to center it on a wallpaper-sized canvas
|
||||
|
||||
convert \
|
||||
-background none \
|
||||
-density 300 \
|
||||
"${logoSvg}" \
|
||||
-fuzz 100% -fill "${foregroundColor}" -opaque black \
|
||||
-resize 800x800 \
|
||||
-gravity center \
|
||||
-background "${backgroundColor}" \
|
||||
-extent ${toString width}x${toString height} \
|
||||
$out
|
||||
'';
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = false;
|
||||
splash = true;
|
||||
preload = [ "${asgWallpaper}" ];
|
||||
wallpaper = [ ",${asgWallpaper}" ];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -105,67 +105,6 @@ in
|
||||
supportedLocales = [ "all" ];
|
||||
};
|
||||
}
|
||||
{
|
||||
# services.displayManager.cosmic-greeter.enable = false;
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
# services.system76-scheduler.enable = true;
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-cosmic ];
|
||||
};
|
||||
|
||||
users.users.applicative = {
|
||||
name = "applicative";
|
||||
description = "<*>";
|
||||
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"pipewire"
|
||||
"audio"
|
||||
];
|
||||
};
|
||||
|
||||
# to run nspawn in nix sandbox
|
||||
nix.settings = {
|
||||
auto-allocate-uids = true;
|
||||
system-features = [ "uid-range" ];
|
||||
experimental-features = [
|
||||
"auto-allocate-uids"
|
||||
"cgroups"
|
||||
];
|
||||
};
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
extraBackupArgs = [
|
||||
"--exclude=${config.users.users.applicative.home}/src/nixpkgs/.git"
|
||||
];
|
||||
paths = [
|
||||
config.users.users.applicative.home
|
||||
];
|
||||
};
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
# still required for systemd-nspawn
|
||||
users = [ config.users.users.applicative.name ];
|
||||
commands = [ "ALL" ];
|
||||
}
|
||||
];
|
||||
|
||||
home-manager.users.applicative =
|
||||
lib.recursiveUpdate
|
||||
(import ./graphical/home-manager.nix {
|
||||
inherit lib pkgs config;
|
||||
})
|
||||
{
|
||||
xdg.enable = true;
|
||||
home.stateVersion = "25.11";
|
||||
services.hyprpaper.enable = false;
|
||||
# programs.git = config.home-manager.users.me.programs.git;
|
||||
# programs.alacritty = config.home-manager.users.me.programs.alacritty;
|
||||
};
|
||||
}
|
||||
{
|
||||
services.power-profiles-daemon.enable = true;
|
||||
}
|
||||
@@ -268,7 +207,6 @@ in
|
||||
./clipboard.nix
|
||||
./cloud.nix
|
||||
./direnv.nix
|
||||
./dunst.nix
|
||||
./fonts.nix
|
||||
./fzf.nix
|
||||
./git.nix
|
||||
@@ -302,6 +240,7 @@ in
|
||||
./vscode.nix
|
||||
./wallpaper.nix
|
||||
./zsh.nix
|
||||
./applicative.nix
|
||||
{
|
||||
home-manager.users.me.home.file.".zshrc".text = ''
|
||||
# nothing to see here
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "notifications" ''
|
||||
${pkgs.dunst}/bin/dunstctl history \
|
||||
| ${pkgs.jq}/bin/jq -r '
|
||||
.data[]
|
||||
| map("${sgr "90" ''\(.appname.data)''} ${sgr "1" ''\(.summary.data)''} ${sgr "31" ''\(.body.data | gsub("\n"; " | "))''}")
|
||||
| join("\n")'
|
||||
'')
|
||||
];
|
||||
|
||||
home-manager.users.me.services.dunst = {
|
||||
enable = false;
|
||||
settings = {
|
||||
global = {
|
||||
transparency = 10;
|
||||
geometry = "200x5-30+20";
|
||||
follow = "mouse";
|
||||
indicate_hidden = true;
|
||||
notification_height = 0;
|
||||
separator_height = 2;
|
||||
padding = 8;
|
||||
horizontal_padding = 8;
|
||||
sort = true;
|
||||
markup = "full";
|
||||
format = "%a\\n<b>%s</b>\\n%b";
|
||||
alignment = "left";
|
||||
show_age_threshold = 60;
|
||||
bounce_freq = 0;
|
||||
word_wrap = true;
|
||||
ellipsize = "middle";
|
||||
ignore_newline = false;
|
||||
stack_duplicates = true;
|
||||
hide_duplicate_count = false;
|
||||
max_icon_size = 32;
|
||||
sticky_history = true;
|
||||
history_length = 20;
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
||||
browser = lib.getExe pkgs.niveum-browser;
|
||||
verbosity = "mesg";
|
||||
corner_radius = 0;
|
||||
mouse_left_click = "do_action";
|
||||
mouse_right_click = "close_current";
|
||||
mouse_middle_click = "close_all";
|
||||
};
|
||||
urgency_low = {
|
||||
timeout = 5;
|
||||
};
|
||||
urgency_normal = {
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_critical = {
|
||||
timeout = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -36,6 +36,7 @@
|
||||
st = "status -s";
|
||||
unstage = "reset HEAD --";
|
||||
diffs = "diff --staged";
|
||||
pushf = "push --force-with-lease";
|
||||
last = "log -1 HEAD";
|
||||
logs = "log --pretty=oneline";
|
||||
graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||
|
||||
@@ -38,19 +38,6 @@ in
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
|
||||
# services.displayManager.cosmic-greeter = {
|
||||
# enable = true;
|
||||
# wayland.enable = true;
|
||||
# extraPackages = with pkgs.kdePackages; [
|
||||
# qtmultimedia
|
||||
# qtsvg
|
||||
# ];
|
||||
# };
|
||||
services.libinput = {
|
||||
enable = true;
|
||||
touchpad.tapping = true;
|
||||
};
|
||||
|
||||
programs.regreet =
|
||||
let
|
||||
wallpaper =
|
||||
|
||||
@@ -233,7 +233,10 @@ in
|
||||
"${lib.getExe pkgs.hyprshot}, screencopy, allow"
|
||||
"${pkgs.xdg-desktop-portal-hyprland}/libexec/.xdg-desktop-portal-hyprland-wrapped, screencopy, allow"
|
||||
];
|
||||
monitor = ",preferred,auto,1"; # TODO https://wiki.hypr.land/Configuring/Monitors/
|
||||
monitor = [
|
||||
",preferred,auto,1" # TODO https://wiki.hypr.land/Configuring/Monitors/
|
||||
"desc:Samsung Electric Company C27F390 HTQH602129, 1920x1080, 0x-1080, 1"
|
||||
];
|
||||
exec-once = [
|
||||
(lib.getExe pkgs.ashell)
|
||||
"hyprctl dispatch exec \"[workspace special:उपलविशेषः silent] obsidian\""
|
||||
@@ -242,6 +245,13 @@ in
|
||||
# (lib.getExe pkgs.hyprpaper)
|
||||
];
|
||||
|
||||
device = [
|
||||
{
|
||||
name = "elan-touchscreen";
|
||||
enabled = false;
|
||||
}
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = 2;
|
||||
gaps_out = 2;
|
||||
@@ -257,12 +267,12 @@ in
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 1.0;
|
||||
shadow = {
|
||||
enabled = true;
|
||||
enabled = false;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
};
|
||||
blur = {
|
||||
enabled = true;
|
||||
enabled = false;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
vibrancy = 0.17;
|
||||
@@ -369,10 +379,10 @@ in
|
||||
extraConfig = ''
|
||||
bind = ${mod}, R, submap, resize
|
||||
submap = resize
|
||||
binde = , l, resizeactive, 10 0
|
||||
binde = , h, resizeactive, -10 0
|
||||
binde = , k, resizeactive, 0 -10
|
||||
binde = , j, resizeactive, 0 10
|
||||
binde = , l, resizeactive, 50 0
|
||||
binde = , h, resizeactive, -50 0
|
||||
binde = , k, resizeactive, 0 -50
|
||||
binde = , j, resizeactive, 0 50
|
||||
bind = , escape, submap, reset
|
||||
submap = reset
|
||||
'';
|
||||
|
||||
@@ -41,8 +41,8 @@ in
|
||||
"Alt+j" = "add video-pan-y -0.05";
|
||||
};
|
||||
scripts = [
|
||||
pkgs.mpvScripts.quality-menu
|
||||
pkgs.mpvScripts.visualizer
|
||||
# pkgs.mpvScripts.quality-menu
|
||||
# pkgs.mpvScripts.visualizer
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -215,6 +215,7 @@ in
|
||||
|
||||
(python3.withPackages (py: [
|
||||
py.black
|
||||
py.ruff
|
||||
# py.python-language-server
|
||||
# py.pyls-mypy
|
||||
# py.pyls-black
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
};
|
||||
|
||||
sizes = {
|
||||
terminal = 10;
|
||||
terminal = 8;
|
||||
applications = 10;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
stag = prev.callPackage packages/stag.nix { }; # TODO upstream
|
||||
mpv = prev.mpv.override {
|
||||
scripts = [
|
||||
final.mpvScripts.visualizer
|
||||
# final.mpvScripts.visualizer
|
||||
final.mpvScripts.mpris
|
||||
];
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
di-fm-key-file,
|
||||
radioStreams,
|
||||
executableName ? "mpv-radio",
|
||||
mpvCommand ? "${mpv}/bin/mpv",
|
||||
mpvCommand ? "${mpv}/bin/mpv --force-window=yes",
|
||||
}:
|
||||
let
|
||||
streams = radioStreams.override {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./cuda.nix
|
||||
./hardware-configuration.nix
|
||||
../../configs/networkmanager.nix
|
||||
../../configs/default.nix
|
||||
|
||||
42
systems/fatteh/cuda.nix
Normal file
42
systems/fatteh/cuda.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true; # needed for PRIME
|
||||
open = false; # MX150 (Pascal) needs proprietary firmware
|
||||
nvidiaSettings = true;
|
||||
prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
# from lspci
|
||||
intelBusId = "PCI:0:2:0"; # Intel UHD Graphics 620
|
||||
nvidiaBusId = "PCI:1:0:0"; # NVIDIA GeForce MX150
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings.system-features = [ "cuda" ];
|
||||
|
||||
programs.nix-required-mounts = {
|
||||
enable = true;
|
||||
presets.nvidia-gpu.enable = true;
|
||||
# Workaround for <https://github.com/NixOS/nix/issues/9272>, copied from
|
||||
# <https://github.com/nix-community/infra/pull/1807>.
|
||||
extraWrapperArgs = [
|
||||
"--run shift"
|
||||
"--add-flag '${
|
||||
builtins.unsafeDiscardOutputDependency
|
||||
(derivation {
|
||||
name = "needs-cuda";
|
||||
builder = "_";
|
||||
system = "_";
|
||||
requiredSystemFeatures = [ "cuda" ];
|
||||
}).drvPath
|
||||
}'"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user