flake-parts: yggdrasil done

This commit is contained in:
Christoph Hollizeck 2025-10-28 09:54:37 +01:00
parent ebc8a545c8
commit 72fda87328
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
10 changed files with 228 additions and 58 deletions

17
flake.lock generated
View file

@ -1276,22 +1276,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-tuya-vacuum": {
"locked": {
"lastModified": 1743180016,
"narHash": "sha256-REuNO+d3gTjk+03wZEcwCvXZNQGbb0nv44gwoLMTj4Q=",
"owner": "Daholli",
"repo": "nixpkgs",
"rev": "84b34e39e7a0879367189f34401191f6a0364bcf",
"type": "github"
},
"original": {
"owner": "Daholli",
"repo": "nixpkgs",
"rev": "84b34e39e7a0879367189f34401191f6a0364bcf",
"type": "github"
}
},
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1761373498, "lastModified": 1761373498,
@ -1450,7 +1434,6 @@
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixpkgs-latest-factorio": "nixpkgs-latest-factorio", "nixpkgs-latest-factorio": "nixpkgs-latest-factorio",
"nixpkgs-tuya-vacuum": "nixpkgs-tuya-vacuum",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"simple-nixos-mailserver": "simple-nixos-mailserver", "simple-nixos-mailserver": "simple-nixos-mailserver",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",

View file

@ -16,8 +16,10 @@
import-tree.url = "github:vic/import-tree"; import-tree.url = "github:vic/import-tree";
treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";
catppuccin.url = "github:catppuccin/nix";
sops-nix.url = "github:Mic92/sops-nix";
nixpkgs-latest-factorio.url = "github:Daholli/nixpkgs/e880129391be2f558d6c205cfd931be338b3b707"; nixpkgs-latest-factorio.url = "github:Daholli/nixpkgs/e880129391be2f558d6c205cfd931be338b3b707";
nixpkgs-tuya-vacuum.url = "github:Daholli/nixpkgs/84b34e39e7a0879367189f34401191f6a0364bcf";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
@ -90,13 +92,9 @@
flake = false; flake = false;
}; };
sops-nix.url = "github:Mic92/sops-nix";
## temporary
zen-browser.url = "github:0xc000022070/zen-browser-flake"; zen-browser.url = "github:0xc000022070/zen-browser-flake";
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
catppuccin.url = "github:catppuccin/nix";
################ ################
## inputs for dev shells ## inputs for dev shells

View file

@ -7,8 +7,8 @@
home.packages = [ home.packages = [
pkgs.kitty pkgs.kitty
pkgs.xfce.thunar
]; ];
home.sessionVariables.TERMINAL = "kitty"; home.sessionVariables.TERMINAL = "kitty";
home.file.".config/Thunar/uca.xml".text = '' home.file.".config/Thunar/uca.xml".text = ''

View file

@ -9,14 +9,5 @@
enable = true; enable = true;
}; };
}; };
# systemd = {
# services.NetworkManager-wait-online.enable = false;
# network.wait-online.enable = false;
# };
services.resolved = {
enable = true;
};
}; };
} }

View file

