Compare commits

...

4 commits

Author SHA1 Message Date
49dc0ecc50
cleanup
Some checks failed
CI / formatting (push) Failing after 9m23s
CI / nix_flake_check (push) Failing after 9m24s
2025-12-09 14:35:23 +01:00
083adeee17
Remove backup configuration file 2025-12-08 17:57:20 +01:00
23f115760d
Fix deprecated option warnings in desktop.nix 2025-12-08 17:57:05 +01:00
b2dfb94ec9
Modularize and clean up NixOS configuration 2025-12-08 17:56:11 +01:00
27 changed files with 2219 additions and 653 deletions

View file

@ -0,0 +1 @@
3.11

0
direnvs/python/README.md Normal file
View file

6
direnvs/python/main.py Normal file
View file

@ -0,0 +1,6 @@
def main():
print("Hello from python!")
if __name__ == "__main__":
main()

View file

@ -0,0 +1,9 @@
[project]
name = "python"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"jupyter>=1.1.1",
]

1654
direnvs/python/uv.lock generated Normal file

File diff suppressed because it is too large Load diff

126
flake.lock generated
View file

@ -30,11 +30,11 @@
]
},
"locked": {
"lastModified": 1754091436,
"narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=",
"lastModified": 1763759067,
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd",
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
"type": "github"
},
"original": {
@ -61,24 +61,6 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -86,11 +68,11 @@
]
},
"locked": {
"lastModified": 1755442500,
"narHash": "sha256-RHK4H6SWzkAtW/5WBHsyugaXJX25yr5y7FAZznxcBJs=",
"lastModified": 1765202646,
"narHash": "sha256-Cgceqa+xPgI8JiS1fMaviGw4dthTeW2RqE6RUR4OcS8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d2ffdedfc39c591367b1ddf22b4ce107f029dcc3",
"rev": "caa47b637d877124ac891a64abc14de09fce1675",
"type": "github"
},
"original": {
@ -99,34 +81,6 @@
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1748294338,
"narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.8",
"repo": "ixx",
"type": "github"
}
},
"nix-ai-tools": {
"inputs": {
"blueprint": "blueprint",
@ -134,11 +88,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1764903547,
"narHash": "sha256-ZAkVNnHrjp4lLtcpA0bLk7IoR4UuxeR/X3vD/G2nX8o=",
"lastModified": 1765203591,
"narHash": "sha256-LAWxwGYTM6bZqTode/bHmR2tX96X4u0JQDOaHxUSNkA=",
"owner": "numtide",
"repo": "nix-ai-tools",
"rev": "a5eb2131473bdaaa6081db3d17eb1b2a98b5e781",
"rev": "edfd764a49e2440fd2169c9e14d8fd6b7df11135",
"type": "github"
},
"original": {
@ -149,11 +103,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1764856222,
"narHash": "sha256-yEJmtoFu4cJre1NuU4fb8q57Oux+NTbocnALtJ64aEI=",
"lastModified": 1764947035,
"narHash": "sha256-EYHSjVM4Ox4lvCXUMiKKs2vETUSL5mx+J2FfutM7T9w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ece6e266caf1effab32eceef0403b797b4330373",
"rev": "a672be65651c80d3f592a89b3945466584a22069",
"type": "github"
},
"original": {
@ -165,11 +119,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1755186698,
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
"lastModified": 1764950072,
"narHash": "sha256-BmPWzogsG2GsXZtlT+MTcAWeDK5hkbGRZTeZNW42fwA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
"rev": "f61125a668a320878494449750330ca58b78c557",
"type": "github"
},
"original": {
@ -185,47 +139,22 @@
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_4"
"systems": "systems_3"
},
"locked": {
"lastModified": 1754262585,
"narHash": "sha256-Yz5dJ0VzGRzSRHdHldsWQbuFYmtP3NWNreCvPfCi9CI=",
"lastModified": 1765210697,
"narHash": "sha256-Gq6/MRmBhNjGdMDFvZBcnPcfuw/j/dk6N1Y9R+HSA7Q=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "ab1b5962e1ca90b42de47e1172e0d24ca80e6256",
"rev": "05c57f2e74d39e87ef0696e450b7e817dde5378d",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "nixos-25.05",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_2",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1753771532,
"narHash": "sha256-Pmpke0JtLRzgdlwDC5a+aiLVZ11JPUO5Bcqkj0nHE/k=",
"owner": "NuschtOS",
"repo": "search",
"rev": "2a65adaf2c0c428efb0f4a2bc406aab466e96a06",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
@ -280,21 +209,6 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
@ -319,4 +233,4 @@
},
"root": "root",
"version": 7
}
}

