This commit is contained in:
Michael Thomas 2022-06-21 22:34:18 -04:00
commit 66f71f9688
11 changed files with 109 additions and 64 deletions

54
flake.lock generated
View File

@ -61,11 +61,11 @@
]
},
"locked": {
"lastModified": 1654591300,
"narHash": "sha256-53a6fimkMTc1DqnzdEWFHbaOT1xlMgeOJaD2/IGO22k=",
"lastModified": 1655723343,
"narHash": "sha256-J95qdF7m30dEioJZE8fsmaOusqIp57SMJyG4U/ZKfJk=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "4de4d6acb7fc868677380496b62a5e51890fc331",
"rev": "e178b6df72d79324a8446cd175d9d091223585ae",
"type": "github"
},
"original": {
@ -76,27 +76,26 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1654442937,
"narHash": "sha256-dYJ79gt85hwIbPlX52eAwnkYzMexLyNRmRcTRpMn+Gw=",
"owner": "nixos",
"lastModified": 1655456688,
"narHash": "sha256-j2trI5gv2fnHdfUQFBy957avCPxxzCqE8R+TOYHPSRE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ca2629644d4a5098004e20cb9ca179345f2acd8e",
"rev": "d17a56d90ecbd1b8fc908d49598fb854ef188461",
"type": "github"
},
"original": {
"owner": "nixos",
"id": "nixpkgs",
"ref": "nixos-22.05",
"repo": "nixpkgs",
"type": "github"
"type": "indirect"
}
},
"nur": {
"locked": {
"lastModified": 1654593979,
"narHash": "sha256-iDvyU5vs7IoPBpxwhNAI/J3llDsmtzH1xYqvCGvzCww=",
"lastModified": 1655739339,
"narHash": "sha256-ykV5RQgltIJl5EXbGdndf6IcncfCP8RnyH57TyKFazE=",
"owner": "nix-community",
"repo": "NUR",
"rev": "47044837d4ebcaa37e699d92d893a32d4e301852",
"rev": "0cadcae82c23de1ec4b4a5bbe1e2f75e59752317",
"type": "github"
},
"original": {
@ -111,22 +110,37 @@
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs",
"nur": "nur",
"unstable": "unstable"
"unstable": "unstable",
"utils": "utils"
}
},
"unstable": {
"locked": {
"lastModified": 1654230545,
"narHash": "sha256-8Vlwf0x8ow6pPOK2a04bT+pxIeRnM1+O0Xv9/CuDzRs=",
"owner": "nixos",
"lastModified": 1655567057,
"narHash": "sha256-Cc5hQSMsTzOHmZnYm8OSJ5RNUp22bd5NADWLHorULWQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "236cc2971ac72acd90f0ae3a797f9f83098b17ec",
"rev": "e0a42267f73ea52adc061a64650fddc59906fc99",
"type": "github"
},
"original": {
"owner": "nixos",
"id": "nixpkgs",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "indirect"
}
},
"utils": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}

View File

