made config work on nixos
This commit is contained in:
parent
b9e231d72f
commit
800f63b000
7 changed files with 605 additions and 690 deletions
89
flake.lock
89
flake.lock
|
@ -50,22 +50,6 @@
|
|||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1746162366,
|
||||
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
|
@ -81,7 +65,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_3": {
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
|
@ -427,7 +411,7 @@
|
|||
"nvf",
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741118843,
|
||||
|
@ -483,29 +467,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-cosmic": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747826251,
|
||||
"narHash": "sha256-Fe4AXmnnAKnh/wIe1ao4Pv/8m6WGA1ujwp6VApgos30=",
|
||||
"owner": "lilyinstarlight",
|
||||
"repo": "nixos-cosmic",
|
||||
"rev": "9a67b4a289cd8994080398d40b57cfde8e8cfb0a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lilyinstarlight",
|
||||
"repo": "nixos-cosmic",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1736012469,
|
||||
|
@ -537,22 +498,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1747676747,
|
||||
"narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "72841a4a8761d1aed92ef6169a636872c986c76d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1747744144,
|
||||
|
@ -647,36 +592,14 @@
|
|||
"nh": "nh",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nix-options-search": "nix-options-search",
|
||||
"nixos-cosmic": "nixos-cosmic",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nvf": "nvf",
|
||||
"rust-overlay": "rust-overlay_3",
|
||||
"rust-overlay": "rust-overlay_2",
|
||||
"zig": "zig",
|
||||
"zls": "zls"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixos-cosmic",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747795013,
|
||||
"narHash": "sha256-c7i0xJ+xFhgjO9SWHYu5dF/7lq63RPDvwKAdjc6VCE4=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "6b1cf12374361859242a562e1933a7930649131a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rust-overlay_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nvf",
|
||||
|
@ -698,7 +621,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rust-overlay_3": {
|
||||
"rust-overlay_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
|
@ -924,7 +847,7 @@
|
|||
},
|
||||
"zig": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils_5",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
|
@ -944,7 +867,7 @@
|
|||
},
|
||||
"zig-overlay": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_7",
|
||||
"nixpkgs": [
|
||||
"zls",
|
||||
|
|
26
flake.nix
26
flake.nix
|
@ -29,9 +29,6 @@
|
|||
moonlight.url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
|
||||
moonlight.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
|
||||
nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nh.url = "github:viperML/nh";
|
||||
nh.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
|
@ -40,16 +37,13 @@
|
|||
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
outputs =
|
||||
{
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
lix-module,
|
||||
nixos-cosmic,
|
||||
darwin,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
} @ inputs: let
|
||||
lib = nixpkgs.lib;
|
||||
# TODO: apply these overlays sooner and remove uses of legacyPackages elsewhere.
|
||||
overlays = [
|
||||
|
@ -75,8 +69,7 @@
|
|||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems =
|
||||
f:
|
||||
forAllSystems = f:
|
||||
builtins.listToAttrs (
|
||||
builtins.map (system: {
|
||||
name = system;
|
||||
|
@ -87,7 +80,8 @@
|
|||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
}
|
||||
);
|
||||
}) systems
|
||||
})
|
||||
systems
|
||||
);
|
||||
|
||||
mkSystem = import ./lib/mkSystem.nix {
|
||||
|
@ -107,8 +101,7 @@
|
|||
inputs
|
||||
;
|
||||
};
|
||||
in
|
||||
rec {
|
||||
in rec {
|
||||
inherit self;
|
||||
# "nix fmt"
|
||||
formatter = forAllSystems (inputs: inputs.pkgs.nixfmt-tree);
|
||||
|
@ -130,7 +123,6 @@
|
|||
host = "desktop";
|
||||
system = "x86_64-linux";
|
||||
extraModules = [
|
||||
nixos-cosmic.nixosModules.default
|
||||
];
|
||||
};
|
||||
# natalie's laptop
|
||||
|
@ -156,11 +148,9 @@
|
|||
# generate checks for "nix flake check --all-systems --no-build"
|
||||
checks.aarch64-darwin = builtins.listToAttrs (
|
||||
builtins.map (
|
||||
name:
|
||||
let
|
||||
name: let
|
||||
d = darwinConfigurations.${name}.system;
|
||||
in
|
||||
{
|
||||
in {
|
||||
name = "darwinConfiguration-" + d.name;
|
||||
value = d;
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
host,
|
||||
mainHomeImports,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
cfg = config.programs;
|
||||
in
|
||||
{
|
||||
imports = mainHomeImports ++ [
|
||||
in {
|
||||
imports =
|
||||
mainHomeImports
|
||||
++ [
|
||||
./macos/sketchybar.nix
|
||||
];
|
||||
programs = {
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
host,
|
||||
...
|
||||
}: {
|
||||
home.file =
|
||||
{}
|
||||
// lib.optionalAttrs host.darwin (
|
||||
lib.attrsets.mapAttrs (file: value: (
|
||||
lib.attrsets.overrideExisting value {enable = config.shared.darwin.tiling.enable;}
|
||||
)) {
|
||||
|
@ -531,5 +534,6 @@
|
|||
esac
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
services = {
|
||||
avahi = {
|
||||
enable = true;
|
||||
|
@ -24,6 +23,7 @@
|
|||
|
||||
desktopManager.cosmic.enable = true;
|
||||
displayManager.cosmic-greeter.enable = true;
|
||||
desktopManager.cosmic.xwayland.enable = true;
|
||||
|
||||
# Auto mount devices
|
||||
udisks2 = {
|
||||
|
|
|
@ -24,13 +24,11 @@
|
|||
"https://cache.nixos.org/?priority=10"
|
||||
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cosmic.cachix.org/"
|
||||
# For haskell
|
||||
"https://cache.iog.io"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
|
||||
# For haskell
|
||||
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
||||
];
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
user,
|
||||
host,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
@ -84,8 +83,6 @@
|
|||
hybrid-sleep.enable = false;
|
||||
};
|
||||
|
||||
packages = [ pkgs.observatory ];
|
||||
|
||||
services.monitord.wantedBy = ["multi-user.target"];
|
||||
};
|
||||
|
||||
|
@ -148,7 +145,10 @@
|
|||
];
|
||||
};
|
||||
environment = {
|
||||
sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1;
|
||||
sessionVariables = {
|
||||
COSMIC_DATA_CONTROL_ENABLED = 1;
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
variables.EDITOR = "nvim";
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
|
|
Loading…
Reference in a new issue