View file

@ -9,7 +9,7 @@
};
flake-utils.url = "github:numtide/flake-utils";
nixvim = {
url = "github:nix-community/nixvim/nixos-25.05";
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -18,42 +18,32 @@
};
outputs = { self, nixpkgs, home-manager, flake-utils, nixvim, nix-ai-tools } @ inputs: {
# Reusable modules
homeManagerModules.copilot-cli = import ./modules/home-manager/copilot-cli.nix;
nixosModules.auto-upgrade = import ./modules/nixos/auto-upgrade.nix;
homeManagerModules.copilot-cli = { lib, pkgs, config, inputs, ... }: {
options.programs.copilot-cli.enable = lib.mkEnableOption "";
config = lib.mkIf config.programs.copilot-cli.enable {
home.packages = [
(
inputs.nix-ai-tools.packages.${pkgs.system}.copilot-cli or
(inputs.nixpkgs.legacyPackages.${pkgs.system}.fetchgit {
url = "github:numtide/nix-ai-tools";
ref = "main";
}).packages.${pkgs.system}.copilot-cli
)
];
};
};
# Host configurations
nixosConfigurations.nxs = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./hosts/nxs/configuration.nix
./hosts/nxs/hardware-configuration.nix
self.nixosModules.auto-upgrade
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.narrator = import ./hosts/nxs/home.nix;
system.autoUpgrade = {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
users.narrator = import ./hosts/nxs/home.nix;
sharedModules = [
self.homeManagerModules.copilot-cli
];
};
nixos.autoUpgrade = {
enable = true;
flake = self.outPath; # <<< here use self.outPath directly, NOT inputs.self
flags = [ "-L" ];
dates = "02:00";
randomizedDelaySec = "45min";
operation = "switch";
flakePath = self.outPath;
};
}
];

View file

