diff --git a/flake.lock b/flake.lock index d7acc9c..1835eaf 100644 --- a/flake.lock +++ b/flake.lock @@ -1,40 +1,5 @@ { "nodes": { - "devshell": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722113426, - "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", - "owner": "numtide", - "repo": "devshell", - "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "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-parts": { "inputs": { "nixpkgs-lib": [ @@ -43,11 +8,32 @@ ] }, "locked": { - "lastModified": 1726153070, - "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -61,11 +47,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -74,58 +60,6 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "nixvim", - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1727514110, - "narHash": "sha256-0YRcOxJG12VGDFH8iS8pJ0aYQQUAgo/r3ZAL+cSh9nk=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "85f7a7177c678de68224af3402ab8ee1bcee25c8", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "nixvim", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -133,11 +67,11 @@ ] }, "locked": { - "lastModified": 1727383923, - "narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=", + "lastModified": 1746661235, + "narHash": "sha256-TAm/SnOT8AD3YKYOdjtg5Nmf/hCKEwc0USHBIoXV8qo=", "owner": "nix-community", "repo": "home-manager", - "rev": "ffe2d07e771580a005e675108212597e5b367d2d", + "rev": "ec71b5162848e6369bdf2be8d2f1dd41cded88e8", "type": "github" }, "original": { @@ -149,16 +83,16 @@ "home-manager_2": { "inputs": { "nixpkgs": [ - "nixvim", + "plasma-manager", "nixpkgs" ] }, "locked": { - "lastModified": 1727383923, - "narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=", + "lastModified": 1740494361, + "narHash": "sha256-Dd/GhJ9qKmUwuhgt/PAROG8J6YdU2ZjtJI9SQX5sVQI=", "owner": "nix-community", "repo": "home-manager", - "rev": "ffe2d07e771580a005e675108212597e5b367d2d", + "rev": "74f0a8546e3f2458c870cf90fc4b38ac1f498b17", "type": "github" }, "original": { @@ -167,24 +101,31 @@ "type": "github" } }, - "home-manager_3": { + "ixx": { "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], "nixpkgs": [ - "plasma-manager", + "nixvim", + "nuschtosSearch", "nixpkgs" ] }, "locked": { - "lastModified": 1714377222, - "narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49", + "lastModified": 1737371634, + "narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "home-manager", + "owner": "NuschtOS", + "ref": "v0.0.7", + "repo": "ixx", "type": "github" } }, @@ -204,34 +145,29 @@ "url": "https://git.psf.lt/xezo360hye/nethack" } }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, + "nixpkgs": { "locked": { - "lastModified": 1727507295, - "narHash": "sha256-I/FrX1peu4URoj5T5odfuKR2rm4GjYJJpCGF9c0/lDA=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "f2e1c4aa29fc211947c3a7113cba1dd707433b70", + "lastModified": 1746461020, + "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", "type": "github" }, "original": { - "owner": "lnl7", - "repo": "nix-darwin", + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", "type": "github" } }, - "nixpkgs": { + "nixpkgs_2": { "locked": { - "lastModified": 1727634051, - "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", + "lastModified": 1746461020, + "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9", + "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", "type": "github" }, "original": { @@ -243,24 +179,18 @@ }, "nixvim": { "inputs": { - "devshell": "devshell", - "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "git-hooks": "git-hooks", - "home-manager": "home-manager_2", - "nix-darwin": "nix-darwin", "nixpkgs": [ "nixpkgs" ], - "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" + "nuschtosSearch": "nuschtosSearch" }, "locked": { - "lastModified": 1727645871, - "narHash": "sha256-Os3PAThU5XliKkKa+SHsFyV/EsCHogHcYONmpzb6500=", + "lastModified": 1746650585, + "narHash": "sha256-9WZtcSn1/UkYK4UNXkcLCnVR7aIVI83VweqVlCf06OA=", "owner": "nix-community", "repo": "nixvim", - "rev": "5f4a4b47597d3b9ac26c41ff4e8da28fa662f200", + "rev": "6597afe2097ba07fdf515a541a2a02a7e06768cd", "type": "github" }, "original": { @@ -270,12 +200,17 @@ } }, "nur": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_2", + "treefmt-nix": "treefmt-nix" + }, "locked": { - "lastModified": 1727822548, - "narHash": "sha256-euvpMdV9W3jQOZGlX8IswS6wlBTZZGxUPyajv8hsyh8=", + "lastModified": 1746658175, + "narHash": "sha256-3T7nq2pMvbm6Jf7v2ow6WX0seR4wxnvqIkCkxDQ4PeM=", "owner": "nix-community", "repo": "NUR", - "rev": "302e013d8945f9b1f9253b1d05c9a0a09f975428", + "rev": "f80f80517b5a2d37b4cec14e13c7cbc04d3c1c16", "type": "github" }, "original": { @@ -287,17 +222,18 @@ "nuschtosSearch": { "inputs": { "flake-utils": "flake-utils", + "ixx": "ixx", "nixpkgs": [ "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1727452028, - "narHash": "sha256-ehl/A4HQFRyqj1Fk7cl+dgSf/2Fb1jLwWJtZaMU6RfU=", + "lastModified": 1745046075, + "narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=", "owner": "NuschtOS", "repo": "search", - "rev": "9f7426e532ef8dfc839c4a3fcc567b13a20a70d3", + "rev": "066afe8643274470f4a294442aadd988356a478f", "type": "github" }, "original": { @@ -308,17 +244,17 @@ }, "plasma-manager": { "inputs": { - "home-manager": "home-manager_3", + "home-manager": "home-manager_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1727463368, - "narHash": "sha256-5glMknkwQejUrKy28iy/kCFlSMwHcVyf/whmxqD0ggk=", + "lastModified": 1742765550, + "narHash": "sha256-2vVIh2JrL6GAGfgCeY9e6iNKrBjs0Hw3bGQEAbwVs68=", "owner": "nix-community", "repo": "plasma-manager", - "rev": "29ad64f0ac4ae84710dfeb1d37572d95c94cbfd8", + "rev": "b70be387276e632fe51232887f9e04e2b6ef8c16", "type": "github" }, "original": { @@ -355,16 +291,16 @@ "treefmt-nix": { "inputs": { "nixpkgs": [ - "nixvim", + "nur", "nixpkgs" ] }, "locked": { - "lastModified": 1727431250, - "narHash": "sha256-uGRlRT47ecicF9iLD1G3g43jn2e+b5KaMptb59LHnvM=", + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "879b29ae9a0378904fbbefe0dadaed43c8905754", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 427ae5c..17da758 100644 --- a/flake.nix +++ b/flake.nix @@ -37,14 +37,14 @@ inherit (nixpkgs) lib; username = "andrey"; - hostnames = [ "tokishiko" "maidena" "noma" ]; + hostnames = [ "tokishiko" "maidena" "noma" "tuxedo" ]; stateVersion = "24.05"; makeSystem = hostname: { "${hostname}" = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ - nur.nixosModules.nur + nur.modules.nixos.default ./system/common.nix ./system/${hostname}.nix @@ -72,7 +72,7 @@ extraSpecialArgs = { inherit inputs; }; pkgs = import nixpkgs { system = "x86_64-linux"; - overlays = [ nur.overlay ]; + overlays = [ nur.overlays.default ]; }; modules = (extractModules [ @@ -80,7 +80,7 @@ nethack plasma-manager ]) ++ [ - nur.hmModules.nur + nur.modules.homeManager.default ./home/${hostname}.nix ./home/common.nix diff --git a/hardware/tuxedo.nix b/hardware/tuxedo.nix new file mode 100644 index 0000000..e71581b --- /dev/null +++ b/hardware/tuxedo.nix @@ -0,0 +1,42 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/67e3bb85-4f70-4b8f-8b88-ad0e0f96e336"; + fsType = "ext4"; + }; + + fileSystems."/boot/efi" = + { device = "/dev/disk/by-uuid/8834-14B3"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/f198a128-2b2f-48b9-a804-cce6ab9803de"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp58s0f1.useDHCP = lib.mkDefault true; + # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp59s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/home/common.nix b/home/common.nix index ef50037..3045fae 100644 --- a/home/common.nix +++ b/home/common.nix @@ -5,13 +5,12 @@ ./modules/nethack ./modules/firefox ./modules/neovim - ./modules/emacs ]; programs = { home-manager.enable = true; fastfetch.enable = true; - htop.enable = true; + btop.enable = true; bash = { @@ -33,6 +32,7 @@ mpv = { enable = true; + config.hwdec = "auto"; scripts = with pkgs.mpvScripts; [ mpris ]; diff --git a/home/modules/firefox/default.nix b/home/modules/firefox/default.nix index 437ec84..e2ca1c6 100644 --- a/home/modules/firefox/default.nix +++ b/home/modules/firefox/default.nix @@ -4,10 +4,10 @@ enable = true; profiles.default = { - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ ublock-origin private-relay - libredirect + yomitan reddit-enhancement-suite enhancer-for-youtube @@ -54,7 +54,7 @@ search = { force = true; - default = "DuckDuckGo"; + default = "ddg"; engines = let makeShortcuts = let @@ -69,11 +69,11 @@ }; }; in engines: lib.listToAttrs (map hideEngine engines); - in (hideEngines [ "Google" "Bing" "Amazon.com" "eBay" ]) // + in (hideEngines [ "google" "bing" "amazondotcom-us" "ebay" ]) // { "Arch Wiki" = { urls = [{ template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; }]; - iconUpdateURL = "https://wiki.archlinux.org/favicon.ico"; + icon = "https://wiki.archlinux.org/favicon.ico"; definedAliases = makeShortcuts [ "archlinux" "aw" ]; }; @@ -93,19 +93,19 @@ "NixOS Wiki" = { urls = [{ template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; }]; - iconUpdateURL = "https://wiki.nixos.org/favicon.png"; + icon = "https://wiki.nixos.org/favicon.png"; definedAliases = makeShortcuts [ "nixos" "nw" ]; }; "MyNixOS" = { urls = [{ template = "https://mynixos.com/search?q={searchTerms}"; }]; - iconUpdateURL = "https://mynixos.com/favicon-light.svg"; + icon = "https://mynixos.com/favicon-light.svg"; definedAliases = makeShortcuts [ "mynixos" "mw" ]; }; "RuTracker" = { urls = [{ template = "https://rutracker.org/forum/tracker.php?nm={searchTerms}"; }]; - iconUpdateURL = "https://rutracker.org/favicon.ico"; + icon = "https://rutracker.org/favicon.ico"; definedAliases = makeShortcuts [ "rutracker" "rt" ]; }; }; diff --git a/home/modules/neovim/default.nix b/home/modules/neovim/default.nix index e22c40d..4af42ab 100644 --- a/home/modules/neovim/default.nix +++ b/home/modules/neovim/default.nix @@ -14,12 +14,14 @@ copilot-lua = { enable = true; - suggestion.autoTrigger = true; - suggestion.keymap = { - accept = ""; - acceptLine = ""; - acceptWord = ""; - }; + settings = { + suggestion.autoTrigger = true; + suggestion.keymap = { + accept = ""; + acceptLine = ""; + acceptWord = ""; + }; + }; }; }; diff --git a/home/modules/plasma/default.nix b/home/modules/plasma/default.nix index 55445f8..060fd19 100644 --- a/home/modules/plasma/default.nix +++ b/home/modules/plasma/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { programs.firefox = { - nativeMessagingHosts = [ pkgs.plasma-browser-integration ]; + nativeMessagingHosts = [ pkgs.kdePackages.plasma-browser-integration ]; profiles.default = { extensions = [ pkgs.nur.repos.rycee.firefox-addons.plasma-integration ]; @@ -25,16 +25,6 @@ naturalScroll = true; }]; - powerdevil = let - settings = { - powerButtonAction = "sleep"; - }; - - modes = [ "AC" "battery" "lowBattery" ]; - in lib.mergeAttrsList ( - map (m: { "${m}" = settings; }) modes - ); - kwin.edgeBarrier = 0; workspace = { clickItemTo = "open"; @@ -75,14 +65,13 @@ date.format = "isoDate"; time.format = "24h"; - date.position = "besideTime"; + date.position = "belowTime"; calendar.firstDayOfWeek = "monday"; }; }; workspaces = "org.kde.plasma.pager"; separator = "org.kde.plasma.panelspacer"; - desktop = "org.kde.plasma.showdesktop"; in [ kickoff @@ -94,7 +83,6 @@ separator systray - desktop ]; } ]; diff --git a/home/tuxedo.nix b/home/tuxedo.nix new file mode 100644 index 0000000..0c022f2 --- /dev/null +++ b/home/tuxedo.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./modules/plasma + ]; +} diff --git a/system/common.nix b/system/common.nix index cf25bb0..50fae59 100644 --- a/system/common.nix +++ b/system/common.nix @@ -13,22 +13,6 @@ in services.tailscale.enable = true; - # Router shared filesystem - fileSystems."/home/andrey/Public" = { - device = "root@192.168.0.3:/mnt/sda1"; - fsType = "sshfs"; - options = [ - "nodev" - "noatime" - "allow_other" - "reconnect" - "noauto" - "x-systemd.automount" - "IdentityFile=/home/andrey/.ssh/id_ed25519" - ]; - }; - - # l10n and i8n time.timeZone = "Europe/Riga"; i18n.defaultLocale = "en_US.UTF-8"; @@ -74,7 +58,6 @@ in # Printers and scanners hardware.sane.enable = true; services.printing.enable = true; - services.printing.drivers = [ pkgs.cnijfilter2 ]; programs.system-config-printer.enable = true; services.avahi = { @@ -83,8 +66,6 @@ in openFirewall = true; }; - programs.adb.enable = true; - # Distcc services.distccd = { enable = true; @@ -136,4 +117,9 @@ in tappingDragLock = false; }; }; + + fonts.packages = with pkgs; [ + noto-fonts-cjk-sans + noto-fonts-cjk-serif + ]; } diff --git a/system/tuxedo.nix b/system/tuxedo.nix new file mode 100644 index 0000000..c4b6f75 --- /dev/null +++ b/system/tuxedo.nix @@ -0,0 +1,20 @@ +{ + boot.loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; + }; + grub = { + efiSupport = true; + device = "nodev"; + }; + }; + + services = { + desktopManager.plasma6.enable = true; + displayManager.sddm = { + enable = true; + wayland.enable = true; + }; + }; +}