@ -13,7 +13,6 @@
{ {
imports = [ imports = [
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
inputs.catppuccin.homeModules.catppuccin
]; ];
home = { home = {
@ -31,7 +30,6 @@
{ {
imports = [ imports = [
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
inputs.catppuccin.nixosModules.catppuccin
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View file

@ -11,12 +11,18 @@
username = "cholli"; username = "cholli";
in in
{ {
imports = [ inputs.nix-ld.nixosModules.nix-ld ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nixfmt-rfc-style nixfmt-rfc-style
nix-prefetch-git nix-prefetch-git
nix-index nix-index
nix-output-monitor nix-output-monitor
nix-du
nix-weather
nix-index
]; ];
programs.nh = { programs.nh = {
@ -26,6 +32,8 @@
}; };
nix = { nix = {
package = pkgs.lix;
settings = settings =
let let
users = [ users = [

View file

@ -255,28 +255,28 @@
"$mod CTRL, right, movecurrentworkspacetomonitor, r" "$mod CTRL, right, movecurrentworkspacetomonitor, r"
# move focus # move focus
"$mod, h, hy3:movefocus, l" "$mod, h, movefocus, l"
"$mod, j, hy3:movefocus, d" "$mod, j, movefocus, d"
"$mod, k, hy3:movefocus, u" "$mod, k, movefocus, u"
"$mod, l, hy3:movefocus, r" "$mod, l, movefocus, r"
"$mod, left, hy3:movefocus, l" "$mod, left, movefocus, l"
"$mod, down, hy3:movefocus, d" "$mod, down, movefocus, d"
"$mod, up, hy3:movefocus, u" "$mod, up, movefocus, u"
"$mod, right, hy3:movefocus, r" "$mod, right, movefocus, r"
# move focus # move focus
"$mod SHIFT, h, hy3:movewindow, l, once" "$mod SHIFT, h, movewindow, l, once"
"$mod SHIFT, j, hy3:movewindow, d, once" "$mod SHIFT, j, movewindow, d, once"
"$mod SHIFT, k, hy3:movewindow, u, once" "$mod SHIFT, k, movewindow, u, once"
"$mod SHIFT, l, hy3:movewindow, r, once" "$mod SHIFT, l, movewindow, r, once"
"$mod SHIFT, left, hy3:movewindow, l, once" "$mod SHIFT, left, movewindow, l, once"
"$mod SHIFT, down, hy3:movewindow, d, once" "$mod SHIFT, down, movewindow, d, once"
"$mod SHIFT, up, hy3:movewindow, u, once" "$mod SHIFT, up, movewindow, u, once"
"$mod SHIFT, right, hy3:movewindow, r, once" "$mod SHIFT, right, movewindow, r, once"
#run important programs #run important programs
"$mod, Return, exec, kitty" "$mod, Return, exec, kitty"
"$mod, D, exec, rofi -show drun" "$mod, D, exec, fuzzel"
"$mod, P, exec, focus-or-open-1pass" "$mod, P, exec, focus-or-open-1pass"
# "$mod, D, exec, rofi -show combi" # "$mod, D, exec, rofi -show combi"
@ -294,7 +294,7 @@
in in
[ [
"$mod, code:1${toString i}, workspace, ${toString ws}" "$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, hy3:movetoworkspace, ${toString ws}" "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
] ]
) 9 ) 9
) )

View file

@ -1,3 +1,165 @@
{ {
flake.modules.nixos.niri = { ... }: { }; flake.modules = {
nixos.niri =
{ inputs, pkgs, ... }:
{
imports = [
inputs.niri-flake.nixosModules.niri
];
programs.niri = {
enable = true;
package = inputs.niri-flake.packages.${pkgs.system}.niri-unstable;
};
environment.systemPackages = [
pkgs.alacritty
pkgs.fuzzel
];
};
homeManager.cholli =
{
config,
inputs,
lib,
osConfig,
pkgs,
...
}:
{
config = lib.mkIf osConfig.programs.niri.enable {
programs.niri.settings = {
input = {
keyboard = {
numlock = true;
};
};
outputs."DP-1" = {
mode = {
width = 3440;
height = 1440;
};
};
outputs."HDMI-A-1" = {
mode = {
width = 1920;
height = 1080;
};
transform.rotation = 90;
};
layout = {
gaps = 5;
center-focused-column = "never";
default-column-width = {
proportion = 0.5;
};
preset-column-widths = [
{ proportion = 1. / 3.; }
{ proportion = 1. / 2.; }
{ proportion = 2. / 3.; }
];
focus-ring = {
width = 1;
active = {
color = "#7fc8ff";
};
inactive = {
color = "#505050";
};
};
};
hotkey-overlay.skip-at-startup = true;
screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png";
# block 1pass from screenshots and window capture
window-rules = [
];
binds =
with config.lib.niri;
let
workspaces = (builtins.genList (x: x + 1) 9);
focus-workspaces = builtins.listToAttrs (
map (num: {
name = "Mod+${toString num}";
value = {
action.focus-workspace = num;
};
}) workspaces
);
in
lib.mkMerge [
{
"Mod+Shift+Slash".action = actions.show-hotkey-overlay;
"Mod+Return".action.spawn = "${lib.getExe pkgs.kitty}";
"Mod+D".action.spawn = "${lib.getExe pkgs.fuzzel}";
"Mod+Alt+L".action.spawn = "hyprlock-blur";
"Mod+Shift+Q" = {
action = actions.close-window;
repeat = false;
};
"Mod+O" = {
action = actions.toggle-overview;
repeat = false;
};
"XF86AudioRaiseVolume" = {
action.spawn = [
"wpctl"
"set-volume"
"@DEFAULT_AUDIO_SINK@"
"0.1+"
];
allow-when-locked = true;
};
"XF86AudioLowerVolume" = {
action.spawn = [
"wpctl"
"set-volume"
"@DEFAULT_AUDIO_SINK@"
"0.1-"
];
allow-when-locked = true;
};
"XF86AudioMute" = {
action.spawn = [
"wpctl"
"set-mute"
"@DEFAULT_AUDIO_SINK@"
"toggle"
];
allow-when-locked = true;
};
"XF86AudioMicMute" = {
action.spawn = [
"wpctl"
"set-mute"
"@DEFAULT_AUDIO_SOURCE@"
"toggle"
];
allow-when-locked = true;
};
}
focus-workspaces
];
};
};
};
};
} }

View file

@ -6,7 +6,12 @@ let
in in
{ {
flake.modules.nixos."hosts/yggdrasil" = flake.modules.nixos."hosts/yggdrasil" =
{ lib, pkgs, ... }: {
inputs,
lib,
pkgs,
...
}:
{ {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -19,7 +24,18 @@ in
diebahn diebahn
path-of-building path-of-building
bottles
# to be removed
kdePackages.bluez-qt
zed-editor
seahorse
font-manager
vesktop
rofi-unwrapped
]; ];
# to be removed
virtualisation.waydroid.enable = true;
services.teamviewer.enable = true; services.teamviewer.enable = true;
environment.pathsToLink = [ "/libexec" ]; environment.pathsToLink = [ "/libexec" ];
@ -31,6 +47,11 @@ in
imports = imports =
with config.flake.modules.nixos; with config.flake.modules.nixos;
[ [
inputs.nixos-hardware.nixosModules.common-cpu-amd
inputs.nixos-hardware.nixosModules.common-pc
inputs.nixos-hardware.nixosModules.common-pc-ssd
inputs.catppuccin.nixosModules.catppuccin
# System modules # System modules
base base
dev dev
@ -44,6 +65,7 @@ in
# dektops # dektops
hyprland hyprland
niri
# apps # apps
_1password _1password
@ -55,6 +77,9 @@ in
{ {
home-manager.users.cholli = { home-manager.users.cholli = {
imports = with config.flake.modules.homeManager; [ imports = with config.flake.modules.homeManager; [
inputs.catppuccin.homeModules.catppuccin
# components
base base
dev dev
@ -106,8 +131,6 @@ in
}; };
services.fstrim.enable = true;
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-uuid/b1a956f4-91d5-456e-a92b-be505bb719bd"; device = "/dev/disk/by-uuid/b1a956f4-91d5-456e-a92b-be505bb719bd";
@ -144,6 +167,7 @@ in
]; ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.enableRedistributableFirmware = true;
hardware.cpu.amd.updateMicrocode = true; hardware.cpu.amd.updateMicrocode = true;
}; };
} }

View file

@ -47,7 +47,7 @@
}; };
homeManager.cholli = homeManager.cholli =
{ ... }: { pkgs, ... }:
let let
defaultIconFileName = "profile.png"; defaultIconFileName = "profile.png";
in in
@ -64,6 +64,12 @@
".face".source = ./${defaultIconFileName}; ".face".source = ./${defaultIconFileName};
"Pictures/${defaultIconFileName}".source = ./${defaultIconFileName}; "Pictures/${defaultIconFileName}".source = ./${defaultIconFileName};
}; };
packages = with pkgs; [ graphviz ];
shellAliases = {
nixsize = "nix-du -n=50 | dot -Tsvg > ~/Pictures/store.svg";
};
}; };
}; };
}; };