flakes for foureighty

This commit is contained in:
Cyryl Płotnicki 2021-05-30 20:41:33 +01:00
parent eb84eb2f5a
commit 0c1aa1b081
14 changed files with 266 additions and 132 deletions

View file

@ -1,11 +1,9 @@
{ config, pkgs, ... }: { config, pkgs, inputs, ... }:
{ {
networking.hostName = "foureighty"; networking.hostName = "foureighty";
imports = [ imports = [
<home-manager/nixos>
./hardware-configuration.nix ./hardware-configuration.nix
./lte-modem.nix
../../boot.nix ../../boot.nix
../../common.nix ../../common.nix
../../gfx-intel.nix ../../gfx-intel.nix
@ -34,22 +32,12 @@
services.hardware.bolt.enable = true; services.hardware.bolt.enable = true;
services.fprintd = { services.fprintd = {
enable = true; 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; fonts.fontconfig.enable = true;
programs.steam.enable = true; programs.steam.enable = true;
home-manager.users.cyryl = {...}: {
home.packages = [ inputs.bisq.legacyPackages."x86_64-linux".bisq-desktop ];
};
} }

View file

@ -8,6 +8,13 @@
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
nixpkgs.config = {
allowUnfree = true;
};
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
hardware.cpu.intel.updateMicrocode = true; hardware.cpu.intel.updateMicrocode = true;
hardware.pulseaudio = { hardware.pulseaudio = {
@ -24,7 +31,7 @@
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
package = pkgs.bluezFull; package = pkgs.bluezFull;
config = { settings = {
General = { Enable = "Source,Sink,Media,Socket"; }; General = { Enable = "Source,Sink,Media,Socket"; };
}; };
}; };

View file

@ -34,10 +34,12 @@
xkbOptions = "caps:ctrl_modifier"; xkbOptions = "caps:ctrl_modifier";
libinput = { libinput = {
enable = true; enable = true;
touchpad = {
naturalScrolling = false; naturalScrolling = false;
clickMethod = "clickfinger"; clickMethod = "clickfinger";
disableWhileTyping = true; disableWhileTyping = true;
}; };
};
useGlamor = true; useGlamor = true;

View file

@ -1,42 +1,15 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{
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 = imports =
[ [
./syncthing.nix
./gsconnect.nix
./common-hardware.nix ./common-hardware.nix
./common-services.nix ./common-services.nix
./security.nix ./security.nix
./wireguard.nix ./syncthing.nix
]; ];
security.allowUserNamespaces = true; 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.enableDebugInfo = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget git gnupg curl tmux htop atop home-manager pciutils powertop fd dnsutils usbutils wget git gnupg curl tmux htop atop home-manager pciutils powertop fd dnsutils usbutils

100
nixos/flake.lock Normal file
View file

@ -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
}

64
nixos/flake.nix Normal file
View file

@ -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; };
};
};
};
}

View file

@ -12,6 +12,8 @@
qt = { qt = {
enable = true; enable = true;
platformTheme = "gnome"; platformTheme = "gnome";
style.name = "adwaita-dark";
style.package = pkgs.adwaita-qt;
}; };
imports = [ imports = [
@ -32,30 +34,30 @@
gsettings-desktop-schemas gsettings-desktop-schemas
keybase-gui keybase-gui
libreoffice libreoffice
mindforgerPatched.mindforger mindforger
modem-manager-gui modem-manager-gui
passff-host passff-host
pdfarranger pdfarranger
python38Packages.binwalk-full python38Packages.binwalk-full
qemu aqemu qemu
shotwell shotwell
simple-scan simple-scan
slack slack
spotify spotify
unstable.ssb-patchwork ssb-patchwork
unstable.discord discord
unstable.electrum electrum
unstable.element-desktop element-desktop
unstable.freecad freecad
unstable.ghidra-bin ghidra-bin
unstable.hopper hopper
unstable.inkscape inkscape
unstable.nyxt nyxt
unstable.openscad openscad
unstable.qcad qcad
unstable.signal-desktop signal-desktop
unstable.torbrowser torbrowser
unstable.wireshark wireshark
vlc vlc
wineFull wineFull
xclip xclip

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
home.packages = with pkgs.unstable; [ home.packages = with pkgs; [
(vscode-with-extensions.override { (vscode-with-extensions.override {
vscodeExtensions = with vscode-extensions; [ vscodeExtensions = with vscode-extensions; [
bbenoist.Nix bbenoist.Nix

View file

@ -35,9 +35,9 @@
rustup rustup
terraform terraform
tmux tmux
unstable.exercism exercism
unstable.genpass genpass
unstable.topgrade topgrade
unzip unzip
veracrypt veracrypt
wget wget

View file

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {} }: { pkgs }:
let let
myEmacs = pkgs.emacs-nox; myEmacs = pkgs.emacs-nox;
emacsWithPackages = (pkgs.emacsPackagesGen myEmacs).emacsWithPackages; emacsWithPackages = (pkgs.emacsPackagesGen myEmacs).emacsWithPackages;

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
home.file.".vimrc".source = /home/cyryl/dev/dotfiles/.vimrc.nixos; home.file.".vimrc".source = ../../../.vimrc.nixos;
programs.neovim = { programs.neovim = {
enable = true; enable = true;
viAlias = true; viAlias = true;

View file

@ -20,7 +20,6 @@
dbus = { dbus = {
packages = with pkgs; [ gnome2.GConf gnome3.dconf ]; packages = with pkgs; [ gnome2.GConf gnome3.dconf ];
socketActivated = true;
}; };
fractalart.enable = true; fractalart.enable = true;

View file

@ -32,7 +32,7 @@ in
position = "top"; position = "top";
colors.background = "#002b36"; colors.background = "#002b36";
fonts = [ "Fira Code Nerd Font 10" ]; 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"; trayOutput = "primary";
} }
]; ];

View file

@ -5,6 +5,5 @@
user = "cyryl"; user = "cyryl";
dataDir = "/home/cyryl/.syncthing"; dataDir = "/home/cyryl/.syncthing";
openDefaultPorts = true; openDefaultPorts = true;
package = pkgs.unstable.syncthing;
}; };
} }