Merge branch 'main' of github.com:asosnovsky/nixos-setup
This commit is contained in:
commit
a980713fdf
17 files changed
+364
-505
No files matched your search
Vendored
+2
-7
@@ -2,13 +2,8 @@
|
|||||||
"nix.enableLanguageServer": true,
|
"nix.enableLanguageServer": true,
|
||||||
"nix.serverPath": "nixd",
|
"nix.serverPath": "nixd",
|
||||||
"nixEnvSelector.nixFile": "${workspaceFolder}/flake.nix",
|
"nixEnvSelector.nixFile": "${workspaceFolder}/flake.nix",
|
||||||
"cSpell.words": [
|
"cSpell.words": ["nixd", "nixos", "nixpkgs", "pkgs"],
|
||||||
"nixd",
|
|
||||||
"nixos",
|
|
||||||
"nixpkgs",
|
|
||||||
"pkgs"
|
|
||||||
],
|
|
||||||
"search.exclude": {
|
"search.exclude": {
|
||||||
"system-special-links": true,
|
"system-special-links": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env nu
|
#!/usr/bin/env nu
|
||||||
|
|
||||||
# Ensure we are located at the bin folder
|
# Ensure we are located at the bin folder
|
||||||
const current_folder = path self | path dirname
|
const current_folder = path self | path dirname | path dirname
|
||||||
cd $current_folder
|
cd $current_folder
|
||||||
|
|
||||||
def valid_profiles [] {
|
def valid_profiles [] {
|
||||||
@@ -16,6 +16,7 @@ def is-valid-profile [name: string] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def main [] {
|
def main [] {
|
||||||
|
print $current_folder
|
||||||
help main
|
help main
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+153
-188
@@ -1,190 +1,155 @@
|
|||||||
{
|
{
|
||||||
"reload_style_on_change": true,
|
"reload_style_on_change": true,
|
||||||
"layer": "top", // Waybar at top layer
|
"layer": "top", // Waybar at top layer
|
||||||
"height": 32, // Waybar height (to be removed for auto height)
|
"height": 32, // Waybar height (to be removed for auto height)
|
||||||
"margin-top": 4,
|
"margin-top": 4,
|
||||||
"margin-left": 4,
|
"margin-left": 4,
|
||||||
"margin-right": 4,
|
"margin-right": 4,
|
||||||
"spacing": 0, // Gaps between modules (4px)
|
"spacing": 0, // Gaps between modules (4px)
|
||||||
"modules-left": [
|
"modules-left": ["niri/window"],
|
||||||
"niri/window"
|
"modules-center": ["privacy", "clock"],
|
||||||
],
|
"modules-right": [
|
||||||
"modules-center": [
|
"group/controls",
|
||||||
"privacy",
|
"battery",
|
||||||
"clock",
|
"group/sound",
|
||||||
],
|
"group/backlight",
|
||||||
"modules-right": [
|
"tray",
|
||||||
"group/controls",
|
"mpd",
|
||||||
"battery",
|
// "jack",
|
||||||
"group/sound",
|
// "wireplumber",
|
||||||
"group/backlight",
|
"custom/logout",
|
||||||
"tray",
|
],
|
||||||
"mpd",
|
// Modules configuration
|
||||||
// "jack",
|
"group/sound": {
|
||||||
// "wireplumber",
|
"click-to-reveal": true,
|
||||||
"custom/logout"
|
"orientation": "horizontal",
|
||||||
],
|
"drawer": {
|
||||||
// Modules configuration
|
"transition-duration": 500,
|
||||||
"group/sound": {
|
"transition-left-to-right": true,
|
||||||
"click-to-reveal": true,
|
},
|
||||||
"orientation": "horizontal",
|
"modules": ["pulseaudio", "pulseaudio/slider"],
|
||||||
"drawer": {
|
},
|
||||||
"transition-duration": 500,
|
"group/backlight": {
|
||||||
"transition-left-to-right": true
|
"click-to-reveal": true,
|
||||||
},
|
"orientation": "horizontal",
|
||||||
"modules": [
|
"drawer": {
|
||||||
"pulseaudio",
|
"transition-duration": 500,
|
||||||
"pulseaudio/slider"
|
"transition-left-to-right": true,
|
||||||
]
|
},
|
||||||
},
|
"modules": ["backlight", "backlight/slider"],
|
||||||
"group/backlight": {
|
},
|
||||||
"click-to-reveal": true,
|
"pulseaudio/slider": {
|
||||||
"orientation": "horizontal",
|
"min": 0,
|
||||||
"drawer": {
|
"max": 100,
|
||||||
"transition-duration": 500,
|
"orientation": "horizontal",
|
||||||
"transition-left-to-right": true
|
},
|
||||||
},
|
"custom/logout": {
|
||||||
"modules": [
|
"format": "⏻",
|
||||||
"backlight",
|
"tooltip": true,
|
||||||
"backlight/slider"
|
"on-click": "nwg-bar",
|
||||||
]
|
},
|
||||||
},
|
"keyboard-state": {
|
||||||
"pulseaudio/slider": {
|
"numlock": true,
|
||||||
"min": 0,
|
"capslock": true,
|
||||||
"max": 100,
|
"format-icons": {
|
||||||
"orientation": "horizontal",
|
"locked": "",
|
||||||
},
|
"unlocked": "",
|
||||||
"custom/logout": {
|
},
|
||||||
"format": "⏻",
|
"format": {
|
||||||
"tooltip": true,
|
"numlock": "N {icon}",
|
||||||
"on-click": "nwg-bar"
|
"capslock": "C {icon}",
|
||||||
},
|
},
|
||||||
"keyboard-state": {
|
},
|
||||||
"numlock": true,
|
"niri/window": {
|
||||||
"capslock": true,
|
"icon": true,
|
||||||
"format-icons": {
|
"format": "{app_id}/{title}",
|
||||||
"locked": "",
|
},
|
||||||
"unlocked": ""
|
"idle_inhibitor": {
|
||||||
},
|
"format": "{icon}",
|
||||||
"format": {
|
"format-icons": {
|
||||||
"numlock": "N {icon}",
|
"activated": "",
|
||||||
"capslock": "C {icon}"
|
"deactivated": "",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
"niri/window": {
|
"tray": {
|
||||||
"icon": true,
|
"spacing": 10,
|
||||||
"format": "{app_id}/{title}"
|
},
|
||||||
},
|
"custom/controls": {
|
||||||
"idle_inhibitor": {
|
"format": "🎛️",
|
||||||
"format": "{icon}",
|
"tooltip": true,
|
||||||
"format-icons": {
|
},
|
||||||
"activated": "",
|
"group/controls": {
|
||||||
"deactivated": ""
|
"click-to-reveal": true,
|
||||||
}
|
"orientation": "horizontal",
|
||||||
},
|
"drawer": {
|
||||||
"tray": {
|
"transition-duration": 500,
|
||||||
"spacing": 10
|
"transition-left-to-right": false,
|
||||||
},
|
},
|
||||||
"custom/controls": {
|
"modules": [
|
||||||
"format": "🎛️",
|
"custom/controls",
|
||||||
"tooltip": true
|
"network",
|
||||||
},
|
"cpu",
|
||||||
"group/controls": {
|
"memory",
|
||||||
"click-to-reveal": true,
|
"temperature",
|
||||||
"orientation": "horizontal",
|
"idle_inhibitor",
|
||||||
"drawer": {
|
"keyboard-state",
|
||||||
"transition-duration": 500,
|
],
|
||||||
"transition-left-to-right": false
|
},
|
||||||
},
|
"clock": {
|
||||||
"modules": [
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
"custom/controls",
|
"format": "{:%e %B %H:%M}",
|
||||||
"network",
|
"on-click": "gnome-calendar",
|
||||||
"cpu",
|
},
|
||||||
"memory",
|
"cpu": {
|
||||||
"temperature",
|
"format": "{usage}% ",
|
||||||
"idle_inhibitor",
|
"tooltip": false,
|
||||||
"keyboard-state"
|
},
|
||||||
]
|
"memory": {
|
||||||
},
|
"format": "{}% ",
|
||||||
"clock": {
|
},
|
||||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
"temperature": {
|
||||||
"format": "{:%e %B %H:%M}",
|
"critical-threshold": 80,
|
||||||
"on-click": "gnome-calendar"
|
"format": "{temperatureC}°C {icon}",
|
||||||
},
|
"format-icons": ["", "", ""],
|
||||||
"cpu": {
|
},
|
||||||
"format": "{usage}% ",
|
"backlight": {
|
||||||
"tooltip": false
|
"format": "{icon}",
|
||||||
},
|
"format-icons": ["", "", "", "", "", "", "", "", ""],
|
||||||
"memory": {
|
},
|
||||||
"format": "{}% "
|
"battery": {
|
||||||
},
|
"states": {
|
||||||
"temperature": {
|
"good": 95,
|
||||||
"critical-threshold": 80,
|
"warning": 30,
|
||||||
"format": "{temperatureC}°C {icon}",
|
"critical": 15,
|
||||||
"format-icons": [
|
},
|
||||||
"",
|
"format": "{capacity}% {icon}",
|
||||||
"",
|
"format-charging": "{capacity}% ",
|
||||||
""
|
"format-plugged": "{capacity}% ",
|
||||||
]
|
"format-alt": "{time} {icon}",
|
||||||
},
|
"format-icons": ["", "", "", "", ""],
|
||||||
"backlight": {
|
},
|
||||||
"format": "{icon}",
|
"network": {
|
||||||
"format-icons": [
|
"format": "{ifname} {essid}",
|
||||||
"",
|
"tooltip-format": "{ifname} {ipaddr}/{cidr} {essid} {icon} {frequency} {signaldBm}",
|
||||||
"",
|
"on-click": "nmcli device wifi rescan && ghostty -e nmtui",
|
||||||
"",
|
},
|
||||||
"",
|
"pulseaudio": {
|
||||||
"",
|
"format": "{icon}",
|
||||||
"",
|
"format-bluetooth": "{volume}% {icon}",
|
||||||
"",
|
"format-bluetooth-muted": " {icon}",
|
||||||
"",
|
"format-muted": "",
|
||||||
""
|
"format-source": "{volume}% ",
|
||||||
]
|
"format-source-muted": "",
|
||||||
},
|
"format-icons": {
|
||||||
"battery": {
|
"headphone": "",
|
||||||
"states": {
|
"hands-free": "",
|
||||||
"good": 95,
|
"headset": "",
|
||||||
"warning": 30,
|
"phone": "",
|
||||||
"critical": 15
|
"portable": "",
|
||||||
},
|
"car": "",
|
||||||
"format": "{capacity}% {icon}",
|
"default": ["", "", ""],
|
||||||
"format-charging": "{capacity}% ",
|
},
|
||||||
"format-plugged": "{capacity}% ",
|
"on-click": "/run/current-system/sw/bin/flatpak run org.pipewire.Helvum",
|
||||||
"format-alt": "{time} {icon}",
|
// "on-click": "/run/current-system/sw/bin/pavucontrol"
|
||||||
"format-icons": [
|
},
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
""
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"format": "{ifname} {essid}",
|
|
||||||
"tooltip-format": "{ifname} {ipaddr}/{cidr} {essid} {icon} {frequency} {signaldBm}",
|
|
||||||
"on-click": "nmcli device wifi rescan && ghostty -e nmtui"
|
|
||||||
},
|
|
||||||
"pulseaudio": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-bluetooth": "{volume}% {icon}",
|
|
||||||
"format-bluetooth-muted": " {icon}",
|
|
||||||
"format-muted": "",
|
|
||||||
"format-source": "{volume}% ",
|
|
||||||
"format-source-muted": "",
|
|
||||||
"format-icons": {
|
|
||||||
"headphone": "",
|
|
||||||
"hands-free": "",
|
|
||||||
"headset": "",
|
|
||||||
"phone": "",
|
|
||||||
"portable": "",
|
|
||||||
"car": "",
|
|
||||||
"default": [
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
""
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"on-click": "/run/current-system/sw/bin/flatpak run org.pipewire.Helvum"
|
|
||||||
// "on-click": "/run/current-system/sw/bin/pavucontrol"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -34,98 +34,50 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{ self
|
||||||
self,
|
, nixpkgs-unstable
|
||||||
nixpkgs-unstable,
|
, determinate
|
||||||
determinate,
|
, nixos-hardware
|
||||||
nixos-hardware,
|
, nixpkgs
|
||||||
nixpkgs,
|
, systems
|
||||||
systems,
|
, home-manager
|
||||||
home-manager,
|
, nix-darwin
|
||||||
nix-darwin,
|
, nix-flatpak
|
||||||
nix-flatpak,
|
, stylix
|
||||||
stylix,
|
, hyprlauncher
|
||||||
hyprlauncher,
|
, dms
|
||||||
dms,
|
,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
user = {
|
|
||||||
name = "ari";
|
|
||||||
fullName = "Ari Sosnovsky";
|
|
||||||
email = "ariel@sosnovsky.ca";
|
|
||||||
};
|
|
||||||
homeManagerVersion = "24.11";
|
|
||||||
# Local Services
|
|
||||||
localNixCaches = {
|
|
||||||
urls = [
|
|
||||||
"http://minipc1.lab.internal:5000"
|
|
||||||
];
|
|
||||||
keys = [
|
|
||||||
"minipc1.lab.internal:buUlsyg+xRqkUk0MWACmIyRUtHIOPQQzg7nc4qZCc4E="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
localDockerRegistries = [ "minipc1.lab.internal:5001" ];
|
|
||||||
hlCommonSettings = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
user = user;
|
|
||||||
localNixCaches = localNixCaches;
|
|
||||||
homeManagerVersion = homeManagerVersion;
|
|
||||||
os = {
|
|
||||||
enable = true;
|
|
||||||
firewall = {
|
|
||||||
enable = false;
|
|
||||||
};
|
|
||||||
enableFonts = true;
|
|
||||||
hardware = {
|
|
||||||
enable = false;
|
|
||||||
};
|
|
||||||
enablePrometheusExporters = true;
|
|
||||||
containers = {
|
|
||||||
runtime = "docker";
|
|
||||||
localDockerRegistries = localDockerRegistries;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# Lib Config
|
|
||||||
libConfig = {
|
|
||||||
inherit
|
|
||||||
determinate
|
|
||||||
nix-darwin
|
|
||||||
hlCommonSettings
|
|
||||||
systems
|
|
||||||
nix-flatpak
|
|
||||||
stylix
|
|
||||||
;
|
|
||||||
specialArgs = {
|
|
||||||
inherit
|
|
||||||
hyprlauncher
|
|
||||||
nixpkgs-unstable
|
|
||||||
dms
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# Libs
|
# Libs
|
||||||
lib = (
|
lib =
|
||||||
import modules/lib.nix (
|
import modules/lib.nix
|
||||||
{
|
{
|
||||||
nixpkgs = nixpkgs;
|
user = {
|
||||||
home-manager = home-manager;
|
name = "ari";
|
||||||
|
fullName = "Ari Sosnovsky";
|
||||||
|
email = "ariel@sosnovsky.ca";
|
||||||
|
};
|
||||||
|
inherit
|
||||||
|
nixpkgs
|
||||||
|
nixpkgs-unstable
|
||||||
|
home-manager
|
||||||
|
determinate
|
||||||
|
nix-darwin
|
||||||
|
systems
|
||||||
|
nix-flatpak
|
||||||
|
stylix
|
||||||
|
;
|
||||||
|
|
||||||
|
specialArgs = {
|
||||||
|
inherit
|
||||||
|
hyprlauncher
|
||||||
|
nixpkgs-unstable
|
||||||
|
dms
|
||||||
|
;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
// libConfig
|
;
|
||||||
)
|
|
||||||
);
|
|
||||||
homelabServices = (
|
|
||||||
(lib.makeHLServices {
|
|
||||||
user = user;
|
|
||||||
nodeNames = [
|
|
||||||
"hl-minipc1"
|
|
||||||
"hl-minipc2"
|
|
||||||
"hl-minipc3"
|
|
||||||
"hl-terra1"
|
|
||||||
"hl-bigbox1"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Dev Setups
|
# Dev Setups
|
||||||
@@ -154,80 +106,76 @@
|
|||||||
|
|
||||||
# None-NIXOS LINUX Setups
|
# None-NIXOS LINUX Setups
|
||||||
# -------------
|
# -------------
|
||||||
homeConfigurations."${user.name}" = lib.makeHomeManagerUsers {
|
# homeConfigurations."${user.name}" = lib.makeHomeManagerUsers {
|
||||||
inherit user homeManagerVersion;
|
# inherit user homeManagerVersion;
|
||||||
};
|
# };
|
||||||
|
|
||||||
# NIXOS LINUX Setups
|
# NIXOS LINUX Setups
|
||||||
# -------------
|
# -------------
|
||||||
nixosConfigurations = {
|
nixosConfigurations =
|
||||||
# NIXOS Framework Setups
|
{
|
||||||
# -------------
|
fwbook = lib.makeNixOs {
|
||||||
fwbook = lib.makeNixOsModule {
|
hostName = "fwbook";
|
||||||
system = "x86_64-linux";
|
systemStateVersion = "23.11";
|
||||||
user = user;
|
configuration = [
|
||||||
systemStateVersion = "23.11";
|
./hosts/fwbook.nix
|
||||||
hostName = "fwbook";
|
./hosts/fwbook.hardware-configuration.nix
|
||||||
# localNixCaches = localNixCaches;
|
nixos-hardware.nixosModules.framework-13-7040-amd
|
||||||
localDockerRegistries = localDockerRegistries;
|
];
|
||||||
homeManagerVersion = homeManagerVersion;
|
|
||||||
os = {
|
|
||||||
enable = true;
|
|
||||||
firewall = {
|
|
||||||
enable = false;
|
|
||||||
};
|
|
||||||
enableFonts = true;
|
|
||||||
enableNetworking = true;
|
|
||||||
enableSSH = false;
|
|
||||||
hardware = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
containers = {
|
|
||||||
localDockerRegistries = localDockerRegistries;
|
|
||||||
runtime = "docker";
|
|
||||||
};
|
|
||||||
enablePrometheusExporters = true;
|
|
||||||
};
|
};
|
||||||
configuration =
|
hl-fws1 = lib.makeNixOs {
|
||||||
{ ... }:
|
hostName = "hl-fws1";
|
||||||
{
|
configuration = [
|
||||||
imports = [
|
./hosts/hl-fws1.nix
|
||||||
nixos-hardware.nixosModules.framework-13-7040-amd
|
./hosts/hl-fws1.hardware-configuration.nix
|
||||||
(import ./hosts/fwbook.nix {
|
nixos-hardware.nixosModules.framework-11th-gen-intel
|
||||||
user = user;
|
];
|
||||||
})
|
};
|
||||||
];
|
hl-fwdesk = lib.makeNixOs {
|
||||||
};
|
hostName = "hl-fwdesk";
|
||||||
};
|
systemStateVersion = "25.05";
|
||||||
# NIXOS Framework Homelab
|
configuration = [
|
||||||
# -------------
|
./hosts/hl-fwdesk.nix
|
||||||
hl-fws1 = lib.makeHLService {
|
./hosts/hl-fwdesk.hardware-configuration.nix
|
||||||
hostName = "hl-fws1";
|
nixos-hardware.nixosModules.framework-desktop-amd-ai-max-300-series
|
||||||
configuration =
|
];
|
||||||
{ ... }:
|
};
|
||||||
{
|
hl-bigbox1 = lib.makeNixOs {
|
||||||
imports = [
|
hostName = "hl-bigbox1";
|
||||||
nixos-hardware.nixosModules.framework-11th-gen-intel
|
configuration = [
|
||||||
(import (./hosts/hl-fws1.nix) { user = user; })
|
./hosts/hl-bigbox1.nix
|
||||||
];
|
./hosts/hl-bigbox1.hardware-configuration.nix
|
||||||
};
|
];
|
||||||
systemStateVersion = "24.05";
|
};
|
||||||
};
|
hl-minipc1 = lib.makeNixOs {
|
||||||
# NIXOS Framework Desktop
|
hostName = "hl-minipc1";
|
||||||
# -------------
|
configuration = [
|
||||||
hl-fwdesk = lib.makeHLService {
|
./hosts/hl-minipc1.nix
|
||||||
hostName = "hl-fwdesk";
|
./hosts/hl-minipc1.hardware-configuration.nix
|
||||||
configuration =
|
];
|
||||||
{ ... }:
|
};
|
||||||
{
|
hl-minipc2 = lib.makeNixOs {
|
||||||
imports = [
|
hostName = "hl-minipc2";
|
||||||
nixos-hardware.nixosModules.framework-desktop-amd-ai-max-300-series
|
configuration = [
|
||||||
(import (./hosts/hl-fwdesk.nix) { user = user; })
|
./hosts/hl-minipc2.nix
|
||||||
];
|
./hosts/hl-minipc2.hardware-configuration.nix
|
||||||
};
|
];
|
||||||
systemStateVersion = "25.05";
|
};
|
||||||
};
|
hl-minipc3 = lib.makeNixOs {
|
||||||
}
|
hostName = "hl-minipc3";
|
||||||
// homelabServices;
|
configuration = [
|
||||||
|
./hosts/hl-minipc3.nix
|
||||||
|
./hosts/hl-minipc3.hardware-configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
hl-terra1 = lib.makeNixOs {
|
||||||
|
hostName = "hl-terra1";
|
||||||
|
configuration = [
|
||||||
|
./hosts/hl-terra1.nix
|
||||||
|
./hosts/hl-terra1.hardware-configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
+5
-10
@@ -1,10 +1,7 @@
|
|||||||
{ user }:
|
{ pkgs
|
||||||
{
|
, unstablePkgs
|
||||||
pkgs,
|
, user
|
||||||
hyprlauncher,
|
, ...
|
||||||
system,
|
|
||||||
nixpkgs-unstable,
|
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
zshFWBook = builtins.filterSource (p: t: true) ./scripts/fwbook;
|
zshFWBook = builtins.filterSource (p: t: true) ./scripts/fwbook;
|
||||||
@@ -13,10 +10,8 @@ let
|
|||||||
8000
|
8000
|
||||||
8001
|
8001
|
||||||
];
|
];
|
||||||
unstable = nixpkgs-unstable.legacyPackages.${system};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./fwbook.hardware-configuration.nix ];
|
|
||||||
# Skyg
|
# Skyg
|
||||||
environment.sessionVariables.NIXPKGS_ALLOW_UNFREE = 1;
|
environment.sessionVariables.NIXPKGS_ALLOW_UNFREE = 1;
|
||||||
environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1;
|
environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1;
|
||||||
@@ -265,7 +260,7 @@ in
|
|||||||
port = 11434;
|
port = 11434;
|
||||||
acceleration = "rocm";
|
acceleration = "rocm";
|
||||||
rocmOverrideGfx = "11.0.2";
|
rocmOverrideGfx = "11.0.2";
|
||||||
package = unstable.ollama-rocm;
|
package = unstablePkgs.ollama-rocm;
|
||||||
};
|
};
|
||||||
# # Brother Printer
|
# # Brother Printer
|
||||||
hardware.sane.brscan5.enable = true;
|
hardware.sane.brscan5.enable = true;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{ ... }:
|
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./hl-bigbox1.hardware-configuration.nix ];
|
|
||||||
skyg = {
|
skyg = {
|
||||||
user.enable = true;
|
user.enable = true;
|
||||||
server.admin.enable = true;
|
server.admin.enable = true;
|
||||||
|
|||||||
+6
-3
@@ -1,5 +1,7 @@
|
|||||||
{ ... }:
|
{ pkgs
|
||||||
{ pkgs, ... }:
|
, unstablePkgs
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
ports = {
|
ports = {
|
||||||
tabby = 11029;
|
tabby = 11029;
|
||||||
@@ -22,7 +24,7 @@ in
|
|||||||
amdgpu.enable = true;
|
amdgpu.enable = true;
|
||||||
};
|
};
|
||||||
desktop = {
|
desktop = {
|
||||||
stylix.enable = true;
|
stylix.enable = true;
|
||||||
enable = true;
|
enable = true;
|
||||||
tiler = {
|
tiler = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -108,6 +110,7 @@ in
|
|||||||
host = "0.0.0.0";
|
host = "0.0.0.0";
|
||||||
port = ports.ollama;
|
port = ports.ollama;
|
||||||
acceleration = "rocm";
|
acceleration = "rocm";
|
||||||
|
package = unstablePkgs.ollama-rocm;
|
||||||
};
|
};
|
||||||
# Tabby
|
# Tabby
|
||||||
services.tabby = {
|
services.tabby = {
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
{ user }:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
|
||||||
scriptsFolder = builtins.filterSource (p: t: true) ./scripts/fw1;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [ ./hl-fws1.hardware-configuration.nix ];
|
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
skyg.nixos.server.k3s.enable = true;
|
skyg.nixos.server.k3s.enable = true;
|
||||||
@@ -24,4 +19,3 @@ in
|
|||||||
# Kernel
|
# Kernel
|
||||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
{ user }:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
let
|
let
|
||||||
ports = {
|
ports = {
|
||||||
@@ -24,7 +23,6 @@ let
|
|||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./hl-minipc1.hardware-configuration.nix ];
|
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
skyg.nixos.common.containers.openMetricsPort = true;
|
skyg.nixos.common.containers.openMetricsPort = true;
|
||||||
@@ -89,4 +87,3 @@ in
|
|||||||
networking.firewall.allowedUDPPorts = openPorts;
|
networking.firewall.allowedUDPPorts = openPorts;
|
||||||
networking.firewall.allowedTCPPorts = openPorts;
|
networking.firewall.allowedTCPPorts = openPorts;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
{ user }:
|
{ ... }:
|
||||||
{ pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
imports = [ ./hl-minipc2.hardware-configuration.nix ];
|
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
skyg.nixos.common.containers.openMetricsPort = true;
|
skyg.nixos.common.containers.openMetricsPort = true;
|
||||||
@@ -39,4 +35,3 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
{ user }:
|
{ ...
|
||||||
{ pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [ ./hl-minipc3.hardware-configuration.nix ];
|
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
skyg.nixos.common.containers.openMetricsPort = true;
|
skyg.nixos.common.containers.openMetricsPort = true;
|
||||||
@@ -20,4 +17,3 @@
|
|||||||
# Disable firewall
|
# Disable firewall
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
{ user }:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
openPorts = [
|
openPorts = [
|
||||||
@@ -16,7 +15,6 @@ let
|
|||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./hl-terra1.hardware-configuration.nix ];
|
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
skyg.nixos.desktop.enable = false;
|
skyg.nixos.desktop.enable = false;
|
||||||
@@ -46,4 +44,3 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,6 +22,7 @@ in
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
nix.settings.substituters = [
|
nix.settings.substituters = [
|
||||||
|
"http://minipc1.lab.internal:5000"
|
||||||
"https://cache.nixos.org"
|
"https://cache.nixos.org"
|
||||||
"https://cache.flox.dev"
|
"https://cache.flox.dev"
|
||||||
"https://devenv.cachix.org"
|
"https://devenv.cachix.org"
|
||||||
@@ -36,6 +37,7 @@ in
|
|||||||
"ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
|
"ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
|
||||||
] ++ cfg.urls;
|
] ++ cfg.urls;
|
||||||
nix.settings.trusted-public-keys = [
|
nix.settings.trusted-public-keys = [
|
||||||
|
"minipc1.lab.internal:buUlsyg+xRqkUk0MWACmIyRUtHIOPQQzg7nc4qZCc4E="
|
||||||
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
|
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
|
||||||
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
|
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
|||||||
+85
-102
@@ -1,26 +1,43 @@
|
|||||||
{ nixpkgs
|
{ nixpkgs
|
||||||
|
, nixpkgs-unstable
|
||||||
|
, user
|
||||||
, determinate
|
, determinate
|
||||||
, home-manager
|
, home-manager
|
||||||
, nix-darwin
|
, nix-darwin
|
||||||
, systems
|
, systems
|
||||||
, hlCommonSettings
|
|
||||||
, nix-flatpak
|
, nix-flatpak
|
||||||
, specialArgs
|
|
||||||
, stylix
|
, stylix
|
||||||
,
|
, specialArgs
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
skygUtils = import ./skyg-utils.nix;
|
skygUtils = import ./skyg-utils.nix;
|
||||||
makeImports =
|
makeNixOs =
|
||||||
{ attrs
|
{ system ? "x86_64-linux"
|
||||||
, extraConfiguration ? [ ]
|
, hostName
|
||||||
,
|
, homeManagerVersion ? "24.11"
|
||||||
}:
|
, systemStateVersion ? "24.05"
|
||||||
(if (isNull attrs.configuration) then [ ] else [ attrs.configuration ])
|
, configuration ? [ ]
|
||||||
++ [
|
}: nixpkgs.lib.nixosSystem {
|
||||||
(import ./main.nix attrs)
|
specialArgs = specialArgs // {
|
||||||
]
|
inherit system skygUtils user;
|
||||||
++ extraConfiguration;
|
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
|
||||||
|
};
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
determinate.nixosModules.default
|
||||||
|
stylix.nixosModules.stylix
|
||||||
|
home-manager.nixosModules.default
|
||||||
|
nix-flatpak.nixosModules.nix-flatpak
|
||||||
|
specialArgs.dms.nixosModules.dankMaterialShell
|
||||||
|
(import ./main.nix {
|
||||||
|
inherit
|
||||||
|
user
|
||||||
|
homeManagerVersion
|
||||||
|
hostName
|
||||||
|
systemStateVersion;
|
||||||
|
})
|
||||||
|
] ++ configuration;
|
||||||
|
};
|
||||||
eachSystem = nixpkgs.lib.genAttrs (import systems);
|
eachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||||
allPkgs = eachSystem (
|
allPkgs = eachSystem (
|
||||||
system:
|
system:
|
||||||
@@ -31,101 +48,67 @@ let
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
makeNixOsModuleMaker =
|
# makeDarwinModule =
|
||||||
masterAttrs:
|
# { system ? "x86_64-darwin"
|
||||||
{ system ? masterAttrs.system ? "x86_64-linux"
|
# , user
|
||||||
, ...
|
# , ...
|
||||||
}@attrs:
|
# }@attrs:
|
||||||
let
|
# nix-darwin.lib.darwinSystem {
|
||||||
joinedttrs = masterAttrs // attrs;
|
# modules =
|
||||||
in
|
# (makeImports {
|
||||||
nixpkgs.lib.nixosSystem {
|
# attrs = attrs;
|
||||||
specialArgs = specialArgs // {
|
# extraConfiguration = [
|
||||||
inherit system skygUtils;
|
# home-manager.darwinModules.home-manager
|
||||||
};
|
# stylix.darwinModules.stylix
|
||||||
inherit system;
|
# ];
|
||||||
modules = [
|
# })
|
||||||
determinate.nixosModules.default
|
# ++ [
|
||||||
stylix.nixosModules.stylix
|
# (import ./macos.nix {
|
||||||
]
|
# user = user;
|
||||||
++ (makeImports {
|
# system = system;
|
||||||
attrs = joinedttrs;
|
# })
|
||||||
extraConfiguration = [
|
# ];
|
||||||
home-manager.nixosModules.default
|
# };
|
||||||
nix-flatpak.nixosModules.nix-flatpak
|
# makeHomeManagerUsers =
|
||||||
specialArgs.dms.nixosModules.dankMaterialShell
|
# { modules ? [ ]
|
||||||
];
|
# , homeManagerVersion
|
||||||
});
|
# , user
|
||||||
};
|
# , system ? "x86_64-linux"
|
||||||
makeNixOsModule = makeNixOsModuleMaker { };
|
# ,
|
||||||
makeHLService = makeNixOsModuleMaker hlCommonSettings;
|
# }:
|
||||||
makeDarwinModule =
|
# let
|
||||||
{ system ? "x86_64-darwin"
|
# hm = (
|
||||||
, user
|
# import ./home {
|
||||||
, ...
|
# stateVersion = homeManagerVersion;
|
||||||
}@attrs:
|
# }makeHLServices
|
||||||
nix-darwin.lib.darwinSystem {
|
# );
|
||||||
modules =
|
# pkgs = allPkgs."${system}";
|
||||||
(makeImports {
|
# in
|
||||||
attrs = attrs;
|
# home-manager.lib.homeManagerConfiguration {
|
||||||
extraConfiguration = [
|
# inherit pkgs;
|
||||||
home-manager.darwinModules.home-manager
|
# modules = [
|
||||||
stylix.darwinModules.stylix
|
# (hm.makeCommonUser user)
|
||||||
];
|
# ]
|
||||||
})
|
# ++ modules;
|
||||||
++ [
|
# };
|
||||||
(import ./macos.nix {
|
|
||||||
user = user;
|
|
||||||
system = system;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
makeHomeManagerUsers =
|
|
||||||
{ modules ? [ ]
|
|
||||||
, homeManagerVersion
|
|
||||||
, user
|
|
||||||
, system ? "x86_64-linux"
|
|
||||||
,
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
hm = (
|
|
||||||
import ./home {
|
|
||||||
stateVersion = homeManagerVersion;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
pkgs = allPkgs."${system}";
|
|
||||||
in
|
|
||||||
home-manager.lib.homeManagerConfiguration {
|
|
||||||
inherit pkgs;
|
|
||||||
modules = [
|
|
||||||
(hm.makeCommonUser user)
|
|
||||||
]
|
|
||||||
++ modules;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
eachSystem = eachSystem;
|
eachSystem = eachSystem;
|
||||||
pkgs = allPkgs;
|
pkgs = allPkgs;
|
||||||
makeNixOsModule = makeNixOsModule;
|
makeNixOs = makeNixOs;
|
||||||
makeHLService = makeHLService;
|
makeNixosConfigurations =
|
||||||
makeDarwinModule = makeDarwinModule;
|
nodes:
|
||||||
makeHomeManagerUsers = makeHomeManagerUsers;
|
|
||||||
makeHLServices =
|
|
||||||
{ nodeNames ? [ ]
|
|
||||||
, systemStateVersion ? "24.05"
|
|
||||||
, user
|
|
||||||
,
|
|
||||||
}:
|
|
||||||
builtins.listToAttrs (
|
builtins.listToAttrs (
|
||||||
builtins.map
|
builtins.map
|
||||||
(name: {
|
({ hostName
|
||||||
name = name;
|
, ...
|
||||||
value = makeHLService {
|
}@attrs: {
|
||||||
hostName = name;
|
name = hostName;
|
||||||
configuration = (import (../hosts + "/${name}.nix") { user = user; });
|
value = makeNixOs
|
||||||
systemStateVersion = systemStateVersion;
|
{
|
||||||
};
|
inherit hostName;
|
||||||
|
} // attrs;
|
||||||
})
|
})
|
||||||
nodeNames
|
nodes
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,6 @@
|
|||||||
, homeManagerVersion
|
, homeManagerVersion
|
||||||
, systemStateVersion
|
, systemStateVersion
|
||||||
, hostName
|
, hostName
|
||||||
# Desktop Module
|
|
||||||
# os
|
|
||||||
, os ? {
|
|
||||||
enable = false;
|
|
||||||
}
|
|
||||||
, localNixCaches ? { keys = [ ]; urls = [ ]; }
|
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
@@ -20,7 +14,5 @@
|
|||||||
skyg.user = user;
|
skyg.user = user;
|
||||||
skyg.core.hostName = hostName;
|
skyg.core.hostName = hostName;
|
||||||
skyg.home-manager.version = homeManagerVersion;
|
skyg.home-manager.version = homeManagerVersion;
|
||||||
skyg.core.substituters = localNixCaches;
|
|
||||||
skyg.nixos.common.containers = (if os.enable then os.containers else { });
|
|
||||||
system.stateVersion = systemStateVersion;
|
system.stateVersion = systemStateVersion;
|
||||||
}
|
}
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
};
|
};
|
||||||
localDockerRegistries = lib.mkOption {
|
localDockerRegistries = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ "minipc1.lab.internal:5001" ];
|
||||||
};
|
};
|
||||||
metricsPort = lib.mkOption {
|
metricsPort = lib.mkOption {
|
||||||
type = lib.types.number;
|
type = lib.types.number;
|
||||||
|
|||||||
@@ -2,13 +2,10 @@
|
|||||||
, lib
|
, lib
|
||||||
, pkgs
|
, pkgs
|
||||||
, skygUtils
|
, skygUtils
|
||||||
, system
|
|
||||||
, nixpkgs-unstable
|
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.skyg.nixos.desktop.tiler.niri;
|
cfg = config.skyg.nixos.desktop.tiler.niri;
|
||||||
unstable = nixpkgs-unstable.legacyPackages.${system};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
|||||||
Reference in new issue
Block a user