@ -1,136 +1,47 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports =
[
imports = [
./hardware-configuration.nix
./modules/nixos/boot.nix
./modules/nixos/hardware.nix
./modules/nixos/desktop.nix
./modules/nixos/power-management.nix
];
# System settings
nix.settings.experimental-features = [ "nix-command" "flakes" ];
fileSystems."/home" = {
device = "/dev/disk/by-uuid/31dbc3a8-dfdc-4177-8d3e-2b6e294e7daf";
fsType = "btrfs";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/f9da6980-510f-4cce-bff5-50a791346c07"; }
];
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
#boot.loader.systemd-boot.enable = true;
#boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.grub.device = "nodev";
boot.loader.grub.useOSProber = true;
boot.loader.grub.configurationLimit = 5;
boot.loader.efi.canTouchEfiVariables = true;
#boot.loader.grub.efiInstallAsRemovable = true;
boot.loader.grub.extraConfig = ''
GRUB_DISABLE_OS_PROBER=false
GRUB_TERMINAL_OUTPUT=console
'';
system.stateVersion = "25.05";
boot.loader.grub.gfxmodeBios = "1280x720"; # for BIOS, or
boot.loader.grub.gfxmodeEfi = "1280x720"; # for EFI
boot.loader.grub.gfxpayloadBios = "keep";
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [ "nvidia-drm.modeset=1" "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
networking.hostName = "nxs"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Networking
networking = {
hostName = "nxs";
networkmanager.enable = true;
firewall.enable = true;
};
# Set your time zone.
# Localization
time.timeZone = "Europe/Rome";
virtualisation.docker.enable = true;
# optional but sane:
virtualisation.docker.enableOnBoot = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
services.xserver = {
# Virtualization
virtualisation.docker = {
enable = true;
libinput = {
enable = true;
touchpad = {
naturalScrolling = true;
tapping = true;
disableWhileTyping = true;
clickMethod = "clickfinger";
};
enableOnBoot = true;
};
displayManager.lightdm = {
enable = true;
autoLogin.enable = true;
autoLogin.user = "narrator";
};
windowManager.i3.enable = true;
videoDrivers = [ "amdgpu" "nvidia" ];
deviceSection = ''
BusID "PCI:1:0:0"
Driver "nvidia"
'';
};
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# services.pulseaudio.enable = true;
# OR
security.rtkit.enable = true;
services.pipewire = {
alsa.enable = true;
enable = true;
pulse.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
# Users
programs.fish.enable = true;
users.users.narrator = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ]; # Enable sudo for the user.
extraGroups = [ "wheel" "docker" ];
shell = pkgs.fish;
packages = with pkgs; [
tree
];
packages = with pkgs; [ tree ];
};
programs.firefox.enable = true;
# List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options).
# System packages
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
vim
gnupg
wget
cryptsetup
@ -143,119 +54,28 @@
git
pinentry-curses
lightdm
i3-gaps
i3
awesome
blueman
];
fonts.packages = with pkgs; [
nerd-fonts.fira-code
nerd-fonts.droid-sans-mono
nerd-fonts.symbols-only
];
services.logind = {
lidSwitch = "ignore";
lidSwitchDocked = "ignore";
lidSwitchExternalPower = "lock";
extraConfig = ''
IdleAction=ignore
HandleSuspendKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
SuspendKeyIgnoreInhibited=yes
LidSwitchIgnoreInhibited=yes
HandlePowerKey=poweroff
HandleSuspendKey=hibernate
'';
# Services
services = {
openssh.enable = true;
timesyncd.enable = true;
pcscd.enable = true;
};
systemd.sleep.extraConfig = ''
AllowSuspend=no
AllowHibernation=no
AllowHybridSleep=no
AllowSuspendThenHibernate=no
'';
# firewall bc duh
networking.firewall.enable = true;
documentation.man.generateCaches = false;
# time sync
services.timesyncd.enable = true;
# bluetooth
hardware.bluetooth.enable = true;
services.blueman.enable = true;
# enable printing
services.printing.enable = true;
# enable openssh for remote access
services.openssh.enable = true;
programs.ssh.startAgent = true;
# Programs
programs = {
firefox.enable = true;
ssh.startAgent = true;
gnupg.agent.enable = true;
};
# Security
security.sudo.wheelNeedsPassword = false;
system.stateVersion = "25.05"; # Did you read the comment?
# GnuPG
programs.gnupg.agent = {
enable = true;
};
services.pcscd.enable = true;
systemd.services."getty@tty2".enable = true;
systemd.services."getty@tty3".enable = true;
hardware.graphics = {
enable = true;
};
# Load nvidia driver for Xorg and Wayland
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = true;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
#powerManagement.finegrained = true;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
open = true;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
# SSH config:
};
hardware.nvidia.forceFullCompositionPipeline = true;
systemd.services = {
systemd-suspend.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false";
systemd-hibernate.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false"; # if u care
};
hardware.nvidia.prime = {
offload.enable = true;
amdgpuBusId = "PCI:7:0:0";
nvidiaBusId = "PCI:1:0:0";
#amdgpuBusId = "PCI:54:0:0"; # If you have an AMD iGPU
};
# Documentation
documentation.man.generateCaches = false;
}

View file