@ -2,10 +2,12 @@
description = "Michael Thomas's NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "nixpkgs/nixos-22.05";
unstable.url = "nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
utils.url = "github:numtide/flake-utils";
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs = {
@ -21,35 +23,38 @@
};
};
outputs = { self, nixpkgs, unstable, nur, nixos-wsl, home-manager, ... }@inputs: {
outputs = { self, nixpkgs, unstable, nur, utils, nixos-wsl, home-manager, ... }@inputs: {
# This repo's overlay plus any other overlays you use
# If you want to use packages from flakes that are not nixpkgs (such as NUR), add their overlays here.
overlays = import ./overlays // {
# Third party overlays here
# This repo's overlay plus any other overlays you use
# If you want to use packages from flakes that are not nixpkgs (such as NUR), add their overlays here.\
overlays = {
default = import ./overlays inputs;
};
overlaysModule = {
nixpkgs.overlays = nixpkgs.lib.attrValues self.overlays;
nixpkgs.overlays = [ self.overlays.default ];
};
nixosConfigurations = {
loft = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./modules/common.nix
./modules/containers.nix
system = utils.lib.system.x86_64-linux;
modules = [
self.overlaysModule
home-manager.nixosModules.home-manager
./modules/common.nix
./modules/containers.nix
./machines/loft/configuration.nix
];
specialArgs = { inherit inputs; };
};
./machines/loft/configuration.nix
];
specialArgs = { inherit inputs; };
};
kitchen = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
system = utils.lib.system.x86_64-linux;
modules = [
self.overlaysModule
home-manager.nixosModules.home-manager
./modules/common.nix
./modules/containers.nix
@ -58,8 +63,9 @@
specialArgs = { inherit inputs; };
};
# WSL environment
work = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
system = utils.lib.system.x86_64-linux;
modules = [
self.overlaysModule
{
@ -86,12 +92,6 @@
stateVersion = "21.05";
configuration = { config, pkgs, ... }:
{
nixpkgs.config = {
allowUnfree = true;
};
nixpkgs.overlays = nixpkgs.lib.attrValues self.overlays;
programs.home-manager.enable = true;
imports = [
@ -107,12 +107,6 @@
stateVersion = "21.05";
configuration = { config, pkgs, ... }:
{
nixpkgs.config = {
allowUnfree = true;
};
nixpkgs.overlays = nixpkgs.lib.attrValues self.overlays;
programs.home-manager.enable = true;
imports = [
@ -121,5 +115,15 @@
};
};
};
};
# // utils.lib.eachSystem [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ] (system: {
# nixpkgs = import nixpkgs {
# inherit system;
# overlays = [
# self.overlays.default
# ];
# config.allowUnfree = true;
# };
# });
}

View File

@ -31,6 +31,11 @@
pkgs.gnome.gnome-tweaks
];
home-manager = {
users.michael = import ../../user/environments/nixos/home.nix pkgs;
useGlobalPkgs = true;
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;

View File

@ -29,6 +29,11 @@
networking.hostName = "loft"; # Define your hostname.
networking.firewall.enable = false;
home-manager = {
users.michael = import ../../user/environments/nixos/home.nix pkgs;
useGlobalPkgs = true;
};
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
@ -65,7 +70,7 @@
environment.systemPackages = with pkgs; [
wget micro
google-chrome
pkgs.gnome3.gnome-tweaks
gnome3.gnome-tweaks
gnomeExtensions.gsconnect
];

View File

@ -1,6 +1,9 @@
{
imports = [
(fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master")
(fetchTarball {
url = "https://github.com/msteen/nixos-vscode-server/tarball/d2343b5eb47b811856085f3eff4d899a32b2c136";
sha256 = "sha256:1cszfjwshj6imkwip270ln4l1j328aw2zh9vm26wv3asnqlhdrak";
})
];
services.vscode-server.enable = true;

View File

@ -1,3 +1,15 @@
{
paperwm = import ./paperwm;
}
{ nixpkgs, unstable, ... }:
let
inherit (nixpkgs.lib) composeManyExtensions;
inherit (builtins) attrNames readDir;
overlay-unstable = self: super: {
unstable = unstable.legacyPackages.x86_64-linux;
};
localOverlays = map
(f: import (./default + "/${f}"))
(attrNames (readDir ./default));
in
composeManyExtensions (localOverlays ++ [
overlay-unstable
])

View File

@ -1,12 +1,12 @@
self: super: {
gnomeExtensions = super.gnomeExtensions // {
paperwm = super.gnomeExtensions.paperwm.overrideDerivation (old: {
version = "41.0";
version = "42.0";
src = super.fetchFromGitHub {
owner = "PaperWM-community";
owner = "ccope";
repo = "PaperWM";
rev = "b66aaf13e8f4cdf0e2f9078fb3e75703535b822c";
sha256 = "sha256-6AUUu63oWxRw9Wpxe0f7xvt7iilvQfhpAB8SYG4yP8Q=";
rev = "1e9004dc2cd1416cde86585056053853a8b86817";
sha256 = "sha256-ejyWIa4HX1lEIHc9qax8jgrgi992W6rkTK60FGzKI/E=";
};
});
};

View File

@ -10,5 +10,7 @@
azure-cli
kubectl
kubernetes-helm
# Nix
rnix-lsp
];
}

View File

@ -1,4 +1,4 @@
{ config, pkgs, libs, ... }:
{ config, pkgs, lib, ... }:
{
home.packages = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" ]; })
@ -6,5 +6,5 @@
inter
];
fonts.fontconfig.enable = true;
# fonts.fontconfig.enable = true;
}

View File

@ -1,4 +1,4 @@
{ config, pkgs, libs, ... }:
{ config, pkgs, lib, ... }:
{
home.packages = with pkgs; [
git-lfs
@ -10,7 +10,7 @@
userEmail = "michaelhthomas@outlook.com";
userName = "Michael Thomas";
extraConfig = {
credential.helper = "store";
credential.helper = lib.mkDefault "store";
pull.rebase = "false";
init.defaultBranch = "main";
};

View File

@ -4,7 +4,7 @@
gnomeExtensions.caffeine
gnomeExtensions.paperwm
gnomeExtensions.cleaner-overview
gnomeExtensions.vertical-overview
unstable.gnomeExtensions.vertical-overview
gnomeExtensions.disable-workspace-switch-animation-for-gnome-40
];