nix: use unstable and add home-manager
This commit is contained in:
@ -2,14 +2,22 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ inputs, config, pkgs, ... }:
|
||||||
|
|
||||||
let python-packages = ps: with ps; [ ];
|
let python-packages = ps: with ps; [ ];
|
||||||
in rec {
|
in rec {
|
||||||
imports = [ # Include the results of the hardware scan.
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users.julian = import ./home.nix;
|
||||||
|
};
|
||||||
|
|
||||||
# Bootloader
|
# Bootloader
|
||||||
# Use this for simple nix boot menu, if no dual boot required
|
# Use this for simple nix boot menu, if no dual boot required
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
@ -84,7 +92,7 @@ in rec {
|
|||||||
services.xserver.windowManager.i3.extraPackages = with pkgs; [
|
services.xserver.windowManager.i3.extraPackages = with pkgs; [
|
||||||
rofi
|
rofi
|
||||||
i3lock
|
i3lock
|
||||||
unstable.i3status-rust
|
i3status-rust
|
||||||
nitrogen
|
nitrogen
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -140,7 +148,7 @@ in rec {
|
|||||||
makemkv
|
makemkv
|
||||||
audacity
|
audacity
|
||||||
gnome.cheese
|
gnome.cheese
|
||||||
unstable.zoom-us
|
zoom-us
|
||||||
qutebrowser
|
qutebrowser
|
||||||
|
|
||||||
unetbootin
|
unetbootin
|
||||||
@ -152,6 +160,8 @@ in rec {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
users.groups.julian = { gid = 1000; };
|
users.groups.julian = { gid = 1000; };
|
||||||
# users.groups.wolfi = { gid = 1001; };
|
# users.groups.wolfi = { gid = 1001; };
|
||||||
|
|
||||||
@ -166,9 +176,7 @@ in rec {
|
|||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
# nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.nvidia.acceptLicense = true;
|
||||||
# unstable = import <nixos-unstable> { config = config.nixpkgs.config; };
|
|
||||||
# };
|
|
||||||
|
|
||||||
environment.etc."manual-links/xfce4-notifyd".source =
|
environment.etc."manual-links/xfce4-notifyd".source =
|
||||||
"${pkgs.xfce.xfce4-notifyd}/lib/xfce4/notifyd/xfce4-notifyd";
|
"${pkgs.xfce.xfce4-notifyd}/lib/xfce4/notifyd/xfce4-notifyd";
|
||||||
@ -257,7 +265,6 @@ in rec {
|
|||||||
python3
|
python3
|
||||||
black
|
black
|
||||||
libnotify
|
libnotify
|
||||||
# unstable.tor-browser-bundle-bin
|
|
||||||
libclang
|
libclang
|
||||||
libreoffice
|
libreoffice
|
||||||
killall
|
killall
|
||||||
@ -326,7 +333,7 @@ in rec {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fonts = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||||
font-awesome
|
font-awesome
|
||||||
dejavu_fonts
|
dejavu_fonts
|
||||||
|
42
nix/flake.lock
generated
42
nix/flake.lock
generated
@ -16,6 +16,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1695224363,
|
||||||
|
"narHash": "sha256-+hfjJLUMck5G92RVFDZA7LWkR3kOxs5zQ7RPW9t3eM8=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "408ba13188ff9ce309fa2bdd2f81287d79773b00",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-matlab": {
|
"nix-matlab": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
@ -49,7 +69,7 @@
|
|||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694959747,
|
"lastModified": 1694959747,
|
||||||
"narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=",
|
"narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=",
|
||||||
@ -59,31 +79,17 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1688392541,
|
|
||||||
"narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=",
|
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"ref": "nixos-22.11",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
"nix-matlab": "nix-matlab",
|
"nix-matlab": "nix-matlab",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2"
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,29 +1,24 @@
|
|||||||
{
|
{
|
||||||
inputs.nixpkgs.url = "nixpkgs/nixos-22.11";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
inputs.nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
inputs.home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
inputs.nix-matlab.url = "gitlab:doronbehar/nix-matlab";
|
inputs.nix-matlab.url = "gitlab:doronbehar/nix-matlab";
|
||||||
# inputs.home-manager.url = "github:nix-community/home-manager";
|
# inputs.home-manager.url = "github:nix-community/home-manager";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, nix-matlab, ... }@attrs:
|
outputs = { self, nixpkgs, home-manager, nix-matlab, ... }@inputs:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
overlay-unstable = final: prev: {
|
|
||||||
# unstable = nixpkgs-unstable.legacyPackages.${prev.system};
|
|
||||||
# use this variant if unfree packages are needed:
|
|
||||||
unstable = import nixpkgs-unstable {
|
|
||||||
inherit system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
# inherit system;
|
||||||
specialArgs = attrs;
|
specialArgs = { inherit inputs system; };
|
||||||
modules = [
|
modules = [
|
||||||
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
||||||
({ config, pkgs, ... }: {
|
({ config, pkgs, ... }: {
|
||||||
nixpkgs.overlays = [ overlay-unstable nix-matlab.overlay ];
|
nixpkgs.overlays = [ nix-matlab.overlay ];
|
||||||
})
|
})
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
];
|
];
|
||||||
|
26
nix/home.nix
Normal file
26
nix/home.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Home Manager needs a bit of information about you and the
|
||||||
|
# paths it should manage.
|
||||||
|
home.username = "julian";
|
||||||
|
home.homeDirectory = "/home/julian";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your
|
||||||
|
# configuration is compatible with. This helps avoid breakage
|
||||||
|
# when a new Home Manager release introduces backwards
|
||||||
|
# incompatible changes.
|
||||||
|
#
|
||||||
|
# You can update Home Manager without changing this value. See
|
||||||
|
# the Home Manager release notes for a list of state version
|
||||||
|
# changes in each release.
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
# pkgs.cowsay
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user