From b90817a0f60db086ab3899a46534311c053212df Mon Sep 17 00:00:00 2001 From: xqtc161 Date: Mon, 19 Feb 2024 12:02:16 +0100 Subject: [PATCH] enabling libvirt; fix for nvim-base16 rename in nixpkgs upstrea (waiting on nixos-unstable being propagated) --- flake.lock | 61 +++++++++++++++++++++++--------------- flake.nix | 6 ++-- home/default.nix | 64 ++++++++++++++++------------------------ home/modules/nixvim.nix | 1 + hosts/lilith/default.nix | 46 ++++++++++++++++++----------- 5 files changed, 96 insertions(+), 82 deletions(-) diff --git a/flake.lock b/flake.lock index d7743a6..cc6abce 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1707969829, - "narHash": "sha256-3OGHlhhJwM9o7Tl1vbC6ehvMZAcGvEhOsd8RKY93VR4=", + "lastModified": 1708315443, + "narHash": "sha256-kAUx0D/d9TaeEJfZ8UYN7HILUGiLzyNdNkYvOVuyDcc=", "owner": "rycee", "repo": "nur-expressions", - "rev": "d6054eda1bec2eef94411d88c09f20541ce478a7", + "rev": "aaef0f127338365da54d808bcd45799f8dc6d704", "type": "gitlab" }, "original": { @@ -22,6 +22,20 @@ } }, "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1696426674, @@ -138,11 +152,11 @@ ] }, "locked": { - "lastModified": 1707919853, - "narHash": "sha256-qxmBGDzutuJ/tsX4gp+Mr7fjxOZBbeT9ixhS5o4iFOw=", + "lastModified": 1708294481, + "narHash": "sha256-DZtxmeb4OR7iCaKUUuq05ADV2rX8WReZEF7Tq//W0+Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "043ba285c6dc20f36441d48525402bcb9743c498", + "rev": "a54e05bc12d88ff2df941d0dc1183cb5235fa438", "type": "github" }, "original": { @@ -196,11 +210,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1707842204, - "narHash": "sha256-M+HAq1qWQBi/gywaMZwX0odU+Qb/XeqVeANGKRBDOwU=", + "lastModified": 1708091350, + "narHash": "sha256-o28BJYi68qqvHipT7V2jkWxDiMS1LF9nxUsou+eFUPQ=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "f1b2f71c86a5b1941d20608db0b1e88a07d31303", + "rev": "106d3fec43bcea19cb2e061ca02531d54b542ce3", "type": "github" }, "original": { @@ -226,40 +240,41 @@ "type": "github" } }, - "nixpkgs-unstable": { + "nixpkgs-master": { "locked": { - "lastModified": 1707956935, - "narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=", + "lastModified": 1708339623, + "narHash": "sha256-Tmn5fWBeL3e+Zput55yjRH7vqrhMyiLjz7VmVpliUtk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c", + "rev": "b3d1fe3b876cdde17803f4ad3d30132d126ff9b0", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "master", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1707956935, - "narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=", + "lastModified": 1708247094, + "narHash": "sha256-H2VS7VwesetGDtIaaz4AMsRkPoSLEVzL/Ika8gnbUnE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c", + "rev": "045b51a3ae66f673ed44b5bbd1f4a341d96703bf", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixvim": { "inputs": { + "flake-compat": "flake-compat", "flake-parts": "flake-parts", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", @@ -269,11 +284,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1708003742, - "narHash": "sha256-Y2ET4HnijBUhVww5qs7bA076UyJq2X1zyKiTTcVP3x8=", + "lastModified": 1708338329, + "narHash": "sha256-AAxCApUIwIdUN+nwYHK9qVSaQ3q0R2BN4N5oU/SZ1p4=", "owner": "nix-community", "repo": "nixvim", - "rev": "2594863af79adcd140a80e8b1008333198d70830", + "rev": "b8815f04a32c2fcff4c10f6a52aab0e030a71060", "type": "github" }, "original": { @@ -284,7 +299,7 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-utils": "flake-utils_3", "gitignore": "gitignore", "nixpkgs": [ @@ -317,7 +332,7 @@ "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", - "nixpkgs-unstable": "nixpkgs-unstable", + "nixpkgs-master": "nixpkgs-master", "nixvim": "nixvim" } }, diff --git a/flake.nix b/flake.nix index 2387c3e..f8cf933 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,8 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-master.url = "github:NixOS/nixpkgs/master"; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; @@ -17,7 +17,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs @ {self, nixpkgs, nixpkgs-unstable, firefox-addons, home-manager, nixos-hardware, nixvim, ...}: let + outputs = inputs @ {self, nixpkgs, nixpkgs-master, firefox-addons, home-manager, nixos-hardware, nixvim, ...}: let lib = nixpkgs.lib; util = (import ./overlays/util.nix {} {}).util; system = "x86_64-linux"; diff --git a/home/default.nix b/home/default.nix index 0ef072c..b6fc7ce 100644 --- a/home/default.nix +++ b/home/default.nix @@ -15,11 +15,8 @@ enable = true; extraConfig = builtins.readFile ./config-files/wezterm.lua; }; - #programs.dconf.enable = true; - #programs.easyeffects.enable = true; - #services.easyeffects.enable = true; - programs = { + programs = { atuin = { enable = true; enableNushellIntegration = true; @@ -37,49 +34,39 @@ } ''; }; - # The config.nu can be anywhere you want if you like to edit your Nushell with Nu - #extraConfig = builtins.readFile ./config-files/config.nu; }; carapace.enable = true; carapace.enableNushellIntegration = true; starship = - let - flavour = "mocha"; - in - { - enable = true; - enableNushellIntegration = true; - settings = { - # Other config here - character = { - success_symbol = "[λ::](bold green)"; - error_symbol = "[λ::](bold red)"; - }; - format = "$all"; # Remove this line to disable the default prompt format - palette = "catppuccin_${flavour}"; - } // builtins.fromTOML (builtins.readFile - (pkgs.fetchFromGitHub - { - owner = "catppuccin"; - repo = "starship"; - rev = "5629d2356f62a9f2f8efad3ff37476c19969bd4f"; # Replace with the latest commit hash - sha256 = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0="; - } + /palettes/${flavour}.toml)); - }; - #starship = { enable = true; - # settings = { - # add_newline = true; - # character = { - # success_symbol = "[λ::](bold green)"; - # error_symbol = "[λ::](bold red)"; - # }; - # }; - #}; + let + flavour = "mocha"; + in + { + enable = true; + enableNushellIntegration = true; + settings = { + # Other config here + character = { + success_symbol = "[λ::](bold green)"; + error_symbol = "[λ::](bold red)"; + }; + format = "$all"; # Remove this line to disable the default prompt format + palette = "catppuccin_${flavour}"; + } // builtins.fromTOML (builtins.readFile + (pkgs.fetchFromGitHub + { + owner = "catppuccin"; + repo = "starship"; + rev = "5629d2356f62a9f2f8efad3ff37476c19969bd4f"; # Replace with the latest commit hash + sha256 = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0="; + } + /palettes/${flavour}.toml)); + }; }; dconf.enable = true; dconf.settings = { "org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; + cursor-theme = "Adwaita"; }; }; @@ -134,7 +121,6 @@ bitwarden-cli sway-contrib.grimshot - #zathura libnotify diff --git a/home/modules/nixvim.nix b/home/modules/nixvim.nix index d43c48a..c03cb1e 100644 --- a/home/modules/nixvim.nix +++ b/home/modules/nixvim.nix @@ -23,6 +23,7 @@ lsp = { enable = true; servers = { + bashls.enable = true; lua-ls.enable = true; nushell.enable = true; clangd.enable = true; diff --git a/hosts/lilith/default.nix b/hosts/lilith/default.nix index 045d46b..fce476b 100644 --- a/hosts/lilith/default.nix +++ b/hosts/lilith/default.nix @@ -4,7 +4,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - ../antivirus.nix + #../antivirus.nix ../gc.nix #nixos-hardware.nixosModules.lenovo.thinkpad.t480 #(builtins.getFlake (builtins.fetchGit "github:NixOs/nixos-hardware")).nixosModules.lenovo-thinkpad-t480 @@ -43,6 +43,15 @@ boot.kernelPackages = pkgs.linuxPackages_latest; + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; + #dconf.settings = { + # "org/virt-manager/virt-manager/connections" = { + # autoconnect = ["qemu:///system"]; + # uris = ["qemu:///system"]; + # }; + #}; + networking.hostName = "lilith"; # Define your hostname. # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -113,7 +122,7 @@ # Define a user account. Don't forget to set a password with ‘passwd’. users.users.xqtc = { isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + extraGroups = [ "wheel" "libvirtd" ]; # Enable ‘sudo’ for the user. packages = with pkgs; [ nushell clamtk @@ -132,12 +141,15 @@ cargo cargo-generate sway + gnome3.adwaita-icon-theme + glib #swaylock swaylock-effects tofi waybar wl-clipboard wdisplays + #qemu_full gnomeExtensions.blur-my-shell ]; @@ -168,27 +180,27 @@ package = pkgs.mullvad-vpn; }; - networking.nameservers = [ - #"9.9.9.9#nine.nine.nine.nine" - "1.1.1.1#one.one.one.one" - "1.0.0.1#one.zero.zero.one" - ]; - services.resolved = { - enable = true; - #dnssec = "true"; - domains = [ "~." ]; - fallbackDns = ["1.1.1.1#one.one.one.one"]; - extraConfig = '' - MulticastDNS=yes - ''; - }; + #networking.nameservers = [ + # #"9.9.9.9#nine.nine.nine.nine" + # "1.1.1.1#one.one.one.one" + # "1.0.0.1#one.zero.zero.one" + #]; + #services.resolved = { + # enable = true; + # #dnssec = "true"; + # domains = [ "~." ]; + # fallbackDns = ["1.1.1.1#one.one.one.one"]; + # #extraConfig = '' + # # MulticastDNS=yes + # #''; + #}; #networking.wireguard.enable = true; services.tailscale.enable = true; # Open ports in the firewall. - networking.firewall.allowedTCPPorts = [ 2234 8080 5173 ]; + networking.firewall.allowedTCPPorts = [ 22 2234 8080 5173 ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false;