@ -1,46 +1,22 @@
{ config, lib, pkgs, inputs, ... }:
{
imports = [
inputs.nixvim.homeManagerModules.nixvim
inputs.self.homeManagerModules.copilot-cli
./i3.nix
./i3blocks.nix
./modules/neovim.nix
./modules/fish.nix
./modules/tmux.nix
./modules/home-manager/i3.nix
./modules/home-manager/i3blocks.nix
./modules/home-manager/neovim.nix
./modules/home-manager/fish.nix
./modules/home-manager/tmux.nix
];
home.username = "narrator";
home.homeDirectory = "/home/narrator";
home.stateVersion = "25.05";
programs.home-manager.enable = true;
programs.ssh = {
enable = true;
forwardAgent = true;
addKeysToAgent = "yes";
matchBlocks = {
"git.unime.it" = {
hostname = "git.unime.it";
port = 42000; # e.g. 2222
};
};
extraConfig = ''
Host git.nonaxiomatic.systems
ControlMaster no
'';
};
services.gpg-agent = {
enable = true;
defaultCacheTtl = 28800;
defaultCacheTtlSsh = 28800;
sshKeys = [ ]; # auto-populates from gpg keys
};
programs.copilot-cli.enable = true;
# Home Manager settings
home = {
username = "narrator";
homeDirectory = "/home/narrator";
stateVersion = "25.05";
home.packages = with pkgs; [
packages = with pkgs; [
ssh-to-age
pinentry-curses
cryptsetup
@ -56,7 +32,6 @@
kiwix
kiwix-tools
aria2
teamspeak3
git
nicotine-plus
sl
@ -78,7 +53,7 @@
telegram-desktop
feh
alacritty
i3-gaps
i3
lsd
polybar
tmux
@ -90,12 +65,37 @@
lshw
age
notepad-next
];
programs.direnv = {
};
programs = {
home-manager.enable = true;
copilot-cli.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
};
ssh = {
enable = true;
forwardAgent = true;
addKeysToAgent = "yes";
matchBlocks = {
"git.unime.it" = {
hostname = "git.unime.it";
port = 42000;
};
};
extraConfig = ''
Host git.nonaxiomatic.systems
ControlMaster no
'';
};
};
services.gpg-agent = {
enable = true;
defaultCacheTtl = 28800;
defaultCacheTtlSsh = 28800;
sshKeys = [ ];
};
}

View file

@ -0,0 +1,40 @@
{ config, lib, pkgs, ... }:
{
boot = {
loader = {
grub = {
enable = true;
efiSupport = true;
device = "nodev";
useOSProber = true;
configurationLimit = 5;
gfxmodeBios = "1280x720";
gfxmodeEfi = "1280x720";
gfxpayloadBios = "keep";
extraConfig = ''
GRUB_DISABLE_OS_PROBER=false
GRUB_TERMINAL_OUTPUT=console
'';
};
efi = {
efiSysMountPoint = "/boot/efi";
canTouchEfiVariables = true;
};
};
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = [
"nvidia-drm.modeset=1"
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/31dbc3a8-dfdc-4177-8d3e-2b6e294e7daf";
fsType = "btrfs";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/f9da6980-510f-4cce-bff5-50a791346c07"; }
];
}

View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
{
services.xserver.enable = true;
services.libinput = {
enable = true;
touchpad = {
naturalScrolling = true;
tapping = true;
disableWhileTyping = true;
clickMethod = "clickfinger";
};
};
services.displayManager.autoLogin = {
enable = true;
user = "narrator";
};
services.xserver.displayManager.lightdm.enable = true;
services.xserver.windowManager.i3.enable = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
services.blueman.enable = true;
services.printing.enable = true;
fonts.packages = with pkgs; [
nerd-fonts.fira-code
nerd-fonts.droid-sans-mono
nerd-fonts.symbols-only
];
}

View file

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
{
hardware = {
graphics.enable = true;
bluetooth.enable = true;
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
forceFullCompositionPipeline = true;
prime = {
offload.enable = true;
amdgpuBusId = "PCI:7:0:0";
nvidiaBusId = "PCI:1:0:0";
};
};
};
services.xserver = {
videoDrivers = [ "amdgpu" "nvidia" ];
deviceSection = ''
BusID "PCI:1:0:0"
Driver "nvidia"
'';
};
}

View file

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
{
services.logind = {
lidSwitch = "ignore";
lidSwitchDocked = "ignore";
lidSwitchExternalPower = "lock";
};
systemd.sleep.extraConfig = ''
AllowSuspend=no
AllowHibernation=no
AllowHybridSleep=no
AllowSuspendThenHibernate=no
'';
systemd.services = {
systemd-suspend.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false";
systemd-hibernate.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false";
"getty@tty2".enable = true;
"getty@tty3".enable = true;
};
}

View file

@ -0,0 +1,17 @@
{ lib, pkgs, config, inputs, ... }:
{
options.programs.copilot-cli.enable = lib.mkEnableOption "GitHub Copilot CLI";
config = lib.mkIf config.programs.copilot-cli.enable {
home.packages = [
(
inputs.nix-ai-tools.packages.${pkgs.system}.copilot-cli or
(inputs.nixpkgs.legacyPackages.${pkgs.system}.fetchgit {
url = "github:numtide/nix-ai-tools";
ref = "main";
}).packages.${pkgs.system}.copilot-cli
)
];
};
}

View file

@ -0,0 +1,22 @@
{ config, lib, ... }:
{
options.nixos.autoUpgrade = {
enable = lib.mkEnableOption "automatic NixOS upgrades";
flakePath = lib.mkOption {
type = lib.types.str;
description = "Path to the flake for auto-upgrade";
};
};
config = lib.mkIf config.nixos.autoUpgrade.enable {
system.autoUpgrade = {
enable = true;
flake = config.nixos.autoUpgrade.flakePath;
flags = [ "-L" ];
dates = "02:00";
randomizedDelaySec = "45min";
operation = "switch";
};
};
}