diff --git a/nixos/boxes/foureighty/default.nix b/nixos/boxes/foureighty/default.nix index 94680445..63456ddd 100644 --- a/nixos/boxes/foureighty/default.nix +++ b/nixos/boxes/foureighty/default.nix @@ -1,11 +1,9 @@ -{ config, pkgs, ... }: +{ config, pkgs, inputs, ... }: { networking.hostName = "foureighty"; imports = [ - ./hardware-configuration.nix - ./lte-modem.nix ../../boot.nix ../../common.nix ../../gfx-intel.nix @@ -34,22 +32,12 @@ services.hardware.bolt.enable = true; services.fprintd = { enable = true; - package = pkgs.unstable.fprintd; }; - home-manager.users.cyryl = {...}: { - imports = [ - ../../home-manager - ]; - home.stateVersion = config.system.stateVersion; - - nixpkgs.overlays = config.nixpkgs.overlays; - nixpkgs.config = config.nixpkgs.config; - home.packages = with pkgs; [ - bisq.bisq-desktop - ]; - }; fonts.fontconfig.enable = true; programs.steam.enable = true; + home-manager.users.cyryl = {...}: { + home.packages = [ inputs.bisq.legacyPackages."x86_64-linux".bisq-desktop ]; + }; } diff --git a/nixos/common-hardware.nix b/nixos/common-hardware.nix index bdeda8b2..5736a6a1 100644 --- a/nixos/common-hardware.nix +++ b/nixos/common-hardware.nix @@ -8,6 +8,13 @@ networking.networkmanager.enable = true; hardware.enableAllFirmware = true; + + + nixpkgs.config = { + allowUnfree = true; + }; + + hardware.enableRedistributableFirmware = true; hardware.cpu.intel.updateMicrocode = true; hardware.pulseaudio = { @@ -24,7 +31,7 @@ hardware.bluetooth = { enable = true; package = pkgs.bluezFull; - config = { + settings = { General = { Enable = "Source,Sink,Media,Socket"; }; }; }; diff --git a/nixos/common-services.nix b/nixos/common-services.nix index dfe12708..253a4a3b 100644 --- a/nixos/common-services.nix +++ b/nixos/common-services.nix @@ -34,9 +34,11 @@ xkbOptions = "caps:ctrl_modifier"; libinput = { enable = true; - naturalScrolling = false; - clickMethod = "clickfinger"; - disableWhileTyping = true; + touchpad = { + naturalScrolling = false; + clickMethod = "clickfinger"; + disableWhileTyping = true; + }; }; useGlamor = true; diff --git a/nixos/common.nix b/nixos/common.nix index 89e2738c..668d610a 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -1,92 +1,65 @@ { config, pkgs, ... }: +{ + imports = + [ + ./common-hardware.nix + ./common-services.nix + ./security.nix + ./syncthing.nix + ]; -let - unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz; - bisqTarball = fetchTarball https://github.com/emmanuelrosa/nixpkgs/archive/3a681b0daaed9841cbd3ea2ebd51f9cca4c836f2.tar.gz; - mindforgerTarball = fetchTarball https://github.com/cyplo/nixpkgs/archive/80286e3d62406777c08c4afbeeb5deeb1c44062b.tar.gz; - nurTarball = fetchTarball https://github.com/nix-community/NUR/archive/master.tar.gz; -in - { - imports = - [ - ./syncthing.nix - ./gsconnect.nix - ./common-hardware.nix - ./common-services.nix - ./security.nix - ./wireguard.nix + security.allowUserNamespaces = true; + + environment.enableDebugInfo = true; + environment.systemPackages = with pkgs; [ + wget git gnupg curl tmux htop atop home-manager pciutils powertop fd dnsutils usbutils + ]; + + i18n.defaultLocale = "en_GB.UTF-8"; + + users.users.cyryl = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" "video" "scanner" "lp" "docker" "vboxusers" "adbusers" "libvirtd" "dialout" "wireshark" ]; + shell = pkgs.zsh; + }; + + networking.hosts = { + "10.11.99.1" = [ "remarkable" ]; + }; + + programs.light.enable = true; + programs.adb.enable = true; + programs.wireshark.enable=true; + + virtualisation.docker = { + enable = true; + autoPrune.enable = true; + }; + + fonts.fonts = with pkgs; [ powerline-fonts weather-icons material-icons source-code-pro fira-code noto-fonts-emoji emojione iosevka font-awesome nerdfonts ]; + + services.haveged.enable = true; + + nix = { + autoOptimiseStore = true; + daemonIONiceLevel = 7; + daemonNiceLevel = 19; + gc.automatic = true; + optimise.automatic = true; + nixPath = [ + "nixpkgs=https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz" + "nixos-config=/etc/nixos/configuration.nix" + "/nix/var/nix/profiles/per-user/root/channels" + "home-manager=https://github.com/rycee/home-manager/archive/release-20.09.tar.gz" ]; - - security.allowUserNamespaces = true; - - nixpkgs.config = { - allowUnfree = true; - packageOverrides = pkgs: { - unstable = import unstableTarball { - config = config.nixpkgs.config; - }; - bisq = import bisqTarball { - config = config.nixpkgs.config; - }; - mindforgerPatched = import mindforgerTarball { - config = config.nixpkgs.config; - }; - nur = import nurTarball { - inherit pkgs; - }; - }; - }; - - environment.enableDebugInfo = true; - environment.systemPackages = with pkgs; [ - wget git gnupg curl tmux htop atop home-manager pciutils powertop fd dnsutils usbutils - ]; - - i18n.defaultLocale = "en_GB.UTF-8"; - - users.users.cyryl = { - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" "video" "scanner" "lp" "docker" "vboxusers" "adbusers" "libvirtd" "dialout" "wireshark" ]; - shell = pkgs.zsh; - }; - - networking.hosts = { - "10.11.99.1" = [ "remarkable" ]; - }; - - programs.light.enable = true; - programs.adb.enable = true; - programs.wireshark.enable=true; - - virtualisation.docker = { - enable = true; - autoPrune.enable = true; - }; - - fonts.fonts = with pkgs; [ powerline-fonts weather-icons material-icons source-code-pro fira-code noto-fonts-emoji emojione iosevka font-awesome nerdfonts ]; - - services.haveged.enable = true; - - nix = { - autoOptimiseStore = true; - daemonIONiceLevel = 7; - daemonNiceLevel = 19; - gc.automatic = true; - optimise.automatic = true; - nixPath = [ - "nixpkgs=https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz" - "nixos-config=/etc/nixos/configuration.nix" - "/nix/var/nix/profiles/per-user/root/channels" - "home-manager=https://github.com/rycee/home-manager/archive/release-20.09.tar.gz" - ]; - package = pkgs.nixUnstable; - extraOptions = '' - experimental-features = nix-command flakes - ''; - }; + package = pkgs.nixUnstable; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; - system = { - stateVersion = "20.03"; - }; - } + system = { + stateVersion = "20.03"; + }; + } diff --git a/nixos/flake.lock b/nixos/flake.lock new file mode 100644 index 00000000..acc60347 --- /dev/null +++ b/nixos/flake.lock @@ -0,0 +1,100 @@ +{ + "nodes": { + "bisq": { + "locked": { + "lastModified": 1620344115, + "narHash": "sha256-xnssmdoQsDyZL8vWSuv9QmAc260JMPzBCFRYznOna78=", + "owner": "emmanuelrosa", + "repo": "nixpkgs", + "rev": "3a681b0daaed9841cbd3ea2ebd51f9cca4c836f2", + "type": "github" + }, + "original": { + "owner": "emmanuelrosa", + "ref": "3a681b0daaed9841cbd3ea2ebd51f9cca4c836f2", + "repo": "nixpkgs", + "type": "github" + } + }, + "futils": { + "locked": { + "lastModified": 1620759905, + "narHash": "sha256-WiyWawrgmyN0EdmiHyG2V+fqReiVi8bM9cRdMaKQOFg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b543720b25df6ffdfcf9227afafc5b8c1fabfae8", + "type": "github" + }, + "original": { + "owner": "numtide", + "ref": "master", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1622368473, + "narHash": "sha256-5/HXUr8uv+L9ZerwEF3UefYL8Ik+j4uPoMpnxealANo=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "d2aaeac42c563cf8cf76ee3b90d9585dadbb91e0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1622194753, + "narHash": "sha256-76qtvFp/vFEz46lz5iZMJ0mnsWQYmuGYlb0fHgKqqMg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "540dccb2aeaffa9dc69bfdc41c55abd7ccc6baa3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nur": { + "locked": { + "lastModified": 1622369728, + "narHash": "sha256-VLnaYJDw2DFP2p1LHDgEpV0FV6vyYGj3uV2ciJFuAiE=", + "owner": "nix-community", + "repo": "NUR", + "rev": "58be3aa3e3940dd8f2401370ea348aaf97f5bbe6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "NUR", + "type": "github" + } + }, + "root": { + "inputs": { + "bisq": "bisq", + "futils": "futils", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "nur": "nur" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nixos/flake.nix b/nixos/flake.nix new file mode 100644 index 00000000..e1a26aa2 --- /dev/null +++ b/nixos/flake.nix @@ -0,0 +1,64 @@ +{ + description = "NixOS configuration with flakes"; + inputs = { + futils = { + type = "github"; + owner = "numtide"; + repo = "flake-utils"; + ref = "master"; + }; + + home-manager = { + type = "github"; + owner = "nix-community"; + repo = "home-manager"; + ref = "master"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; + + nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "nixos-unstable"; + }; + + nur = { + type = "github"; + owner = "nix-community"; + repo = "NUR"; + ref = "master"; + }; + + bisq = { + type = "github"; + owner = "emmanuelrosa"; + repo = "nixpkgs"; + ref = "3a681b0daaed9841cbd3ea2ebd51f9cca4c836f2"; + }; + }; + + outputs = { self, futils, home-manager, nixpkgs, nur, bisq } @ inputs: { + + nixosConfigurations = { + foureighty = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + (import ./boxes/foureighty) + + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.cyryl = import ./home-manager; + } + + ]; + specialArgs = { inherit inputs; }; + }; + }; + }; +} + diff --git a/nixos/gui/default.nix b/nixos/gui/default.nix index b2002df5..1c885db0 100644 --- a/nixos/gui/default.nix +++ b/nixos/gui/default.nix @@ -12,6 +12,8 @@ qt = { enable = true; platformTheme = "gnome"; + style.name = "adwaita-dark"; + style.package = pkgs.adwaita-qt; }; imports = [ @@ -32,30 +34,30 @@ gsettings-desktop-schemas keybase-gui libreoffice - mindforgerPatched.mindforger + mindforger modem-manager-gui passff-host pdfarranger python38Packages.binwalk-full - qemu aqemu + qemu shotwell simple-scan slack spotify - unstable.ssb-patchwork - unstable.discord - unstable.electrum - unstable.element-desktop - unstable.freecad - unstable.ghidra-bin - unstable.hopper - unstable.inkscape - unstable.nyxt - unstable.openscad - unstable.qcad - unstable.signal-desktop - unstable.torbrowser - unstable.wireshark + ssb-patchwork + discord + electrum + element-desktop + freecad + ghidra-bin + hopper + inkscape + nyxt + openscad + qcad + signal-desktop + torbrowser + wireshark vlc wineFull xclip diff --git a/nixos/gui/vscode.nix b/nixos/gui/vscode.nix index d7b90344..878b9fba 100644 --- a/nixos/gui/vscode.nix +++ b/nixos/gui/vscode.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: { - home.packages = with pkgs.unstable; [ + home.packages = with pkgs; [ (vscode-with-extensions.override { vscodeExtensions = with vscode-extensions; [ bbenoist.Nix diff --git a/nixos/home-manager/cli.nix b/nixos/home-manager/cli.nix index 4d661ee2..3fe714dc 100644 --- a/nixos/home-manager/cli.nix +++ b/nixos/home-manager/cli.nix @@ -35,9 +35,9 @@ rustup terraform tmux - unstable.exercism - unstable.genpass - unstable.topgrade + exercism + genpass + topgrade unzip veracrypt wget diff --git a/nixos/home-manager/programs/emacs/emacs.nix b/nixos/home-manager/programs/emacs/emacs.nix index c9c128bc..22483923 100644 --- a/nixos/home-manager/programs/emacs/emacs.nix +++ b/nixos/home-manager/programs/emacs/emacs.nix @@ -1,4 +1,4 @@ -{ pkgs ? import {} }: +{ pkgs }: let myEmacs = pkgs.emacs-nox; emacsWithPackages = (pkgs.emacsPackagesGen myEmacs).emacsWithPackages; diff --git a/nixos/home-manager/programs/vim.nix b/nixos/home-manager/programs/vim.nix index 724f521c..3fe47161 100644 --- a/nixos/home-manager/programs/vim.nix +++ b/nixos/home-manager/programs/vim.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: { - home.file.".vimrc".source = /home/cyryl/dev/dotfiles/.vimrc.nixos; + home.file.".vimrc".source = ../../../.vimrc.nixos; programs.neovim = { enable = true; viAlias = true; diff --git a/nixos/i3/default.nix b/nixos/i3/default.nix index ad77450f..ff49a307 100644 --- a/nixos/i3/default.nix +++ b/nixos/i3/default.nix @@ -20,7 +20,6 @@ dbus = { packages = with pkgs; [ gnome2.GConf gnome3.dconf ]; - socketActivated = true; }; fractalart.enable = true; diff --git a/nixos/i3/i3.nix b/nixos/i3/i3.nix index 56fc0d06..e58b3b66 100644 --- a/nixos/i3/i3.nix +++ b/nixos/i3/i3.nix @@ -32,7 +32,7 @@ in position = "top"; colors.background = "#002b36"; fonts = [ "Fira Code Nerd Font 10" ]; - statusCommand = "${pkgs.unstable.i3status-rust}/bin/i3status-rs $HOME/dev/dotfiles/.config/i3/i3-status.toml"; + statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs $HOME/dev/dotfiles/.config/i3/i3-status.toml"; trayOutput = "primary"; } ]; diff --git a/nixos/syncthing.nix b/nixos/syncthing.nix index a22cbf23..57116057 100644 --- a/nixos/syncthing.nix +++ b/nixos/syncthing.nix @@ -5,6 +5,5 @@ user = "cyryl"; dataDir = "/home/cyryl/.syncthing"; openDefaultPorts = true; - package = pkgs.unstable.syncthing; }; }