From 6a3d3201c1b0ccc6dbd12cd6e93e01654814afc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Sun, 5 Jan 2025 21:24:47 +0100 Subject: [PATCH] add uv and ventoy --- fish/conf.d/aliases.fish | 1 + nix/configuration.nix | 12 ++-- nix/flake.lock | 149 ++++++++++++++++++++++++++++++++++++++- nix/flake.nix | 20 +++++- nix/packages.nix | 5 +- topgrade.toml | 7 +- 6 files changed, 183 insertions(+), 11 deletions(-) diff --git a/fish/conf.d/aliases.fish b/fish/conf.d/aliases.fish index 71b0bb1..a360b9c 100644 --- a/fish/conf.d/aliases.fish +++ b/fish/conf.d/aliases.fish @@ -19,3 +19,4 @@ alias vihosts 'sudo vim /etc/hosts' alias s 'TERM=xterm-256color ssh' alias hs 'halig git commit && halig git push' alias hp 'halig git pull' +alias reboot2uefi 'systemctl reboot --firmware-setup' diff --git a/nix/configuration.nix b/nix/configuration.nix index a1cd6a6..f7c7c4d 100644 --- a/nix/configuration.nix +++ b/nix/configuration.nix @@ -1,5 +1,5 @@ -{ config, pkgs, ... }: +{ config, pkgs, pkgs-unstable, ... }: { imports = [ ./hardware-configuration.nix @@ -71,7 +71,6 @@ }; services.printing.enable = true; - hardware.pulseaudio.enable = false; security.rtkit.enable = true; hardware.graphics.enable = true; @@ -82,7 +81,6 @@ pulse.enable = true; }; - users.users.catalin = { isNormalUser = true; description = "catalin"; @@ -98,7 +96,7 @@ nixpkgs.config.allowUnfree = true; services.flatpak.enable = true; programs.nix-ld.enable = true; - environment.systemPackages = import ./packages.nix pkgs; + environment.systemPackages = import ./packages.nix pkgs ; programs = { bash = { interactiveShellInit = '' @@ -119,6 +117,7 @@ }; xdg.portal.enable = true; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + xdg.portal.config.common.default = "gtk"; programs.mtr.enable = true; programs.dconf.enable = true; programs.gnupg.agent = { @@ -134,6 +133,11 @@ }; nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 1w"; + }; services.openssh.enable = true; virtualisation.docker.enable = true; networking.nameservers = [ "192.168.1.7" "1.1.1.1" ]; diff --git a/nix/flake.lock b/nix/flake.lock index febcdc6..65a9821 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -1,6 +1,22 @@ { "nodes": { "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -32,6 +48,45 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "ghostty": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-unstable": "nixpkgs-unstable", + "zig": "zig" + }, + "locked": { + "lastModified": 1735765328, + "narHash": "sha256-f4LI34cXP8nOTi4Va6GPUFaJYf0qGbabk+OeUddsfuk=", + "owner": "ghostty-org", + "repo": "ghostty", + "rev": "94599102e9fb8247af08cbbbcb7ee25e3d31e1bd", + "type": "github" + }, + "original": { + "owner": "ghostty-org", + "repo": "ghostty", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -55,7 +110,7 @@ }, "nix-snapd": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", "nixpkgs": [ "nixpkgs" @@ -103,11 +158,101 @@ "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1733423277, + "narHash": "sha256-TxabjxEgkNbCGFRHgM/b9yZWlBj60gUOUnRT/wbVQR8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e36963a147267afc055f7cf65225958633e536bf", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "release-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1733229606, + "narHash": "sha256-FLYY5M0rpa5C2QAE3CKLYAM6TwbKicdRK6qNrSHlNrE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "566e53c2ad750c84f6d31f9ccb9d00f823165550", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { + "ghostty": "ghostty", "home-manager": "home-manager", "nix-snapd": "nix-snapd", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "unstable": "unstable" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "unstable": { + "locked": { + "lastModified": 1735617354, + "narHash": "sha256-5zJyv66q68QZJZsXtmjDBazGnF0id593VSy+8eSckoo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "69b9a8c860bdbb977adfa9c5e817ccb717884182", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "zig": { + "inputs": { + "flake-compat": [ + "ghostty" + ], + "flake-utils": "flake-utils", + "nixpkgs": [ + "ghostty", + "nixpkgs-stable" + ] + }, + "locked": { + "lastModified": 1717848532, + "narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=", + "owner": "mitchellh", + "repo": "zig-overlay", + "rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43", + "type": "github" + }, + "original": { + "owner": "mitchellh", + "repo": "zig-overlay", + "type": "github" } } }, diff --git a/nix/flake.nix b/nix/flake.nix index 21c683d..0c2230d 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -3,6 +3,10 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + ghostty = { + url = "github:ghostty-org/ghostty"; + }; nix-snapd.url = "github:nix-community/nix-snapd"; nix-snapd.inputs.nixpkgs.follows = "nixpkgs"; home-manager = { @@ -11,13 +15,25 @@ }; }; - outputs = { self, nixpkgs, nix-snapd, home-manager, ... }@inputs: { + outputs = { self, nixpkgs, unstable, ghostty, nix-snapd, home-manager, ... }: + let + system = "x86_64-linux"; + lib = nixpkgs.lib; + pkgs-unstable = unstable.legacyPackages.${system}; + in + { nixosConfigurations.limgrave = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + inherit system; + specialArgs = { inherit pkgs-unstable; }; modules = [ ./configuration.nix nix-snapd.nixosModules.default home-manager.nixosModules.home-manager + { + environment.systemPackages = [ + ghostty.packages.x86_64-linux.default + ]; + } ]; }; }; diff --git a/nix/packages.nix b/nix/packages.nix index 03cb8e6..6d831da 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -30,7 +30,6 @@ pkgs: with pkgs; [ trashy cargo inconsolata - inconsolata-nerdfont devenv google-chrome discord @@ -72,5 +71,7 @@ pkgs: with pkgs; [ kubecolor kubeconform kube-score - tflint + coder + uv + ventoy-full ] diff --git a/topgrade.toml b/topgrade.toml index 0d5be8e..fac03f3 100644 --- a/topgrade.toml +++ b/topgrade.toml @@ -1,14 +1,19 @@ [misc] assume_yes = true -#ignore_failures = ["powershell"] +ignore_failures = ["helm"] disable = ["containers"] pre_sudo = true run_in_tmux = true display_time = true cleanup = true +pre_sudo = true +no_self_update = true [firmware] upgrade = true [flatpak] use_sudo = true + +[linux] +nix_arguments = "--flake /home/catalin/.dotfiles/nix/" \ No newline at end of file